Initializing Variables On Page Load
EEGJun 9 2009 — edited Jun 11 2009Hello.
I have an Apex 3.2 application in which a page has a report region displaying a huge amount of data.
I would like to suspress the running of this report whenever a user navigates to this page, say, via a tab link.
I tried creating a hidden page item P3_SHOW_REPORT_FLAG and gave it a default value of 'NO'. I created a page button called RUN_REPORT that, when clicked, invokes an After Submit Computation that assigns 'YES" to this hidden item. This causes my report to run. The problem arises whenever a user navigates back to this page from somewhere else in my application say via a tab link. The report immediately is invoked again and the user must wait before the page even displays.
In the tab link, I tried assigning P3_SHOW_REPORT = 'NO'. I thought that this would suspress my report if a user clicks on the tab. And it does! Unfortunately, when the user then tries to actually run the report (by clicking the RUN_REPORT button), the page first runs my initializtion statement (P3_SHOW_REPORT = 'NO') that I had placed in the tab link, and so, the report never is invoked.
How then can one initialize my hidden item P#_SHOW_REPORT so that whenever a user navigates to my page the report will not run. Or, perhaps, there is a better approach. In any case, the report should run *only* when the RUN_REPORT button is clicked.
Thank you.
Elie