How To Set Up CR 8.5 Report With VB6
Hi guys ...
I using VB6 and CR8.5.
Now I try to open a pre-design report which made using CR8.5 and saved as report file with .rpt extension.
What references i should use to open this report? For your note, i don't want to use Crystal 8.5 Designer.
Thanks in advance.
Re: How To Set Up CR 8.5 Report With VB6
rpt files can only be opened and modified by using the Crystal Report Designer.
Re: How To Set Up CR 8.5 Report With VB6
Are you asking about what references to add to allow the user to print or view the report from your application using the Crystal APIs?
Re: How To Set Up CR 8.5 Report With VB6
I want to view the report on a new window using CR viewer.
Re: How To Set Up CR 8.5 Report With VB6
If using the CR Viewer OCX then Select Project--> Components --> Controls and select the Crystal report control (crystal32.ocx). This will add the view control to the tools. If you want to do it on your own then the API selections I use add the following references to the project: Crystal Report 7 ActiveX Designer Design Time Library (Internal) (craxddt.dll), Crystal Report 8.5 ActiveX Designer Design Time (craxdrt.dll), Crystal Reprot Engine 7 Object Library (cpeaut32.dll).
Re: How To Set Up CR 8.5 Report With VB6
Well, a little confused about that. Can you give me an example project for this? Thanks.
Re: How To Set Up CR 8.5 Report With VB6
I will generate a small app using both methods later today and post.
1 Attachment(s)
Re: How To Set Up CR 8.5 Report With VB6
Here is an example using and OCX and API to display or print using CR 8.5, VB6 with an MSAccess 2000 DB backend. Hope it helps.
Re: How To Set Up CR 8.5 Report With VB6
thanks for the code sample.
i also try different way using craxdrt.dll, crviewer.dll, crviewer.oca.
What the difference between using crystal report activex designer runtime library and crystal report engine object library?
here is my code:
VB Code:
Dim crApp As New CRAXDRT.Application
Dim crReport As New CRAXDRT.Report
Set crReport = crApp.OpenReport(App.Path & "\Reports\ICPShipment.rpt")
frmViewer.crView.ReportSource = crReport
frmViewer.crView.ViewReport
frmViewer.Show vbModeless, Me
Set crReport = Nothing
Set crApp = Nothing
But i have problem with that code, why everytime i run that code always give me an error "server has not yet been opened"?
But when i try to open an empty report, it just work fine.