Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
I have tried implementing SSRS report integration using report viewer but somehow i am not able to do it.
http://abcd1234/Reports/Pages/Report.aspx?ItemPath=%2fMyReportFolder%2fCityList

where abcd1234 is report server and CityList is report name.Above URL is report URL which open report on server.

I am not sure if there is some problem with this URL and we have to change some setting on SSRS server to get some other URL for the report.
i tried using :: https://www.c-sharpcorner.com/article/how-to-display-ssrs-report-in-asp-net-mvc-web-application/
But not able to do it.
It will be really help,if i can get code same to render report using report viewer having above mentioned URL.

What I have tried:

String reportFolder = System.Configuration.ConfigurationManager.AppSettings["SSRSReportsFolder"].ToString();

rvSiteMapping.Height = Unit.Pixel(Convert.ToInt32(Request["Height"]) - 58);
rvSiteMapping.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;

rvSiteMapping.ServerReport.ReportServerUrl = new Uri("http://abcd1234/Reports/Pages/Folder.aspx?ItemPath=%2fMyReportFolder"); // Add the Reporting Server URL
rvSiteMapping.ServerReport.ReportPath = String.Format("/{0}/{1}", reportFolder, Request["ReportName"].ToString());

rvSiteMapping.ServerReport.Refresh();
Posted
Updated 26-Jun-18 5:27am

1 solution

Try:
C#
rvSiteMapping.ServerReport.ReportServerUrl = new Uri("http://abcd1234/ReportServer");
rvSiteMapping.ServerReport.ReportPath = String.Format("/{0}/{1}", reportFolder, Request["ReportName"]);

The ReportServerUrl is the "Web Service URL" in the reporting services configuration. It should not include the folder or report names.
 
Share this answer
 

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