2. After registering the assembly you will be able to use ReportViewer control to fetch reports on your ASPX page. Below is the code for ReportViewer Control on ASPX page.
3. Now, please find below code, which you will need to write into your ASPX.cs file...
protected void Page_Load(object sender, EventArgs e)
{
MyReportViewer.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
MyReportViewer.ServerReport.ReportServerUrl = new Uri("http://reportserver/erports"); // Report Server URL
MyReportViewer.ServerReport.ReportPath = "EmployeeReport"; // Report Name
MyReportViewer.ShowParameterPrompts = false;
MyReportViewer.ShowPrintButton = true;
// Below code demonstrate the Parameter passing method. User only if you have parameters into the reports.
Microsoft.Reporting.WebForms.ReportParameter[] reportParameterCollection = new Microsoft.Reporting.WebForms.ReportParameter[1];
reportParameterCollection[0] = new Microsoft.Reporting.WebForms.ReportParameter();
reportParameterCollection[0].Name = Perks.Constants.Pages.ClientAdmin.ShowInvoice.QueryStrings.INVOICEID;
reportParameterCollection[0].Values.Add(Request.QueryString[Perks.Constants.Pages.ClientAdmin.ShowInvoice.QueryStrings.INVOICEID].ToString());
MyReportViewer.ServerReport.SetParameters(reportParameterCollection);
MyReportViewer.ServerReport.Refresh();
}
Reporting Services is very vast. Please try to refer other online contents and articles. Although if you have any doubts or query, please feel free to contact me.
I am unable to load SSRS in my asp .net 2008 project.
Hi Abhishek,
How are you trying to do this?
What method you are using to load report in your application(Reporting Services SOAP API, the ReportViewer controls for Microsoft Visual Studio or URL access)?
What issue are you facing?
if you have just started the implementation then you must start from this article on how SSRS can be implemented in web applications -
Best way is to use report viewer control as Nirav explained.
When you ask a question, remember to click "mark as answered" when you get a reply which answers your question; this ensures the right forum member gets credit for being helpful (and makes search more relevant too).
In your code I see how to specify ReportServerUrl but have a question regarding reportPath. What is report is not in the root on ReportServer but couple of folders down?
In your code I see how to specify ReportServerUrl but have a question regarding reportPath. What is report is not in the root on ReportServer but couple of folders down?
How to Configure ReportViewer for Remote Processing
<div id="sectionSection0">
To configure a ReportViewer control for remote processing, specify a server report to use with the control. Follow these steps to select a server report:
Add the ReportViewer control from the Data section of the Toolbox to the form or Web page in your project.
In the ReportViewer Tasks smart tags panel, in Choose Report, select
Server Report.
In the Report Server text box, type the report server URL. The default URL syntax is http://localhost/reportserver. The actual URL that is used in your installation might be different depending on how the report server virtual directory settings are
configured.
In the Report Path text box, type the fully qualified path of a published report. The report path must start with a forward slash ( / ). The path must not include report URL parameters. The path consists of folders in the report server folder namespace
and the name of the report. For example, if you installed the SQL Server 2005 sample report Company Sales on your report server, the report path might be
/AdventureWorks Sample Reports/Company Sales.
Build or deploy the application to verify that the report appears correctly in your application. If you receive HTTP proxy errors, verify that the report server URL is correct. If you receive a compatibility error, confirm that the report server is a SQL
Server 2005 instance.
Select the ReportViewer control and open the Properties window.
Set properties on the ReportViewer control to configure the report toolbar and run-time functionality. Use the reference documentation to learn about each property. For more information, see
ReportViewer Properties.
abhishek_22m
Member
109 Points
38 Posts
How to call SSRS in asp .net Project
Jun 27, 2008 06:52 AM|LINK
Hi Friends,
I m new in SQl Server Reporting Services. I am unable to load SSRS in my asp .net 2008 project.
Could you please solve my issuse and send me relevant code of asp .net using C#.
Thankx
With regards
Abhishek Kumar
9818028524
Server 2005 sqLserver2005
Abhishek
9818028524
shrainpatel
Member
631 Points
144 Posts
Re: How to call SSRS in asp .net Project
Jun 27, 2008 09:27 AM|LINK
Hi Abhishek,
To learn how to create reports, please visit below URL...
http://nileshpupadhyay.blogspot.com/2008/05/simple-steps-for-developing-ssrs-report.html
Now, to call the report into the ASPX page, please follow below steps...
1. Register the Microsoft.Reporting.WebForms into your ASPX page.
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>2. After registering the assembly you will be able to use ReportViewer control to fetch reports on your ASPX page. Below is the code for ReportViewer Control on ASPX page.
3. Now, please find below code, which you will need to write into your ASPX.cs file...
Reporting Services is very vast. Please try to refer other online contents and articles. Although if you have any doubts or query, please feel free to contact me.
Regards,
My Blog
My Work Place
MARK AS ANSWER if post helps. It's required to boost somebody's moral to help community.
akjoshi
Contributor
3636 Points
615 Posts
Re: How to call SSRS in asp .net Project
Jun 30, 2008 01:51 PM|LINK
Hi Abhishek,
How are you trying to do this?
What method you are using to load report in your application(Reporting Services SOAP API, the ReportViewer controls for Microsoft Visual Studio or URL access)?
What issue are you facing?
if you have just started the implementation then you must start from this article on how SSRS can be implemented in web applications -
http://technet.microsoft.com/en-us/library/ms153697(SQL.100).aspx
Best way is to use report viewer control as Nirav explained.
jzurbo77
Member
34 Points
75 Posts
Re: How to call SSRS in asp .net Project
Dec 30, 2009 03:09 PM|LINK
Hi,
In your code I see how to specify ReportServerUrl but have a question regarding reportPath. What is report is not in the root on ReportServer but couple of folders down?
My report's URL is
http://nareports/Reports/Pages/Report.aspx?ItemPath=%2fCBA+Development+Sandbox%2fMOC_01%2fMOC_R03_Individual
can I assume that ReportServerUrl shoud be
"http://nareports/Reports"
and reportPath should be
"%2fCBA+Development+Sandbox%2fMOC_01%2fMOC_R03_Individual" ??
thanks
shcdeveloper
Member
2 Points
7 Posts
Re: How to call SSRS in asp .net Project
Jan 23, 2010 05:13 PM|LINK
hi , did you get the answer to your post above? I have the exact same problem. What should the report path be in your case? PLEASE HELP
timexist1999
Member
2 Points
1 Post
Re: How to call SSRS in asp .net Project
May 05, 2010 07:55 AM|LINK
How to Configure ReportViewer for Remote Processing
<div id="sectionSection0">To configure a ReportViewer control for remote processing, specify a server report to use with the control. Follow these steps to select a server report:
-
-
-
-
-
-
-
</div>Add the ReportViewer control from the Data section of the Toolbox to the form or Web page in your project.
In the ReportViewer Tasks smart tags panel, in Choose Report, select Server Report.
In the Report Server text box, type the report server URL. The default URL syntax is http://localhost/reportserver. The actual URL that is used in your installation might be different depending on how the report server virtual directory settings are configured.
In the Report Path text box, type the fully qualified path of a published report. The report path must start with a forward slash ( / ). The path must not include report URL parameters. The path consists of folders in the report server folder namespace and the name of the report. For example, if you installed the SQL Server 2005 sample report Company Sales on your report server, the report path might be /AdventureWorks Sample Reports/Company Sales.
Build or deploy the application to verify that the report appears correctly in your application. If you receive HTTP proxy errors, verify that the report server URL is correct. If you receive a compatibility error, confirm that the report server is a SQL Server 2005 instance.
Select the ReportViewer control and open the Properties window.
Set properties on the ReportViewer control to configure the report toolbar and run-time functionality. Use the reference documentation to learn about each property. For more information, see ReportViewer Properties.