Print Page | Close Window

Change Database Provider at Runtime

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
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=178
Printed Date: 02 May 2024 at 5:41am


Topic: Change Database Provider at Runtime
Posted By: jpavlik
Subject: Change Database Provider at Runtime
Date Posted: 01 Feb 2007 at 7:41am
I have a report I created with a SQL connection (PULL model).
 
Can I change this at runtime to use the Oracle OLE DB connection?
 



Replies:
Posted By: BrianBischof
Date Posted: 01 Feb 2007 at 11:07am
Yes, to change the Crystal Reports data provider at runtime you have to use the ReportDocment object model and change the properties ServerName and DatabaseName to the Oracle database. Unfortunately, I've never used Oracle before so I don't know if there are any special quirks that might trip you up.

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: hilfy
Date Posted: 01 Feb 2007 at 1:05pm
If you used a Command Text to set the query for the report, you're probably ok.  If you used the Database Expert to select tables and link them, you may have problems due to the table owner being included in the SQL.  Use the Database menu option "Show SQL Query" to take a look at the SQL in your report.  If there is "sa." in front of the table names, just changing the driver will not work because sa is not a valid table owner in Oracle.
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics



Print Page | Close Window