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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I change my datasource of my Reports which created for one db

Status
Not open for further replies.

essa2000

Programmer
Dec 6, 2000
299
CA
Dears ;

I have a problem here using Crystal Report 9.0 using VB.NET , I have created few reports selecting my development database and now I want to run these reports on Client site with their Server and their production database which has live data in it.

But, all the reports are retrieving data from developement database and it db name is fixed in reports. So, what we are doing here right now we created one database with the same database name which we have at client site. It is hassel for us in testing report. We want to run reports with different database.

I did some R & D and I used UDL files and I made my report using UDL file and now I am changing database name and server name in UDL files and it is ok but it is not refreshing datasource information in Crystal Reports. Reports are stilling retriving data from that database which was selected at the time of creation of that report. I am not saving reports with Data and I am also refreshing data but its not working. I check properties in crystal report it is showing the initial catalog is still old one.

Can someone explained me how can I change my datasource information in crystal report.

Thanks.



Muhammad Essa Mughal
Software Engineer
iLogic Inc.
 
You need to use the Database--->SET LOCATION Function in the menu bar.

The step-by-step methodolgy is covered in the CR-9 User Guide PDF (just search for "SET LOCATION").

FYI - If you are doing this a lot and your report has a lot of tables, I suggest developing your report against a named ODBC System DSN connection then you can quickly repoint it to DEV, PROD and Client DBs just by changing the datasource that the DSN connects to.

Hope it helps...
 
If you don't mind a third party utility, our new .rpt Inspector 2 Professional Suite now comes in two editions. One that supports CR5.x-CR8.5 and one that supports CR9.x. Everything else in the two editions is the same. Including support of a new "data source / database conversion and migration wizard" which allows you to select one or more reports and select multiple sources to a destination for set location, convert driver, verify database. And we support ODBC / OLE DB / Native DB2 / Native Informix / Native Oracle / Native SQL Server / Native Sybase.

Both editions are now available for a FREE 30-day trial download.

Software Forces, LLC

===> two editions released: ".rpt Inspector 2 Professional Suite (for CR5.x-CR8.5)" and ".rpt Inspector 2 Professional Suite (for CR9.x)"
=====> download your FREE 30-day trial today!

proud makers of ".rpt Inspector" brand for Crystal Reports,
"SPL (Smart Pick Lists)" for Crystal Enterprise, and "SmartObjects" for Seagate Info & Crystal Enterprise.

Coming soon ".rpt Inspector 3 Enterprise Suite" for Crystal Enterprise
 
Thanks for nice suggestion , I'll download these tools and see how they work.

I already changed the Location using VB Code but it is not working if any report is calling an other sub report so it that code is not running for sub report.

So, i need to fix it so I'll see into these tools.

Thanks.

Muhammad Essa Mughal
Software Engineer
iLogic Inc.
 
I found 2 (not nice) ways to solve this problem :

1st : don't use OLE DB connection and use ODBC DSN instead... I don't like this one.

2nd : set the connection timeout in the report to 1 second so even if it don't find the server it jumps to the next task (opening the report) after only one second instead of 15 for the default timeout. Not a nice way to do, but it's the one I use.
If someone or I found something better, I'll be happy to set back this timeout to 15s...

Geeks are people who thinks that a kilometer is 1024 meters long.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top