locked
Deploying a Crystal Report 2008 application RRS feed

  • Question

  • User-1393143432 posted

     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") command.

    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?

    Friday, July 30, 2010 12:34 PM

Answers

  • User1668404196 posted

    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.Cool

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, August 4, 2010 1:12 AM

All replies

  • User1668404196 posted

    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...

    Saturday, July 31, 2010 2:26 AM
  • User1224194097 posted

      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

    Server.MapPath("assetreport.rpt");

    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 =   
      (CrystalDecisions.CrystalReports.Engine.ReportClass)
       Activator.CreateInstance(reportType);
    }
    hope I haven't confused you.

    Saturday, July 31, 2010 12:24 PM
  • User-1393143432 posted

    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. 

     

     

    Tuesday, August 3, 2010 2:30 PM
  • User-1393143432 posted

    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.

     

    Tuesday, August 3, 2010 2:46 PM
  • User1668404196 posted

    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.Cool

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, August 4, 2010 1:12 AM