Crystal Reports in ClickOnce deployment

10,197

Solution 1

I had this problem: for Click-Once applications, you must download and install the 32-bit version of the Crystal Reports Runtime on the client regardless of the client computer's architecture. I ended up installing both the 32-bit and the 64-bit using the MSIs provided on SAP's site to cover all bases and make the GAC error to go away. Afterwards, everything ran smoothly.

Download and install the MSIs (not the executable) from here

FOR CLICK ONCE DEPLOYMENT

In addition to making SAP Crystal Reports Runtime a prerequisite, you need to modify the product.xml file on the development machine. This file is located in: {Program Files}\Microsoft SDKs\Windows\v*.0A\Bootstrapper\Packages\Crystal Reports for .NET Framework 4.0\

Find the following line and comment it out: <BypassIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="Intel"/>

Now, re-publish your solution and the setup should install both runtimes on 64-bit machines.

Solution 2

If the above solution didn't work try this,

  • Go into your project Properties.
  • Go to the Publish tab.
  • Click the Application Files button.
  • Change Publish Status from Prerequisites(auto) to Exclude any file with CrystalDecisions or BusinessObjects in the name.
  • Click OK
  • Rebuild your application, then republish it to your site or file share to be installed by your clients.
Share:
10,197
Ethan
Author by

Ethan

Updated on June 11, 2022

Comments

  • Ethan
    Ethan almost 2 years

    My application needs to print a Crystal Reports report. It does not show a preview, just takes two parameters and shows a print dialog to set the printer. It works fine on computers that have Crystal Reports installed, but I do not have a way to enforce clients have it already installed.

    I have read in various places that adding the ClickOnce prerequisite "SAP Crystal Reports Runtime Engine for .NET Framework" would allow the required Crystal Reports libraries to be registered on the client. When installing the application on the client, it does download the runtime, and installs the runtime, but the application fails to install stating that various CrystalDecisions and CrystalReports assemblies must be registered in GAC.

    The first is CrystalDecisions.ReportAppServer.CommonObjectModel. If I add a reference to this in the project and redeploy, then it just gives another message about another assembly. I literally did this 15 times, and never got a seamless install.

    What am I missing? I followed this guide from the SAP website (zipped, 2.2 MB, contains a Microsoft Compiled HTML Help file, crnet_dg_2010_en.chm).

  • Ethan
    Ethan almost 11 years
    Thanks, this has me on the right path! I downloaded that MSI and installed it manually on a test client. The ClickOnce app installed fine. Now I need that MSI as a prerequisite in the ClickOnce deployment. How can I set that up?
  • Ethan
    Ethan almost 11 years
    I've marked this as the answer since the 32-bit runtime install did make the app work. However, I still really need to figure out a way to make the ClickOnce pre-req work.
  • Ally
    Ally almost 11 years
    I figured it out because I had this problem, too, when I tried doing Click Once at a client's site. I will update my answer, now.