Solved

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

Posted on 2013-02-07
3
903 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 70

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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

739 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