first open the report with the following methods: 1) crystalreport control 2) add the report into the project (project->add->crystal report) 3) add reference (crystal report 8.5 ActiveX Designer Run time Library, definition as follows with vb code: Dim m_Application As New CRAXDRT.Application Dim m_Report As CRAXDRT.Report set m_Report = m_Application.openreport("test.rpt") '1: first parameter m_Report.ParameterFields(1).addCurrentValue(your parameter value)
' use the crystalreport viewer control crviewer1.reportsource = m_Report crviewer1.zoom 1 crviewer1.viewreport
1) crystalreport control
2) add the report into the project (project->add->crystal report)
3) add reference (crystal report 8.5 ActiveX Designer Run time Library, definition as follows with vb code:
Dim m_Application As New CRAXDRT.Application
Dim m_Report As CRAXDRT.Report set m_Report = m_Application.openreport("test.rpt")
'1: first parameter
m_Report.ParameterFields(1).addCurrentValue(your parameter value)
' use the crystalreport viewer control
crviewer1.reportsource = m_Report
crviewer1.zoom 1
crviewer1.viewreport