Solved

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

Posted on 2013-02-07
3
828 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This video discusses moving either the default database or any database to a new volume.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

762 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

6 Experts available now in Live!

Get 1:1 Help Now