I would like to pass some values from VB6 to CR11. Ifound some code posted. I have tried but get the following error. Here is the code I copied from here and the associated error.
VB Code:
Sub RunReport() Dim crxApp As New CRAXDDRT.Application Dim crxReport As CRAXDDRT.Report Dim crxDatabaseTables As CRAXDDRT.DatabaseTables Dim crxDatabaseTable As CRAXDDRT.DatabaseTable Dim crxDatabase As CRAXDDRT.Database Dim crxParm As CRAXDDRT.ParameterValues Dim crxSubReport As CRAXDDRT.Report Dim ReportName As String ReportName = "C:\Consulting\Georgia\Cutbill\Reports\Guide.rpt" 'Report Path Set crxReport = crxApp.OpenReport(ReportName) crxReport.ParameterFields.GetItemByName("Door Series").AddCurrentValue (CBDoorCode(CBLI)) crxReport.ParameterFields.GetItemByName("Slat Type").AddCurrentValue CBSlatType(CBLI) 'crxReport.PrintOut False, 1 'uncomment to printout the report With crView 'Control Name .ReportSource = crxReport .ViewReport While .IsBusy DoEvents Wend .Zoom "75" .Visible = True End With End Sub




Reply With Quote