Our servers already have the Crystal Reports run time engine that is available as part of the default installation of Microsoft Visual Studio. Our servers have Visual Studio either 2005 or 2008 or 2010 redistributable package of VS.
If a user uses the same Crystal Reports run time that is installed in the server, there is no need to install other dependencies or merge modules. But as developers use different Crystal Reports run time engines, it might need some additional steps which will be covered later in this article.
A common misconception about deploying a Crystal Reports application is that the production server must have the Crystal Reports .NET server components installed. However, in reality, it becomes practically impossible to install each and every Crystal Reports run time engines in a shared server. So the developers should approach the deployment in a different way:
- Install the Crystal Reports Developer tools in their development (local) machine.
This now gets registered in your local machine’s GAC (Global Assembly Cache, which is C:\Windows\assembly). If you are using Visual Studio, to develop your .NET application, you add reference to these Crystal Reports decisions classes in web.config file from GAC.
Now, the development stage is over and you prepare your application for deployment to our production server.
- Deploy your application to our production server.
Now, if you are using a different Crystal Reports run time engine than the one installed in the server, you are likely to get an error which says “Crystal Reports run time not found”. Here, note that the Crystal Reports decisions components you used for your application are present in your local machine’s GAC and our production server may not have it. This is where “bin deploy” comes handy.
- Bin deploying Crystal Reports Components
In your development (local machine), Crystal Decisions components get installed at C:\Program Files\Common Files\Crystal Decisions\x.x\managed
So, for all of the classes your application references, you need to copy the matching DLL files from the above Common Files folder to your application’s bin folder.
P.S: A bin folder may not be present by default. If you are deploying your application to main domain’s wwwroot folder, create a bin folder outside of this wwwroot folder and upload the DLL files there.
- Add reference in web.config file
Finally make sure that your web.config file has correct reference to the DLLs that are present in the web.config file. An ASP.NET application always checks the dlls in an application’s bin folder before it checks GAC
That will be all, your ASP.NET application and Crystal Reports should be working fine now.