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

change datasource of a report 2

Status
Not open for further replies.

HowardHammerman

Instructor
Oct 11, 2001
640
US
My client has two companies and he has created two SQL databases on the same SQL server. Each database has the identical number of tables named the same way. I created a report using one of the companies and now he wants me to clone the report for use with the other.

I clicked on database/set datasource location and clicked on "update" but the source did not move. When I look at the SQL query it is obvious that it is still pulling from the old database.

Using Crystal 2008.

Thanks,

Howard Hammerman,
Crystal Training and Crystal Material
On-site classes and one-on-one coaching
Low-cost telephone/email support
FREE independent Crystal newsletter
howard@hammerman.com
800-783-2269
 
Use the menu item Database/Set Location

Create a new connection and select each table from and then the table in the new connection.

Are you using ODBC or OLEDB to connect to the database? Nicer if you use the same method to the new database.

I also find it easier to create a new report against the new data source, and then both the original and new source are listed under "Current Connections".

Editor and Publisher of Crystal Clear
 
Thanks,

That did the trick. I didn't know that I had to do it on a table-by-table basis. I tried to update the entire tree at once. It works now.

Howard Hammerman,
Crystal Training and Crystal Material
On-site classes and one-on-one coaching
Low-cost telephone/email support
FREE independent Crystal newsletter
howard@hammerman.com
800-783-2269
 
You do not have to do it table by table if when building the report you defined the fully qualified table name.

In database/set location open up the properties of each table and double click fully qualified name. Enter the table name again.

This will remove schema name from SQL query and make it more portable if you want to repeatedly switch schemas.

Ian
 
Thanks,

A great suggestion.

Howard

Howard Hammerman,
Crystal Training and Crystal Material
On-site classes and one-on-one coaching
Low-cost telephone/email support
FREE independent Crystal newsletter
howard@hammerman.com
800-783-2269
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top