Search code examples
c#.netwinformsreportviewer

ReportViewer error - The definition of the report " is invalid. Could not load file or assembly Microsoft.ReportViewer.ProcessingObjectMode


I have ReportViewer in my project. When I create .exe of this file in InstallShield in Vsual Studio 2012 I add into Redistributables Microsoft ReportViewer 2010.

When I do install my app on Windows 8 - every ReportViewer displays it's report correctly.

I'm having problem on Windows XP the ReportViewer loads correctly but displayes this error instead of correct Report:

An error occurred during local report processing. The definition of the report " is invalid. An unexpected error ocurred in Report Processing.

Could not load file or assembly Microsoft.ReportViewer.ProcessingObjectMode. Version =11.0.0., Culture=neutral, PublicKeyToken=89845dc8080cc91 or one of its dependencies. this system cannot find the file specified.

I ensure you that in references I have added Microsoft.ReportViewer.Winfroms 11.0.0.0 and Copy Local = true.

How can I solve this issue?


Solution

  • Found out that this error means that you are missing Microsoft.ReportViewer.PorcessingObjectMode.dll version 11.0.0.0. There is one solution:

    On your Windows 8 Machine do following:

    1. Open dos command prompt (press START + R then type cmd and press ENTER)

    2. Type cd .. until you are on C:\ > Type Cd windows\assembly\gac_msil\Microsoft.ReportViewer.pro* and press enter

    3. Just type cd 11*

    4. Then type copy * c:\

    5. The .dll will be copied to your C directory.

    6. This file simply copy into your Program Files on Windows XP machine to folder where your application has been installed.

    Hope it helps to others as I was stuct with this issue for long time.