Reportviewer .net 2005 passing a parameter from a form to a report. RRS feed

  • Question

  •   I am trying set up a form where the user can enter a date field in a textbox and that can used to filter out data on a report.  The report contains a parameter so is there any way to pass that from the form to the report defined in the reportviewer? 

    Is there any examples or instructions on how to do this anywhere?

    I am trying to do this with SQL reporting services.

    Friday, October 3, 2008 5:24 PM


All replies

  • You can programmatically set a parameter value in the following way (VB.NET syntax):

    <CLSCompliant(False)> Protected parameter(0) As Microsoft.Reporting.WinForms.ReportParameter

    Me.parameter(0) = New Microsoft.Reporting.WinForms.ReportParameter("your parameter name", "your parameter value")



    Monday, October 6, 2008 7:11 AM
  • Thanks, it worked.
    Monday, October 6, 2008 2:45 PM