Exception "Report Definitoin is not valid" when deployed to Local IIS

The report ran fine on the Web Dev Server. Deployed to local IIS using "publish website' from vs 2005 which compiles the code to dlls.

Can no longer render report - got the following exception: Any idea? Is precompiling the application a problem?

Thanks in advance for any help!

ReportProcessingException: The report definition is not valid.

ReportProcessingException: The report definition is not valid. Details: Data at the root level is invalid. Line 1, position 1.]
Microsoft.ReportingServices.ReportProcessing.ReportPublishing.Phase1(CatalogItemContext reportContext, Byte[] definition, CreateReportChunk createChunkCallback, CheckSharedDataSource checkDataSourceCallback, String& description, String& language, DataSourceInfoCollection& dataSources, UserLocationFlags& userReferenceLocation, Boolean& hasExternalImages, Boolean& hasHyperlinks) +983
Microsoft.ReportingServices.ReportProcessing.ReportPublishing.CreateIntermediateFormat(CatalogItemContext reportContext, Byte[] definition, CreateReportChunk createChunkCallback, CheckSharedDataSource checkDataSourceCallback, PublishingErrorContext errorContext, AppDomain compilationTempAppDomain, Boolean generateExpressionHostWithRefusedPermissions, String& description, String& language, ParameterInfoCollection& parameters, DataSourceInfoCollection& dataSources, UserLocationFlags& userReferenceLocation, ArrayList& dataSetsName, Boolean& hasExternalImages, Boolean& hasHyperlinks) +87
Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CompileReport(CatalogItemContext reportContext, Byte[] reportDefinition, CreateReportChunk createChunkCallback, CheckSharedDataSource checkDataSourceCallback, PublishingErrorContext errorContext, AppDomain compilationTempAppDomain, Boolean generateExpressionHostWithRefusedPermissions, String& reportDescription, String& reportLanguage, ParameterInfoCollection& parameters, DataSourceInfoCollection& dataSources, UserLocationFlags& userReferenceLocation, ArrayList& dataSetsName, Boolean& hasExternalImages, Boolean& hasHyperlinks) +80
Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CreateIntermediateFormat(CatalogItemContext reportContext, Byte[] reportDefinition, CreateReportChunk createChunkCallback, CheckSharedDataSource checkDataSourceCallback, AppDomain compilationTempAppDomain, Boolean generateExpressionHostWithRefusedPermissions) +259
Microsoft.Reporting.ReportCompiler.CompileReport(CatalogItemContext context, Byte[] reportDefinition, Boolean generateExpressionHostWithRefusedPermissions, ReportSnapshotBase& snapshot) +222
.......

[2753 byte] By [ServerGirl] at [2007-12-24]
# 1

Wonder why there is no response?

Anyway, on the same day (02-03-2006), I found a work-around. I decided that there must be something wrong w/ deploying the web app using Publish website ( where everything is compiled), as it seems to be calling ReportProcessing.CompileReport... so I used Copy Website instead, and it worked fine.

Is this a bug? Or is it an oversight? How do one get around this to take advantage of the pre-compilation option?

Thanks!

ServerGirl at 2007-10-8 > top of Msdn Tech,Visual Studio,Visual Studio Report Controls...
# 2
After no luck with numerous other techniques posted on different forums and postings, I followed your "Copy Site" advice instead of Precompiling. It worked perfectly - thanks for ending the madness. :)
PConsultant at 2007-10-8 > top of Msdn Tech,Visual Studio,Visual Studio Report Controls...
# 3

I too experienced this problem yesterday, and yes - "Copy Site" works.

However, I have also discovered something else of great relevance.

In VS Studio 2005, when you publish a website (Build > Publish Web Site) you are given a number of options.

If you tick the "Allow this precompiled site to be updatable", then all of the end points (.aspx, .rdlc) remain intact. In this case, the report will run.

However, if you untick the "Allow this precompiled site to be updatable", then the end points are compiled into a DLL and the contents are changed to something like - "This is a marker file generated by the precompilation tool, and should not be deleted!"

If I publish a website where the end points are changed as above (i.e. untick the box) then I get the error below. If I publish the site with the box ticked (end points remain intact) then the report works OK.

From this I can conclude that this may be a bug.

The ability to publish a website, where the end points are hidden is a definite bonus, as this means that your precious source is hidden more. However, if the report feature isn't going to work, then I'll leave the box ticked for now and leave the end points intact.

  • An error occurred during local report processing.
    • The definition of the report 'Main Report' is invalid.
      • The report definition is not valid. Details: Data at the root level is invalid. Line 1, position 1.
robinwebb at 2007-10-8 > top of Msdn Tech,Visual Studio,Visual Studio Report Controls...
# 4

We had the same problem over and over when deploying (by publishing with the forementioned "Allow this precompiled site to be updatable" option ) the web site to a Windows 2003 Server. We finally got it solved by setting the TEMP directory to c:\windows\temp and setting the IIS Worker process user write access to this temp folder. hope this helps.

Greetings

Stefaan & Kim

SVerhalle at 2007-10-8 > top of Msdn Tech,Visual Studio,Visual Studio Report Controls...
# 5

Hi robinwebb,

basically you are right. I had a similar problem. Nevertheless you can acutally use all features like pre-compilation. The only thing you have to do, when compiling without the "updateable"-flag is to copy the .rdlc file from your sources to the published directory replacing the "1kb"-reference file.

gkind regards, Chris

lc247 at 2007-10-8 > top of Msdn Tech,Visual Studio,Visual Studio Report Controls...
# 6

lc247 you are really like a god to me ! I've been looking and looking to get this issue fixed. Your solution (to copy the RDLC's over the reference files) was the only fix that worked for me.

When I publish using the updatable flag on I get this strange conversion error.

Compiler Error Message: CS0030: Cannot convert type
'ASP.reportviewer_aspx' to 'Microsoft.Reporting.WebForms.ReportViewer'

Compiling without this flag + copying the RDLC's works just fine. I was really going nuts on this one ... Almost installed VS.NET on my production servers.

Thx !!!!!!!!!!!!!!!!!!!

DieterDepuydt at 2007-10-8 > top of Msdn Tech,Visual Studio,Visual Studio Report Controls...
# 7
Thankyou so much i have been going nuts over this I actually simply published my application then copied the report from my project folder directly to the production server and it worked a treat. Please Please microsoft fix this !!!!!!!!!!!!!!!.
VS_BS at 2007-10-8 > top of Msdn Tech,Visual Studio,Visual Studio Report Controls...
# 8
I've came across the same exception, and have managed to resolve it:
the problem is that the code-behind class the the page uses has the same name as the code behinf class of the ReportViewer control.
So the easiest resolution to this problem is to add the code-behind class to a namespace.

There was a similar bug with login control that was resolved my Microsoft few months ago -

http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=102543

Reznick at 2007-10-8 > top of Msdn Tech,Visual Studio,Visual Studio Report Controls...
# 9

Thanks Reznick,

After I used your suggestion, this issue is fixed for me. But interesting to note is this only occurs with published site.

Thanks again,

RohanReddy at 2007-10-8 > top of Msdn Tech,Visual Studio,Visual Studio Report Controls...
# 10

What if I need to create an installer? I need to create one and that the output is precompiled.

How do I do this?

xavito at 2007-10-8 > top of Msdn Tech,Visual Studio,Visual Studio Report Controls...

Visual Studio

Site Classified