RDLC report is not showing after publishing the site on IIS Server. If I publish on the same system where I'm developing an application then it's showing.
Front end asp.net code is as below:
<div class="center-block c-report">
<asp:UpdatePanel ID="upReport" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" Font-Size="8pt"
CssClass="HideWhenReset" WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt"
Style="text-align: center" SizeToReportContent="True" Width="100%" Height="100%"
InteractiveDeviceInfos="(Collection)">
<LocalReport ReportPath="Reports\Total_Report.rdlc">
</LocalReport>
</rsweb:ReportViewer>
</ContentTemplate>
</asp:UpdatePanel>
</div>
The backend code is as below:
private void BindReport(string ReportPath, DataTable Table)
{
this.ReportViewer1.LocalReport.ReportPath = ReportPath;
this.ReportViewer1.LocalReport.DataSources.Clear();
this.ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("DataSet1", Table));
if (ReportPath != "Reports\\InformationReports\\MembersMailingLabels.rdlc")
this.ReportViewer1.LocalReport.SetParameters(new ReportParameter("CompanyName", SystemConfig.GetSystemKeyValue("ClientNameAr", false)));
this.ReportViewer1.LocalReport.Refresh();
}
From Event log getting the following exception:
An error occurred during local report processing. When Microsoft.Reporting.WebForms.LocalReport.EnsureExecutionSession ()
When Microsoft.Reporting.WebForms.LocalReport.SetParameters (IEnumerable`1 parameters)
When MembersDataReport.BindReport (String ReportPath, DataTable Table) in D: \ PublishedWebsite \ asd \ \ InformationReports \ MembersDataReport.aspx.cs: Line 174
when MembersDataReport.GetData () in D: \ PublishedWebsite \ asd \ Reports \ InformationReports \ MembersDataReport.aspx.cs: Line 144
at MembersDataReport.btnSearch_Click (Object sender, EventArgs e) in D: \ PublishedWebsite \ asd \ Reports \ InformationReports \ MembersDataReport.aspx.cs: Line 87
at System.Web.UI.WebControls.Button.OnClick (EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent (String eventArgument) at System .Web.UI.Page.ProcessRequestMain (Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) The definition of the report 'Reports \ InformationReports \ MembersDataReport.rdlc' is invalid. When Microsoft.Reporting.ReportCompiler.CompileReport (ICatalogItemContext, Byte [] reportDefinition, Boolean generateExpressionHostWithRefusedPermissions, ControlSnapshot & snapshot) (When Microsoft.Reporting.LocalService.GetCompiledReportService.GetCompiledReport), Microsoft.Reporting.LocalService.GetCompiledReport (PreviewItemContext. ) When Microsoft.Reporting.WebForms.LocalReport.EnsureExecutionSession () an unexpected error occurred in Report Processing. When Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CreateIntermediateFormat (PublishingContext reportPublishingContext) When Microsoft.Reporting.ReportCompiler.CompileReport (ICatalogItemContext context, Byte [] ReportDefinition, BooleanExpress & GenerationHostWithRithRefusedPermissions, the Microsoft ReportDefinition, BooleanExpress & generateHostWithRithRefusedPermissions could not load Microsoft.Reporting. = 14.0.0.0, Culture = neutral, PublicKeyToken = 89845dcd8080cc91 'or one of its dependencies. The system cannot find the file specified. On Microsoft.ReportingServices.ReportIntermediateFormat.Persistence.IntermediateFormatWriter.Write (Object obj, Boolean verify, Boolean assertOnInvalidType) When Microsoft.ReportingServices.ReportIntermediateFormat.Persistence.ReportIntermediateFormat.Persistence.IntermediateFormatWriter. At Microsoft.ReportingServices.ReportPublishing.ReportPublishing.InternalCreateIntermediateFormat (Stream definitionStream, String & description, String & language, ParameterInfoCollection & parameters, DataSourceInfoCollection & dataSources, DataSetInfoCollection & sharedDataSetReferences,An error occurred during local report processing. When Microsoft.Reporting.WebForms.LocalReport.EnsureExecutionSession () When Microsoft.Reporting.WebForms.LocalReport.SetParameters (IEnumerable`1 parameters) When MembersDataReport.BindReport (String ReportPath, DataTable Table) in D: \ PublishedWebsite \ asd \ \ InformationReports \ MembersDataReport.aspx.cs: Line 174 when MembersDataReport.GetData () in D: \ PublishedWebsite \ asd \ Reports \ InformationReports \ MembersDataReport.aspx.cs: Line 144 at MembersDataReport.btnSearch_Click (Object sender, EventArgs e) in D: \ PublishedWebsite \ asd \ Reports \ InformationReports \ MembersDataReport.aspx.cs: Line 87 at System.Web.UI.WebControls.Button.OnClick (EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent (String eventArgument) at System .Web.UI.Page.ProcessRequestMain (Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) The definition of the report 'Reports \ InformationReports \ MembersDataReport.rdlc' is invalid. When Microsoft.Reporting.ReportCompiler.CompileReport (ICatalogItemContext, Byte [] reportDefinition, Boolean generateExpressionHostWithRefusedPermissions, ControlSnapshot & snapshot) (When Microsoft.Reporting.LocalService.GetCompiledReportService.GetCompiledReport), Microsoft.Reporting.LocalService.GetCompiledReport (PreviewItemContext. ) When Microsoft.Reporting.WebForms.LocalReport.EnsureExecutionSession () an unexpected error occurred in Report Processing. When Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CreateIntermediateFormat (PublishingContext reportPublishingContext) When Microsoft.Reporting.ReportCompiler.CompileReport (ICatalogItemContext context, Byte [] ReportDefinition, BooleanExpress & GenerationHostWithRithRefusedPermissions, the Microsoft ReportDefinition, BooleanExpress & generateHostWithRithRefusedPermissions could not load Microsoft.Reporting. = 14.0.0.0, Culture = neutral, PublicKeyToken = 89845dcd8080cc91 'or one of its dependencies. The system cannot find the file specified. On Microsoft.ReportingServices.ReportIntermediateFormat.Persistence.IntermediateFormatWriter.Write (Object obj, Boolean verify, Boolean assertOnInvalidType) When Microsoft.ReportingServices.ReportIntermediateFormat.Persistence.ReportIntermediateFormat.Persistence.IntermediateFormatWriter. At Microsoft.ReportingServices.ReportPublishing.ReportPublishing.InternalCreateIntermediateFormat (Stream definitionStream, String & description, String & language, ParameterInfoCollection & parameters, DataSourceInfoCollection & dataSources,
DataSetInfoCollection & sharedDataSetReferences,
Make sure all the files related to RDLC are there in the published files. If it is not there copy and paste it from Project file. you can try the following steps.
In addition to making sure the files are actually on the server, you should be mapping the paths properly in ASP.NET using HttpServerUtility.MapPath .
// Assuming ReportPath is something like '/Reports/MyReport.rdlc'
this.ReportViewer1.LocalReport.ReportPath = HttpContext.Current.Server.MapPath(ReportPath);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.