SSRS报告与ASP.NET集成

时间:2018-06-25 17:52:20

标签: asp.net reporting-services reportviewer

我尝试使用报表查看器实现SSRS报表集成,但是以某种方式我无法做到这一点。 http://abcd1234/Reports/Pages/Report.aspx?ItemPath=%2fMyReportFolder%2fCityList

其中abcd1234是报告服务器,CityList是报告名称。上面的URL是在服务器上打开报告的报告URL。

我不确定此URL是否存在问题,我们必须更改SSRS服务器上的设置以获取报告的其他URL。 我尝试使用:: https://www.c-sharpcorner.com/article/how-to-display-ssrs-report-in-asp-net-mvc-web-application/ 但是无法做到。 如果我可以使用具有上述URL的报告查看器获取相同的代码来呈现报告,那将是真正的帮助。

我尝试过的事情:

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();

1 个答案:

答案 0 :(得分:1)

实际上问题是给正确的服务器Uri.i使用了错误的URI。当我登录SSRS服务器并检查服务器属性时,我才知道正确的服务器uri。 我的情况是https://abced1234/reportserver