cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal 2010 (13) and .NET 4.0 report images not displaying

Former Member
0 Kudos

I'm posting this in case someone else has the same issue because, after a lot of searching, head-banging, and gnashing of teeth, I didn't find any help online.

I'm publishing a .NET 4.0 web application to a Windows 2008 R2 server. I installed both the 32bit and 64bit (and in the correct order!) runtimes, however my website is running in an app pool that allows 32bit applications because we're not quite ready to move everything to 64bit.

I'll save my rant until after I explain what fixed my specific issue.

I finally got reports to work, after wrestling with permissions for 2 days, but images on the report itself were coming up as broken images (yes, the red 'X'). I'm not talking about the toolbar images, for which there are many different posts about many different fixes for you to use in, yes you guessed it, trial and error. I figured it couldn't be permissions on the \temp folder... I had gone so far as to give "Everyone" full control to make sure of this. I also verified that the image was being created for the report. It just wasn't showing in the viewer.

What I tracked it down to being was an issue with the crystal image handler. The web.config references that I had (for both classic and integrated mode, just in case) seemed to be 100% correct. Well, it was, except for an option that isn't even visible/assignable within the IIS MMC snap-in for the integrated mode reference, within <system.webServer>.

At first, my seemingly valid handler entry in web.config was:

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

After messing with it in IIS manager, it somehow got set to this:

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

Note the precondition. The "integratedMode" is correct, and I'm not sure if it's even necessary since it's specified in the app pool that I'm using. However, I have the website setup to use .NET 4.0! Why does it say 2.0? Why did the IIS manager stick this in there when there seems to be nowhere to change the value to correct it within the IIS GUI? Who knows. I changed it to 4.0 and it worked, my images were now visible on the reports:

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

<rant>

I'd like to speak to the blatant lack of documentation for getting CR 2010 running correctly in a production environment. And by "lack of" I mean the sheer nonexistence of said documentation. Having forum posts saying "oh, you need to follow our old guidelines, but need to use IUSR and IIS_IUSRS instead" is not the answer. Not only are there some conflicting posts out there, but that doesn't provide anyone what needs the additional permissions. Because of the long 2 days of trial-and-error of giving permissions, taking permissions away, and giving them back, I finally got it where it'd work. Now I have no idea if my server is less secure than it needs to be because I gave permissions to something that wasn't necessary. Thanks Business Objects/SAP.

I know that the "production" version of Crystal for VS 2010 was just released weeks ago, but come on. At least have some documents out there describing what you need to do with IUSR, IIS_IUSRS, and, apparently, the handler reference in web.config.

</rant>

Hope this helps someone.

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

First, I'll say that I agree with you - to a point. The documentation that could have led you to a solution is there:[This|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a0437ea8-97d2-2b10-2795-c202a76a5e80] article was published in January of 2009 and does document preCondition="integratedMode".

The KB [1484727 - Red x is displayed in place of a picture or chart in Crystal Report viewed in web browser|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333433383334333733323337%7D.do] should also have helped.

I have no idea what you needed to do to get preCondition="integratedMode,runtimeVersionv2.0" added to the web.config, so not much there...

Thing to realize is that before VS2010, all that was needed was;

preCondition="integratedMode"

and voila. E.g.; no framework 4.0.

Now we have so many frameworks, it is actually necessary to specify the framework, thus the;

preCondition="integratedMode,runtimeVersionv4.0"

So, in a nut shell, you are right in that this needs to be documented and I'll cobble a KBase on it tomorrow.

- Ludek

Former Member
0 Kudos

You're right, it could have helped me find the solution, but it didn't. With as much searching as I did you'd think I would have found this article that you wrote way back in January 2009 at some point. It's a testament to how the "community network" could use some improvement making this information more readily available.

Now, it is beyond me how you think that someone could be expected to then follow that "since this is VS 2010 and .NET 4.0, we need to specify that the handler use the older framework". No where is this little fact documented, so how exactly could you expect me, or anyone else, to come to that conclusion? Not only would it take some digging to find what can be specified for the preCondition (MS's documentation shortcomings), but why would one think that the handler with the new version of Crystal, for VS 2010, needs to have "runtimeVersion2.0" specified as a preCondition?

Thank you for responding to my post and taking the time to document this requirement... I'm sure someone at some point will find it very useful!

Answers (0)