Quantcast
Channel: SQL Server Reporting Services
Viewing all articles
Browse latest Browse all 1418

Create a rdlc report with parameter passed from query string not working, please help, thanks.

$
0
0

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 Sub

It would be greatly appreciated if someone can tell me how to fix it. Thanks in advance.


Viewing all articles
Browse latest Browse all 1418

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>