I have an rdlc reportviewer with userName as parameter.
The parameter is called @uchide.
Our spec is to for a user to log in, click on Print Report and print a report that belongs to him or her based on username.
This is my current code with parameter that is supposed to open the report when the report icon is clicked:
Protected Sub btnUser_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnUser.Click
which.Value = "U"
Call Run_Report("")
End Sub
Sub Run_Report(ByVal sel As String)
ReportViewer1.Reset()
ReportViewer1.LocalReport.DataSources.Clear()
' Create report data source
SqlDataSource1.SelectParameters("uchide").DefaultValue = Session("username")
Dim userName As ReportParameter
userName = New ReportParameter("uchide", SqlDataSource1.SelectParameters("uchide").DefaultVal ...
Go to the complete details ...