Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update RPT file with VB

Status
Not open for further replies.

BenMc

IS-IT--Management
Mar 13, 2003
1
NL
Hi,

we have some customers that use our application, combined with a set of reports (Crystal Reports XI). Our application uses VB code to launch the report.

Every customer uses their own schema name, which means that our application will perform (every time a report is called) a "Set Location" for that report. This is effecting the performance, so we would prefer to do this once and then store the data inside that report, meaning VB will have to update the *.rpt file.

Is this possible at all? How to do this?

Cheers,
Ben
 
Yes, this is possible. You will need to have the Developer edition of Crystal to get the SDK that you need. If you're in legacy VB, you'll use the COM SDK, if you're in VB.NET, you'll use the .NET SDK. In either case, you'll load each .rpt file into a ReportDocument object, set the database login, and then save it.

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.
 
Not a problem. Just note that Crystal Reports 2008 requires dot net. The RDC used in prior versions is no longer available. So if you users expect to upgrade to 2008 or a later version, the VB/COM/RDC solution won't work.

You need to build your app for a specific version of VB. While some are interchangable, saving a CR 8 or 8.5 report with the CR 10 run time will mean it can no longer be run/viewed/designed with CR 8/8.5

Editor and Publisher of Crystal Clear
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top