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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CAN I UPDATE REPORT THAT EXISTS IN VB6 RDC?? 2

Status
Not open for further replies.

TNN

Programmer
Sep 13, 2000
417
US
From within VB6.0 I have imported or added a existing crystal report that was created outside of VB6. Now I have updated the same report outside of VB6 and want to update the report that exists in VB6. Is that possible.

I know you can make changes to a report from within VB6 using the Crystal RDC and then save the changes to a Crystal reports file outside of VB6 but can you go the other way?? or do you have to import the changed report as a new Crystal report. If so that means re-writing existing code.

TNN, Tom


TOM
 
The downside to using .dsr files is that they compile into your.exe and if you want to update the report, you need to do so in source, recompile and redeploy.

In your case, you should be able to open your VB project delete the .dsr and reimport/add the changed report. If needed you could change the .dsr to what the original was and maintain your code links.

Make sure you try this with a [bcopy[/b] of your project source.

Cheers,

SurfingGecko
Home of Crystal Ease
 
SurfingGecko,
I deleted .dsr from my vb6 app and then imported or added the crystal report again. Seemed to be easiest way. Still had to go in and delete code that comes with the import, that I am not using, and remove the report form as the start-up form.

You mentioned the drawbacks of the .dsr files. Is there a way to use the crystal reports from within vb6 without having to import or add them to the vb6 app???

Thank you for your suggestions.

TNN, Tom


TOM
 
sure, rather than declare your report object as

dim Report as New CrystalReport1

dim Report as New craxdrt.report

set report = application.openreport(path)

of course this is a bit of paraphrase, but I think you get the idea


Cheers,

SurfingGecko
Home of Crystal Ease
 
Hi SurfingGecko

Thanks for your note. I was searching for a way to use the integration of the RDC without needing to embed the rpt reports into the exe.

It seems the Application object also needs to be declared, resulting in the following code:

Dim rptReport As New CRAXDRT.Report
Dim appApplication As New CRAXDRT.Application
Set rptReport = appApplication.OpenReport("Sample path")

Danny


[rockband] [wiggle][wiggle][wiggle]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top