none
Report Viewer is not working in .net2.0? RRS feed

  • Question

  • Hi,

    I am generating report using Report viewer. I am getting an error like "Parameter value is missing for p1", Here P1 is my parameter in report viewer and in code behind i am passing value to report viewer like this

    MyParameterCollection.Values(0) = "A".ToString

    ReportViewer1.ServerReport.SetParameters(MyParameterCollection)

    Any idea plz.....

    Friday, January 16, 2009 10:59 AM

All replies

  • hi,
      use the snippet i provided  , it work fine with parameter report

    Dim paramReport(2) As ReportParameter

    paramReport(0) = New ReportParameter("ReportName", sReportName)
    paramReport(1) = New ReportParameter("CompanyName", sCompanyName)
    paramReport(2) = New ReportParameter("Period", sPeriod)
    RptViewer.LocalReport.SetParameters(New ReportParameter() {paramReport(0), paramReport(1), paramReport(2)})
    Wednesday, January 21, 2009 10:28 AM
  • Hi,
    Thanks for reply,

    Its working fine now.But one more doubt i am having. That is i am generating report for multiple employees, all details i am sending to one parameter(ie, all employee names to 1st parameter, all phone nos to 2nd parameter, and so on....) In report i have to display 1st employee details in 1st page and 2nd employee details in 2nd page....like that, how is it possible in report viewer????

    Thanks,
    Aswath.
    Wednesday, January 21, 2009 1:08 PM
  • You could use a table control, set grouping in that table control to the employee, and page break on the group.
    Living my life at 123mph in 11.15 seconds
    Wednesday, January 21, 2009 3:24 PM
  • Hi,
    Thanks for reply, I drag n drop a table control. According to my knowledge every table cell is acting like textbox so for that textbox iam writing formula using parameters, but its displaying error. I don't know for table how to send values from code behind. Plz tell me any idea.........

    Thanks.
    Thursday, January 22, 2009 9:07 AM
  • expression for textbox would be   =Parameters!MyCoolParameterName.Value
    Living my life at 123mph in 11.15 seconds
    Thursday, January 22, 2009 7:39 PM