Skaugen
asked on
crystal 10 report, need to run in different server and database
I have vb code to a crystal report 10, it works fine, if I have the report run in the same SQL server and database. However, if I run the report in different sql server and database, it will show up the Server1.DB1.procedure doesn't exist.
I need a way that I can dynamically change the servername and databasename when run the report, so the report can be run in different combination as long as the table/view/procedure exists.
Please help!
I need a way that I can dynamically change the servername and databasename when run the report, so the report can be run in different combination as long as the table/view/procedure exists.
Please help!
ASKER
Thanks for you feedback.
For example,
First I need the report run in Server1 and Database1, and then user may switch to run the same report in Server2 and Database2.
The Table structure in Server1/Database1 and Server2/Database2 are the same. However the data might be different.
I need the report can run in both, but in Crystal 10, the table location is like Server1.Database1.table, when I run the report in Server2.Database2, it will prompt up the error message saying "Server1.Database1.table is not exist...", which make sense since the report is trying to run in Server2.Database2.
So I need a solution for this, In crystal 8.5, what i did is to remove Server1.database1. from the datasource, but in Crystal 10, I have no way to do that. I was trying to find a way that if I can dynamically change it in my VB6 code.
Please suggest!
Skaugen
For example,
First I need the report run in Server1 and Database1, and then user may switch to run the same report in Server2 and Database2.
The Table structure in Server1/Database1 and Server2/Database2 are the same. However the data might be different.
I need the report can run in both, but in Crystal 10, the table location is like Server1.Database1.table, when I run the report in Server2.Database2, it will prompt up the error message saying "Server1.Database1.table is not exist...", which make sense since the report is trying to run in Server2.Database2.
So I need a solution for this, In crystal 8.5, what i did is to remove Server1.database1. from the datasource, but in Crystal 10, I have no way to do that. I was trying to find a way that if I can dynamically change it in my VB6 code.
Please suggest!
Skaugen
Copy the report and change the datasource....assign it to separate DB's and be done with it.
So that you will have 2 separate reports on for each datasource...named as such.
MikeV
So that you will have 2 separate reports on for each datasource...named as such.
MikeV
ASKER
The problem is I have a lot of reports and don't want to keep two copies of all and also, I would like to have the flexibilty to do this, so the report will not restrict to server/database name as long as the table/view/proc structure is the same.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I would like to use the trusted connection, instead of using myTable.SetLogOnInfo "Server", "Database", "User", "Password"
since different SQL server's username and password may vary, control from admin server is a lot of easy.
Any idea?
since different SQL server's username and password may vary, control from admin server is a lot of easy.
Any idea?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Glad i could help
mlmcc
mlmcc
I"m not sure I'm understanding your question...but I'll take a shot at it.....
Do you have MS Data Transformation Services? If so, copy the database TABLE(s) that ther report needs over to the other SQL Server. Why do you need to change the datasource SERVER?
MikeV