Friday, December 16, 2005

Project Server Traffic Light Indicators - SQL Reporting Services

Recently I had to mirror a custom Project Center view from Project Server 03 using reporting services. When trying to dynamically display the traffic light indicators in a SQL reporting services report I started to confront some of the limitations of the 2000 version of this product. The assumption was that these images were not included in the datbase as BLOBS. The problem came when trying to dynamically load an image based on a numeric database value and the relative URL path. The trick I discovered (thanx Google newsgroups) was some quite simple logic in the value attribute of the image control. As an example, I have included the logic for the the schedule field from the dataset.

=iif(Fields!Schedule.Value="1","02 red.jpeg", iif(Fields!Schedule.Value="3","01 green.jpeg",iif(Fields!Schedule.Value="2","03 yellow.jpeg","")))

The logic driving the field values is contained in a SQL view. Hopes this helps someone else trying to do a similar thing.

No comments: