Passing parameter from windows application to SSRS Report.

Posted by Rajanarayanan under Sql Server on 5/3/2013 | Points: 10 | Views : 2318 | Status : [Member] | Replies : 1
Hi,

I am very new in SSRS. I want to passing parameter from windows

appln to SSRS.

-> select * from dbo.Employee where isActive = @active

query in my ssrs report.

-> in VS 2010 button click event.

rptViewer.ServerReport.ReportServerUrl = new Uri(@"http://localhost/ReportServer");
rptViewer.ServerReport.ReportPath = "/Custom Report/Custom Tempalte1";
rptViewer.ProcessingMode = ProcessingMode.Remote;
rptViewer.RefreshReport();
ReportParameter[] reportParameterCollection = new ReportParameter[1];
reportParameterCollection[0] = new ReportParameter("active", "1");
this.rptViewer.ServerReport.SetParameters(reportParameterCollection);
rptViewer.ShowParameterPrompts = false;
rptViewer.ServerReport.Refresh();

here i am passing parameter(active) to '1' but it is not working for me. ie) it is not produce report for active = '1' .
what is wrong this . please kindly help me.

Thanks & Regards
Narayanan P



Responses

Posted by: Niladri.Biswas on: 5/3/2013 [Member] Platinum | Points: 25

Up
0
Down
This should help you

http://www.codeproject.com/Articles/194097/SSRS-Series-Part-I-Various-ways-of-Report-creation#9

Best Regards,
Niladri Biswas

Rajanarayanan, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response