Method to use the substitution strings from the Region Footer of (interactive) reports for other purposes.
In the example above, the #TOTAL_ROWS#; substitution string is used to fill page item P1009_REPORT_TOTAL_ROWS, using jquery.
The value of this page item can then be used in dynamic actions, e.g. to show/hide other items.
Note: Make sure that in your page template, the javascript substitution strings listed below are located in the Header and not in the Footer.
E.g. in Theme 42 of Apex 5.0 these are located in the footer, resulting in Javascript error "ReferenceError: $s is not defined".
#APEX_JAVASCRIPT#
#THEME_JAVASCRIPT#
#TEMPLATE_JAVASCRIPT#
#APPLICATION_JAVASCRIPT#
#PAGE_JAVASCRIPT#
Item P1009_REPORT_ROWS_SHOWN contains the number of rows that are actually displayed in an Interactive Report; it is not useful for Classic Reports.
The number of rows displayed changes whenever e.g. using filters or changing the number of rows of the IR. Those types of IR actions have no effect on the substitution strings, since they refresh the report itself using PPR (Partial Page Refresh) and not the footer that contains the substitution strings.
Dynamic Actions
P1009_REPORT_ROWS_SHOWN (2x):
Note that we need 2 versions, because the class we are searching for got a new name in Apex 5.
Note also that you will probably need to substitute "LINK" for another column header, one that exist in your report and that cannot be hidden by the user.
To use P1009_REPORT_TOTAL_ROW, create true/false actions to show/hide items (or to perform any other actions you want).