http://www.sqlservercentral.com/blogs/pturley/2010/03/11/displaying-a-check-mark-for-a-row-when-a-related-record-exists/

Printed 2014/11/23 01:14PM

Displaying a Check Mark for a Row When a Related Record Exists

By pturley, 2010/03/11

Let's say that you have a column named some_id in an outer-joined table that will return a value if a record exists and will return null if a record doesn't exist...

  1. Add an image item to a table cell.
  2. Add two embedded images to the report; a check mark and a blank white square the same size. Let's call the image files Check.png and Blank.png (or JPG, GIF, BMP, TIF, etc.)
  3. For the Value property of the image report item, use an expression like:
    =IIF(IsNothing(Fields!some_id.Value), "Blank", "Check")

In the table or group footer, use a COUNT function with the same field: =COUNT(Fields!some_id.Value)
This will only count the existing values.



Weblog by Paul Turley and SQL Server BI Blog.
Copyright © 2002-2014 Simple Talk Publishing. All Rights Reserved. Privacy Policy. Terms of Use. Report Abuse.