Crystal Reports images not visible in web viewer

2019-06-27 14:46发布

I have some Crystal Reports (V10) in an application (.NET 1.1) I inherited that is deployed in four "identical" environments. In three of the environments, they are working fine. In the fourth, the chart graphics are not visible in the web viewer. They are visible if you export the reports.

The IT guys swear everything is exactly the same in all four environments and have kicked the problem back to me to solve. I'm not sure how I'm going to do that since I can't get to the servers to check anything for myself. But I don't see how this can NOT be an environment issue.

It seems to me that Crystal has the necessary permissions to write the file and to retrieve it to render the export versions of the report, but the ASP WP can't access the graphic file when the page is rendered.

Thanks for any suggestions you might have to help me!

RESOLUTION From the IT guys: "We had to change the “Execute Permissions” on the CrystalReportsViewer10 folder within IIS from “Scripts only” to “Scripts and executables”. All of the other sites have only “Scripts Only” and they’re fine."

5条回答
祖国的老花朵
2楼-- · 2019-06-27 15:06

There needs to be an IIS virtual directory called something like "CrystalReportViewers115". I think that the exact name changes between versions. This needs to be visible to your ASP.NET user. Start looking at the environments that work and see if they have this virtual directory installed, and compare it to the one on the failing environment. As another check, you should be able to enter in the URL for the images into a browser and see them. To find out the URL, right click on the picture and select "Properties". For example:
http://localhost/crystalreportviewers/images/toolbar/export.gif
You should see the picture when you browse directly to the URL.

查看更多
走好不送
3楼-- · 2019-06-27 15:06

Add the aspnet_client folder in the source folder of the site. Example:

C:\inetpub\wwwroot\myapplication\aspnet_client\system_web\4_0_30319\CrystalReportWebFormViewer4
查看更多
混吃等死
4楼-- · 2019-06-27 15:20

I could resolve this issue in dev enviroment adding next keys (handlers) to web.config:

<system.webServer>
  <handlers>
    <add name="CrystalImageHandler.aspx_GET" verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" preCondition="integratedMode"/>
  </handlers>
</system.webServer>


<system.web>
  <httpHandlers>
    <add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
  </httpHandlers>
</system.web>
查看更多
Summer. ? 凉城
5楼-- · 2019-06-27 15:26

I recently experienced this very issue: although my resolution was a little different:

  • I tried setting the handler in the web.config but that didn't fix it.
  • I tried setting scripts & executables in IIS but that didn't fix it.

Once I went into the C:\Program Files\Common Files\Crystal Decisions\2.5\crystalreportviewers10 folder and turned off custom errors I could see the error was coming from an access denied issue on C:\Windows\Temp\

The solution was then to not and handlers or alter IIS to run scripts and executables, it was to allow the Network Service to read permission on C:\Windows\Temp\

EDIT: Think I've found another solution which doesn't require permission changes... just set a virtual directory for aspnet_client; the level at which you select this will very much depend on your IIS layout.

查看更多
狗以群分
6楼-- · 2019-06-27 15:30

Go to Start->Programs->Microsoft Visualstudio 2008->Visual Studio Tools->Visual Studio 2008 Command Prompt

and type

aspnet_regiis -c


This will automatically copied the corresponding files...

查看更多
登录 后发表回答