2013-01-02 3 views
0

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:

  1. Pourquoi est-ce qui se passe?
  2. Comment puis-je résoudre ce problème?

Répondre

0

Essayez ceci: ReportPath="~/rErrorCompilation.rdlc"

<rsweb:ReportViewer ID="rvErrorCompilation" runat="server" Width="100%"> 
     <LocalReport ReportPath="~/rErrorCompilation.rdlc"> 
     <DataSources> 
      <rsweb:ReportDataSource /> 
     </DataSources> 
    </LocalReport> 
     </rsweb:ReportViewer> 
+0

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é? –

0

studio Microsoft visuel n'a apparemment pas la copie sur le fichier .rdlc sur la publication, même si il a été précisé à le faire, après le déplacement manuellement vers la racine web, il fonctionne maintenant correctement.

Questions connexes