Crystal Report Viewer does not display reports if it is not configured properly. In this article, we are going to talk about the various solutions to this problem.
Table of Content
Installing the Crystal Reports Run Time Files
You must have crystal report run time installed on the Web server (Or Desktop PC in case of windows application). You can download and install the correct run time from the tutorial How to download and install crystal report runtime
Updating web.config file
We need to add a few configurations to the web.config files. Crystal Reports inserts some of them when we add a new Report to the Project for the first time. A Web.Config file in an XML file where we keep application configuration information such as database connection information, assembly references, etc
The following elements are unique to SAP Crystal Reports and may be added to your Web.Config file. (Framework 4.x only)
<section name="printControl" type="System.Configuration.NameValueSectionHandler" />
<add key="CrystalImageCleaner-AutoStart" value="true" />
<add key="CrystalImageCleaner-Sleep" value="60000" />
<add key="CrystalImageCleaner-Age" value="120000" />
Setting up Viewers Virtual Directory
Crystal Reports Require Viewers Virtual Directory is set up correctly on the development as well as production web servers. Crystal Reports relies on a virtual directory to access viewers to display the report. The virtual directory and its underlying file path are unique for each version of SAP Crystal Reports; that way, succeeding versions of SAP Crystal Reports on the same machine work without conflict.
Following are the virtual directory settings for .NET Framework 4.x
Development Server Virtual Directory
Production Virtual Directory (IIS)
- If the above directory are not found, then go to C:\Program files (X86) -> Sap Business Objects -> Crystal Reports for Net Framework 4.0 -> Common ->Crystal reports 2011 -> crystalreportviewers
- Copy the entire crystalreportviewers folder.
- Copy it to the folder mentioned above.
while copying, rename the folder to crystalreportviewers13.
If the folder does not exist, then create the folder manually.
These steps will ensure that reports are rendered correctly in your development or Production servers