Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Choosing the database at runtime using a parameter selection

Status
Not open for further replies.

thiagarr

Technical User
Oct 20, 2006
86
0
0
US
Hi,

I use CR 9.2 and Oracle 9i.

I am looking at an option to select the database to be used for the report using a parameter while running the reports.

For example, I would like to have one of the parameters for selection between 'TEST' and 'PROD' and depending on the selection the datasource should be set to TEST or PROD database. The table and fields will be identical in both the datasources.

Is there any way this could be achieved? If not, what are the alternate options available? We use both Views and Stored Procedures to get the data from the server end.

Any help on this would be very much appreciated.


Thanks and regards,

TR
 
A Stored Procedure could accept a parameter to accomplish this.

Or you might use a Command Object in CR and insert a parameter into the SQL for the database portion.

-k
 
K,

Thank you for the pointers. I will look at these options.

In the meanwhile, I was searching the forums and found something similar to this using 'Setlogin' and other commands. They do not seem to be CR syntax commands. Are these VB commands? Can these be used in the Command option as you mentioned or how does one use them?

Any help would be appreicated.

Thanks and regards,

TR
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top