Include file based on if condition

I was wondering if its possible to include a file (or display a file) based on a condition in JSPs.. for example:
----------Desired functionality----------------
<%
if (myconnection == null)
// include/display login page
else
// display the main page
%>
I tried this.. Not working based on my condition... I get both the files displayed in one page..
----my code----
<%
if (DBcon.con == null)
out.println("No connection");
%>
<%@ include file="Login.jsp"%>
<%
if (DBcon != null)
out.println("connected");
%>
<%@ include file="Main.jsp" %>
-NJU

If you don't put a { after the if statement, then it's only going to execute the first line after it.  This is always the case, in JSP or otherwise.  Otherwise how would it know when to stop? 
<%
if (DBcon.con == null) {
   out.println("No connection");
%>
<%@ include file="Login.jsp"%>
<%
if (DBcon != null) {
   out.println("connected");
%>
<%@ include file="Main.jsp" %>
<%
%>

Similar Messages

  • Single iDOc to multiple files based on a condition

    Hi Friends
    need your help in one scenario which is something like this:
    there is one iDOC as the sender and this iDOC has to be mapped to files based on a condition means let us say if there is a particular field "R" in iDOC(WPDBBYY01) than it should go and create the file "ABC"
    and if the particlar field is P or G or M than it should create another 2 files named "XYZ" and "WUV" .
    Please guide me how can i put this condition ?
    Any help would be rewarded with points
    Thanks

    Have a single receiver and 2 inbound interfaces.
    So you will have 2 different mappings. In the first mappng source is IDOC and the target is file ABC.
    In the second mappping the source is IDOC and the target is 2 files XYZ and WUV.
    In Interface determination, add both the inbound interfaces and put the condition for each interface.
    Regards,
    Jaishankar

  • Writing in to multiple sheets in Excel file based on input condition

    Hi All Experts,
    i need to write in to multiple sheets in one Excel file output.
    is it possible with UTL_FILE ? or Any options there in Oracle to do this ?
    Can anyone please suggest me on this.
    Thanks,
    Ravi

    I have seen all of them they are all just simple SQL pulls from database in to Excel file..No, definitely not
    My requirement is i need to write in to one single Excel file with MULTIPLE sheets based on input condition-> [xml_spreadsheet|http://matzberger.de/oracle/spreadsheet-en.html]
    so for each parameter need to write into separate sheet in one Excel File..-> [xml_spreadsheet|http://matzberger.de/oracle/spreadsheet-en.html]
    I hope you understand my problem atleast now...I think I understood your problem at first sight.
    If you simply want to throw 2 queries at the package and get back an Excel file with 2 worksheets you just have to look at the first page of the [tutorial |http://matzberger.de/oracle/spreadsheet-tut-en.html]. Half way down the page there's an example.
    If you want a special formatting then you can do this too, it's described step by step.
    Regards
    Marcus

  • IDOC-File - records in Idoc to file based on some condition

    Hello experts,
    I have a idoc to file scenario. the incoming Idoc can have multiple records in it and i have to map these records to a csv file. Now the problem is not all records has to be mapped to the file. Based on the value of a perticular file (which is not root), i need to decide if the entire record has to be processed or not. Like the idoc structure is say:
    IDOC
       E1WPA01            0....9999
          E1WPA04         0...99
              KONDART     0..1
    Now for all valid E1WPA01 where the value of KONDART equals to some spacified value (known) , there has to be one record in the target csv file.
    How can this be done at the root level?
    One way of doing is we give empty values in the target file where the condition of KONDART is not fulfilled. Say if there are 10 records of E1WPA01 and only 4 satisfies the condition, we will ahve 10 records in the output file but only 4 records will have value and the rest 6 will be blank like (,,,,,,,). But I dont want this. I want only 4 records in the output file.
    I tried mapping like this:
    E1WPA01----
    >Advanced -
    > Root
    E1WPA04-KONDART---->UDF
    The problem i am facing here is if 4 records fulfill the condition, the first 4 are taken and the revelent 4.
    Please help.
    Regards,
    Yash

    Hi Chirag,
    I wrote the following code in UDF:
    for(i=0;i<a.length;i++)
    if(a{i}.equals("Specified Values"))
    result.addValue("a{i}");
    else
    result.addValue(ResuktList.SUPPRESS);
    And its working partially. I mean the queue of the UDF looks like
    1. AAAA                      SUPPRESS
    2. <Specified value>     <Specified value>     
    3. AAA                        SUPPRESS
    4. AAA                        SUPPRESS
    5. AAA                        SUPPRESS
    6. AAA                        SUPPRESS
    7. <Specified value>     <Specified value>
    8. AAA                        SUPPRESS
    9. AAA                        SUPPRESS
    and it creates 2 ROOT nodes. But the root nodes are created for line 2 and line 8 insteed of 7.
    What can be problem??
    Yash

  • IDoc to file. Grouping and generation of files based on condition

    Hi All,
    I am working on a scenario, Idoc to File. I need to create number of files based on  occurrence of a field(vendor) in the idoc. Also the condition is to group by the field(vendor) and create as many files as the number of groups formed.
    For e.g.: In an Idoc if there are ten items present and 3 vendors who are supplying it. <b>The vendor and items can repeat in any order within the same idoc. </b>
    I need to group the items by the vendors and create a file separately for each vendor.  Like :   
    Item         Vendor
    Item1       V1
    Item2         V1
    Item3         V2
    Item4       V2
    Item5        V2
    Item6         V2
    Item1      V2
    Item2         V2
    Item3        V3
    Item6        V3
    What we have to achieve is, to group by the vendors irrespective of the order of the items or number of reoccurrence of the items.  As you see, the Item1 is supplied by both V1 and V2. I need to generate 3 files as follows:
    V1.xml with Item1 and Item2 details.
    V2.xml with Item3, Item4, Item5, Item6, Item1 Item2 details.
    V3.xml with Item3 and Item6 details.
    Can someone please help me with achieving this without using BPM?

    Hi Shashi,
    For this scenario you have to use multimaping without BPM using this blog.
    /people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible
    And while doing your message mapping you have to use <b>removeContext</b> & <b>SplitByValue</b> (double clike the on splitbyvalue and select <b>value changed</b>) function. This function you have to use with the node in which your Vendor is coming. Example:
    if required to sort the vendor, then first sort the vendor in the below mapping.
    Vendor (NODE) -
    > removeContext -
    > SplitByValue (value Changed) -
    > IDOC.
    By doing this your vendor will be grouped and you will get new IDOC on change of  Vendor.
    Regards,
    Sarvesh

  • UIX: Problem with the include file

    Hello,
    I am totally lost here. I am trying to follow the example of including a code snippet in an uix file from the user guide at: http://download-west.oracle.com/otn_hosted_doc/jdeveloper/904preview/uixhelp/uixdevguide/includes.html
    The parent file that I have is as follows ( test.uix )
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <page xmlns="http://xmlns.oracle.com/uix/controller"
    xmlns:ui="http://xmlns.oracle.com/uix/ui"
    xmlns:data="http://xmlns.oracle.com/uix/ui"
    xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
    xmlns:html="http://www.w3.org/TR/REC-html40" expressionLanguage="el">
    <content>
    <dataScope xmlns="http://xmlns.oracle.com/uix/ui">
    <provider>
    <!-- Add DataProviders (<data> elements) here -->
    </provider>
    <contents>
    <document>
    <metaContainer>
    <!-- Set the page title -->
    <head title="test"/>
    </metaContainer>
    <contents>
    <body>
    <contents>
    <form name="form0">
    <contents>
    <pageLayout title="test">
    <corporateBranding>
    <image source="" destination="http://oracle.com"/>
    </corporateBranding>
    <productBranding>
    <image source="" destination="http://oracle.com"/>
    </productBranding>
    <tabs>
    <tabBar>
    <contents>
    <link text="tab1" destination=""/>
    </contents>
    </tabBar>
    </tabs>
    <pageHeader>
    <globalHeader>
    <contents>
    <link text="page header" destination=""/>
    </contents>
    </globalHeader>
    </pageHeader>
    <globalButtons>
    <include ctrl:node="testinclude"/>
    </globalButtons>
    <copyright>
    <styledText text="Copyright Oracle 2006"
    styleClass="OraCopyright"/>
    </copyright>
    <privacy>
    <link text="Privacy Statement" destination=""/>
    </privacy>
    <contents/>
    <pageButtons/>
    <start/>
    <end/>
    <about/>
    </pageLayout>
    </contents>
    </form>
    </contents>
    </body>
    </contents>
    </document>
    </contents>
    </dataScope>
    </content>
    <handlers>
    <!-- Add EventHandlers (<event> elements) here -->
    </handlers>
    </page>
    The include file that I have is as follows ( testinclude.uix )
    <?xml version="1.0" encoding="windows-1252"?>
    <globalButtonBar xmlns="http://xmlns.oracle.com/uix/ui">
    <contents>
    <globalButton text="first button"/>
    <globalButton text="second button"/>
    </contents>
    </globalButtonBar>
    When I try to compile the test.uix ( which is my parent file ) I get the following error message:
    Warning(45,59): test.uix: Parsing error, line 45, column 59: attributes in the namespace:http://xmlns.oracle.com/uix/ui are only allowed with the "data" expressionLanguage
    How can I resolve this ?
    This is what I am trying to do - and maybe there is a better way:
    I have an application with two tabs, each tab has two (or more) subTabs/PageHeaders. Each pageHeader has a sideNav with atleast three elements. Each of the element goes to a differnt page. So far I have managed to create a template for the tabs and the pageHeaders. I do the switch for the pageheaders using the switcher element with the tabSelectedIndex as my "case". However I could not figure out a way to do the switcher based on the tab and the page header selected ( two conditions ), hence I thought of writing an include file with the sideNav and including it in the code corresponding to the page headers ( the code that I have posted is a very simple globalButton include - this is the most simplest thing that I could think of to experiment )
    Thanks !

    Perhaps if you try like this
    <sideBar rendered="${uix.rootAttr.indiceTopo != -1}" width="220">
    <contents>
    <include rendered="${uix.rootAttr.indiceTopo == 0}"
    node="${ctrl:parsePage(uix,'/MeuAmbiente/menuMeuAmbiente')}"/>
    <include rendered="${uix.rootAttr.indiceTopo == 1}"
    node="${ctrl:parsePage(uix,'/Declaracao/menuDeclaracao')}"/>
    note , this include tag is inside one mainTemplate.uit and see the rendered atribute is passed by parameter to this template.
    As a metter of fact menuMeuAmbiente.uix is only the stiledlist tag and it's styledItens, i have one menu<Module>.uix for each superior tab
    I hope this helps;

  • PHP - include content based on page variable

    Hello,
    I have a slight /and probably not that hard) problem.
    I have index page which has <div> content </div>
    area that shows included files like articles etc. Nothing uncommon
    in that nope. At the side there is a submenu <div> sidebar
    </div> showing various things depending if you're logged in
    etc. The issue is how to show the sidebars areas based on the
    indexes current shown include at the content area.
    For example i do not wish to show the news tab at the sidebar
    with any other pages than the default include "welcome.php" at the
    index.php.
    So what manner variable should i set to drop of unwanted
    content on some pages?
    i have currently tried out making variable like
    $include_in_sidebar which is set true on the content pages where i
    wish to have "the" option shown at the sidebar, and then inside if
    statement placed in the sidebar code around the specific part i
    wish to have shown. That does not do the trick, so something (or
    many things) must be wrong. All sort of help and guidelines
    appreciated,
    Cheers!

    OK... this was actually quite easy. How come i did not figure
    it out before. I just applied Show if region to the part i wished
    to make visible only on some pages and made the condition to look
    for page include namevariables which had to match the condition...
    like --- if (@$_GET['page'] == 'xxx') {}..
    Feeling a bit shamed now, as i roamed through various places
    where to learn this trivial trick. The original question was
    probably too easy so no one bothered answering :D... need to study
    more them PHP manuals...

  • Split records into two files based on lookup table

    Hi,
    I'm new to ODI and want to know on how I could split records into two files based on a value in one of the columns in the table.
    Example:
    Table:
    my columns are
    account name country
    100 USA
    200 USA
    300 UK
    200 AUS
    So from the 4 records I maintain list of countries in a lookup file and split the records into 2 different files based on values in the file...
    Say I have records AUS and UK in my lookup file...
    So my ODI routine should send all records with country into file1 and rest to file2.
    So from above records
    File1:
    300 UK
    200 AUS
    File2:
    100 USA
    200 USA
    Can you help me how to achieve this?
    Thanks,
    Sam

    1. where and how do i create filter to restrict countries? In source or target? Should I include some kind of filter operator in interface.
    You need to have the Filter on the Source side so that we can filter records accordingly the capture the same in the File. To have a Filter . In the source data store click and drag the column outside the data store and you will have Cone shaped icon and now you can click and type the Filter.
    Please look into this link for ODI Documentation -http://www.oracle.com/technetwork/middleware/data-integrator/documentation/index.html
    Also look into this Getting started guide - http://download.oracle.com/docs/cd/E15985_01/doc.10136/getstart/GSETL.pdf . You can find information as how to create Filter in this guide.
    2. If I have include multipe countries like (USA,CANADA,UK) to go to one file and rest to another file; Can I use some kind of lookup file...? Instead of modifying filter inside interface...Can i Update entries in the file?
    there are two ways of handling your situation.
    Solution 1.
    1. Create Variable Country_Variable
    2. Create a Filter in the Source datastore in the First Interface ( SOURCE.COLUMN = #Country_Variable)
    3. Create a new Package Country File Unload
    4. Call the Variable in Country_Variable in Set Mode and provide the Country (USA )
    5. Next call the First Interface
    6. Next call the Second Interface where the Filter condition will be ( SOURCE.COLUMN ! = #Country_Variable )
    7. Now run the package .
    Solution 2.
    If you need a solution to handle through Filer.
    1. Use this Method (http://odiexperts.com/how-to-refresh-odi-variables-from-file-%E2%80%93-part-1-%E2%80%93-just-one-value ) to call the File where you wish to create store the country name into the variable Country_Variable
    2. Pretty much the same Create a Filter in the Source datastore in the First Interface ( SOURCE.COLUMN = #Country_Variable)
    3.Create a new Package Country File Unload
    4.Next call the Second Interface where the Filter condition will be ( SOURCE.COLUMN ! = #Country_Variable )
    5. Now run the package .
    Now through this way using File you can control the File.
    Please try and let us know , if you need any other help.

  • 1:N mapping without using BPM , based on segment conditions

    Hi All,
    I have to send 3 different files from source based on some conditions
    1) for the first file to be sent is okay
    2) But for second file and third file i need to check some conditions
    the conditions are
    If E1EDL44 case detail fields exists   i should generate second file and i should not create any third file  (it's one or the other, not both).
    If E1EDL44 case details doesnot exist i should generate third file and not second file...
    So My confusion is how to send either second or third file (any one only)
    If i do mapping  is it sufficient or also should i use condition editor in Receiver Determination...
    Please suggest u r valuable help..
    Thanks and Regards,
    sridhar

    Hi Sridhar,
    Make ur second interface Occurence as Optional 0:1 in ur Interfaec Mapping.
    In ur Multi-mapping (Message Mapping) also make ur  message type corresponding to ur second file as Optional.
    In ur mapping check the condition and if doesnot satisfy dont populate the second message type. Check this option.
    Regards,
    Sudharshan

  • How to activate or deactivate a user-exit based a specific condition

    hi all,
    i want to activate or deactivate(make it trigger) a particular user-exit based in a condition.
    can i do that. if yes please tell me how.
    can we use COMMIT in user-exits or BADI's.
    Thanks & Regards,
    Saroja.

    Hello Saroja
    The solution provided by Rich should be used for testing purposes only in the the reverted sense:
    IF ( syst-uname ne '<specific user>' ).
      RETURN.
    ENDIF.
    " Execute user-exit for specific user
    However, for serious programming you should use a a better strategy. In principle, user-exits are either ON or OFF and, if they are ON, they are ON for <b>all </b>user which is usually not intended.
    The following example shows a (possible) strategy how to execute user-exits based on specific conditions.
    The SAP extension CATS0001 contains the component EXIT_SAPLCATS_001 with the following interface:
    FUNCTION EXIT_SAPLCATS_001.
    *"*"Lokale Schnittstelle:
    *"  IMPORTING
    *"     VALUE(SAP_TCATS) LIKE  TCATS STRUCTURE  TCATS
    *"     VALUE(SAP_PERNR) LIKE  CATSFIELDS-PERNR
    *"     VALUE(SAP_DATELEFT) LIKE  CATSFIELDS-DATELEFT
    *"     VALUE(SAP_DATERIGHT) LIKE  CATSFIELDS-DATERIGHT
    *"     VALUE(SAP_DATEFROM) LIKE  CATSFIELDS-DATEFROM OPTIONAL
    *"     VALUE(SAP_DATETO) LIKE  CATSFIELDS-DATETO OPTIONAL
    *"  TABLES
    *"      SAP_ICATSW STRUCTURE  CATSW
    *"      SAP_ICATSW_FIX STRUCTURE  CATSW OPTIONAL
      INCLUDE ZXCATU01.
    ENDFUNCTION.
    The include ZXCATU01 contains only the following coding:
      CALL FUNCTION 'Z_EXIT_SAPLCATS_001'
        EXPORTING
          sap_tcats            = sap_tcats
          sap_pernr            = sap_pernr
          sap_dateleft         = sap_dateleft
          sap_dateright        = sap_dateright
          SAP_DATEFROM         = SAP_DATEFROM
          SAP_DATETO           = SAP_DATETO
        tables
          sap_icatsw           = sap_icatsw
          SAP_ICATSW_FIX       = SAP_ICATSW_FIX.
    This function module is just a copy of the exit function module in the customer namespace.
    Let us assume that your condition at which the user-exit should be executed is that the employee (SAP_PERNR) belongs to a specific controlling area. Thus, we make another copy of the original exit function module and call this fm within the "general" customer-specific exit function module:
    FUNCTION z_exit_saplcats_001.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(SAP_TCATS) LIKE  TCATS STRUCTURE  TCATS
    *"     VALUE(SAP_PERNR) LIKE  CATSFIELDS-PERNR
    *"     VALUE(SAP_DATELEFT) LIKE  CATSFIELDS-DATELEFT
    *"     VALUE(SAP_DATERIGHT) LIKE  CATSFIELDS-DATERIGHT
    *"     VALUE(SAP_DATEFROM) LIKE  CATSFIELDS-DATEFROM OPTIONAL
    *"     VALUE(SAP_DATETO) LIKE  CATSFIELDS-DATETO OPTIONAL
    *"  TABLES
    *"      SAP_ICATSW STRUCTURE  CATSW
    *"      SAP_ICATSW_FIX STRUCTURE  CATSW OPTIONAL
    " User-Exit specific for employees (SAP_PERNR)
    " belonging to controlling area 1000
      CALL FUNCTION 'Z_EXIT_SAPLCATS_001_1000'
        EXPORTING
          sap_tcats      = sap_tcats
          sap_pernr      = sap_pernr
          sap_dateleft   = sap_dateleft
          sap_dateright  = sap_dateright
          sap_datefrom   = sap_datefrom
          sap_dateto     = sap_dateto
        TABLES
          sap_icatsw     = sap_icatsw
          sap_icatsw_fix = sap_icatsw_fix.
    " User-Exit specific for employees (SAP_PERNR)
    " belonging to controlling area 2000
      CALL FUNCTION 'Z_EXIT_SAPLCATS_001_2000'
        EXPORTING
          sap_tcats      = sap_tcats
          sap_pernr      = sap_pernr
          sap_dateleft   = sap_dateleft
          sap_dateright  = sap_dateright
          sap_datefrom   = sap_datefrom
          sap_dateto     = sap_dateto
        TABLES
          sap_icatsw     = sap_icatsw
          sap_icatsw_fix = sap_icatsw_fix.
    ENDFUNCTION.
    Finally, within the specific exit function module we define the condition when the exit should be executed:
    FUNCTION z_exit_saplcats_001_1000.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(SAP_TCATS) LIKE  TCATS STRUCTURE  TCATS
    *"     VALUE(SAP_PERNR) LIKE  CATSFIELDS-PERNR
    *"     VALUE(SAP_DATELEFT) LIKE  CATSFIELDS-DATELEFT
    *"     VALUE(SAP_DATERIGHT) LIKE  CATSFIELDS-DATERIGHT
    *"     VALUE(SAP_DATEFROM) LIKE  CATSFIELDS-DATEFROM OPTIONAL
    *"     VALUE(SAP_DATETO) LIKE  CATSFIELDS-DATETO OPTIONAL
    *"  TABLES
    *"      SAP_ICATSW STRUCTURE  CATSW
    *"      SAP_ICATSW_FIX STRUCTURE  CATSW OPTIONAL
      IF ( <user BELONGS to CONTROLLING area 1000> ).
        "   execute user-exit
      ELSE.
        RETURN.
      ENDIF.
    ENDFUNCTION.
    The alternative would be to place the entire coding including the conditions in the include ZXCATU01. However, in this case you can test the user exit <b>only in the context of the transaction</b> in which the user-exit is passed.
    Using the strategy I have devised you are able to test the user-exit in general and the specific user-exits <b>independent </b>of the transaction. For example, if you are already working on 6.40 or higher then you could use ABAP Unit Testing for this purpose.
    The same logic can be applied for BAdI where we can have only a single active implementation.
    Finally, I hope to convince that it makes sense to spend some time into a reasonable strategy for implementing user-exits.
    Regards
      Uwe

  • %@ include file= ... does not work properly in Portal

    I am devloping a portlet based on a jsp that uses some <%@include ..> tags. I have
    a problem in that variables declared and used in one jsp is not visible in a jsp
    that is included later on. Also, the scope of the page import tag of the main
    jsp does not cover the included jsp's.
    <%@ page import="javax.servlet.* ......>
    <%@ include file="variables.jsp" %> // Classes imported above are not recognised
    in this jsp
    <%@ include file="code.jsp" %> // Variables declared and used in variables.jsp
    are not visible here
    The exact same code runs very well in a Tomcat container (as pure jsp, not portlet)
    Can anybody help here please?

    Geir -
    I have the same problem. If you do solve it, please post it to this thread.
    Thanks
    Kunal
    "Geir Willumsen" <[email protected]> wrote:
    >
    I am devloping a portlet based on a jsp that uses some <%@include ..>
    tags. I have
    a problem in that variables declared and used in one jsp is not visible
    in a jsp
    that is included later on. Also, the scope of the page import tag of
    the main
    jsp does not cover the included jsp's.
    <%@ page import="javax.servlet.* ......>
    <%@ include file="variables.jsp" %> // Classes imported above are not
    recognised
    in this jsp
    <%@ include file="code.jsp" %> // Variables declared and used in variables.jsp
    are not visible here
    The exact same code runs very well in a Tomcat container (as pure jsp,
    not portlet)
    Can anybody help here please?

  • Include file

    Hi,
    I have say 4 jsp pages. One page (A.jsp) is sort of a controller. It defines different kinds of variables. The other 3 jsp pages (say B, C, D) are included in between the code in A.jsp (using @include file..) depending upon some kind of condition. Not all the 3 files are included - they are in a if..then condition. All the 3 files make use of some variables defined in A.jsp.
    The problem is:
    In JDev9i, When I try to run the application, I get an error in the compilation stage saying that variable x etc are not found in file B, C or D - wherever its used (The variable was defined in A.jsp). and the application fails to execute. What do I have to o in order to get around this problem 'cause there are many such files in my project.

    Hi,
    Instead of using static include using @include, depending on the condition, use dynamic jsp include <jsp:include> and pass the variables used in A.jsp using <jsp:param> to B,C,D jsps. Access the value of the variable from the request.parameter object.
    Hope that helps.
    OTN Group@IDC

  • EDI Mapping based on a condition

    Hi All,
    Can we use some condition to differentiate different mappings based on the source feild?
    My scenario is the invoice from R/3 is imported into XI and based on a feild Receiver company code&Company name  , different mappings needs to be executed and please keep in mind (different mappings include include verisons like EDIFACT, TRADACOM etc)
    Please guide me!!
    Thanks,
    Smith

    Hi Peter,
    Thanks for your reply. As per my understanding,
    If we have 4 customers whom we need to send invoices based on the company code and description,
    The following needs to be created:
    one outbound interface in PI(Idoc from R/3 )
    Four inbound interfaces from PI to EDI
    Four different mappings
    In receiver determination based on the condition the message mapping is selected and delivered .
    Please confirm
    Thanks,
    Smith

  • Oracle Business Intelligence How to choose data set based on a condition

    Hi,
    I am using Oracle Business Intelligence for creating reports, i am facing a situation where i have two quries (data sets in BI), one to display a Failure message and other to fetch data from the table to be displayed in the report.
    The problem is i am unable to choose which data set to run based on a condition. How to use a condition based on which the dataset will be run
    For example : i will read a table column value if it is 'S' means success, then i have to run the dataset to fetch the data from the table.
    If the column value has 'F' then i have to run the dataset which will display failure message
    Please let me know if any of you have any idea on this
    Thanks in advance
    Muthukumaran

    Hi Chinna,
    You have to use some scripting as well as coding to perform the tasks listed by you. First of all make your form Dynamic, In your Adobe lifecycle Designer, open your form,
    Goto, File --> Form Properties,
    Goto the Defaults tab,
    Select "Dynamic PDF" for the XDP Preview Format:
    Click OK.
    This setting will now allow dynamicity in your Form, when you view it in PDF Preview tab.
    For Hiding/Unhiding the fields/SF, you can use the presence property and set it based on the conditions. like:
    if (this.rawValue == null)
    TextField1.presence = "hidden";
    For your second task, you may map a method corresponding to onSubmit event of the IF and write the code to create the workflow and make RFC call here.
    For third one, you need to convert the PDFObject from Binary context into a byte array and save it at appropriate location.
    Hope I have answered all your queries.
    Cheers,
    Arafat

  • Trying to alter font on a report row based on data condition

    Hello.
    I have an Apex application with a "classic" SQL report and a corresponding form.
    In the report region I am pulling all items from a table (Select * from TASKS)
    The TASKS table contains many columns including DUE_DATE and COMPLETE_DATE field.
    I am trying to find a way to format the rows in my report based on the condition of those two fields.
    If the record has a complete_date (not null) then I want to change the font for the entire row (each column) to be grey.
    If the record does not have a complete_date (null) and due_date is before today, I want the row to be bold and red.
    Otherwise, the row would display standard black text.
    I can't seem to find a straightforward way to do this in Apex.

    Hi JodyMorin,
    Try looking at this post:
    Conditional item formatting (color)
    You will need to tweak the code a bit for your needs, but I hope it helps.
    -Marc

Maybe you are looking for

  • HP LaserJet Pro MFP M435 – Help

    HP LaserJet Pro MFP M435 how to setup my prenter . eprinting email addres pls help me

  • Can i sort reminders by date

    I want to sort my reminders so they show in date order - - - this is an obvious bit of functionality that any reminder program should have -- why can't i do this?

  • Valueset where clause

    Hi All, I have two valuesets Valueset1 & Valueset2, Both are independent valuesets and both has set of values. here valuset2 has been attached to one KFF structure's segment. (Valueset1 & Valueset2 will have same set of values). I want to restrict th

  • Export 11g-32 bit Oracle database- import  11g to 64 bit Oracle DB posible

    Hi experts, i want to export from 11gR2- 32 bit oracle production database and import into 11gR2 -64 bit oracle database. Can it possible or not???

  • Switching Time Machine Drives

    Hello, I am trying to change the HDD my Time Machine is in to a new drive. I've researched it on the internet and what everyone suggested was for me to copy the backups folder to the new drive (of course, after unchecking the "ignore ownership" box a