Forum Stats

  • 3,782,050 Users
  • 2,254,585 Discussions
  • 7,879,901 Comments

Discussions

LOV to determine the resultset

RayWon
RayWon Member Posts: 31
edited Sep 27, 2016 11:56PM in APEX Discussions

Hi,

I want to add a LOV on an existing Interactive Report page. The LOV contains rows of single characters and the resultset select statement with have a where condition where the first character of the name field equals to the user chosen value of the LOV.

1. Is Content Body a good place to put the List?

2. How do I refer to the List selection in the SQL query of the report?

I am using APEX 5.0 on 11.2 Express.

The Interactive Report page is generated by APEX wizard.

Thanks.

Tagged:

Best Answer

  • fac586
    fac586 Senior Technical Architect Member Posts: 20,337 Red Diamond
    edited Sep 27, 2016 7:05AM Accepted Answer
    RayWon wrote:I got the LOV in place above the actual data in the same Content Body region. I also changed the SQL of the actual data region.But selecting the LOV has no effect.I guess I need to create a processing trigger but how do I do that?

    Create a Refresh dynamic action on the report region triggered by Change events on the list item.

    1. Add the list item to the Page Items to Submit property of the report region. This causes the values in the shuttle to be submitted before a partial page refresh is performed on the report, making them available in session state when the region content is refreshed.

    2. Create a Change dynamic action on the list item:

    Event: Change

    Selection Type: Item

    Item: <list item>

    Action: Refresh

    Fire On Page Load: No

    Selection Type: Region

    Region: <report region>

Answers

  • fac586
    fac586 Senior Technical Architect Member Posts: 20,337 Red Diamond
    edited Sep 27, 2016 4:30AM
    RayWon wrote:I want to add a LOV on an existing Interactive Report page. The LOV contains rows of single characters and the resultset select statement with have a where condition where the first character of the name field equals to the user chosen value of the LOV.1. Is Content Body a good place to put the List?

    The obvious location for the list item is in the interactive report region.

    2. How do I refer to the List selection in the SQL query of the report?

    Using bind variable notation in a predicate in the WHERE clause:

    select    ...from    ...where    ...and name_col like :p1_initial_lov || '%'
  • RayWon
    RayWon Member Posts: 31
    edited Sep 27, 2016 5:41AM

    I got the LOV in place above the actual data in the same Content Body region. I also changed the SQL of the actual data region.

    But selecting the LOV has no effect.

    I guess I need to create a processing trigger but how do I do that?

  • fac586
    fac586 Senior Technical Architect Member Posts: 20,337 Red Diamond
    edited Sep 27, 2016 7:05AM Accepted Answer
    RayWon wrote:I got the LOV in place above the actual data in the same Content Body region. I also changed the SQL of the actual data region.But selecting the LOV has no effect.I guess I need to create a processing trigger but how do I do that?

    Create a Refresh dynamic action on the report region triggered by Change events on the list item.

    1. Add the list item to the Page Items to Submit property of the report region. This causes the values in the shuttle to be submitted before a partial page refresh is performed on the report, making them available in session state when the region content is refreshed.

    2. Create a Change dynamic action on the list item:

    Event: Change

    Selection Type: Item

    Item: <list item>

    Action: Refresh

    Fire On Page Load: No

    Selection Type: Region

    Region: <report region>

  • RayWon
    RayWon Member Posts: 31
    edited Sep 27, 2016 11:56PM

    Got it working. Thanks.

This discussion has been closed.