VBorDeliver
Programmer
Hi!
I have set up a report that I call from my VB app using the Crystal OCX control. I need to change the location of the SQL database on the fly, this I can do for reports that access the SQL tables directly by using the code:
CrystalReport.Connect = "dsq=" & DatabaseName
However I have set up a stored procedure for the report in question that works fine except for when I try and change the location of the database. It just won't do it!!!
Usually you have to remove the 'Database Name' part from the SQL query in Crystal, unfortunaly when using stored procedures you just cannot get rid of this part of the query, every time you remove it it just appears again!!!
Any ideas on how to solve this would be greatly appreciated, I don't really want to have a seperate report for each database.
I have set up a report that I call from my VB app using the Crystal OCX control. I need to change the location of the SQL database on the fly, this I can do for reports that access the SQL tables directly by using the code:
CrystalReport.Connect = "dsq=" & DatabaseName
However I have set up a stored procedure for the report in question that works fine except for when I try and change the location of the database. It just won't do it!!!
Usually you have to remove the 'Database Name' part from the SQL query in Crystal, unfortunaly when using stored procedures you just cannot get rid of this part of the query, every time you remove it it just appears again!!!
Any ideas on how to solve this would be greatly appreciated, I don't really want to have a seperate report for each database.