CR 9 to an Oracle db (the database belongs to an outside group so I have no ability to make changes/views at the db level).
Each of 6 agencies has a parallel set of tables differing only by the first 2 characters of the table name (i.e. all the same field names, only the table names change).
Ie.
A1_Master
Report_No
Report_Date
Etc.
A2_Master
Report_No
Report_Date
Etc.
I would like to write one report that prompts for agency and then only queries the correct set of tables. Is there a way to use variables to specify the table name?
As an alternative I tried using case select formulas to connect the display (and selection) data to the right table based on the selected agency but there are no real links between the tables for each agency so Crystal seems to be failing to return data due to multiple starting points. If I deselect all but one agency’s tables and rem out the case statements connecting to the other agencies’ tables it returns data fine.
I did find a way around using 6 subreports (each hard coded to point to one agency’s tables) in different report footer sections which are selectively suppressed but I was hoping to find a more elegant way that only connects to one agency’s tables and doesn’t involve maintaining 6 subreports.
Each of 6 agencies has a parallel set of tables differing only by the first 2 characters of the table name (i.e. all the same field names, only the table names change).
Ie.
A1_Master
Report_No
Report_Date
Etc.
A2_Master
Report_No
Report_Date
Etc.
I would like to write one report that prompts for agency and then only queries the correct set of tables. Is there a way to use variables to specify the table name?
As an alternative I tried using case select formulas to connect the display (and selection) data to the right table based on the selected agency but there are no real links between the tables for each agency so Crystal seems to be failing to return data due to multiple starting points. If I deselect all but one agency’s tables and rem out the case statements connecting to the other agencies’ tables it returns data fine.
I did find a way around using 6 subreports (each hard coded to point to one agency’s tables) in different report footer sections which are selectively suppressed but I was hoping to find a more elegant way that only connects to one agency’s tables and doesn’t involve maintaining 6 subreports.