Results 1 to 4 of 4

Thread: ***CLOSED***Passing Multiple Parameters to Crystal Reports

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2002
    Location
    Sunny Scottsdale Arizona
    Posts
    254

    ***CLOSED***Passing Multiple Parameters to Crystal Reports

    I currently use the following method to pass a parameter to a Crystal 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
    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?

    Thank You
    Last edited by Jefftopia; Jul 23rd, 2007 at 04:48 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width