none reportviewer parameters RRS feed

  • Question

  • HI


    I  tried to use the samples in and others c# samples in msnd, but don´t work.


    Anyone have a sample that show how can I pass the parameters to Reportviewer  in VB.NET?




    Nelson de Moura

    Saturday, May 12, 2007 8:00 PM

All replies

  • To passthem into the report viewer from another vb form do the following

    Code Snippet

    Imports microsoft.Reporting.WinForms

    'I have two parameters in my report object "StartDate" 'and "EndDate" -- date type

            Dim sDate As New ReportParameter("StartDate", CType("1/1/07", Date))
            Dim eDate As New ReportParameter("EndDate", CType("5/5/07", Date))

            Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter() {sDate, eDate})

    I'm still trying to find a way to pass parameters from the report it's self to the stored procedures within it.
    Thursday, May 31, 2007 1:16 PM
  • Create a list of reportparameters and add your parameter to it.


    pass the list to the setParameters method.




    dim myparam as new reportparameter("p1,"12345")

    dim myparams as new list (of reportparameter)







    Friday, December 14, 2007 1:40 PM