I would like to print a report directly from vb based on the selected ID number. I am very new to crystal reports so I don't know all of the components that I need.
I have included in my start up module
Global crxApplication As New CRAXDDRT.Application
Global CrxReport As CRAXDDRT.Report
Then on my print form I have included the following code:
Dim Report As CrystalReport1
Set Report = New CrystalReport1
Set CrxReport = crxApplication.OpenReport(App.Path & "\Report3.Rpt"
strSelectionFormula = "{tblcontent.orderID} = " & gCurrentID
CrxReport.RecordSelectionFormula = strSelectionFormula
Report.PrintOut
When I get to report.PrintOut I receive the error message, Server has not yet been opened. I am using VB6, MS Access 2000 and Crystal Reports 8.5. Can someone please tell me what I am missing?
Thanks in advance for your help.
I have included in my start up module
Global crxApplication As New CRAXDDRT.Application
Global CrxReport As CRAXDDRT.Report
Then on my print form I have included the following code:
Dim Report As CrystalReport1
Set Report = New CrystalReport1
Set CrxReport = crxApplication.OpenReport(App.Path & "\Report3.Rpt"
strSelectionFormula = "{tblcontent.orderID} = " & gCurrentID
CrxReport.RecordSelectionFormula = strSelectionFormula
Report.PrintOut
When I get to report.PrintOut I receive the error message, Server has not yet been opened. I am using VB6, MS Access 2000 and Crystal Reports 8.5. Can someone please tell me what I am missing?
Thanks in advance for your help.