Print Page | Close Window

Changing datasource = problems!

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Data Connectivity
Forum Discription: How to connect to data sources and export reports
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=13510
Printed Date: 01 May 2024 at 8:19pm


Topic: Changing datasource = problems!
Posted By: nlc19
Subject: Changing datasource = problems!
Date Posted: 16 Jun 2011 at 5:03am
Hi,
Am hoping someone can help me.  One of our applications was recently upgraded and this also involved the SQL database being renamed. (SQL2005).  I have a load of Crystal reports which all point to the previous named database.
 
I have tried to update the report using the Database > Set Datasource Location and this is now showing the new Database name.
 
However, if I run the report it is still pulling information from the old Database.  If I click on Database > Show SQL query it shows the name of the old database, not the new one which is now showing as the Datasource Location.
 
This is Crystal XI.  Any ideas?  Thanks in advance.



Replies:
Posted By: CircleD
Date Posted: 16 Jun 2011 at 1:10pm
If the Tables and Fields names aren't identical to the old database you have to remap the data fields.It seems to me though you should be getting an error message instead of the report running at all.I wonder if the Set Datasource Location box isn't recognizing them as the same and you just think it's changing.Whenever i change one the report properties changes to "False" and I have to edit it to say "True" or the report throws a Database Connection Error.


Posted By: Dewald
Date Posted: 19 Jun 2011 at 11:42pm
sometimes, i have found that you have to the set location on all the tables, not just the connection.


-------------
Dewald Botha
http://www.ITClarity.co.za


Posted By: CircleD
Date Posted: 20 Jun 2011 at 12:00pm
Originally posted by Dewald

sometimes, i have found that you have to the set location on all the tables, not just the connection.



Yea,you're right.in Crystal 10 after you've changed the database name you have to go under properties for each table and double click the "Overridden Qualified Table Name:" and retype the name of the table.Don't forget the subreports either.


Posted By: sharona
Date Posted: 06 Jul 2011 at 4:53am
make sure you verify the database to pull in the new values

-------------
sharona


Posted By: keithme
Date Posted: 19 Jan 2013 at 2:15pm
I have this same problem. Verifying the Database just says its ok. ALL Table Names (and fields) are the SAME. None of the above seems to help.

My sql code also still says the OLD Database name.. can we EDIT this code??

Hope someone can help!!!


Posted By: kevlray
Date Posted: 22 Jan 2013 at 6:04am
This has been an issue for some time.  The only way that I have been able to 'fix' it is to update data source table by table (Set Datasource Location).

I hope this helps.


Posted By: keithme
Date Posted: 22 Jan 2013 at 12:20pm
Looking at: http://www.crystalreportsbook.com/Forum/forum_posts.asp?TID=13766 I found the second entry said:

Click on Database (menu item on top of the screen)
click Log on or off Server (Data Explorer window should open up)

Being in despair (as nothing had helped and this didn't look like my answer) I DID click ==LOG ON OR OFF SERVER==

Nothing seemed to happen but when I went back to the report IT HAD MY NEW DATA THERE!!!!!!

Wonderful!!

So we should all make sure to click the "Log On of Off Server" FIRST as I guess that breaks the OLD connection and ALLOWS the NEW!!

Worked for me anyway.. thanks to user "CrystalDesigner".

:)



Print Page | Close Window