I currently use the following method to pass a parameter to a Crystal Report:
What if I have five different ID's for which I want to include on this report? In other words, how can I pass multiple ID parameters to limit the report?Code:Private Sub ParameterExample(MyID_Parameter As Double) '--------Encapslulated code opens cr report-------- Dim Report As New rptExampleReport Dim crPDefs As CRAXDRT.ParameterFieldDefinitions Dim crPDef As CRAXDRT.ParameterFieldDefinition Set crPDefs = Report.ParameterFields For Each crPDef In crPDefs With crPDef Select Case .ParameterFieldName Case "IDParm" .AddCurrentValue MyID_Parameter End Select End With Next Report.EnableParameterPrompting = False frmRptView.CRViewer1.ReportSource = Report frmRptView.Show frmRptView.CRViewer1.ViewReport '------------------------------------------------- End Sub
Thank You




Reply With Quote