Filtering interactive report question

hi all,
i created an interactive report that uses a query like this..
SELECT i.issue_id "ID",
  i.title "TITLE",
  i.module "MODULE",
  u1.last_name || ', ' || u1.first_name || ' ' || SUBSTR(u1.middle_name,   1,   1) || '.' "OWNER",
  u2.last_name || ', ' || u2.first_name || ' ' || SUBSTR(u2.middle_name,   1,   1) || '.' "REPORTED BY",
  i.report_date "DATE REPORTED",
  u3.last_name || ', ' || u3.first_name || ' ' || SUBSTR(u3.middle_name,   1,   1) || '.' "SUBMITTER"
FROM issues i,
  users u1,
  users u2,
  users u3
WHERE 1 = 1
AND i.owner = u1.user_id
AND i.reported_by = u2.user_id
AND i.submitter = u3.user_idi created an application item called APP_USERID and added a process on the 101 page to select the userid into :APP_USERID from users_table where username = :app_user.
i want to create a default filter based on the current user's user_id. if i change my query like this
WHERE 1 = 1
AND i.owner = u1.user_id
AND i.reported_by = u2.user_id
AND i.submitter = u3.user_id
AND i.owner = :APP_USERIDit works fine but if i wanted to view all records not just owned by the current user, i will have a problem.
can anyone suggest an approach on how i can solve this.
thanks.
regards,
allen

Hi Allen,
I tried some different things in the Interactive reports (make a default with :ITEM or &ITEM.), but they didn't work.
The only why I can think of now how to get it work is by adding in your query a DECODE or NVL
WHERE 1 = 1
AND i.owner = u1.user_id
AND i.reported_by = u2.user_id
AND i.submitter = u3.user_id
AND i.owner = NVL(:APP_USERID,i.owner)
Basically what it does, if the value of :APP_USERID is set it will use that, if that value is null it will return all records. So you would have a process or computation that sets the item APP_USERID to null when you hit something to get all records.
Regards,
Dimitri
-- http://dgielis.blogspot.com/
-- http://apex-evangelists.com/
-- http://apexblogs.info/

Similar Messages

  • Another Interactive Report Question

    Hi guys!
    Is it possible to create link which filters Interactive Report? I would like to create a report on one page which contains all the user saved interactive reports and then if another users clicks one, page changes to a page with an interactive report and the saved report opens?
    With regards,
    PsmakR

    I'm referring to this help text in Advanced attributes - "If saved versions of the report exist, this specifies if they should be displayed as tabs. Turn tabs off if you want to create a separate page with a list of reports.". This is my goal - separate page with reports with on click page redicrection to saved report.
    Im looking through help file and found this:
    Report ID Item
    This attribute enables you to send a user directly to a saved view of the report that they have saved. You specify an item whose value stores the report ID of the saved view. Report ID's can be retrieved from the APEX_APPLICATION_PAGE_IR_RPT view.
    Has anyone played with this? Is it working?
    Please help...
    With regards,
    PsmakR

  • Adding Every Row From a Filtered Interactive Report to a Collection

    I'm creating an email list maintenance application in Apex 3.1. I have an Interactive Report on an email address table. I want the users to be able to run this IR and then click a button to add all of the resulting email addresses into a selected mailing list table. The interface needs to be as quick and simple for the user as possible, so I don't want to force them to click a checkbox beside hundreds of rows.
    Is there a way to add every resulting row from a custom IR to an apex_collection?
    I know that collections can be created based on a query with the CREATE_COLLECTION_FROM_QUERY call. But I don't think it's possible to reference the SQL statement which is dynamically generated through an Interactive Report. I'm referring to the SQL created after the user has applied filters. If there were, then I would just create the collection that way. Please correct me if I'm wrong.
    Thanks,
    Martin

    Hi Martin
    I couldn't find a place where the filters are stored either - it would be nice to know.
    It is possible to get to the filters via javascript as they are actually stored in a table with an id of "apexir_CONTROL_PANEL_COMPLETE". Within there, there are rows for each filter and each row has four cells. The second cell contains an A tag that has the filter itself as the text displayed as a hyperlink on screen. The third cell contains the checkbox that enables/disables the filter. Strings and numbers seem to be formatted ok, so you could pick up these values and create your own WHERE clause, populate a hidden field somewhere and then pick that up to generate a full select statement to get to the id's that you need.
    I haven't yet tried this, so this is theory only - but I can't see that it wouldn't work
    Andy

  • Interactive Report questions

    Good Afternoon,
    I converted a sql classic report to an interactive report. The classic report has parameters, that once selected fires a page process that inserts data into a table, which creates column headings for my report. The parameters still work in the interactive report, but I want the interactive report to handle the parameters instead.
    Problems I can't figure out how to mimic this in the interactive report: example: the classic report could have up to 50 columns and change when a user selects a unit and displays that unit's report date as a column heading once the user hits the run report button. I wan the user to be able to do that using the IR filters, but I cannot find the actions menu items name to change the page process to fire when the user presses apply.
    The parameters the user currently selects are Unit and enter a From and To Date. This is what I need to mimic in the IR. I am using a union query for this report. Is this even possible.
    I am using apex 4.1, theme is Underlined from 3.2 and Oracle 11g.
    Thanks,
    Mary

    Mary,
    Not sure that I understood all of that but, I think, overall, you just want to be able to be able to submit the page (and thus fire your On Submit Page process) when the user clicks Apply? Is this right?
    If so, you don't actually have to fire anything from the click of the Apply button. It turns out that, whenever the Apply button is clicked, the Refresh event is fired for your Interactive Report (IRR). However, what's different is that the IRR refresh is implemented with a "Partial Page Refresh" whereas your Classic Report was implemented using a Page submission, i.e. refreshing just one section versus refreshing the whole page.
    So, all that is necessary is to do something "After Refresh" of the region.
    There are lots of ways to do this. The easiest would be to:
    1. Create a Dynamic Action that is fired After Refresh of your IRR. The "Action" is going to be JavaScript. Here's the code:
    apex.submit('PROPERTY_SET');        2. This causes the page to be submitted whenever the IRR is refreshed. By submitting the page, you will get your whole page refresh that you had before.
    All of this said, I would use AJAX and do all of this without submitting the page but, that is a longer post. This should work for you as a quick solution.
    -Joe

  • Quick Interactive Report Question

    I am testing Apex 4.1 on the oracle webisite
    In order to use the download options of pdf or rtf on an interactive report, do we need BI Publisher.
    I have tested the download email option and it seems to work, but with the subscription option, but I am not recieving an email.
    Gus

    Gus,
    If you want the pdf/rtf in custom format then you need BI Publisher, if just downloading i dont think so.
    Subscription:
    Make sure you enable subscription under
    Report Attributes->SearchBar->Subscription
    then under Add Subscription make sure you fill in all the fields, i use this feature for almost all my applications, it sure does work.
    Kumar

  • Interactive Reports - Question about Downloading PDF, CSV, Email, etc

    I recently installed the latest version of APEX. I deployed it as an EAR on Oracle WebLogic. I then created a simple
    interactive report that has the search bar above the report. The downloads (emailing, pdf, etc) do not work after I
    run the report.
    What setup\configuration is required to get the emailing and downloading of the other files to work?
    fyi: right now I have Oracle WebLogic, Oracle 10g, and APEX running locally on a XP based laptop.
    Thank you in advance,
    Wes

    Hello Wes,
    Sending a report as an email requires an SMTP server. You need to configure your instance settings to point to the SMTP server.
    http://download.oracle.com/docs/cd/E17556_01/doc/admin.40/e15521/adm_mg_service_set.htm#BEJBCEEH
    To download a report as a pdf, excel or RTF... you need to have a reporting engine installed. Check this link for details...
    http://www.oracle.com/technetwork/developer-tools/apex/application-express/configure-printing-093060.html
    Thanks,
    Machaan

  • Interactive Report question-New to Apex

    Hi, I am new to Apex..I request your help in solving a prob..
    I am trying to create an interactive report(IR) which has more than 160 columns..It says the max limit is 60(or 64) columns..I remember when I was just starting to build the app it did allow me to create the report with 160+ columns but I didnt want to start with IR..My entire application has been built and this is the only thing that has to be done..Is there anyway to create an IR with 160+ columns now that I am almost finishing up the app..
    (just a thot-may be create another app with the IR and then import that page-if you think that will work plz guide me on how to do it)
    Regards,
    R

    Hi R,
    I had the same thought; if it's possible to create a new appl with IR with 160+ columns then do so.
    After creating a new appl go back to the original appl, open one of the pages, click the copy button on top of the page, click 'Page in another application', select the new appl with the IR, then select the page with IR ...... follow the steps
    Kind regards
    Mel

  • Filtering Interactive Report which has combo box

    Hi,
    I am a rookie in apex.I have an interactive report in which I have a column which contain's only combo box's. Let me say for example that the display values are Yes and No and the return values are Y and N and the name of the column as "required". When I try to filter the report, I can do so for all the other column's but when I try to do so for this column, I get two combo box's when I click on the expression filter instead of the Yes or No choices. I want the choices to appear in the filter for 'required' column instead of the combo box's. How can I do this? ...I have been searching google in vain...Thanks in advance
    Edited by: user13073434 on May 3, 2010 8:27 PM

    Do I have to recompile this .rdf on the UNIX box again? No.
    How to go about this problem?Have a look at the following notes:
    Note: 337302.1 - Error REP-0756 Unable to find PL/SQL library 'inv.pll' when Opening Report POXPRPOP in Reports Builder
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=337302.1
    Note: 1015074.1 - REP-756,REP-735,REP-736 OPENING REPORT WITH FILESYSTEM ATTACHED LIBRARY
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=1015074.1
    Note: 1016542.6 - Getting REP-0756 : Unable to Find PLsql when Running Standard Reports
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=1016542.6

  • Button branch to filtered interactive report

    Is it possible to have a button branch to an interactive report and filter it per click of the button rather than using the search bar? Basically my user wants the same action as the search bar but in button form on the previous page.
    I know, I know...somoetimes you've just gotta say, "NO" to users, as well.
    Edited by: userRRRYB on Apr 12, 2010 1:06 PM

    You could reference your form fields in the where clause like this:
    SELECT something
       FROM some_table st
    WHERE (:F100_FILTER_01 IS NULL OR st.col_name_01=:F100_FILTER_01)
         AND (:F100_FILTER_02 IS NULL OR st.col_name_02=:F100_FILTER_02);You have to compare the filter to NULL as well. That way, if they don't enter anything in the form field, they will get all records. I've done this with one app, and the users really like it.
    Rick

  • Filtering Interactive Reports with Greater Than Less Than Operators

    The available filter operators in the interactive reports do not include greater than or less than. How is it possible to enable an application user to filter records where greater than or less then logic is needed?
    For example the user wants to query records where sysdate falls between a start and end date.
    Regards,
    Todd

    Ya know, that's all well and good ... BUT ... WHAT IF you do want to sort text type columns with Greater Than and Less Than operatiors??
    SQL does it just Fine ... so WHY does APEX have the limit??? This is an Oracle BUG ... it SHOULD NOT limit the operators ... I realize "they" may be trying to be helpful with proper constraints to field searches ... but ... if SQL can do it, then ... no need for a limit.
    EG ...
    Show the records where
    the "Begin_Year-Wk" data is less than or equal to "2009-09" AND
    the "End_Year-Wk" data is greater than or equal to "2009-04"
    ... to give everything that was running in that 5 week period whether or not it starts within that time frame
    I can run this query perfectly fine via SQL ... but not in APEX ... unless I reconvert a lot of strings back to numbers, and for sorting / formatting / explain-to-user purposes, I really don't want them to be numbers.
    So ... there's gotta be a hidden tweak for operators somewhere ...

  • Interactive Report question - report list question

    Hi!
    I was wondering if I turn off the option to show report as tabs is there a possibility to make another page with list of reports created by current logged in user with an option to click on the name of the report and the IR region shows the saved report?
    With regards,
    PsmakR

    Hi Imran,
    Basically we can have one basic list and 20 interactive lists.
    Once when we reached to 20th list then it goes to shortdump.
    So, inorder to avoid that we can modify the system field
    SY-LSIND.
    Just see this example and try this. I hope this will be useful for you.
    REPORT  ZSAMPLE1111.
    data: begin of itab occurs 0,
            matnr like mara-matnr,
            mtart like mara-mtart,
            mbrsh like mara-mbrsh,
            end of itab.
    data: begin of jtab occurs 0,
          maktx like makt-maktx,
          spras like makt-spras,
          end of jtab.
    select matnr mtart mbrsh into table itab from mara up to 10 rows.
    loop at itab.
    write:/ itab-matnr, itab-mtart, itab-mbrsh.
    hide itab-matnr.
    endloop.
    at line-selection.
    select maktx spras into table jtab from makt where spras = 'EN' .
    case sy-lsind.
    when '1'.
    loop at jtab.
    write:/ jtab-maktx, jtab-spras.
    endloop.
    when '20'.             * changes see here.
    sy-lsind = 1.
    when others .
    write:/ 'name',sy-lsind.
    endcase.
    I hope this will be helpful for you.
    <REMOVED BY MODERATOR>
    Cheers,
    Swamy kunche
    Edited by: Alvaro Tejada Galindo on Apr 15, 2008 4:01 PM

  • Interactive report question

    Hello,
    Is it possible dont include column in IR (simply dont show column on page, but in SELECt it is), but to have opportunnity search data by this column (it means to have this columns list in built in IR's search region).
    Thank you!

    Hi,
    Column need to be available in report, so display attribute can not be hidden.
    But you can hide column from report default layout.
    Regards,
    Jari
    My Blog: http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai

  • Retrieve SQL with filters applied from an Interactive Report

    I want to use an Interactive report as interface for providing parameters to a base report query.
    I would like to capture the full SQL code from the filtered interactive report and then run the sql to create a collection.
    I have found this tread
    Re: Using Data from filtered Interactive Report
    which says that you can use APEX_APPLICATION_PAGE_IR to access the reports SQL. This holds the information about the interactive report when the user saves it. The sql code from the interactive report (after the user has added filters) is stored in the field sql_query.I can only retrieve the base query and not the filtered version even after saving.
    Any ideas how this can be done would be appreciated.
    regards
    PP

    OK Darren I think I've got it working. My solution is an adaption that follows the steps of a blog I found here: http://stewstools.wordpress.com/2009/02/19/get-ir-where-clause/
    My solution allows you to click on a button and the records that are currently displayed in the IR report are saved to an APEX collection. You can then use the collection to save records to a table or run a report on another page. (I haven't included code for this last step but it's easy to find on the forum)
    First a bit of background knowledge. The following APEX views hold all the information on IRs that you access via PLSQL code in the package you need to download. Run an IR report, save a version of the report, then in SQL Workshop have a look at:
    select * from APEX_APPLICATION_PAGE_IR
    select * from APEX_APPLICATION_PAGE_IR_COND
    select * from APEX_APPLICATION_PAGE_IR_COL
    select * from APEX_APPLICATION_PAGE_IR_RPT
    When you run an IR report it has an internal ID that you can access and also a Base Id for each Saved report that is currently in context.
    Here are the steps:
    1) Download the following package and install it in the workspace schema
    http://www.mediafire.com/?nj118x9vmc9
    click on the link "click here to download"
    2)In the HTML header Attribute of the page where your IR runs, put the following Javascript:
    <!--===================================================================-->
    <!--FUNCTION TO RETRIEVE IR REPORTS SQL WITH WHERE CLAUSE
    <!--===================================================================-->
    <script language="JavaScript" type="text/javascript">
    function SaveAndRunReport() {
    document.location='f?p=&APP_ID.:3:&SESSION.:CONSTRUCT_IR_QUERY:NO::'+
    'P3_BASE_REPORT_ID:'+$v('apexir_REPORT_ID');
    </script>
    <!--===================================================================-->
    Notes: You will need to obviously change the URL above to reflect your Page No. (3) and the name of a HIDDEN Item (P3_BASE_REPORT_ID) that you will populate with the base ID of the report.
    Setting :P3_BASE_REPORT_ID to +$v('apexir_REPORT_ID') is an internal thing and works out of the box. It returns the Id of the Base report.
    3) Create a button called SELECT_SPECIMENS (in region position - top of region) in the IR region that will initiate the execution of the IR background SQL to create a collection with the current selected records.
    TARGET= URL
    URL Target = javascript:SaveAndRunReport();
    You might also want to create a condition that only shows the button when there are records selected
    CONDITION TYPE=Exists(SQL returns at least one row)
    EXPRESSION 1 - put the SQL of the IR report here.
    4)Create a branch back to the same page (3) and with the REQUEST attribute set to the value in the Javascript URL above e.g. CONSTRUCT_IR_QUERY. Create a condition on the branch that uses this branch WHEN BUTTON PRESSED= SELECT_SPECIMENS
    5) Create an AFTER HEADER PROCESS with the following code:
    declare
    v_base_query clob;
    v_where clob;
    v_query clob;
    v_base_where varchar2(12):=' where 1=1 '; -- incase there is no where clause in the base query
    begin
    if apex_collection.collection_exists('IR_COLLECTION') THEN
    htmldb_collection.delete_collection( p_collection_name => 'IR_COLLECTION');
    end if;
    --GET THE BASE QUERY OF THE IR REPORT
    select sql_query
    into v_base_query
    from APEX_APPLICATION_PAGE_IR
    where application_id=:APP_ID
    and page_id=:APP_PAGE_ID; -- you can only have one IR report per page
    --UNCOMMENT TO VIEW THE PARAMETERS TO THE PACKAGED FUNCTION
    --raise_application_error(-20001, :APP_ID||'-'||:APP_PAGE_ID||'-'||:SESSION||'-'||:P3_BASE_REPORT_ID);
    --GET THE SQL FILTER CODE
    select apex_ir_query.ir_query_where(:APP_ID,:APP_PAGE_ID,:SESSION,:P3_BASE_REPORT_ID)
    into v_where
    from dual;
    --CHECK TO SEE THAT THERE IS A "WHERE" CLAUSE IN THE BASE QUERY
    if instr(upper(v_base_query),'WHERE ') > 0 then
    v_query:=v_base_query||' '||v_where;
    else
    v_query:=v_base_query||' '||v_base_where||' '||v_where;
    end if;
    --UNCOMMENT TO SEE THE FULL QUERY SYNTAX
    --raise_application_error(-20001,v_query);
    --CREATE COLLECTION FROM IR RECORDS
    apex_collection.create_collection_from_query(P_collection_name=>'IR_COLLECTION',p_query=>v_query);
    exception
    when others then
    raise_application_error(-20001, 'Interactive report not found. Contact Administrator. Could not create collection of records.');
    end;
    remember to update P3_BASE_REPORT_ID above to your HIDDEN ITEM name.
    Set the following attributes for the process above
    CONDITIONAL PROCESSING
    CONDITION TYPE = Request=Expression 1
    EXPRESSION 1 --> CONSTRUCT_IR_QUERY (Note: this was set on the branch in step 4 above)
    6) Run the IR report, click on the "SELECT SPECIMENS" button then click on the Session link on the Developer's Toolbar and select VIEW COLLECTIONS from the popup list then click GO. You should now see the IR records.
    By the way I've been testing in IE not Firefox.
    ...and that's it!
    enjoy
    Paul P

  • Interactive reports filter

    How can I run Interactive report only after entering all criteria ?

    vlablin,
    Are you hiding it because the report is slow without any filters? or because showing the full dataset not make sense?
    The thread here might be helpful: Re: Interactive Report Question
    - Marco

  • Interactive Report NLS Language

    Hi again,
    Apex 3.2.0
    Oracle XE
    I was wondering if you could help.
    I have a combo box on a form region that selects a language. The idea of this is to change the number and date formats when displaying data in reports and on forms.
    On my reports and forms my format strings are set to a page item e.g. :P10_CURRENCY_FORMAT which contains the oracle currency format I need, e.g. FML999G999G999G999G990D00.
    I can then set the NLS_CURRENCY value by either altering the session or via the apex.util:
    ALTER SESSION SET NLS_CURRENCY='£';
    or
    APEX_UTIL.SET_SESSION_STATE('FSP_LANGUAGE_PREFERENCE','en-gb');
    and the correct currency symbol appears in front of the number in the report.
    This all works fine until I get to filtering interactive reports.
    The problem is when I want to filter interactive reports all the currency settings are set back to the APEX defaults set in APPLICATION/GLOBALIZATION.
    I then created a BEFORE HEADER process to alter the session, however when filtering interactive reports, the page isn't refreshed so this takes no effect.
    So I have ended up with £ symbols in my report columns and when I filter it, they all change to $ symbols, the next page reverts back to £ until I filter again.
    Am I going about it all the wrong way, or does anybody have any ideas?
    Thanks,
    Blackstone.

    This approach won't work with interactive reports as the Before Header process is not executed by the AJAX call that refreshes the report.
    This is a deficiency in IR operation that we can hope will be addressed by a future enhancement to provide the ability to run processes pre- and post-IR refresh.
    In the meantime, IR refreshes do run the Virtual Private Database PL/SQL call defined in the application security attributes, so putting the NLS modification code there will work. Go to Application > Shared Components > Edit Security Attribute | Virtual Private Database (VPD), and make the call from there. Due to the specific requirements of the code that has to be called from here when used for security purposes, this is probably best done by setting this up to make 2 separate calls to packages defined outside APEX, one to handle security-related details and the other to orchestrate any other code that has to be run. (For example, in this case it may not be desired to alter the NLS environment on every page, so the program could take a parameter specifying the current page and apply the ALTER SESSION conditionally on this.)
    [See this thread|http://forums.oracle.com/forums/thread.jspa?threadID=936753] for a similar issue.

Maybe you are looking for

  • How can i copy a moving image (video) off the screen?

    How can I copy Video from the screen? IE, is there a similar way to the cmd arrow 4 to copy a screen shot?

  • 10.3 still not available q10

    Hi, iam using unlocked BBQ10 in pakisan, the problem which iam facing is still no sign on 10.3 update on my phone i have tried the sim in and out procedure with mobile network switched off still no luck, i would like to know why and what is the reaso

  • Problem in making pz tag working in a jsp

    hai Iam working with the rules and wanna access a rule in a jsp through the pz div tag.... I created the segment in the ebcc tool and than assosiated the user id as visitor7 and the id as classifications rule as ShivaSegment The rule seems to execute

  • HOW TO  upload OF URL ITEM INTO FOLDER programmatically

    Does anybody know how to upload URL item into folder programmatically either using sql command or PL/SQL. Please help...because I need to upload about 10,000 of URL link into a folder. Doing this one by one might not practical. Thanks.

  • How to enable editing sites with SharePoint Designer

    HI, when i try edit my web part in SharePoint designer I receive a error: "Web Site Editing is Disabled. This web site has been configured to disallow editing with SharePoint Designer. Contact your web site administrator for more information." I neve