cancel
Showing results for 
Search instead for 
Did you mean: 

Red X instead of images when running a CR for VS report in my ASP.NET app

Former Member
0 Kudos

I've been researching this on the SAP Business Objects web site - so far nothing has worked!

I'm creating an ASP.NET web app using CR for VS (version 13.0.10) under Visual Studio 2013 for .NET 4.x running on a Windows 2012 (64-bit) server.  The app is compiled under 64-bit and the report shows data in the Web Viewer.  The only thing missing are the images (including the charts) - I'm seeing red Xs because the path to the image is not found.  The image path has the path of the folder that my ASP.NET web form is in - with http://servername/appname/foldername/CrystalImageHandler.aspx?dynamicimage=cr_tmp_imagehttp://servername/appname/folder/CrystalImageHandler.aspx?dynamicimage=cr_tmp_image_ ...   That path produces a 404 error (confirmed in the IIS logs).  However, the images are all there if I export to a PDF!

I researched a number of threads (887604, 1338110, 1810968, 3375644, 3541014) and documents (1329630, 1547124) that address this issue.  From the info, I tried putting the httpHandler reference under the system.web section or putting the handlers reference under the system.webServer section (with both preCondition="integratedMode,runtimeVersionv4.0" and preCondition="integratedMode").  (FYI, my application pool is using Integrated mode.) So far nothing has worked!

If anyone has any ideas what I am missing or what might be wrong here, please let me know.  Thanks in advance for your help!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

FYI, I figured out what the problem was - the MVC route.IgnoreRoute settings were incomplete.  (My app is setup up for Web Forms and MVC 5.)

I had to add routes.IgnoreRoute("Forms/{resource}.aspx/{*pathInfo}"); to ignore the calls to CrystalImageHandler.aspx for images in the Forms folder.  Once I did that, the images displayed no problem (even when paging through the report)!

Thanks everyone for your help!

former_member183750
Active Contributor
0 Kudos

Sorry Trevor

It's been way busy and I was not able to get to your post in time (could have saved you time and headaches). The solution is documented:

2007224 - Crystal Reports Web viewer displays embedded graphics as black squares

So, this is more of an FYI to those following in your footsteps I suppose.

- Ludek

Former Member
0 Kudos

Yes - this is definitely an FYI at this point.

I looked at document 2007224 numerous times without realizing that I had to add routes.IgnoreRoute("Forms/{resource}.aspx/{*pathInfo}"); (in addition to the routes.IgnoreRoute("{resource}.aspx/{*pathInfo}"); statement specified in the document)(Glad I finally figured it out!)

Based on my experience, what might be helpful is to add to the document an explanation that any sub-folders containing ASP.NET web forms that run Crystal Reports need to be addressed with an additional routes.IgnoreRoute statement (in addition to the one you have for the root folder).

Thanks!

former_member183750
Active Contributor
0 Kudos

Great point. I was actually thinking of creating a new KBA and linking the two. But your idea might work even better. I'll modify the KBA by end of Friday.

Happy coding ,

- Ludek

Answers (4)

Answers (4)

Former Member
0 Kudos

FYI, I looked at thread #3538009 and SAP Note #2007224 - looks like these might apply to my situation.  So far nothing has worked (though I tried the things mentioned in these).  Wondering if this problem is a bug with VS2013 and .NET 4.5.1 (I'm using both)?

0 Kudos

Create a new Web Crystal app and see if that works because we know this works. Just add the CR viewer reference to the form and the Template will add the 3 CR assemblies to the project and then open and preview a report with saved data.

Then we can look at why your main app won't update.

Don

Former Member
0 Kudos

I don't see a Crystal Web App (or anything similar) as an available project template in Visual Studio 2013 - either under Web or Reporting (here I see Crystal Reports templates for a WPF Application or a Windows Application - but nothing for a web app).

Is that something that should be installed with CR for VS (version 13.0.10) - or is it something I have to download from somewhere to add it?  Thanks.

Former Member
0 Kudos

I made a partial breakthrough!

My form with the Crystal Reports Web Viewer control is running in a sub-folder
named Forms under the root for my app.  When the report is rendered in IE, images that are not displaying reference CrystalImageHandler.aspx - with "Forms/" within the image URL.  I overrode the Render method of my ASP.NET web form and discovered that if I do a string replace to the output and insert a complete URL path (http://appname/CrystalImageHandler.aspx?... vs. only CrystalImageHandler.aspx?...), the images show up when the report is initially displayed!

Is there a way to configure my app so that I don't need to implement this work around?  Also, it works only with the initial display - but the images disappear again when I page back and forth.

Thanks!

Former Member
0 Kudos


I tried both things:

  • Re: Don's response, I tried copying the entire crystalreportviewers13 folder (from C:\inetpub\wwwroot\aspnet_client\system_web\4_0_30319) to the root folder of my app.  No difference in the behavior from when I made that folder accessible as a Virtual Directory (and Applicaiton) through IIS.
  • Re: Ludek's response, I already had everything referenced in that article in my web.config file.

FYI, the images needed for the CrystalReportViewer control itself are all there - just not the images in the report itself (in case that helps).

Any other thoughts or suggestions?  Thanks!

0 Kudos

Hi Trevor,

What happens if you simply double click on the image when browsing through Explorer, not IE?

Seems like it's missing a dependency to display images in the DDE command.

Try Fiddler and Process Monitor and look for Permission Denied or Access errors.

Don

Former Member
0 Kudos

I tried finding the image on the server (using the properties of the missing image from IE) - couldn't even find it.

Not sure what dependency your talking about?  I tried running this report app from both an IE browser on the server itself and from my laptop - same behavior (red X for the missing image).  My laptop certainly should have the image dependencies set - it runs earlier versions of Crystal Reports and other web sites no problem!

RE: permission denied errors, wondering to what would be permission denied?  I'm finding 404 errors logged for the images in the IIS log - so those are getting through somehow?

former_member183750
Active Contributor
0 Kudos

Have a look at this article. The article does not go all the way to CRVS as it was created in the days of CR 2008, but it may point you towards resolution.

Couple of KBAs that essentially would be a continuation of the above article:

1547124 - CRVS2010 - Red X displayed in report instead of dynamic images

1605773 - CRVS2010 web viewer is not displaying the Crystal report

1720670 - Crystal Reports Web viewer does not display on web form (Crystal Reports for Visual Studio...

so, have a look at that. If none of the suggestions presented in this thread help, it's time to start thinking about it fro the perspective of; why me? What am I doing that is different, because the above steps invariable resolve the issue.

- Ludek

Former Member
0 Kudos

I ran Process Manager and got the following errors related to CrystalImageHandler - wondering if anyone can help me interpret what they mean - and what is wrong.  Thanks!

former_member183750
Active Contributor
0 Kudos

Assuming you are using "SAP Crystal Reports, Developer Version for Visual Studio .NET", have a look at KBA 1547124 - CRVS2010 - Red X displayed in report instead of dynamic images.

If you are using CR 2008 see KBA 1484727 - Red x is displayed in place of a picture or chart in Crystal Report viewed in web browser

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow us on Twitter

Former Member
0 Kudos

I am using SAP Crystal Reports, Developer Version for Visual Studio .NET - and I have everything setup as referenced in KBA 1547124 (I've already been through this article - I have Integrated Mode in IIS and the reference added to the <system.webServer> <handlers> section of the web.config) - but it's still not working!

0 Kudos

Hi Trevor,

What Browser are you using? In the IDE you can select what you have installed.

If you run the app on your DEV PC and use Casini/IISExpress does it work? IISExpress is little more forgiving around permissions and should simply work.

Is the AppPool also set for 64 bit? What happens if you set it for 32 bit?

Oh, and just thought of something, quite often all you have to do is copy the web.config file into the app folder, For some reason a Deployment package does not include it. Your logs show PATH NOT FOUND, seems like it is missing or the folder permissions are not set correctly, try setting them to full access with read/write.

And what happens if you create a simply one button CR WEB app and preview a report with saved data, no DB log on or parameters etc.

Does that work?

Don

Former Member
0 Kudos

Don - thanks for your thoughts.

Re: running under IISExpress, I had to change the ResourceUri setting to "../crystalreportviewers13" (that folder is copied into the root folder of my app) to fix the "JavaScript runtime error: 'bobj' is undefined" (which I wasn't getting running under IIS with the setting as "~/crystalreportviewers13"). Once I did that, report rendered but the images now have black "X"s instead of red "X"s,  What does that mean?

Re: browser version, I've tried using both IE8 (on my Windows 7 32-bit laptop) and IE10 (on the Windows 2012 64-bit server where I'm doing the development work)For reasons not related to the Crystal Reports, my app will currently only run in IE.

Re: the IIS AppPool the app is using, Enable 32-Bit Applications is set to False (Manage Pipeline Mode is also set to Integrated).

Re: the web.config, IIS has been running the app out of the directory I've been working in VS with, so the web.config file is there at the root folder of the app (one virtual folder/Application below the root for the Default Web Site).  I did not use a deployment package.

Re: trying 32-bit vs. 64, the app is set for 64 and that is a more significant change, so I'll have to try that when I have more time.

Re: a one-button CR WEB app, again I'll have to try that when I have more time as well (if we don't find a solution soon).

former_member183750
Active Contributor
0 Kudos

See this:

Visual Studio 2012 Crystal Report not working on Windows Server 2012/ 0x800a1391 &amp;#8211; JavaScr...

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow us on Twitter

0 Kudos

Hi Trevor,

Try copying the whole folder into your app folder, that should give it the same permissions.

Don