Results 1 to 6 of 6

Thread: how to pass multiple parameters to a report?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2002
    Posts
    150

    how to pass multiple parameters to a report?

    hi,
    I have a report that works fine and gets me all data. I need to integrate this report to a vb.net application and instead of getting all the records I will need to pass 2 different paramters (ie, Project_ID and Location) through VB.
    the Project_ID can be only one or few but the location in only one. what should I change in my report so it expects these paramters?

    sample code or pointing into the right directions would be very helpful

    thank you,

  2. #2
    Frenzied Member Asgorath's Avatar
    Join Date
    Sep 2004
    Location
    Saturn
    Posts
    2,036

    Re: how to pass multiple parameters to a report?

    "The dark side clouds everything. Impossible to see the future is."

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Nov 2002
    Posts
    150

    Re: how to pass multiple parameters to a report?

    actually I was looking for solution at the Crystal report end. my report runs and gets all data in the table. what should I change in the report so it looks for certain paramaters(Id)?

    thanks

  4. #4
    Frenzied Member Asgorath's Avatar
    Join Date
    Sep 2004
    Location
    Saturn
    Posts
    2,036

    Re: how to pass multiple parameters to a report?

    In vb.net its easy in the open the field explorer window of the report.
    left click on Parameter Fields right-click and select NEW and a window popup for you to create a new parameter.
    Jorge
    "The dark side clouds everything. Impossible to see the future is."

  5. #5
    Hyperactive Member vincentg's Avatar
    Join Date
    Jun 2005
    Location
    Chicago IL, USA
    Posts
    261

    Re: how to pass multiple parameters to a report?

    this works on VS.Net 2003

    VB Code:
    1. Dim oCrystal As New rptYourCrystalReport
    2.  
    3. Sub SetCRParameters(ByVal oCrystal As CrystalDecisions.CrystalReports.Engine.ReportClass)
    4. With oCrystal
    5.  .SetParameterValue("prName", "Vincent")
    6.  .SetParameterValue("prAccountNo", "12345")
    7. End With
    8. End Sub

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Nov 2002
    Posts
    150

    Re: how to pass multiple parameters to a report?

    thank you
    Last edited by waely; Sep 12th, 2006 at 10:43 AM.

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