Click here to Skip to main content
15,946,012 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi all,
i want to know generate the reports using reportviewer vs2010 with mysql database.while i generate the reports with single table means(dataset,report.rdlc and reportviewer).when i use join query and pass parameters,its not working.Tell me how to pass parameters in reportviewer vs2010

i tryed with this code,but iam not get any o/p

C#
this.ReportViewer1.LocalReport.ReportEmbeddedResource = "Report1.rdlc";
ReportParameter rps = new ReportParameter("course_code",);
this.ReportViewer1.LocalReport.SetParameters(new ReportParameter[] { rps });
this.ReportViewer1.LocalReport.Refresh();
Posted
Updated 10-Oct-11 0:05am
v4
Comments
André Kraak 10-Oct-11 6:06am    
Your parameter creation seems to be missing a second parameter: ReportParameter rps = new ReportParameter(“course_code”,);

1 solution

this.ReportViewer1.LocalReport.ReportEmbeddedResource = "Report1.rdlc";
ReportParameter rps = new ReportParameter("course_code","ABC");
this.ReportViewer1.LocalReport.SetParameters(new ReportParameter[] { rps });
this.ReportViewer1.LocalReport.Refresh();


Check this
http://www.gotreportviewer.com/localmodeparameters/index.html[^]
 
Share this answer
 
Comments
srujitharam 11-Oct-11 1:59am    
hi,
thanks for your solution.its better than before,now report is loading after execution, but it doesn't show any o/p.

Regards
srujitharam 18-Oct-11 5:34am    
"ABC" is static value,but i want to pass multiple values,and i replace "ABc" with parameter but is not working.
luisnike19 18-Oct-11 9:35am    
luisnike19 - 1 sec ago
I do not understand what's the problem here. Any exception?
are u using a rdlc file? Did you add the DataSource to the report?

I hope this helps you
http://forums.asp.net/t/1240076.aspx/1
srujitharam 18-Oct-11 10:15am    
iam working with ssrs 2005 using mysql database.iam trying to pass multi value parameters.In filters i wrote like IN(?),parameter is passed, and i double click on dataset i wrote in parameters like
=JOIN(Parameters!course_code.Value,","),but it generates only single value. i want to generate multi value parameters,could you tell the solution for this.i dont know mysql is supported or not to ssrs

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