Print Search Rate
    
   03-07-2011, 9:16 AM
How can I use the Crystal Import utility if the version of Crystal Reports I have installed differs from those referenced by the utility?
Symptom:

The following exception may be thrown by the DataDynamics.Reports.Imports.Crystal.exe utility:

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'CrystalDecisions.CrystalReports.Engine, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.
File name: 'CrystalDecisions.CrystalReports.Engine, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304'
   at DataDynamics.Reports.Imports.Crystal.CrystalImport.ConvertReport()
   at DataDynamics.Reports.Imports.Crystal.Import.Main(String[] args)


Solution:

Assembly binding redirection can be used with the DataDynamics.Reports.Imports.Crystal.exe utility if you have newer versions of the Crystal Reports assemblies installed on your system. Open the DataDynamics.Reports.Imports.Crystal.exe.config file in your text editor of choice. This file can be found in the Data Dynamics Reports Assemblies Directory (%Program Files(x86)%\Data Dynamics\Reports\x.x.x.x\Assemblies). Add the <runtime> section to the configuration file and save.

When finished, the configuration file should look like this (substitute the newVersion attributes of the bindingRedirect elements to the build number of the assemblies that you have installed):

<configuration>
    <startup useLegacyV2RuntimeActivationPolicy="true">
        <supportedRuntime version="v2.0.50727"/>
        <supportedRuntime version="v4.0"/>
    </startup>
    <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <dependentAssembly>
                <assemblyIdentity name="CrystalDecisions.CrystalReports.Engine" culture="neutral" publicKeyToken="692fbea5521e1304" />
                <bindingRedirect oldVersion="10.2.3600.0" newVersion="13.0.2000.0"/>
            </dependentAssembly>
            <dependentAssembly>
                <assemblyIdentity name="CrystalDecisions.Shared" culture="neutral" publicKeyToken="692fbea5521e1304" />
                <bindingRedirect oldVersion="10.2.3600.0" newVersion="13.0.2000.0"/>
            </dependentAssembly>
        </assemblyBinding>
    </runtime>
</configuration>


The utility will now be able to convert the reports successfully.


Applies To:
Data Dynamics Reports 1.0
GrapeCity » Knowledge Base » KnowledgeBase f... » How can I use the Crystal Import utility if the version of Crystal Reports I have installed differs from those referenced by the utility?
Privacy Policy | Copyright © 1997-2013 — GrapeCity, inc.
All trademarks mentioned are the property of their respective owners.