My code is:
Dim crxApp As New CRAXDRT.Application
Dim crxRpt As CRAXDRT.Report
'Declare a ReportSourceRouter object
Dim MultiReport As New CRVIEWERLibCtl.ReportSourceRouter
' Open the report
Set crxRpt = crxApp.OpenReport(App.Path & "\PrtPicTkt.rpt")
' Clear any saved data to force the report to read from the db
crxRpt.DiscardSavedData
' Set the connection for the report.
crxRpt.Database.Tables(1).SetLogOnInfo "Macola02", "Macola02", "administrator", "odyssey"
Do ' more than one report per run
' Create itemSelect
' Set up selection formula
crxRpt.RecordSelectionFormula = itemSelect
MultiReport.AddReport crxRpt
Loop
'Set the ReportSource of the Crystal Report Smart Viewer to the
'ReportSourceRouter object
CRViewer1.ReportSource = MultiReport
CRViewer1.ViewReport
It seems to be creating the multireport, but the viewer doesn't launch when i ask it to viewreport. Any ideas
Dim crxApp As New CRAXDRT.Application
Dim crxRpt As CRAXDRT.Report
'Declare a ReportSourceRouter object
Dim MultiReport As New CRVIEWERLibCtl.ReportSourceRouter
' Open the report
Set crxRpt = crxApp.OpenReport(App.Path & "\PrtPicTkt.rpt")
' Clear any saved data to force the report to read from the db
crxRpt.DiscardSavedData
' Set the connection for the report.
crxRpt.Database.Tables(1).SetLogOnInfo "Macola02", "Macola02", "administrator", "odyssey"
Do ' more than one report per run
' Create itemSelect
' Set up selection formula
crxRpt.RecordSelectionFormula = itemSelect
MultiReport.AddReport crxRpt
Loop
'Set the ReportSource of the Crystal Report Smart Viewer to the
'ReportSourceRouter object
CRViewer1.ReportSource = MultiReport
CRViewer1.ViewReport
It seems to be creating the multireport, but the viewer doesn't launch when i ask it to viewreport. Any ideas