The definition of the report 'Main Report' is invalid


  • Hi

      I built a new report using vs.net2005 (Local report) and could get see the report when i was developing the application.when i published to IIS iam getting the following error

    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

    Any suggestions to solve this?



    Saturday, February 11, 2006 7:57 AM


All replies

  • It seems to be a problem in connectionstring defined in report to server. How you connect to SQL server, under what account?
    Monday, February 13, 2006 1:13 PM
  • Hi

     i checked with another report without any connection to sql server.i.e static data populated to typed arraylist etc.but when i publish to IIS iam getttig the same error message.(which is working fine under development (file system web sitea))

    • 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.

    Thanks for your reply and any suggestions to rectify this?


    Tuesday, February 14, 2006 4:59 AM
  • There is already a post in this site, try this, SVNR,

    Good Luck,


    Wednesday, February 15, 2006 12:13 AM
  • Thnks Mr.Long Xue for your referenace.I moved the report to the IIS where my application is published and the problem is solved and it is running well.



    Wednesday, February 15, 2006 1:34 PM

    I followed the link topic above and can say it solved it for me.


    What I found was that if one uses the Publish Web Site feature in VS 2005 and then uncheck "Allow this precompiled site to be updatable", my reporting services reports give this error. Whereas, if I check "Allow this precompiled site to be updatable" I don't have any problems.


    Seems like a bug in VS 2005 with the precompilation feature.


    FYI, I also found that if I copied just my report definitions from a publish with the checkbox on over the top of a website that had been build with the checkbox off, the reports work (as in you can have a fully precompiled website with only the report defintions not precompiled.

    • Proposed as answer by Hong (MA, USA) Wednesday, October 01, 2008 2:21 AM
    Thursday, August 23, 2007 11:49 PM
  • Badajor95,

    Your method works for me too.  I am using VS2008.


    Wednesday, October 01, 2008 2:21 AM
  • If you are still having problems, copy your rdlc files over the deployed ones in your intetpub.
    Wednesday, April 29, 2009 3:48 PM
  • Hello, I find a possible solution,

    I follow the next steps:

    1. Be sure that the Microsoft.Reportviewer at at the GAC
    2. 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.
    3. Finally, assing a correct pool application for your published website.

    I hope that this can help to everyone.

    Thursday, May 21, 2009 4:45 PM
    • I am also facing problem when i upload my project on Server. It's Working fine on my local machine. Please Help me
    • An error occurred during local report processing.
      • The definition of the report 'Main Report' is invalid.
        • An unexpected error occurred in Report Processing.
          • Could not load file or assembly 'Microsoft.ReportViewer.ProcessingObjectModel, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

    Binay Tiwari For Classic ASP
    Friday, July 30, 2010 12:58 PM
  • Thanks rbecerri, that work for me.

    How can you learn from your mistakes, if you don't even know what the heck you were doing
    Thursday, February 10, 2011 3:49 PM
  • Dear Sir.

    This solution also worked for me publishing a vs2010 solution updated form a vs2008 source code. Very thanks!


    Friday, November 04, 2011 1:20 AM
  • Hi,

    The problem can be caused if you have changed datastets,

    specifically if you have changed StoredProcedure's fields(names or somthing like that),

    than when you try to show or deploy the report, the error (The definition of the report 'reportname' is invalud) is raised.

    Try to refresh fields to the dataset with new ones from database.

    Thank you.

    Monday, August 13, 2012 9:15 AM
  • Still have the same error for me in either local or server. I do switch the datasource on the fly though. But why it works in the previous version of  the report designer (2008). is there something wrong in VS2010. The error message does not give me a clue.

    Error Is Here: Microsoft.Reporting.DefinitionInvalidException: The definition of the report 'Main Report' is invalid. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: The report definition is not valid. Details: The report definition has an invalid target namespace '' which cannot be upgraded.
    at Microsoft.Reporting.ReportCompiler.CompileReport(CatalogItemContext context, Byte[] reportDefinition, Boolean generateExpressionHostWithRefusedPermissions, ReportSnapshotBase& snapshot)

    Thursday, September 05, 2013 5:52 PM
  • I managed to fix this error by adding reference to below two dlls and set their property to copy local = true. 



    This will copy these two dlls in the bin folder when you publish the code and which will fix this error.

    Thursday, May 29, 2014 4:19 PM
  • thank you very much 

    the replacement of the report solve the problem for me 

    after searching for 10 days 

    Friday, July 14, 2017 7:28 PM