Reportviewer: The report definition is not valid. Details: Data at the root level is invalid. Line 1, position 1.

by Sven 20. January 2010 14:11

Nach dem Deployen (Web Deployment Project) von lokalen rdlc Reports aus Visual Studio 2008 heraus, gab es auf dem IIS folgenden Fehler:

[ReportProcessingException: The report definition is not valid.  
Details: Data at the root level is invalid. Line 1, position 1.]

[DefinitionInvalidException: The definition of the report
'Main Report' is invalid.]

 

Das Problem ist, dass die Reports vorkompliliert werden, was leider kontraproduktiv ist. Durch ergänzen der csproj Datei für das Deploy kann der Fehler umgangen werden:

<Target Name="AfterBuild">
  <Delete Files="$(OutputPath)\Reports\Report.rdlc" />
  <Copy SourceFiles="$(SolutionDir)WebSites\MyWebApp\Reports\Report.rdlc" 
        DestinationFolder="$(OutputPath)\Reports" />
< /Target>

 

Tags:

.NET | ASP.NET

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

Page List

My latest Flickr Photos

www.flickr.com

Shared items - Google Reader

Instagram Pictures