Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Change data source from Oracle to SQL Server Post Reply Post New Topic
Author Message
Dragos
Newbie
Newbie


Joined: 04 Jan 2013
Location: Canada
Online Status: Offline
Posts: 2
Quote Dragos Replybullet Topic: Change data source from Oracle to SQL Server
     Posted: 04 Jan 2013 at 6:42am
I need change data source from oracle to SQL Server for a built report
the original report use Oracle built driver, for the new SQL Server will use the SQL server OLE driver. However the original report which is pulling data from Oracle uses a command with parameters. When updating the data source from Oracle to SQL in the SET datasource location the command is not recognized since it is written in oracle.
 
If I do not update the datasource and go in database expert and remove the Oracle data source then loose all the report. If also in database expert select the command for the new SQL Server and click on ">" to add then can build the command in SQL and generate new parameters but cannot get rid of the old data source in oracle.
 
basically I just need to update the command in oracle to another SQL Server command and leave the fields as they are.
 
Many thanks,
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 04 Jan 2013 at 7:39am
Here's what I would do:
 
1.  Copy the existing command to somewhere outside of Crystal.
 
2.  Delete from the command in Crystal all Oracle-specific function calls.  If one exists in the selected fields, put a dummy field in there of the same type as the function call.
 
3.  Use Set Datasource Location to change the report from the Oracle connection to SQL Server.
 
4.  Using the SQL saved in Step 1, re-write the SQL so that it works in SQL Server.
 
5.  Paste the SQL from Step 4 back into the Command Editor in Crystal.
 
6.  Save the report.
 
-Dell


Edited by hilfy - 04 Jan 2013 at 7:40am
IP IP Logged
Dragos
Newbie
Newbie


Joined: 04 Jan 2013
Location: Canada
Online Status: Offline
Posts: 2
Quote Dragos Replybullet Posted: 04 Jan 2013 at 2:51pm
Hi Hilfy,
 
did the job. many thanks for the prompt reply
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum