Solved

crystal reports in vb.net - change ODBC connection via application

Posted on 2013-02-07
3
848 Views
Last Modified: 2013-02-11
Hi,

I hope that someone is able to help. I am setting up a test system and this also requires me taking a copy of all the reports from the live system. The problem is that they all use a LIVE DSN ODNC connection. I have started trying to write an application that will go through all the report files in a directory and change the connection and save the report. I am not sure how i would change the ODBC connection in the crystal report. I have created an application with a crystal report:

Then load the report:
rpt.Load("C:\missingarticles.rpt")

I am not sure if i use the following to set the ODBC connection property?
rpt.DataSourceConnections

Any help would be appreciated.

Regards,

Ross
0
Comment
Question by:ross13
3 Comments
 
LVL 69

Expert Comment

by:Éric Moreau
ID: 38863823
if you want to manage your ODBC connections, check http://emoreau.com/Entries/Articles/2009/08/Managing-ODBC-entries-from-a-Net-application.aspx

but you could also push a dataset to the report (instead of having the report fetching its own data). check http://emoreau.com/Entries/Articles/2006/09/Feeding-Crystal-Reports-from-your-application.aspx
0
 
LVL 18

Accepted Solution

by:
vasto earned 500 total points
ID: 38864165
Check this tool :
http://www.r-tag.com/Pages/CRDataSource.aspx

It will update all reports from a folder with subfolders to a new ODBC or OLEDB connection. ( What you tried to do)
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 38866774
IS your test/dev system on the same server?
If not you could create ODBC connections with the PROD name on the servers and use them for all new reports which would eliminate the need to change as you move a report between systems

mlmcc
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now