How to feeding Crystal Report 8.5 parame开发者_如何学Cters from VB6.0 Application?
Here is one way of doing it (assuming that crxRpt points to a valid report object):
Dim crxParam as CRAXDRT.ParameterField
For Each crxParam In crxRpt.ParameterFields
    Select Case crxParam.Name
        Case "{?MyStringParam1}"
            crxParam.AddCurrentValue "Parameter1 value"
        Case "{?MyNumberParam2}"
            crxParam.AddCurrentValue 25.35
    End Select
Next crxParam
Use the GetItemByName(ByVal Name As String, Optional ByVal SubreportName As Object = Nothing) As CRAXDDRT.ParameterFieldDefinition method. Once you have the ParameterFieldDefinition object, the world is your oyster.
here is the way to pass parameters to RPT via CRviewer
Set Report = Appl.OpenReport(App.Path & "MyReport.rpt")
CRViewer1.ReportSource = Report
Report.Database.Tables.Item(1).SetLogOnInfo CnDNS, CnDB, CnUser, CnPwd
Report.EnableParameterPrompting = True
Report.DiscardSavedData
Report.ParameterFields(1).ClearCurrentValueAndRange
Report.ParameterFields(1).AddCurrentValue ParameterValue1
Report.ParameterFields(2).ClearCurrentValueAndRange
Report.ParameterFields(2).AddCurrentValue ParameterValue2
Report.ParameterFields(3).ClearCurrentValueAndRange
Report.ParameterFields(3).AddCurrentValue ParameterValue3
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论