Earlier, I wrote a blogpost about creating a web part to display Crystal Report files. The biggest problem faced was the displaying of images on a report (which include graphs, pie charts and more stuff like that) which wouldn’t work in a MOSS environment. I solved it by creating a second web application to ‘host’ the imagehandler which handles the image requests made by IMG SRC=” tags.
On the MSDN Forum, I found a post made by someone with a similar problem. After solving the problem I replied posting my solution and left it alone. Luckily, I had the post alerts still on to notify me about a new reply being posted. Svetlana came up with two interesting solutions for the exact same problem, which are a bit more elegant if you ask me:
- Rename the CrystalImageHandler.aspx file to a different extension, so the MOSS handler won’t pick it up. Offcourse you’ll have to alter the web.config to include a handler to the correct file.
- Place a custom made CrystalImageHandler.aspx file in the TEMPLATE/LAYOUTS directory of the 12 hyve. Now write a regex which will replace all calls to the old imagehandler with a call to that file which will be in the _layouts directory of your web app.
I’ll see if I can post the contents of the CrystalImageHandler.aspx file and the web part regex to get you guys on your way. And again: thanks to Svetlana for providing this solution!
Update! The fully functional, ready-to-go web part with installation guide and support is now on sale!