I have a project that uses a menu application as a front end to about 40 reports. Each report uses the same grid application(mygrid), with a different WHERE clause in the SQL to select the appropriate data. In the menu application, I set the value of two global variables, [title] and [dataselection]. [title] is used in the Grid Title and [dataselection] in the grid SQL - SELECT col1,col2,…
WHERE area IN ([dataselection]).
This works without issue as long as I am viewing the most recent report that was opened. If I open the report for area1, then open the report for area2 and then return to area1, if I perform any action that regenerates the grid, the WHERE clause picks up the last value of [dataselection] and [title], which in my example are actually the values for area2.
I can duplicate the grid application 40 times, and alter the SQL and grid title, but that creates a maintenance headache should the report need to change.
What I need is a way to define variables that are not local ($myvar) which are limited in scope to a Scriptcase event inside an application (mygrid), not global ([myvar]), which are accessible to all applications in the project, not application-specific (attributes?), since mygrid is reused 40 times, but rather menu tab (iframe) specific, so that when a report is invoked from the menu application, variables are saved and accessible only to that instance of the application (menu tab/iframe). The variables need to persist so that the grid pulls the correct data when refreshed.
Any ideas?