|
-
Jan 23rd, 2003, 07:24 PM
#1
Thread Starter
New Member
Using an external .RPT file with RDC in VB6 **RESOLVED**
I am trying to use an existing .RPT file from within the Report Designer Component in VB6. The code I'm using is code I've seen in multiple places (books, forums, etc.) yet it does not work. I get an error message back saying "Server has not yet been opened."
According to the Crystal Reports Support site, this error is caused by an invalid database connection. I already have a database connection opened and used by the time I get to the report, and the report itself has all (?) of the connection info. The report was created using Crystal Reports Developer 8.5.
I've tried creating another connection from within the form, but without success.
Here is my current code:
VB Code:
Dim Application As CRAXDRT.Application
Dim Report As CRAXDRT.Report
Private Sub Form_Load()
Screen.MousePointer = vbHourglass
Set Application = CreateObject("CrystalRuntime.Application")
Set Report = Application.OpenReport(App.Path & "\reports\ticketless.rpt")
CRViewer1.ReportSource = Report
CRViewer1.ViewReport
Screen.MousePointer = vbDefault
End Sub
Private Sub Form_Resize()
CRViewer1.Top = 0
CRViewer1.Left = 0
CRViewer1.Height = ScaleHeight
CRViewer1.Width = ScaleWidth
End Sub
Any help is greatly appreciated! Thanks
Last edited by wileecoyote; Apr 1st, 2003 at 05:32 PM.
-
Jan 31st, 2003, 03:39 PM
#2
Thread Starter
New Member
**RESOLVED**
Thanks to all who viewed but couldn't solve.
There's a document on the www.crystaldecisions.com website that explains converting from other methods to the RDC.
Here's the link:
http://support.crystaldecisions.com/...s/c2009933.asp
From there you can download three different PDF manuals that explain in detail how to use the RDC when you're familiary with the other methods (OCX, API, or Crystal Automation Server).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|