Crystal Reports Web Part for MOSS 2007

To enable our users to view Crystal Reports in a SharePoint environment, we looked for a solution of Business Objects. Unfortunately, that only seems to be available for SharePoint 2003, and not 2007. Also obtaining it seems not that easy, at least it’s not included in the default developer edition of Crystal Reports XI.

So we decided to create one ourselves by using the standard ASP.NET reportviewer control. The web part consists of the CR reportviewer and CR reportsource which, when combined, display the report in the javascript viewer for ASP.NET. One of the problems to overcome is the lack of ability to use online files via http in the reportsource; by default only local files on the hard drive are supported.

A second problem is caused by the http handler Crystal uses to process images. That won’t work in a MOSS environment because the MOSS handlers kick in before the Crystal handler can even process the request. I tried changing the sequence in web.config so the Crystal handler would process first, but couldn’t get that to work properly. I ended up creating an empty web application on a different (non-MOSS) port and redirecting the CrystalImageHandler.aspx requests to that application by simply replacing those URLs in the outputted sourcecode of the web part with a regular expression. Maybe not the best solution, but it works quite well.

Unfortunately I cannot post the web part here since it’s made for the company I work at. Though you may contact me at jsiegmund [at] datamex [dot] nl to work something out (we don’t have an online shop).

Update! Also check out this new post!

Update 2! The fully functional, ready-to-go web part with installation guide and support is now on sale!

Leave a Reply

Your email address will not be published. Required fields are marked *