locked
Crystal Report in ASPNET Website RRS feed

  • Question

  • User606578968 posted

    I have a aspnet 4.5 website with a ew reports made using CRforVS2012 13.0.9. The reports are working fine in the development environment (Widows 7 SP1, VS 2012, SQL Server 2008 R2). All reports work fine and get exported in to pdf using a httphandler. But the reports do not work when I try to host the website in the same machine and try to view the reports. I get an error message 'Operation not supported. Document processed in JRC engine can not be opened in C++ stack'. A bit of research indicated that this could be due a a host of issues such as

    (a)    Not installing correct CRforVS runtime redistributable.

    (b)    The website not being able to find the report document due to access right restrictions to the temp dir of the ApplicationPoolIdentity or due to incorrect report path specification in the website.

    Therefore I installed the Runtime Redistributable and checked the path specifications of the report for correctness. I also checked that the ApplicationPoolIdentity has access to its temp directory.

    There were also suggestions of copying the aspnet_client folder content from c:/inetpub/wwwroot to the website folder. The web.config file was also altered with additions of <add embedRptInResource="true" value="/crystalreportviewers13"/>, after copying the crystalreportviewers13 folder into the website folder as well as to the wwwroot folder. All these actions are based on the suggestions I found on various related posts.

    However, I continue to get the same error message.

    I also read that it would require me to change the website project to a WebApplication Project, which I dont want to do due to time constraints.

    Any one has any suggestions?

    Wednesday, August 20, 2014 12:33 PM

Answers

  • User606578968 posted

    Ok, after a lot of delay I finally resolved it.

    The clue was in this document which said

    "The only cause to this issue is that “The application could not find the crystal report (.rpt )” be whatever the reason.

     Here are the possible reasons for this error message.

     The report location specified in the ‘Load ()’ method is invalid or report does not exist at that location. :"

    When I checked around, I realised that the sizes of the report files in the published document was only 1kb, which suggested that they were only shortcuts and not original reports. So the simple reason for my trouble was that the report files (.rpt files) were just not getting copied into the folder created during publish. Once I manually copied these files and pasted them to the published folder, everything became OK.

    I had started the project as a website project from the beginning itself. Therefore, I am not able to do the 'Right Click, Select Copy Content during Publish' kind of actions. But the issue is killed for the time being.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, August 31, 2014 11:40 AM