Crystal Report Build Errors in Visual Studio

If a machine has two versions of Crystal reports installed, visual studio somehow sometimes picks the older version and you endup with the following errors.

error BC30456: 'ReuseParameterValuesOnRefresh' is not a member of 'CrystalDecisions.Windows.Forms.CrystalReportViewer'.

error BC30456: 'ShowParameterPanelButton' is not a member of 'CrystalDecisions.Windows.Forms.CrystalReportViewer'.

error BC30455: Argument not specified for parameter 'endPageN' of 'Public Overridable Sub PrintToPrinter(nCopies As Integer, collated As Boolean, startPageN As Integer, endPageN As Integer)'.

error BC30311: Value of type 'System.Drawing.Printing.PrinterSettings' cannot be converted to 'Integer'.

error BC30311: Value of type 'System.Drawing.Printing.PageSettings' cannot be converted to 'Boolean'.

error BC30455: Argument not specified for parameter 'endPageN' of 'Public Overridable Sub PrintToPrinter(nCopies As Integer, collated As Boolean, startPageN As Integer, endPageN As Integer)'.

error BC30311: Value of type 'System.Drawing.Printing.PrinterSettings' cannot be converted to 'Integer'.

error BC30311: Value of type 'System.Drawing.Printing.PageSettings' cannot be converted to 'Boolean'.

error BC30456: 'Xml' is not a member of 'CrystalDecisions.Shared.ExportFormatType'.

error BC30456: 'Xml' is not a member of 'CrystalDecisions.Shared.ExportFormatType'.

error BC30456: 'Xml' is not a member of 'CrystalDecisions.Shared.ExportFormatType'.

error BC30456: 'Xml' is not a member of 'CrystalDecisions.Shared.ExportFormatType'.

In the project file the references were like this

 <Reference Include="CrystalDecisions.CrystalReports.Engine, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\..\..\..\..\Windows\assembly\GAC_MSIL\CrystalDecisions.CrystalReports.Engine\12.0.2000.0__692fbea5521e1304\CrystalDecisions.CrystalReports.Engine.dll</HintPath>
    </Reference>

but still uses 10.5.3700.0 version of the dlls.

Remove all the crystal references and add them back to the project, you will see this in the project file and build errors will go away!.

    <Reference Include="CrystalDecisions.CrystalReports.Engine, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL" />

Comments

Popular posts from this blog

Duplicate Folders Freeware - Not Duplicate Files

SSRS Compile Errors

Free SQL Server Management Studio Addin/Plugin/External Tool to get object information quickly