I am very new to SSRS and wanna know some very important things to begin reporting in it. I created One .rdlc file and binded stored procedure which
accepts Parameters.. and one dataset file(.xsd) created .. How to pass parameters to Dataset(.xsd) and also I used ReportViewer How to bind SSRS to ReportViewer
Thanks And Warm Regards
Narasappa
Narasappa C J
ravi.jadiyannavar@gmail.com
Pls Mark This Post As Answer If it Helps U..
Thanku
for achieving the same you need to use reportviewer control in your aspx page or in your web form. then you need to set the report server url and report path by setting the properties of reportviewer control, if report required parameters, then you can pass
the same using ReportParameters.
this is how you'll achieve it. for more info refer to the link below:
This code helps in connecting with the reports hosted in the MS-SSRS through .NET code. (Example is with C# 4.0 Framework)
----------------------------------------------------------------------------------------------------------------
Microsoft.Reporting.WebForms.ReportParameter[] RptParameters;
reportViewer.ServerReport.ReportServerUrl = new System.Uri(ConfigurationManager.AppSettings["ReportServerURL"]);
reportViewer.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
reportViewer.ToolBarItemBorderColor = System.Drawing.Color.PowderBlue;
reportViewer.ToolBarItemBorderStyle = BorderStyle.Double;
string strUserName = ConfigurationManager.AppSettings["UserName"].ToString();
string strPassword = ConfigurationManager.AppSettings["Password"].ToString();
string strDomain = ConfigurationManager.AppSettings["Domain"].ToString();
reportViewer.ServerReport.ReportServerCredentials = new ReportCredentials(strUserName, strPassword, strDomain);
string strReport = string.Empty;
strReport = ConfigurationManager.AppSettings["ReportsFolder"] + Request.QueryString["ReportName"].ToString();
Below snippet shows on how to pass parameters to the report :
this.reportViewer.ServerReport.ReportPath = strReport;
RptParameters = new Microsoft.Reporting.WebForms.ReportParameter[1];
RptParameters[0] = new Microsoft.Reporting.WebForms.ReportParameter(" <ParameterName>", "<ParameterValue>");
this.reportViewer.ServerReport.SetParameters(RptParameters);
reportViewer.ServerReport.Refresh();
You can pass any number of parameters to the report. Just make sure that the <ParameterName> matches with the parameter name in the report.
</div>
Parthasarathi,
Remember to click Mark as Answer on the post that helps to others.
narasappa
Participant
960 Points
459 Posts
How can I use Reporting Services on ASP.NET Pages
Nov 17, 2012 07:45 AM|LINK
Hi All
I am very new to SSRS and wanna know some very important things to begin reporting in it. I created One .rdlc file and binded stored procedure which accepts Parameters.. and one dataset file(.xsd) created .. How to pass parameters to Dataset(.xsd) and also I used ReportViewer How to bind SSRS to ReportViewer
Thanks And Warm Regards
Narasappa
ravi.jadiyannavar@gmail.com
Pls Mark This Post As Answer If it Helps U..
Thanku
sarathi125
Star
13599 Points
2691 Posts
Re: How can I use Reporting Services on ASP.NET Pages
Nov 17, 2012 08:10 AM|LINK
Hi,
<div sizcache="2" sizset="17">for achieving the same you need to use reportviewer control in your aspx page or in your web form. then you need to set the report server url and report path by setting the properties of reportviewer control, if report required parameters, then you can pass the same using ReportParameters.
this is how you'll achieve it. for more info refer to the link below:
http://odetocode.com/Articles/128.aspx
http://odetocode.com/Articles/156.aspx
http://archive.msdn.microsoft.com/reportviewer
This code helps in connecting with the reports hosted in the MS-SSRS through .NET code. (Example is with C# 4.0 Framework) ---------------------------------------------------------------------------------------------------------------- Microsoft.Reporting.WebForms.ReportParameter[] RptParameters; reportViewer.ServerReport.ReportServerUrl = new System.Uri(ConfigurationManager.AppSettings["ReportServerURL"]); reportViewer.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; reportViewer.ToolBarItemBorderColor = System.Drawing.Color.PowderBlue; reportViewer.ToolBarItemBorderStyle = BorderStyle.Double; string strUserName = ConfigurationManager.AppSettings["UserName"].ToString(); string strPassword = ConfigurationManager.AppSettings["Password"].ToString(); string strDomain = ConfigurationManager.AppSettings["Domain"].ToString(); reportViewer.ServerReport.ReportServerCredentials = new ReportCredentials(strUserName, strPassword, strDomain); string strReport = string.Empty; strReport = ConfigurationManager.AppSettings["ReportsFolder"] + Request.QueryString["ReportName"].ToString(); Below snippet shows on how to pass parameters to the report : this.reportViewer.ServerReport.ReportPath = strReport; RptParameters = new Microsoft.Reporting.WebForms.ReportParameter[1]; RptParameters[0] = new Microsoft.Reporting.WebForms.ReportParameter(" <ParameterName>", "<ParameterValue>"); this.reportViewer.ServerReport.SetParameters(RptParameters); reportViewer.ServerReport.Refresh(); You can pass any number of parameters to the report. Just make sure that the <ParameterName> matches with the parameter name in the report.</div>Remember to click Mark as Answer on the post that helps to others.
My Blog :MyAspSnippets
ramiramilu
All-Star
97887 Points
14503 Posts
Re: How can I use Reporting Services on ASP.NET Pages
Nov 17, 2012 03:12 PM|LINK
http://blog.spiderhawk.com/2006/12/aspnet-report-parameters-from-query.html
thanks,
JumpStart
Shailendra S...
Member
551 Points
145 Posts
Re: How can I use Reporting Services on ASP.NET Pages
Nov 17, 2012 03:28 PM|LINK
http://www.yaldex.com/sql_server/progsqlsvr-CHP-14-SECT-2.html
www.techaray.com