Crystal Reports Web Part – part 2

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!

No permission to create MySite

After switching the authentication provider on our SharePoint installation from NTLM to Kerberos (which should be better), users started to complain that they weren’t able to create a MySite anymore. I checked and offcourse they were right.

To use Kerberos, I had to change the application pool account to the Network Service. That account isn’t a Farm Administrator by default, so you’ll have to add it to that group via the Central Administration pages. After that it should all work again.

By the way: on creation of the MySite, the error received states that the permissions to create a MySite were turned off. That’s very misleading because they weren’t!

Printing SharePoint lists

In a blogpost by Ishai I found some code which enables users to print out lists in a printerfriendly view; something which is missing in SharePoint by default.

To enhance the feature a little bit more, you can edit the printlist.xml file to include a description (which is displayed below the title of the menu item) and an image (which is displayed in front of the image).

For instance:

<CustomAction Id=”SPSTIPS.PrintListActionsToolbar”
RegistrationType=”List”
GroupId=”ActionsMenu”
Location=”Microsoft.SharePoint.StandardMenu”
Sequence=”1000″
Title=”Afdrukken”
Description=”Open deze lijst in afdrukweergave in een nieuw venster.”
ImageUrl=”/_layouts/images/MENUPRINT.GIF”>
<UrlAction Url=”{SiteUrl}/_layouts/PrintList.aspx?list={ListId}”/>
</CustomAction>

The image you use should be a GIF with a dimension of 34×34 pixels. Place it in the TEMPLATE\IMAGES directory in your 12 hyve.

MOSS Development updates!

Hurray! Some nice new development packages have arrived from Redmond! They bring some interesting new features and tools which should make our lives as developers a bit easier.

Direct download links:
MOSS 2007 SDK 1.2
WSS 3.0  SDK 1.2
Visual Studio Extensions for Windows SharePoint Services 3.0 CTP 1.1

Please check out the Microsoft SharePoint Products and Technologies Team Blog for more information on these updates.

MCTS Certified!

Yeah! After reading two quite lengthy books (and for me that’s a lot of reading compared to the things I usually read…) in not so much time, and taking two not too easy exams, I made it! I’m now officially a Microsoft Certified Technology Specialist. Guess I’m going to need new business cards to fit that title 😉 So now that I’m supposed to know a lot of ASP.NET web development, more blogposts will arrive shortly!

And not to worry… I won’t waste my newly gained free time, I’m thinking about taking bass lessons and maybe update the title to MCPD, but on a slower paste this time. But first: celebration time! 😀

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!

InfoPath, SSO and SQL Server credentials

Here’s a quick walkthrough to enable a InfoPath form to get information from a SQL Server database with credentials found in a SSO database (which you typically use with SharePoint).

Read More

Movin’ on

Always looking out for better things, I decided to move my blog. Not that anyone would care since I really have no visitors yet (I think). So it’s all just in my advantage, because this new one at WordPress is a bit easier to manage as opposed to the old one at BlogSpot (no offence…). Just to let you know 🙂

Hey, this one even has instant smileys! 😀

MSDN Showtime! REMIX 07

Last june, I was fortunate enough to be able to visit the Microsoft DevDays in Amsterdam. Lots of interesting stuff there, including some VS “Orcas” 2008 previews (more web related stuff!), the very nice looking Silverlight technology and more. But the most interesting presentation I whitnessed there was by Molly Holzschlag. She talked about CSS and browser standards. She somehow managed to explain how the HTML flow in IE works, with positioning and stuff. I’ve been stuggling with that on almost every site I made (and I’ve made a few), so maybe you’ll be as pleased with this explanation as I was.

Check out the entire presentation at MSDN Showtime: http://www.microsoft.com/emea/msdnshowtime/sessionh.aspx?videoid=590

Molly has her own spot on the web @ http://www.molly.com, where more information about web designing can be found.

Mixing Forms Based and Windows Authentication In ASP.NET

To start off this blog with some usefull information, I´m going to explain how to develop an ASP.NET 2.0 web application which has both forms authentication and Windows authentication enabled.

Let’s say we’re developing a web application which will be running on our local intranet. There’s a pretty good chance that same intranet will have a domain and thus a domain server, which in this case will be a Microsoft Active Directory. Now, after our user has logged in to his (or her) computer, we don’t want to bother him with credentials any more. He provided the correct password to get into the machine, so he’s trusted from that point on.
Read More