This discussion is archived
4 Replies Latest reply: Jul 19, 2013 8:14 AM by user7259503 RSS

report alias in IR

user7259503 Newbie
Currently Being Moderated

Please help.

I'm running apex 4.1.1;

I have interactive report with 2 report alias: Primary (40 columns display); Alternative (20 columns display );

I also have link "link to custom target" in report link to  form with all 40 columns;

I want if user select Primary report, form shows all 40 columns, if user select alternative report, form shows only 20 columns;

I know how hide columns in form depend on condition;

I need to know how I can find out what report user picked.

Thanks MB

  • 1. Re: report alias in IR
    InoL Guru
    Currently Being Moderated

    Can you save the two layouts as public reports? The user can just choose between the two. That may be the simplest solution.

    Customizing Interactive Reports

  • 2. Re: report alias in IR
    user7259503 Newbie
    Currently Being Moderated

    How it will help me? My problems, I don't how dynamically know what report is used?

    let me give you more details:

    I have dynamic action on IR report page

    event: after refresh

    type: region

    execute pl/sql

    begin

    select nvl(report_name,'DEFAULT')

    into :P1_REPORT_ID

    FROM apex_application_page_ir_rpt irr        

    WHERE irr.application_id = 193   

    AND irr.page_id = 1

    AND irr.application_user=:app_user    

    AND irr.session_id = :app_session

    and last_updated_on=(select max(last_updated_on)

    FROM apex_application_page_ir_rpt irr        

    WHERE irr.application_id = 193   

    AND irr.page_id = 1

    AND irr.application_user=:app_user    

    AND irr.session_id = :app_session)

    AND ROWNUM=1;

    END;

     

    I'm using this value in form for show/hide columns;

    This is working when user start page or user add search criteria and push button go; It does not work when user simple using report lov; The last_updated_on column not updated in this case.

    I hope I gave enough details,

  • 3. Re: report alias in IR
    InoL Guru
    Currently Being Moderated

    Okay, I think I misunderstood the first time. You are going from the IR to another page, that is a form with the same columns as shown on the IR.

     

    You can try something like this. Create a dynamic action on the saved report selector:

     

    Event: Change

    Selection Type: jQuery Selector

    jQuery Selector: #apexir_SAVED_REPORTS

     

    Action: Set Value

    Fire On Page Load: Checked

    Set Type: Javascript Expression

    Javascript Expression: $v("apexir_SAVED_REPORTS")

     

    Affected Elements: your item P1_REPORT_ID

     

    I got this to work more or less. It fires on page load, and the first time you select another saved report. It doesn't fire when you change to another saved report again. Don't know why, maybe you can find the problem.

  • 4. Re: report alias in IR
    user7259503 Newbie
    Currently Being Moderated

    Thanks a lot. It is working perfectly for me

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points