Lorna
August 11th, 2003, 05:39 AM
I need some help with Crystal - I am new to the package and I'm battling with the VB integration
My current .vbp project has a form with the following code
General Declaration
Public CrxApplication As New CRAXDRT.Application
Public CrxReport As New CRAXDRT.Report
Then in my code (I'm showing a menu - depending what the user chooses...)
Select Case Index
Case 0
openfile.Filter = "Reports (*.rpt)|*.rpt"
openfile.ShowOpen
If openfile.FileName <> "" Then
Set CrxReport = CrxApplication.OpenReport(openfile.FileName, 0)
CrxReport.Database.LogOnServer "p2sodbc.dll", dsn, dbName, UserName, UserPassword
'? "p2ssql.dll" vir sql?
CRViewer1.ReportSource = CrxReport
CRViewer1.ViewReport
End If
Case 2
--------------------------------
CrxReport.PrinterSetup Me.hWnd (HERE the error occurs)
---------------------------------
Case 3
CRViewer1.PrintReport
Case 5
End
End Select
when CASE = 2 my program errors - 'Method 'printersetup' of object 'Ireport' failed
what does this mean? I am not using an "Ireport' somewhere
Pse help
Thanks!
My current .vbp project has a form with the following code
General Declaration
Public CrxApplication As New CRAXDRT.Application
Public CrxReport As New CRAXDRT.Report
Then in my code (I'm showing a menu - depending what the user chooses...)
Select Case Index
Case 0
openfile.Filter = "Reports (*.rpt)|*.rpt"
openfile.ShowOpen
If openfile.FileName <> "" Then
Set CrxReport = CrxApplication.OpenReport(openfile.FileName, 0)
CrxReport.Database.LogOnServer "p2sodbc.dll", dsn, dbName, UserName, UserPassword
'? "p2ssql.dll" vir sql?
CRViewer1.ReportSource = CrxReport
CRViewer1.ViewReport
End If
Case 2
--------------------------------
CrxReport.PrinterSetup Me.hWnd (HERE the error occurs)
---------------------------------
Case 3
CRViewer1.PrintReport
Case 5
End
End Select
when CASE = 2 my program errors - 'Method 'printersetup' of object 'Ireport' failed
what does this mean? I am not using an "Ireport' somewhere
Pse help
Thanks!