Thursday, March 22, 2012

Adding a check box to a report

I need to create a nice fomatted report in RS and part of that is checking a box if the data = Yes. Is there a way to add controlsOk try this, I spent a little time but was able to find a way to make it work with a list control,
Add the list,
Drag and drop the Image control, bring in a checked and unchecked image and have them embedded in the report. You can even have the images stacked ontop of eachother, so that they will have the same alignment in the report row for row,
Go to the properties area for the image, go to the visibilty area, and choose Expression,
I find that the expression box works a little counter intuitive, so for the unchecked/other than "yes" box do this
=Fields!YourField.Value = "Yes"
Then If the field value is = "Yes" (make sure its cased correctly) then the unchecked box will appear,
=Fields!YourField.Value <> "Yes"
Conversley have it check for if it is not equal to "Yes" and It will have the checked box appear. It seems backwards but i guess the visibility expression takes the negative or something funny, Heres a lil screen shot of what i got,...


I dont see why this couldnt work in a table or matrix control if it came to that
Happy Reporting!!

No comments:

Post a Comment