Opening Remote RDL with .NET Report Viewer

三世轮回 提交于 2019-12-06 09:50:00

You need to actually set it to Local processing mode not remote.

I've only ever loaded a RDL from a DLL not a database but I would look at the following API as it might have an overload to accept a string or you convert your string to a stream.

reportViewer.LocalReport.LoadReportDifinition

Here is the code I use to load from a DLL (might help to see in context)

Assembly assembly = Assembly.LoadFrom("MyReports.dll");
Stream stream = assembly.GetManifestResourceStream("Reports.MyReport.rdlc");
reportViewer.LocalReport.LoadReportDifinition(stream);
Dindo

Try to revise this code:

ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
ReportViewer1.ServerReport.ReportServerCredentials = new ReportServerNetworkCredentials();
//ReportViewer1.ServerReport.ReportServerCredentials = new Rep();
ReportViewer1.ServerReport.ReportServerUrl = new Uri(@"http://PRODUCTIONDB:80/ReportServer/MexReports"); //report server
ReportViewer1.ServerReport.ReportPath = "rptMEXHEDailyReportReview1"; // rdl name
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!