cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot Change Database Location in Crystal Reports 2008

Former Member
0 Kudos

My problem is that I appear to be unable to change Database Locations. I have used Crystal for number of years u2026 had a little break for the last 2 yearsu2026 so maybe a little rusty

I am working with SQL DB, I have created ODBC connections.

When I change the database location via u201CSet datasource Locationu201D it does not seem to register with the Report

I have DB-A as the current DB

In the Data Source Locationu201D Select Replace u2026a new Connection (or My Connection) add DB-B, select update, it refreshes the Current Data Source, looks right. I check the properties and the database associated with the ODBC is the one I want. I either run the report or Field Explorer and do not see the updated content.

The DBs are the same tables, but different data (ie location A and Location B). I have double/tripled check that the DBs do indeed contain different data

I have tried verifying the Databaseu2026still no luck

I look at the u201CShow SQL Queryu201D still has the old DB Connection string

I have tried this on 5 reports. One did change OK, for a while then I saved it and it does not update now

I have tried 4 different databases

I have deleted the ODBC connections, so the report prompts for a new Database, still not reading it correctly u2026. Something odd

I have tried every possible sequence of keys stokes within the u201CSet Datasource Locationu201D and u201CLog off / Log On Serveru201D.

I have even tried changing the DB in the ODBC set-up and used the same name ODBC still not luck

I am using Windows 7, SQL Server 64, Crystal Reports 2008 Version 12.2.0.290

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Brian,

Thank-you this worked. It does seem a little cumbersome to have to do it this way, but it worked

Regards

Andrew

former_member292966
Active Contributor
0 Kudos

Hi Andrew,

Glad it worked. Earlier versions use to ask if you wanted to change all the tables in the report to the same datasource and did it automatically.

I've never trusted it so I've always done each table individually. It makes a certain amount of sense since it's possible to have a report using multiple datasources so automatically setting the location on all the tables would be a problem.

Thanks,

Brian

Answers (2)

Answers (2)

former_member292966
Active Contributor
0 Kudos

Hi,

If you go to Database | Set Datasource Location, you will see the tables being used in the report in the top window.

Highlight one of the tables you want to change. Do not click the plus sign to open the properties.

The bottom window, go to Create New Connection and logon to your second database.

Highlight the table you want to use. Do not click the plus sign to open the properties.

Now both your source table in the top window and the target table in the bottom window should be highlighted.

Press the Update button.

Repeat the process for each of the tables in the report then press the Close button.

Now have a look at the SQL Query and see if it's pointing to the correct database.

Good luck,

Brian

brian_kuipers3
Discoverer
0 Kudos

I've seen this when Crystal Reports cannot find a matching schema. Instead of doing the entire database, try to do one view/table at a time.

Former Member
0 Kudos

Brian,

Thank you for this.... can you provide me with a little more detail please? .... Where do I add tables? I looked in the Set Datasource Location..... I did drill down to the tables (only have 4)... selected added to report .. but did not seem to work