Just wondering whether this is possible without coding it up manually...? I wan a show/hide region but the report detail is only used now and again and takes a couple of seconds to run. So rather than having it as overhead on every page, I want to have a show/hide region and only run the query if the user selects to show.
I know it can be done by branching to another page but I would like it as a region on the same page if possible.
add a where clause to the report query where you use a bind variable to a page item.
Set the initial value of page item to some value that causes the report query to return no result.
Then when the user shows the region change the value of the page item that causes the report query to return the desired result.
That is what evrm meant, i believe.
<li>Create hidden page item, set the value to 0 and 'value protected' to 'No'. eg P1_SHOW_REPORT</li>
<li>amend the where clause in your report query. eg AND :P1_SHOW_REPORT = 1</li>
<li>create an extra true action on the dynamic action you use to show the region. Make this a 'Set Value' action, set the item to value 1.</li>
<li>create an extra true action on the dynamic action you use to show the region. Make this a plsql action, submit the item to the session state (page items to submit). The code can simply be "NULL;".</li>
<li>create an extra true action on the dynamic action you use to show the region. Refresh the report region.</li>
This should refresh the region each time it is shown through the dynamic action.
Thanks for the replies. I have tried the above and got half way but can't quite get it working...
I have set up the actions and when I click the button I Can see that the item value is set in the session browser. But the region doesn't refresh.
If I then manually refresh the page then it shows so it is obvously getting the value, it just seems as though the report isn't refreshing. I have enabled PPR.
I am using a classic report.