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 Contents
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)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | <configSections> <sectionGroup name="businessObjects"> <sectionGroup name="crystalReports"> <section name="printControl" type="System.Configuration.NameValueSectionHandler" /> </sectionGroup> </sectionGroup> </configSections> <appSettings> <add key="CrystalImageCleaner-AutoStart" value="true" /> <add key="CrystalImageCleaner-Sleep" value="60000" /> <add key="CrystalImageCleaner-Age" value="120000" /> </appSettings> |
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
1 2 3 | \Windows\Microsoft.NET\Framework\v4.0.30319\ASP.NETClientFiles\crystalreportviewers13 |
Production Virtual Directory (IIS)
1 2 3 4 5 6 7 | \inetpub\wwwroot\aspnet_client\system_web\4_0_30319\crystalreportviewers13 OR SITE_ROOT\aspnet_client\system_web\4_0_30319\crystalreportviewers13 |
- 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
I tried this process its working well Thanks
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.
may be it is very old but someone may need it.
check the permission of your iis user on the folder contain rpt file it must get write permisssion and check windows\Temp permission also it must be full access
How do I run crystal report from PHP & SQL Server
i have shifted my application to a different application server and also its changed it’s application root directory. It’s start working as i copied the aspnet_client to the application root directory….
that was the only thing that worked for me
Thanks My friend
I tried different things as well as your solution, but following error still after publishing, I am using VS2010 on Win7 Professional & IIS7
Loading failed for the with source “http://10.6.209.238/aspnet_client/system_web/4_0_30319/crystalreportviewers13/js/crviewer/crv.js”.
ReportStatus.aspx:43
ReferenceError: bobj is not defined
[Learn More]
ReportStatus.aspx:71:3
ReferenceError: bobj is not defined
[Learn More]
i got same error while report loading and it is display blank page in application.