Click here to Skip to main content
15,913,115 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to retrieve the report parameters from the RDLC local report

C#
LocalReport localReport = (LocalReport)e.Report;
                ReportParameterInfoCollection ps = new ReportParameterInfoCollection();
                ps = localReport.GetParameters();
                ReportParameter paramV = new ReportParameter();


I want to save a specific parameter with its value in the "paramV"
Posted
Comments
[no name] 4-May-14 6:39am    
http://msdn.microsoft.com/en-us/library/microsoft.reporting.winforms.reportparameterinfo(v=vs.90).aspx

1 solution

I got another easier solution:

C#
ReportParameterInfoCollection ps;
 ps = localReport.GetParameters();
 ReportParameter paramV = new ReportParameter();
 foreach (ReportParameterInfo p in ps)
 {
     if (p.Name == "Quart")
     {
         paramV.Name = p.Name;
         paramV.Values.Add(p.Values[0]);
     }
 }
 
Share this answer
 
v2

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