Problème:ReportViewer ne fonctionne pas correctement après le site a publié
Nous avons un ReportViewer de asp.net qui est attribué dynamiquement un ensemble de données à l'.rdlc, sur mon localmachine cela fonctionne parfaitement bien, lorsque nous publions le serveur Web et tentative pour l'exécuter une erreur se produit.
Erreur:
An error occurred during local report processing.
The report definition for report 'C:\Program Files (x86)\Acumatica ERP\WRIGHTACUMATICA\rErrorCompilation.rdlc' has not been specified
Could not find file 'C:\Program Files (x86)\Acumatica ERP\WRIGHTACUMATICA\rErrorCompilation.rdlc'.
Informations complémentaires:
Le répertoire spécifié dans l'erreur est pas sur le serveur. temp est l'ensemble de données affecté.
C#:
this.rvErrorCompilation.Reset();
this.rvErrorCompilation.LocalReport.ReportPath = Server.MapPath("~/rErrorCompilation.rdlc");
ReportDataSource rds = new ReportDataSource("dsErrorCompilation", temp);
this.rvErrorCompilation.LocalReport.DataSources.Clear();
this.rvErrorCompilation.LocalReport.DataSources.Add(rds);
this.rvErrorCompilation.DataBind();
this.rvErrorCompilation.LocalReport.Refresh();
Asp.Net:
<rsweb:ReportViewer ID="rvErrorCompilation" runat="server" Width="100%">
<LocalReport ReportPath="rErrorCompilation.rdlc">
<DataSources>
<rsweb:ReportDataSource />
</DataSources>
</LocalReport>
</rsweb:ReportViewer>
Question:
- Pourquoi est-ce qui se passe?
- Comment puis-je résoudre ce problème?
wouldnt the this.rvErrorCompilation.LocalReport.ReportPath = Server.MapPath ("~/rErrorCompilation.rdlc"); dans mon code backend remplacer le asp.net essentiellement faire ce que vous avez posté? –