I created a report with one parameter. When I view the report data, I am prompted for the parameter value and the report data is filtered based on what I enter. This works fine. What I would like to do is pass the parameter value from VB to the report without it prompting the user. This is what I tried:
rpt.ParameterFields.Item("CheckNo"
.Value = 170909
I get a type mismatch error with this line.
rpt.ParameterFields(1).Value = "170909"
I get an "Object Required" error with this line.
I am using CR Version 8.0.1
I am using VB Version 6
I am using the CRViewer.dll and launch the report using the following code:
Dim rdApp As CRAXDRT.Application
Dim rpt As CRAXDRT.Report
Set rdApp = CreateObject("crystalruntime.application"
Set rpt = rdApp.OpenReport(App.Path & "\" & rptName)
Call rdApp.LogOnServer ("pdsodbc.dll", "PAC", "PAC", "PACappl", "home"
CRViewer1.ReportSource = rpt
CRViewer1.ViewReport
rpt.ParameterFields.Item("CheckNo"
I get a type mismatch error with this line.
rpt.ParameterFields(1).Value = "170909"
I get an "Object Required" error with this line.
I am using CR Version 8.0.1
I am using VB Version 6
I am using the CRViewer.dll and launch the report using the following code:
Dim rdApp As CRAXDRT.Application
Dim rpt As CRAXDRT.Report
Set rdApp = CreateObject("crystalruntime.application"
Set rpt = rdApp.OpenReport(App.Path & "\" & rptName)
Call rdApp.LogOnServer ("pdsodbc.dll", "PAC", "PAC", "PACappl", "home"
CRViewer1.ReportSource = rpt
CRViewer1.ViewReport