Jan Schreuder on .Net

.Net code samples, experiences, observations

View my professional profile on LinkedIn

Recent Posts

Tags

News

  • Inappropriate comments will be deleted at my discretion.

    The information and code samples in this weblog is provided "AS IS" without warranty of any kind, either expressed or implied, including but not limited to the merchantability and/or fitness for a particular purpose.

Community

Email Notifications

Tool suppliers

Tools

General

Microsoft

Favorite blogs

Archives

Crystal Reports for Visual Studio 2005 deployment trouble

I just spent 4 hours of figuring out why the reports we developed using Crystal Reports would not show the graphs after being deployed to our production server. We checked everything from access rights to proper installation of Crystal reports on the server. Below are a few things you may want to check when you need to deploy a .Net 2.0 web application that integrates Crystal Reports:

Deploy Crystal components

First, and rather obvious, is to make sure the correct version of Crystal components are installed on the server. If you have the Visual Studio SDK installed, you can look for CRRedist2005_x86.msi, which is in this folder C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\CrystalReports on your machine. Running that installation on the server will make sure all components required for Crystal Reports are properly installed on your machine.

If you have a setup project for your web application, you can add a merge module to that project. Crystal Reports provides four merge modules for download at this location. Depending on your needs, you may need to add any combination of these to your setup project. Which module is required for your application can be found in this document on the Business Objects support site.

Web.Config settings

In order for a Crystal Reports viewer to work, the following settings must be added to the appSettings section in the web.Config file:

<add key="CrystalImageCleaner-AutoStart" value="true"/>
<add key="CrystalImageCleaner-Sleep" value="60000"/>
<add key="CrystalImageCleaner-Age" value="120000"/>

This will ensure that the temporary images for Crystal are removed when they are no longer required. The following setting must be added the the httpHandlers section.

<add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, 
    CrystalDecisions.Web, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>

This is required, because otherwise all you will see is an empty box with a red cross in it.

aspnet_client files

Last, but certainly not least, check the aspnet_client folder in the root folder of your web site. This folder should contain a folder with the name CrystalReportWebFormViewer3. That folder must exist in the following path: system_web\2_0_50727. If that folder is not there, copy it from your local machine. It should be in the folder C:\WINNT\Microsoft.NET\Framework\v2.0.50727\ASP.NETClientFiles.

Comments

phronima said:

I installed the redistribution msi but there was no files under system_web\2_0_50727?

But if i use the merge module I will get sub folders

Either way, I've done all that but am still getting image stubs aka red X on the image.. Any ideas? This is my third day trying to get my UAT machine back up..

# March 28, 2008 5:34 AM

Mahesh said:

Thanks Jan. Good article on CR..I just tried it and got the result. Keep your good work.

# May 9, 2008 9:39 AM

Efrain said:

Hi,

thank you for this information. I followed all these steps on a Windows 2008 Server and the app runs. However, when I select a report to display I get a yellow screen saying "fail to render page" and the reports dont show up. If, however, I click on one of the drilldown options  I get data displayed.

This has something to do with the charts i have on the report, however, I have looked everywhere and have not been able to find any fix specific for Windows 2008 Server.

# June 5, 2008 4:29 PM

HITESH said:

i have a sql server named abc where i configure all the crystal reports. they work perfectly allright.

Now i take the published version on the deployment site. I change the sql server name to pqr and configure the web application.

But do i need to configure each and every crystal reports to the new server settings?

I do have a lot of reports.

if that is so i ll again have to publish them at the site.

cant i just make the changes in the web.config?

# July 21, 2008 4:09 PM

Problem in deployment said:

I deploy the crystal report.  My application runs fine but when clicking the button which tries to launch a crystal report my problem.  It gives a Microsoft C++ Runtime Library Runtime Error! Program: C:/windows/Microsoft.Net/Framework/v.2.0.50727/aspnet_wp.exe    and if clicked finally it takes me to the Service Application Unavailable.

Please advice.  This is very urgent and because of this problem we did not deploy this in client for the past two months.

# July 30, 2008 1:05 PM

jsibrahimeye said:

report uses charts.  works fine on development machine

when I call from FlexBuilder, the chart report does not work

note: other reports which only display data records work fine.

the space where the charts should be displayed contain the following two lines

CrystalReportViewer - CrystalReportViewer1

Error: Fail to render the page.

please help me

# July 30, 2008 1:08 PM

Jan Schreuder said:

I'm really sorry, but I don't have all the answers to problems you all may have with Crystal. But check out this bloggingabout.net/.../need-help-with-crystal-reports-look-here.aspx" or this bloggingabout.net/.../sap-is-annoying-me.aspx". These posts contain links to web sites that may help you solve the problems you might have.

# July 30, 2008 1:45 PM

cbiggs said:

Have you ever seen this error: The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception.

I have installed the Redist. and the Merge Modules, changed the web.config, but get this error.

Any suggestions?

# August 15, 2008 8:24 PM

haint83vn said:

Thank you so much! It helps me a lot!

# August 17, 2008 6:29 AM

George said:

How to change the CrystalReportViewer to read MyProject/aspnet_client/system_web/2_0_50727/CrystalReportWebFormViewer3/html ,not root/aspnet_client?

thanks

# August 19, 2008 9:27 AM

Jan Schreuder said:

Post your questions here www.sdn.sap.com/.../businessobjects-forums

or here forums.msdn.microsoft.com/.../threads.

I'm sure someone knows the answer and perhaps you can even find the answer to your question there already.

# August 19, 2008 9:38 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)