水晶报表制作8.5的报表,vb用RUNTIME水晶8.0,VB中如何传递参数给报表,急!

解决方案 »

  1.   

    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