Results 1 to 3 of 3

Thread: [Resolved] Passing Multiple Parameters w/CR & VB 2005

Threaded View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 2007
    Posts
    18

    Resolved [Resolved] Passing Multiple Parameters w/CR & VB 2005

    Hello

    I have searched for how to pass multiple parameters and have found a way but I still get prompted to enter all but one of the multiple parameters. Which ever parameter I add to my parameter list last is the winner, all others I must enter via the prompt dialog. Here's the code:

    Code:
            Dim paramFields As New CrystalDecisions.Shared.ParameterFields
            Dim paramField As New CrystalDecisions.Shared.ParameterField
            Dim paramFieldRange As New CrystalDecisions.Shared.ParameterDiscreteValue
    
            Me.crvReportViewer.ReportSource=rptSource
    
            paramField.Name = "@datStart"
            paramFieldRange.Value = gdatReportStartDate
            paramField.CurrentValues.Add(paramFieldRange)
            paramFields.Add(paramField)
    
            MsgBox(paramField.Name.ToString())
    
            paramField.Name = "@datEnd"
            paramFieldRange.Value = gdatReportEndDate
            paramField.CurrentValues.Add(paramFieldRange)
            paramFields.Add(paramField)
    
            paramField.Name = "@txtUser"
            paramFieldRange.Value = System.Environment.UserName
            paramField.CurrentValues.Add(paramFieldRange)
            paramFields.Add(paramField)
    
            Me.crvReportViewer.ParameterFieldInfo = paramFields
            Me.crvReportViewer.Refresh()
    What I see in the autos window is that paramfields has three items and that all three are exactly the same. I know that this is the issue, but how do I get the paramfields to contain the three different parameters? Does this have something to do with using the ParameterDiscreteValue? Thanks
    Last edited by katuil; Aug 23rd, 2007 at 04:34 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