Apply OR clause in dynamic filter on an interactive report

Apex ver - 4.2
I have a requirement wherein I have to apply filter on interactive report. I have to apply filter which will change depending upon different conditions. So I created a PLSQL process on "On Load Before Region"
For e.g if condition is --- status = 'Open' and Approved = 'Yes'
I can write a PLSQL process with code as:
apex_util.ir_filter(p_page_id => 1, p_report_column=>'Status' p_operator_abbr=>'EQ', p_filter_value=>'Open');
apex_util.ir_filter(p_page_id => 1, p_report_column=>'Approved' p_operator_abbr=>'EQ', p_filter_value=>'Yes');
But these filters have AND logical operator
What can I code if I want OR condition i.e.
status = 'Open' OR Approved = 'Yes'

Check out these blog postings from the APEX Dev Team:
http://anthonyrayner.blogspot.com/2008/07/dynamic-date-filtering-in-interactive.html
http://dpeake.blogspot.com/2008/03/advanced-interactive-reports.html

Similar Messages

  • Getting active filter conditions from interactive reports

    I have been having trouble with how to properly get the filter conditions that a user has applied to an interactive report. I have tried to get at this information using the Apex defined view APEX_APPLICATION_PAGE_IR_COND. However, the problem I am running into is if the user ends their session without first removing their filter conditions, those conditions remain in this view the next time (and any future times) the report is accessed. I can not seem to determine how to tell which filter conditions are actually active in the report. Any help would be greatly appreciated.

    I've done several tests, and the results I'm getting are not like that, if it were there would be no problem. The exact steps I'm doing is setting an arbitrary filter on an interactive report, and then logging out. When I log back in the view still shows those filter conditions, but no records are filtered on the actual report. I've tried this on two separate installations of apex (one 3.1, the other 3.2) and the results are the same. Is this irregular? Or has anyone else found a workaround for this.

  • Create Filter on an Interactive Report in a Link

    Hello,
    Here is info on my environment:
    Database: 10.2.0.1.0
    O/S: Windows XP
    APEX: v3.2.1
    I am trying to use the IR<operator>_<target column alias> feature to filter the linked Interactive Report. The feature does not seem to work. Does this feature work on a 10g database?
    Background:
    I am building the application (AnyCo Corp) described in the _2 Day + Application Express Developer’s Guide_ . On page 4-27 the section titled "_Linking a Column Value to Another Page_" describes linking from the Department report to the Employee report with the Column Link item IR_DEPARTMENT_ID. The link did not work, however.
    The included APEX Users Guide discusses this feature. The path to the relevant section is: Home > Adding Application Components > Creating Reports > Editing Interactive Reports > Linking to Interactive Reports. The Guide describes the string IR<operator>_<target column alias> with lots of operators.
    This is a neat feature. Unfortunately, no matter how I try to use it, it does not work. What am I doing wrong?
    Leon

    Check out these blog postings from the APEX Dev Team:
    http://anthonyrayner.blogspot.com/2008/07/dynamic-date-filtering-in-interactive.html
    http://dpeake.blogspot.com/2008/03/advanced-interactive-reports.html

  • Retrieving sort and filter criteria for interactive report

    I have developed a test management system in APEX. Users log in and see an interactive report with their assignments. Each test they've been assigned occupies one row.
    There is an "Execute" link for each row that takes the user to the test execution page, where they can see the input steps / expected results and report the test passing or failing.
    I've implemented "Next >" and "< Previous" buttons on the execution page, so the user can immediately go forwards or backwards in his assigned tests without having to return to the assignments page and click the Execute link on the next or previous row.
    The test execution page figures out what the next and previous assigned test is using the LAG and LEAD functions, like this:
    lag(assignment_id) over (order by ref_num_full) prev_id,
    lead(assignment_id) over (order by ref_num_full) next_id
    Notice that I've "hardcoded" the over clause to be the reference number of the test.
    The problem here - this solution ignores any custom sorts or filters the user has put in place on the assignments (interactive) report.
    Is there a way I can "grab" the interactive report (1) sort criteria and (2) filter criteria dynamically? I'm thinking I could then use dynamic SQL to build an OVER clause used in the lag/lead calls so that the application now follows whatever sort and/or filter criteria the user has put in place.
    Any help is greatly appreciated...thanks!!

    Thanks WTine!
    I took a look and determined
    - I can get the sort criteria from the APEX_APPLICATION_PAGE_IR_RPT view (SORT_COLUMN_# and SORT_DIRECTION_# columns)
    - I can get the filter criteria from the APEX_APPLICATION_PAGE_IR_COND view
    Regards, Rich

  • Dynamic Action based on Interactive Report Select List Value

    I'd like to perform a Dynamic Action when a user selects one of 3 options from a Select List within an Interactive Report:
    select APEX_ITEM.SELECT_LIST(
    p_idx => 3,
    --p_value         =>   deptno,
    p_list_values => 'Copy;Copy,Delete;Delete,Export to PDF;Export to PDF',
    --p_attributes    =>   'style="color:red;"',
    p_show_null => 'YES',
    p_null_value => NULL,
    p_null_text => '--Select--',
    --p_item_id       =>   'f03_#ROWNUM#',
    p_item_id => 'P6_IR_SELECT_LIST',
    p_item_label => 'Label for f03_#ROWNUM#',
    p_show_extra => 'YES') "Actions"
    from dual;
    When building the Dynamic Action, I chose the following values from the Advanced wizard
    Event: Select
    Selection Type: DOM Object
    DOM Object: P6_IR_SELECT_LIST
    Condition: Equal to
    Value: "Delete"
    True Action: Execute Javascript Code: Alert('Here');
    Doesn't seem to be firing...can anyone help?
    Thanks in advance,
    John

    Hi,
    I am not sure if the "equal to" condition applies to a DOM object... after all, a DOM object can be anything (any HTML element) not only a field.
    Try using a javascript expression instead, like this:
    $v('P6_IR_SELECT_LIST')=='Delete'UPDATE: Sorry, I just tested and "equal to" condition works for DOM objects... should have tested before posting!
    Luis
    Edited by: Luis Cabral on Feb 29, 2012 4:45 PM

  • Remove Filter Type from interactive report

    Hi
    is it possible to remove the Filter Type option from an interactive report?
    We don't want to give users the option to select the filter type.
    Many thanks
    Paul

    Hi Paul,
    I don't think you can remove that option. You can hide it. There are several ways to do this, but they would involve css styling. In your page's HTML Header setting, add in:
    &lt;style type="text/css"&gt;
    label[for="apexir_FILTER_TYPE"] {display:none}
    #apexir_FILTER_TYPE.radio_group {display:none}
    &lt;/style&gt;Note that older versions of IE will not handle the first style, but that's just the label. The actual radio buttons are hidden by the second style
    Andy

  • How to hide some column filter operators in Interactive Report

    Hi,
    I have an APEX 4.2 application what includes Interactive Report page.
    Is there possibilty to hide or disable some filter operators in column filter?
    But I don't want to disable all filter functionality for end users.
    For example how to hide/disable operator "matches regular expression".
    Some filter operators are too complicated for end users.
    I have searhced but not found solution.
    regards,
    Erkki

    erkkik wrote:
    I have an APEX 4.2 application what includes Interactive Report page.
    Is there possibilty to hide or disable some filter operators in column filter?
    But I don't want to disable all filter functionality for end users.
    For example how to hide/disable operator "matches regular expression".
    Some filter operators are too complicated for end users.
    I wouldn't really recommend this. Users will quickly recognise what works for them and avoid options that they do not currently understand. However, over time—through training or advice from more experienced users—they may come to understand and use all of the available features. Blocking access (especially in a non-standard way) to options that users may eventually need is likely to result in unnecessary development work now and at some (possibly inconvenient) time in the future.
    That said, this really isn't difficult to implement using CSS. Use your browser web inspector to identify which filter types are to be blocked, using the value attribute of the filter Operator select list in the generated IR HTML. For example, in APEX 5.0 a filter operator select list looks like:
    <select id="R70597672218719366505_STRING_OPT" class="a-IRR-operator" data-column-type="STRING" title="Operator" name="p_ignore_10" size="1">
      <option value="=">=</option>
      <option value="!=">!=</option>
      <option value="is null">is null</option>
      <option value="is not null">is not null</option>
      <option value="like">like</option>
      <option value="not like">not like</option>
      <option value="in">in</option>
      <option value="not in">not in</option>
      <option value="contains">contains</option>
      <option value="does not contain">does not contain</option>
      <option value="regexp_like">matches regular expression</option>
    </select>
    The "matches regular expression" option has the value regexp_like, so the required CSS rule using the IR operator select list class and an attribute selector on the option value is:
    .a-IRR-operator option[value="regexp_like"] {
      display: none;
    Additional selectors for other filter types can be added to this rule as required, for example:
    .a-IRR-operator option[value="regexp_like"],
    .a-IRR-operator option[value="is not null"] {
      display: none;
    to eliminate the "is not null" filter.
    To implement this for all IRs in your application, create a custom CSS style sheet containing the rule, upload it to your workspace, and reference it in all of the page templates used for IR pages.
    This is not a 100% foolproof solution. CSS is not an appropriate way to implement security restrictions. A web-savvy user could use their web inspector to disable the CSS rule and access the blocked filter(s). However there is little risk here as (1) it appears that your users will lack the required expertise; and (2) doing so will only allow them to further filter data they already have access to.

  • Dynamic Filter Selection in CUIC Reports

    Hi,
    I have come up with a new requirement in CUIC where i need to provide dynamic selection on the filter criteria.
    Ex: Assuming in a report i need a filter criteria as agent name, call type and skill group which can be availble in drop down control. Based on the selection in drop down, the list box control will be filled. Say if i select agent from drop down cotrol...all agent names will be listed in list box control and similarly for calltype and skill group selection.
    Is the above requirement is feasible?
    Thanks,
    Swami

    Hi Vamsi
    I Thing it's not possible in Crystal Report It is possible In Xcelsius reporting  and SQL Analysis Services Report . You can build your Report In Xcelsius . It is best reporting Tool for Dynamic Parameter Report.
    Thanks & Regard
    Khan Imran

  • How to use dynamic internal table in interactive report syntax

    pls let me know

    Hi Aarif,
    Go through the below code for better understanding:
    *& Report  ZDYN_INT_TABLE_02                                           *
    REPORT  ZDYN_INT_TABLE_02.
    TYPE-POOLS: slis.                      " ALV Global types
    SELECTION-SCREEN BEGIN OF BLOCK b1.
    PARAMETERS : p_max(3) TYPE n OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK b1.
    TYPES: BEGIN OF wa_gt_data,
              matnr TYPE mara-matnr,
           END OF wa_gt_data.
    DATA gt_data TYPE STANDARD TABLE OF wa_gt_data WITH HEADER LINE.
    *INITIALIZATION.
    v_1 = 'Maximum of records to read'.
    START-OF-SELECTION.
      PERFORM f_read_data.
      PERFORM f_display_data.
         Form  f_read_data
    FORM f_read_data.
      SELECT matnr INTO TABLE gt_data
               FROM mara
                 UP TO p_max ROWS.
    ENDFORM.                               " F_READ_DATA
         Form  F_DISPLAY_DATA
    FORM f_display_data.
      DATA:
        l_column    TYPE sy-tabix,
        lp_struct   TYPE REF TO data,
        lp_table    TYPE REF TO data,      " Pointer to dynamic table
        ls_lvc_cat  TYPE lvc_s_fcat,
        lt_lvc_cat  TYPE lvc_t_fcat,       " Field catalog
        lt_fcat     TYPE slis_t_fieldcat_alv,  " Field catalog
        ls_fieldcat TYPE slis_fieldcat_alv,
        lt_fieldcat TYPE slis_t_fieldcat_alv,  " Field catalog
        ls_layout   TYPE slis_layout_alv.
      FIELD-SYMBOLS :
        <header>       TYPE ANY,
        <field_header> TYPE ANY,
        <field_mara>  TYPE ANY,
        <lt_data>      TYPE table.         " Data to display
      ls_lvc_cat-fieldname = 'COLUMNTEXT'.
      ls_lvc_cat-ref_table = 'LVC_S_DETA'.
      APPEND ls_lvc_cat TO lt_lvc_cat.
      ls_fieldcat-fieldname = 'COLUMNTEXT'.
      ls_fieldcat-ref_tabname = 'LVC_S_DETA'.
      ls_fieldcat-key  = 'X'.
      APPEND ls_fieldcat TO lt_fieldcat.
      DO p_max TIMES.
      For each line, a column 'VALUEx' is created in the fieldcatalog
      Build Fieldcatalog
       WRITE sy-index TO ls_lvc_cat-fieldname LEFT-JUSTIFIED.
        CONCATENATE 'VALUE' ls_lvc_cat-fieldname
               INTO ls_lvc_cat-fieldname.
        ls_lvc_cat-ref_field = 'VALUE'.
        ls_lvc_cat-ref_table = 'LVC_S_DETA'.
        APPEND ls_lvc_cat TO lt_lvc_cat.
      Build Fieldcatalog
        CLEAR ls_fieldcat.
        ls_fieldcat-fieldname = ls_lvc_cat-fieldname.
        ls_fieldcat-ref_fieldname = 'VALUE'.
        ls_fieldcat-ref_tabname = 'LVC_S_DETA'.
        APPEND ls_fieldcat TO lt_fieldcat.
      ENDDO.
    Create internal table
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = lt_lvc_cat
        IMPORTING
          ep_table        = lp_table.
      ASSIGN lp_table->* TO <lt_data>.
    Create structure = structure of the internal table
      CREATE DATA lp_struct LIKE LINE OF <lt_data>.
      ASSIGN lp_struct->* TO <header>.
    Create field catalog from dictionary structure
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name       = 'MARA'
        CHANGING
          ct_fieldcat            = lt_fcat
        EXCEPTIONS
          inconsistent_interface = 1
          program_error          = 2
          OTHERS                 = 3.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      LOOP AT lt_fcat INTO ls_fieldcat WHERE fieldname = 'MATNR'.
        ASSIGN COMPONENT 1 OF STRUCTURE <header> TO <field_header>.
        IF sy-subrc NE 0. EXIT .ENDIF.
        READ TABLE lt_fcat INTO ls_fieldcat INDEX sy-index.
        <field_header> = ls_fieldcat-seltext_m.
        IF <field_header> IS INITIAL.
          <field_header> = ls_fieldcat-fieldname.
        ENDIF.
        LOOP AT gt_data.
          l_column = sy-tabix + 1.
          ASSIGN COMPONENT 1 OF STRUCTURE gt_data TO <field_mara>.
          IF sy-subrc NE 0. EXIT .ENDIF.
          ASSIGN COMPONENT l_column OF STRUCTURE <header> TO <field_header>.
          IF sy-subrc NE 0. EXIT .ENDIF.
          WRITE <field_mara> TO <field_header> LEFT-JUSTIFIED.
        ENDLOOP.
        APPEND <header> TO <lt_data>.
      ENDLOOP.
      ls_layout-colwidth_optimize = 'X'.
      ls_layout-no_colhead = 'X'.
      ls_layout-zebra = 'X'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          is_layout   = ls_layout
          it_fieldcat = lt_fieldcat
        TABLES
          t_outtab    = <lt_data>.
    ENDFORM.                               " F_DISPLAY_DATA
    END OF PROGRAM Z_ALV_LIST_TRANSPOSED *********************
    *Always reward point for helpful answers
    Regards,
    Amit

  • How to use datafile as a filter in Web Interactive Reporting?

    <p>Hi,</p><p> </p><p>I've used a datafile in the Resultset filtering while using IRClient.</p><p>I try to do the same thing in the HTML version, but it probablycannot find the datafile though I imported the file to the samedirectory in Workspace as the BQY.</p><p> </p><p>Is it possible to do at all?</p><p> </p><p>I'm using Hyperion System 9 BI+ 9.2.0.2 version.</p><p> </p><p>With best regards,</p><p>mar</p>

    Hi Sandy,
    You can't use virtual characteristic in the query since virtual characteristics are popultaed at query run time and in the cube it is simply 'BLANK'. So if you use any filter (except 'blank') on this characteristic then you are not going to get any records feteched from the cube itself.
    Hope it helps,
    thanks
    soumya

  • Dynamic Column Heading on Interactive Report

    I have my column headings for my table columns stored in the database. I want the Interactive Report to use these heading (instead of static headings). Is there a way to have the columns set from the database(with a function/procedure)?

    you can replace the column headings with &PAGE_ITEM.
    obviously one page item per column header
    then use the database to populate the items with your column headings.
    craig
    [http://www.oracleapplicationexpress.com]

  • Dynamic Column Name on Interactive Report

    Hi all,
    Is it possible to assign a SQL result to a Column name on an interactive report?
    I have been able to do this on a standard SQL Report though the use of page items but have not had much luck with interactive reports.
    Any help is appeciated.
    Thanks,
    Dan

    could you please explain step 4 a bit more?
    as with the standard report, i just created an item with SQL query with a corresponding computation with same SQL query and that works great.
    i tried the same method with interactive and it did not work.
    in step 4 it mentions creating a process to populate the items.
    how is this done?
    Thanks,
    Dan

  • Creating Dynamic Column Headings in Interactive Reports

    Hi,
    any ideas how I can alter the name of a column in an interactive report.?
    I have columns whose usage is defined by the end user and consequently want to have their own meaningful column header displayed whenever this column is referenced.
    I can get column headers to change in standard reports by using PL/Sql to return the column headers. In Forms, I use shortcuts (these don't seem to work for reports, I wish they did) but I'm at a loss on how to achieve this with IR's.
    Thanks
    Mike

    I wrote a script(application process) that updated the table that holds column name. I changed the display name, not the column name. I cant remember the actual table, but i found it by looking at the code that create the "APEX Application Page Ir Col" View.
    I dont know if this is best practice, but it works for me.
    Edited by: Adrian3000 on Dec 26, 2008 9:38 AM

  • Interactive Report Filter Operator Tool Tip

    version 4.0.2.00.07
    Hello,
    I had question raised to add a Tool Tip to the Operators in the Filter on the Interactive Reports.
    When the Operator select list is displayed the Managers don't know what all the operators mean. I noticed that if the mouse is hovered over an operator there is a Tool Tip displayed that says "Operator".
    Where and how could that Tool Tip be modified to display a defination of what that operator is for, if it can be done at all?
    Please let me know if you need more information.
    Thanks,
    Joe

    Erik-jan,
    I was hoping I could ask for you assistance again, if possible.
    I've made progress on this task, but I'm also having some issues.
    I've obtained the code as you've suggested and found that there are a few Operator lists.
    There are:
    apexir_STRING_OPT
    apexir_CLOB_OPT
    apexir_NUMBER_OPT
    apexir_DATE_OPT
    apexir_PSEUDO_OPT
    What I've done:
    Created Dynamic Actions for:
    apexir_STRING_OPT
    apexir_CLOB_OPT
    apexir_NUMBER_OPT
    apexir_DATE_OPT
    For each Operator list the Dynamic Actions are created like (changing the names and Operator selections as needed):
    name: Add tooltip to Date filter operators
    - event: Get Focus
    - selection type: jQuery Selector
    - jQuery Selector: select#apexir_DATE_OPT
    Create a true action with the following settings:
    - action: Execute Javascript Code
    - code:
    $(this.triggeringElement).find('option').each(function()
       if(this.value == "&gt;")
          $(this).attr("title", "greater than - Value in Column is greater than the value in Expression");
       else if(this.value == "&gt;=")
          $(this).attr("title", "greater than or equal to - Value in Column is greater than or equal to the value in Expression");
       else if(this.value == "&lt;")
          $(this).attr("title", "less than - Value in Column is less than the value in Expression");
       else if(this.value == "&lt;=")
          $(this).attr("title", "less than or equal to - Value in Column is less than or equal to the value in Expression");
       else if(this.value == "is null")
          $(this).attr("title", "is null - Value in Column is empty");
       else if(this.value == "is not null")
          $(this).attr("title", "is not null - Value in Column is not empty");
       else if(this.value == "is in the last")
          $(this).attr("title", "is in the last - Value in Column is in the last x timeframe");
       else if(this.value == "is not in the last")
          $(this).attr("title", "is not in the last - Value in Column is not in the last x timeframe");
       else if(this.value == "is in the next")
          $(this).attr("title", "is in the next - Value in Column is in the last x timeframe");
       else if(this.value == "is not in the next")
          $(this).attr("title", "is not in the next - Value in Column is not in the last x timeframe");
       else if(this.value == "between")
          $(this).attr("title", "between - Provides a means to test whether an Expression falls within a range of Values");
    })The problem is that the Tool Tips are only showing for the STRING Operator list. If a numeric column or a date column are selected the Tool Tip shows as 'Operator'. I thought that maybe it was a conflict with all these Dynamic Actions so I moved the STRING Dynamic Action to the last one in the sequence and put the DATE Dynamic Action as the first in the sequence. Still only the Tool Tips for the STRING columns are displayed and not the NUMERIC or DATE.
    I've tried to see if there was possibly a different name being used for the two lists that don't display, but I haven't found any other place where these lists are being created. I haven't found a way to set a breakpoint to confirm that's indeed the list being created with those names.
    Would you have any ideas here?
    Thanks,
    Joe

  • Row filter on Interactive Report via URL parameter

    Hi,
    I've searched the forum but can't find a concise answer.
    Is it possible to pass a parameter (p_X) from one page to another via the url and then use p_X to act as a row filter in an Interactive report?
    Thanks for the help
    Joel

    Joel -
    Read the link that Andy posted. It is a pretty good source. This topic is not really that difficult to do. I have done it several times. Make sure that you understand the URL syntax for APEX. If you need a refresher on this take a look at http://www.oracleapplicationexpress.com/tutorials/55
    Austin

Maybe you are looking for

  • User defined function in where IN clause

    Hi, I have a Function who returns in priview: (1,2,3,4) Now i am using this function in SQL where clause Select from debug where id in debug.debug_process() On execute select i am getiing ORA-01722 invalid number , i understand that functions return

  • Can't see albums or events

    The pane where albums and events show up (on the left) is missing for me. When I add new photos, I can see the events, but I can't see any others. The library is intact--I just can't see the folders or events. Puzzling.

  • Oracle streams sql query

    hello all, I had setup a table level replication(one directional) on DML operations, and I've some queries which only tells me that DML transactions happened. But, Is there any query to check- what were the DML transations/changes happened(sqlid,sqlt

  • Solaris 8 4/01 Install Problem on Compaq Deskpro

    Howdy, I am trying to install Solaris 8 4/01 on a Compaq Deskpro 6000 but I am having a problem at the reboot phase. The instructions indicate that I need to eject the Install CD after the system resets and before the memory test/HW detection phase.

  • HELP!! CANNOT download FLASH @ all

    My mom (a Mac user) did something to my computer a PC when she was here last week... loaded some mapping program and when she was done she deleted it... only I think she got carried away. My Flash Player is no longer on my computer. I have Adobe Read