Report displayed based on Select List condition

Hello,
Any help would be appreciated.
I have a report and a select list, P55_MISSING. The select list contains the column names in the table that the report displays.
If I select one of the column names, I would like to display all records where that column name is null.
The sql I have at the moment is:
select
"ID",
"APPLICATION",
"SHORT_DESCRIPTION",
"DESCRIPTION",
"OPC_NET_NAMES",
"PROCESSING_SCHEDULE",
"PROCESSING_REGULARITY",
"PLATFORMS_INVOLVED",
"UNIX_DIRECTORIES",
"SOURCE_FILES",
from "APP_METADATA"
where :P55_MISSING IS NULL
If I select 'source files' for example, I would expect to see 3 out of 4 records stored in the table. However, I receive the message 'no data found'.
Any help would be great. Thank you.

Hi
In order to doe this you will have to use dynamic sql (so you have to change your report type to 'SQL Query (PL/SQL Function Body Returning SQL Query)').
It would then look something like this...
DECLARE
l_sql VARCHAR2(32767);
BEGIN
l_sql := 'SELECT id,
                 application,
                 short_description,
                 description,
                 opc_net_names,
                 processing_schedule,
                 processing_regularity,
                 platforms_involved,
                 unix_directories,
                 source_file
          FROM   app_metadata
          WHERE ';
l_sql := l_sql||:P55_MISSING||' IS NULL';
RETURN l_sql;
END;Sorry, I can't test this as I don't have your tables.
Cheers
Ben

Similar Messages

  • Chart based on Select list with submit Lov problem

    Hi,
    I have one page with interactive report showing username with links, date and
    database actions.
    Another page contains one region having flash chart based on select list with submit Lov.
    The lov is created by dynamic query.
    Every time when i click the 1st page report link, the 2nd page lov is populating the value automatically. But the problem is chart displays NO DATA FOUND message though the LOV has many values.
    I don't want to display any null values so set to NO for LOV
    I tried to write Before header computation (PL/SQL Function Body) to set the lov value, but the query is displayed as such.
    I don't want to assign any static default value also as the values are dynamic for every link.
    The following is my Before header computation of Select list with submit (Item name is p11_schema). (PLSQL Function Body)
    begin
    if :p11_schema is null then
    return 'select distinct owner schema1, owner schema2 from auditing
    where access_date=' || :p11_access_date
    || ' and username=' || :p11_username
    || ' order by owner';
    end if;
    end;
    This is my chart query.
    select null link, obj_name label, sum(sel_count) "Select", sum(ins_count) "Insert", sum(upd_count) "Update", sum(del_count) "Delete" from auditing
    where username=:p11_username
    and access_date=:p11_access_date
    and owner=NVL(:p11_schema, OWNER)
    group by owner, obj_name
    Example: If there more than one records in the lov, the graph should display the 1st record. When i select another record, the chart accordingly display the selected values. But inially it should not display "NO DATA FOUND" message.
    I tried using all the combinations of computation type for the lov, SQL query ( I could not use if conditon then), PLSQL expression, PLSQL function body. But it does not work out.
    Can anyone please help me out.
    Thanks.

    Hi Scott,
    Thanks for your reply.
    I found out the solution for this problem as below.
    But i did it in different way to tackle the dynamic query wich returns more than one record using rownum always the 1st record when it is empty instead of assigning constant (static) value like '1'. And i am returning LOV itself for both null or not null condition as below.
    Declare
    q varchar2(4000);
    begin
    if :p11_schema is null then
    q:='select distinct owner schema from auditing';
    q:=q || ' where username=:p11_username ';
    q:=q || ' and access_date=:p11_access_date ';
    q:=q || ' and rownum<2 order by owner';
    Execute immediate q into :p11_schema USING :p11_username, :p11_access_date;
    end if;
    return :P11_SCHEMA;
    end;
    Thanks.

  • Refresh classic report based on select list value selected

    hello,
    can anyone please help me out with this issue. I have a parameterized classic report based on a select list and I want to refresh this report whenever the select list value is changed. I am using oracle apex version 3.2. i just want to have a javascript function onchange event for the select list which refreshes my report whenever a value is selected.
    My select list item is p1_datastore
    select distinct datastore d,datastore r from my_table1 order by 1;
    My classic report query is
    select * from my_table2 where datastore = :p1_datastore order by last_updated_dt desc;
    ****************************************************thanks,
    orton

    can anyone please help me out with this issue.
    thanks,
    orton

  • How do you get different check box fields to display based upon a list box selection?

    I am a relative newbie with LifeCycle Designer ES using v.8.2.1 to create interactive forms to replace manual hardcopies.  I am working on a form that has a few pull down list boxes.  I want different check box fields to display based upon the selection of an item from one of the pull down lists.
    Any guidance on the best way to accomplish this would be greatly appreciated.

    Hi,
    Here is a sample with script in the change event of the dropdown. You may want to clear previous checkbox choices once the subform is hidden.
    It is good to group objects in a subform - that way you only need to hide the subform and not each object in turn.
    Good luck,
    Niall

  • How to display chart region based on select list in html region ?

    Hi all,
    i'm using 4.0.1.00.03 apex version,in a page i have 2 regions one is html and another one is Chart region.in html region i have a select list and button.when user sign into my application select list have some values in that page,user select's a value and clicks on the button then chart will be displayed.my query is when user first sign into my application i want to dispaly chart region when only select list is selected and clicks on the button.can any one guide me on this.
    thnx in Adv.

    Hi yann,
    thnx for ur reply,
    i have done what u have written but i didn't meet my requirement..
    let me explain what i need exactly
    as of now my application is like this..
    i have a html region in that i have select list(P6_LIST) and go button
    and chart region.
    chart query is like this..
    SELECT your_value
    FROM your_table
    WHERE your_value = :P6_LIST
    AND ...
    how it is working??
    when user sign into my application, user can see html region with 'select list and go button' and chart region with 'no data '.
    when user select a value in select list and click on go button automatically chart region will be dispalyed with chart.
    what i wanted to change is..
    when user sign into my application, user can see html region with 'select list and go button' and no chart region
    when user select a value in select list and click on go button then only user can see chart region with chart.
    plz help me how to do it.. :)
    thnx in Adv.
    Edited by: moulani on Nov 4, 2011 12:05 PM

  • Conditional Validation on Textfield(s) based on Select/List - help needed.

    Hey Gang,
    I have a simple page where a select/list menu with values "1" through "5" determines how many following textfields require validation. There is an "onchange" event which calls a function to update the validation. Below is my code:
    [ body tag *spry js/css scripts are called in head]
    <form id="form1" name="form1" method="post" action="">
      <p>
          <select name="menu" id="menu" onchange="menuFunction()">
            <option value="0" selected="selected">0</option>
            <option value="1">1</option>
            <option value="2">2</option>
            <option value="3">3</option>
            <option value="4">4</option>
            <option value="5">5</option>
          </select>
      </p>
      <p>
        <span id="sprytextfield1"><input type="text" name="text1" id="text1" /></span><br />
        <span id="sprytextfield2"><input type="text" name="text2" id="text2" /></span><br />
        <span id="sprytextfield3"><input type="text" name="text3" id="text3" /></span><br />
        <span id="sprytextfield4"><input type="text" name="text4" id="text4" /></span><br />
        <span id="sprytextfield5"><input type="text" name="text5" id="text5" /></span>
      </p>
    <p><input type="submit" name="submit" id="submit" value="Submit" /></p>
    </form>
    <script type="text/javascript">
    <!--
    function menuFunction() {
          var menuNum = document.getElementById('menu').value;
         for(i=1; i<=5; i++) {
               if(i<=menuNum) {
                    eval("var sprytextfield" +i+ "= new Spry.Widget.ValidationTextField(\"sprytextfield" +i+ "\")" );
               } else {
                   eval("var sprytextfield" +i+ "= new Spry.Widget.ValidationTextField(\"sprytextfield" +i+ "\", \"none\", {isRequired:false})" );
    //-->
    </script>
    [ / body tag etc... ]
    The function seems to work when it requires the validation for the textfields, but not when removing the validation. I've tried doing  eval("sprytextfield" +i+ ".destroy()"); as well without success.
    I've searched through forums and could not find an answer to this (sorry if I missed it)  ... so hopefully somebody can point me in the right direction. (*I found the post w/ the link http://www.spry-it.com/examples/spry-widget-validation-generation-and-destroy/ -- however that page doesn't seem to work *Chrome)
    Thanks for any help! =)
    ~Mike

    Have a look here http://forums.adobe.com/message/2651124#2651124
    If that doesn't help please come back here.
    Ben

  • Change display value of "select list"

    Hi!
    I have a problem with a select list, I want to change the display value through an own pop up (page 5 of apex application) after I submit in it.
    The select list is based on a sql query:
    select A_NAME display_value, A_ID return_value
    from APPLICATIONS
    where a_application_type='GROUP'
    order by 1
    beside I have an link to open a pop up window:
    ... onClick="window.open ('f?p=&APP_ID.:5:&SESSION.::::', 'newWin',
    'scrollbars=no,status=no,width=500,height=270' ...
    On the pop up site there is a tree and a submit button which close the window and renew the original page:
    javascript:window.opener.location.reload();window.close();
    Through the tree I get the value (Group-ID) which I need.
    When I'm back on page 4 a "before header" renew page process links again on the side 4 and change the value of my select list. Afterwards the values have changed correctly but the display value is still the old one. It only change when i go on an other page of the apex application and come back.
    I don't know why it doesn't change immediately!?
    Thanks ahead

    I have done with a solution just in a nutshell of what u r looking for:
    1.create HTML region.
    Add two items : Select list with redirect(P6_X) and text field(P7_X)
    2. Select list is based on LOV query as :
    select empno d,empno r from emp ;
    Source value is Empno Type:DBcolumn.
    3.The text field Source type : SQL Query .
    Query : select ename from emp where empno = :P6_X
    Now select from the dropdown empno and it will populate the Ename value accordingly based on the query .
    U can have more than one text fields and populate those in the same way.....
    Cheers,
    ROSY

  • How Do I Filter a Report Using a Multi Select List Box and Specifying Date Between Begin Date and End Date

    Hope someone can help.  I have tried to find the best way to do this and can't seem to make sense of anything.  I'm using an Access 2013 Database and I have a report that is based on a query.  I've created a Report Criteria Form.  I
    need the user to be able to select multiple items in a list box and also to enter a Begin Date and End Date.  I then need my report to return only the records that meet all selected criteria.  It works fine with a ComboBox and 1 selection but can't
    get it to work with a List Box so they can select multiple items.  Any help is greatly appreciated while I still have hair left. 

    The query should return all records.
    Let's say you have the following controls on your report criteria form:
    txtStart: text box, formatted as a date.
    txtEnd: text box, formatted as a date.
    lbxMulti: multi-select list box.
    cmdOpenReport: command button used to open the report.
    The text boxes are used to filter the date/time field DateField, and the list box to filter the number field SomeField.
    The report to be opened is rptReport.
    The On Click event procedure for the command button could look like this:
    Private Sub cmdOpenReport_Click()
    Dim strWhere As String
    Dim strIn As String
    Dim varItm As Variant
    On Error GoTo ErrHandler
    If Not IsNull(Me.txtStart) Then
    strWhere = strWhere & " AND [DateField]>=#" & Format(Me.txtStart, "yyyy-mm-dd") & "#"
    End If
    If Not IsNull(Me.txtEnd) Then
    strWhere = strWhere & " AND [DateField]<=#" & Format(Me.txtEnd, "yyyy-mm-dd") & "#"
    End If
    For Each varItm In Me.lbxMulti.ItemsSelected
    strIn = strIn & "," & Me.lbxMulti.ItemData(varItm)
    Next varItm
    If strIn <> "" Then
    ' Remove initial comma
    strIn = Mid(strIn, 2)
    strWhere = strWhere & " AND [SomeField] In (" & strWhere & ")"
    End If
    If strWhere <> "" Then
    ' Remove initial " AND "
    strWhere = Mid(strWhere, 6)
    End If
    DoCmd.OpenReport ReportName:="rptMyReport", View:=acViewPreview, WhereCondition:=strWhere
    Exit Sub
    ErrHandler:
    If Err = 2501 Then
    ' Report cancelled - ignore
    Else
    MsgBox Err.Description, vbExclamation
    End If
    End Sub
    If SomeField is a text field instead of a number field, change the line
            strIn = strIn & "," & Me.lbxMulti.ItemData(varItm)
    to
            strIn = strIn & "," & Chr(34) & Me.lbxMulti.ItemData(varItm) & Chr(34)
    Regards, Hans Vogelaar (http://www.eileenslounge.com)

  • Can images be displayed in a Select List ?

    Hi,
    I was wondering if it is possible to display images in a select list.
    For example to display status colors like "red", "green" and "yellow" so that
    the user can click the select list and select the item by its color.
    I would then return a number or a varchar2 (e.g. 'red', 'green' and 'yellow) in
    the LOV.
    In addition I need that select list on a form.
    I tried something with a static select like this:
    STATIC:[<img src="#WORKSPACE_IMAGES#red.gif">];[1],[<img src="#WORKSPACE_IMAGES#green.gif">];[2],[<img src="#WORKSPACE_IMAGES#yellow.gif">];[3]
    But it did not work. Instead of the numbers I would/could use also a varchar2 as mentioned.
    Is that possible somehow?
    Thank you very much.
    Johnny

    HI Marcello,
    yes, I know that possibility. I even use images myself in reports.
    I tried to do it the same way.
    Something like:
    STATIC:wwv_flow_file_mgr.get_file?p_security_group_id=22705712812657001&p_fname=1.gif;1,#APP_IMAGES#2.gif;2
    But both of the ways do not work.Always the text "wwv_flow_file_mgr.get_file?p_security_group_id=22705712812657001&p_fname=1.gif" itself is being displayed. :-(
    Nevertheless...thank you Marcello.
    Johnny

  • Reporting on a Multi-Select list field X:Y:Z

    I'm sure someone must have come across this problem but I can't find a reference to it on the forum.
    PROBLEM
    I have a data entry form with multi-select lists. Users choose a number of display values and the return values are stored in the field in the format
    20:30:50
    When I create an SQL report on a row, there is no option to Display the column as a "multi-select list" like there is with a standard List of Values.
    How do I report the display lookup values rather than the return code?
    Is it possible to display the selected values in a report for example
    red
    orange JOHN 10-JAN-07
    green
    red
    orange MARY 12-FEB-07
    orange
    green MARK 13-JUL-07
    regards
    Paul P

    Paul,
    I have several examples on this topic:
    http://htmldb.oracle.com/pls/otn/f?p=31517:87
    http://htmldb.oracle.com/pls/otn/f?p=31517:84
    http://htmldb.oracle.com/pls/otn/f?p=31517:75
    Basically, you will need to create a table out of your colon separated values and then
    join this table with other tables to be able to display it however you want.
    What just comes to my mind is that Dietmar presented a nice workarround for a similar
    problem here:
    Nested report howto?
    Denes Kubicek

  • Based on select list, i need to retrieve values in other select list

    Hi,
    am new to apex using apex3.2, i need to retrieve values in select list based on the other select list vale with out refreshing page.
    ie i have region select list and country select list,in country corresponding region country must be display but with out refreshing page.
    can you please any body guide me.
    Regards
    shashidhar
    Edited by: 871140 on Jul 7, 2011 10:34 PM

    Hi,
    you can use cascading LOV for that, i which the other LOV field will be changing depending upon the selection of other value(which is in LOV).
    http://www.inside-oracle-apex.com/oracle-apex-4-0-cascading-lovsselect-lists/
    Regards,
    Mini
    Mark Answers Promptly

  • Classical report display from an alv list

    Hi, 
    I have an alv report displayed, and for this alv report have a user defined menu. Now when the Save button is clicked on the application bar then in the background we have a set of invoices which are generated for all the values selected from the alv list.
    Now after this a list is to be displayed listing all the items which were selected from the alv(ie the check boxes for the alv selected and not a particular field for selection)  for which the invoices were created. how do we display the list in a classical report format considering that the write statement will not work....???

    Hi
    Try thsi......
    You write the code in some Zreport of your own and from your ALV program pass the values to this ZReport program. You can pass via 2 ways
    a) Pass via  Export to Memory and Import from Memory ID
    b) Call Submit via Selection Screen and return
    Hope thsi Helps
    Anirban

  • Token from report showing up in Select List

    I'm working on an app that has a drill down report. One of the columns in the report is a link (Target Type = URL) to a form that allows the user to the row that he/she clicked on in the report.
    The values of parms passed to the page "511" are passed via the report tokens.
    Two of the tokens for some reason aren't resolved when they get to the page (511).
    The tokens #MEDIA_UID# and #LOCATION_UID# appear in the respective select lists (Media has a select list and location has a select list).
    For example. When the use clicks on the link the resulting page's Media select
    list will look something like this:
    #MEDIA_UID#
    DOC
    CD
    DVD
    The #MEDIA_UID# Token will be included in the list of values instead of
    the actual value from the row in the report.
    The Target Type for the link is URL.
    The URL is set to:
    f?p=&APP_ID.:511:&SESSION.::&DEBUG.:511:P511_MEDIA_UID,P511_LOCATION_UID,P511_REMARKS,P511_DIST,P511_DOC_MASTER_UID,P511_NUM_TO_COPY:#MEDIA_UID#,#LOCATION_UID#,\#REMARKS#\,\#DIST#\,&P510_DOC_MASTER_UID.,#COPY_NBR#
    Does the URL look OK?
    Has anyone noticed this type of behavior?
    Thanks.
    David

    Bingo. You're right. I just found that out a few minutes ago. I inherited this piece of the app from someone else. I was comparing the URLs (dev to prod). Didn't think to look at the actual column alias until after I had posted this. Someone changed
    the column alias in prod but didn't make that change in the Link's target URL.
    If you set the target to a page in the application and then change a column alias in the query will the link pick that change up automatically? Or do you still have to make sure and change it in the link?
    Thanks.
    Sorry for the wild goose chase.
    David

  • Automatic population of multiselect based on select list

    Hi,
    I have an issue in populating in multiselect from the data in select list.
    Let me take an example and explain.
    I have 3 tables: Employee, Department and a linking table for employee and department.
    The select list contains employee and department is a multiselect. On selection of Employee, all the departments should be displayed and the department to which employee belongs(which is taken from the linking table) should be selected (High-Lighted). How do I do this?

    Hi,
    I am trying this on three tables…DEPT, EMP, DEPT_EMP wit a select list(P1_EMP) and a multiselect (P1_DEPT).
    Dept has two columns (ID and Deptname). It has two rows.
    DEPT
    Id |Deptname
    1. HR
    2. OPERATION
    Emp has two colums (ID and Empname)
    EMP
    Id|Empname
    1. Jason
    2. Pam
    Dept_Emp has three columns (ID, Employee ID which refers to the EMP.ID, DeptID which refers to the DEPT.ID)
    DEPT_EMP
    Id| Employeeid | DeptId
    1. 1 1
    2. 2 2
    As shown , Jason belongs to HR and Pam belongs to OPERATION.
    I have tried the following steps:
    1. OnChange of Employees drop down list(P1_EMP), I have called a javascript function.
    <script type="text/javascript">
    function getDepartments(filter, listName)
    var employee = filter.value;
    var list = document.getElementById(listName);
    var listvalue = list.value;
    var get = new htmldb_Get(null,$v('pFlowId'), 'APPLICATION_PROCESS=GET_DEPARTMENTS_FOR_EMP',0);
    get.add('G_EMPLOYEE', employee);
    ret = get.get('XML');
    if(ret)
    var s = ret.getElementsByTagName("select");
    if(s){
    var o = ret.getElementsByTagName("option");
    var oCount = o.length;
    list.options.length = 0;
    var i=0;
    while(i<oCount)
    var l_Opt_Xml = o [ i ];
    appendToSelect(list, l_Opt_Xml.getAttribute('value'), l_Opt_Xml.firstChild.nodeValue);
    i=i+1;
    list.value = listvalue;
    if (list.selectedIndex == -1)
    list.selectedIndex = 0;
    get = null;
    function appendToSelect(pSelect, pValue, pContent) {
    var l_Opt = document.createElement("option");
    l_Opt.value = pValue;
    if(document.all){
    pSelect.options.add(l_Opt);
    l_Opt.innerText = pContent;
    } else {
    l_Opt.appendChild(document.createTextNode(pContent));
    pSelect.appendChild(l_Opt);
    </script>
    2. The Javascipt function calls in a application process(GET_DEPARTMENTS_FOR_EMP) and I have also created an application item(G_EMPLOYEE) for the same.
    declare
    begin
    owa_util.mime_header('text/xml', FALSE );
    htp.p('Cache-Control: no-cache');
    htp.p('Pragma: no-cache');
    owa_util.http_header_close;
    htp.prn('<data>');
    htp.prn('<select>');
    for rec in (
    select distinct "DEPT"."Deptname" d, "DEPT"."ID" r
    from "DEPT","DEPT_EMP "
    where " DEPT_EMP "."DeptID"="DEPT"."ID"
    and " DEPT_EMP "."EmployeeID"=:G_EMPLOYEE
    order by 1
    loop
    htp.prn('<option value="' || rec.r || '">' || rec.d || '</option>');
    end loop;
    htp.prn('</select>');
    htp.prn('</data>');
    end;
    The employee multiselect(P1_EMP), initially has a “Select employee”. Upon selecting Jason, it should show, all departments and highlight HR. The same for Pam.
    But it is showing only the departments for the employee. If I modify the application process query to show all employees in that department, how do I highlight only that employee?
    Edited by: 841762 on Mar 7, 2011 1:50 AM

  • How to write a javascript function on a report column with type select list

    I have a report with a select list column:
    HTMLDB_ITEM.SELECT_LIST_FROM_LOV(22, "tablename"."PRIMARY", 'PRIMARY').
    The value of primary can be null, yes, no. I want to write a javascript to achieve this: once the user changes one primary value to be yes, others with 'yes' will be changed to 'no' automatically.
    Could somebody help me on this.
    Thanks.
    Jen

    Thanks Patrick for your quick reply.
    I created a dynamic action with the following steps, but the dynamic action is not taking place.
    Event: After Refresh
    Selection Type: Region
    Region: Report 1 (my report name)
    Then in the true action
    Action: Execute Javascript SCode
    Code: showHighlight();
    I even tried to get an alert, but the dynamic action is not done at all. It seems the After refresh dynamic action is not working for a region.

Maybe you are looking for

  • Safari Quit Unexpectedly While Using the Webcore Plug-In

    Below is the crash report for Safari. I am also unable to access safari even when I boot in safe mode. Process:     Safari [361] Path:        /Applications/Safari.app/Contents/MacOS/Safari Identifier:  com.apple.Safari Version:     7.0.1 (9537.73.11)

  • ICH :Exception thrown by adapter framework

    i am working on a scenario for Supplier Managed Inventory Process flow for initial data transfer is from R/3 (IDoc)>XI(XML)>SCM(XML) We are using sap standard mappings to perform the conversion to XML. SXMB_MONI in XI shows "processed successfully" b

  • Can my SNR be reduced? I Really Need Help!

    My router has been connected at 15dB for a few months now with a few disconnections and I was wondering if I could have it reduced? Is this possible? My stats are below: ADSL Link Downstream Upstream Connection Speed 3616 kbps 448 kbps Line Attenuati

  • Clicking noise and freezing during updating

    Hello everyone, if anyone could help with the following problem i'd be more than grateful. my ipod recently wouldnt connect to windows and started making a clicking noise. to try an resolve this i have reset and restored. I thought this would solve t

  • Report a Problem: Don't have items when purchase

    I purchased items in Game(Monster Warlord, 700 Jewel) but I don't have items. Order ID: MHNBZ4SK47. Can you cancel this bill?.