Click here to Skip to main content
15,912,457 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Every One,

I am showing records in .rdlc file report in visual studio 2010.
On My page i have two textboxes 'Datefrom' & 'DateTo'. Now i want to show these both values on report header. But i could not find the code to pass value to parameters.
I have add two parameters in report.

please give me any idea.
Posted

1 solution

You need to create a parameter in report and pass the value to it at runtime in your code. This parameter can be set to display the assigned value during report viewing.
Something like:
C#
List<ReportParameter> paramList = new List<ReportParameter>();
paramList.Add(new ReportParameter("SurnameColumnHeader",
GetGlobalResourceObject("UserReport", "SurnameColumn").ToString()));
ReportViewer1.LocalReport.SetParameters(paramList);


Following resource should help: Setting SSRS Report Parameters from ASP.NET C# Code[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900