This is my first ever rdlc report so the approach might be totally wrong. Here is what I need and what I have done:
1. I need to create a page with ReportViewer
2. The rdlc report is designed using Report Wizard and using stored procedure that has a parameter ID to pass in
3. The report itself doesn't have the ID field in it
I put the report in a ReportViewer in a page, the page generate an error saying:
An attempt was made to set a report parameter 'ID' that is not defined in this report
My backend code is very simple:
Sub LoadReport(ByVal ID As Integer)
Dim param As ReportParameter
param = New ReportParameter("ID", ID.ToString, False)
ReportViewer1.LocalReport.SetParameters(New ReportParameter() {param})
ReportViewer1.ServerReport.Refresh()
End SubIt would be greatly appreciated if someone can tell me how to fix it. Thanks in advance.