Sending a Parameter to a Report RRS feed

  • Question

  • What am i doing wrong?

    I am trying to send a parameter to a report viewer so that I can filter the data that is displayed by the part number.


    I am using an access database and VS 2005.

    Here is the code that I am using to try to get a parameter into the reprote viewer.


    Dim PartNumberReportParameter As Microsoft.Reporting.WinForms.ReportParameter = New Microsoft.Reporting.WinForms.ReportParameter("PartNumberReprotParameter", PartNumberParameter)






    Tuesday, June 22, 2010 7:08 PM

All replies

  • Hi Brian.Cox.Donaldson,

    - Are you displaying a server report (RDL and not RDLC)? I'm assuming that you have gotten a simple report to display in your app.

    - Not sure about VB syntax, but in the VS2005 ReportViewer, the ServerReport.SetParameters() element takes an IEnumerable.

    Cephas Lin This posting is provided "AS IS" with no warranties.
    Tuesday, June 22, 2010 7:42 PM
  • element takes an IEnumerable.

    What does that mean.


    What do I need to do? I am new to VB and VS I am learning as needed.



    Wednesday, June 23, 2010 8:58 PM
  • It takes a list/array/etc. Something like:

    ReportViewer1.ServerReport.SetParameters(New ReportParameter() {PartNumberReportParameter})

    Cephas Lin This posting is provided "AS IS" with no warranties.
    Thursday, June 24, 2010 6:26 PM