The definition of the report 'Main Report' is invalid

Posted by VIJI Saturday, July 4, 2009

The report you bult would be working fine in the local machine.

When the Report is published in the IIS, this error "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" will throw.

Possible Solutions:

1. check "Allow this precompiled site to be updatable" feature in publish web.

2. move the report to the IIS where the application is published

3. Check whether in code-behind class the page uses has the same name as the code behind class of the ReportViewer control.

So the easiest resolution to this problem is to add the code-behind class to a namespace.

4. Instead of ReportProcessing.CompileReport... use Copy Website

a. Be sure that the Microsoft.Reportviewer at at the GAC

b. When you publish your website with the mode non updatable, you must replace the rdlc files pubblished with the rdlc files that are in your visual studio project.

c. Finally, assing a correct pool application for your published website.

6. The issue is that ReportViewer is not part of the .NET Framework. However,

when Visual Studio 2005 is released, ReportViewer will be freely redistributable. You will be able to run a setup program to install ReportViewer on the target machine.

The workaround for now is to manually copy the following assemblies to the target machine (either to the bin directory or to the GAC):



Same Errors and solutions available under

0 Responses to The definition of the report 'Main Report' is invalid

Post a Comment