Last post Aug 04, 2010 01:12 AM by crajeshbe
Jul 30, 2010 12:34 PM|pyoung1|LINK
Hello everyone, I have a VS 2005 C# application that uses Crystal Reports 2008.
The application basically displays a list of reports and allows the user to select a particular report to run. Once the report is selected, the appropriate parameter screen is displayed. The parameter screen contains options for displaying the report either
as an Excel Spreadsheet or a PDF document.
When I run the application from within visual studio, it works fine. The reports display correctly in both formats.
THe problem is that once I publish the application (via msi installation file) to a Windows 2003 web server, the reports won't display. THe system just hangs. I added debug statements and the code is hanging during the ReportDocument.Load(Server.MapPath("/assetreport.rpt")
My deployment project includes the correct msm for Crystal Report 12 and the Web server also has the full blown version of Crystal Reports 12 installed.
Does anyone have any ideas why this works from within visual studio but not when deployed?
crystal report deployment
Jul 31, 2010 02:26 AM|crajeshbe|LINK
Hi Good day, You need to give administrative access to ur application using Impersonation or add IIS user under the administrative group with write access. This will fix your problem...
Jul 31, 2010 12:24 PM|sansan|LINK
THe system just hangs. I added debug statements and the code is hanging during the ReportDocument.Load(Server.MapPath("/assetreport.rpt") command.
I'm not sure if the path mapping is correct.
If the report is on the website root directory, you can use
make sure you have the report in the directory.
you can check if it exists like this
Try to create an instance like this
assetReport report = new assetReport(); check if it fails.
usually, I prefer this way to create a report and pass parameter values
string sType = yourReportClassName; //"assetReport.rpt";
Type reportType = Type.GetType(sType, true, true);
if (reportType != null)
//Create an instance of the report and set it's datasource.
CrystalDecisions.CrystalReports.Engine.ReportClass rpt =
Aug 03, 2010 02:30 PM|pyoung1|LINK
I tried adding the IIS user to the admin group but the report still won't load.
I also fixed the path issue all to no avail.
Thanks anyway Rajesh.
Aug 03, 2010 02:46 PM|pyoung1|LINK
Let me see if I got this.
I am currently using the CrystalDecisions.CrystalReports.Engine.ReportDocument object and trying to use the Load method to load the report.
Instead of doing that, are you suggesting that I use the CrystalDecsions.CrystalReports.Engine.ReportClass object and use the Activator.CreateInstance method to create an instance of the report type?
If so I can try it. At this point I will try anything because nothing thus far has worked.
Aug 04, 2010 01:12 AM|crajeshbe|LINK
Hi Good day, One more thing
Try copying aspnet_client folder from IIS root folder to your application. Becoz this folder contains support files & script for crystal report to run in web.