Link to home
Start Free TrialLog in
Avatar of Dale Fye
Dale FyeFlag for United States of America

asked on

Checkboxes created in report (Visual Studio 2010) do not display properly in SSRS or render properly when exported to Word

I'm trying to recreate a report for a client, and in that report they have three fields Night, Weekend, Holiday (0 or 1) which need to be displayed as check-boxes.
In Visual Studio, I've made the column for these values .2" wide, have set the font to Wingdings, and have the expression which looks like:

= IIF(Fields!Night.Value = 0, chr(0168), chr(0254))
& IIF(Fields!Wknd.Value  = 0, chr(0168), chr(0254))
& IIF(Fields!Holiday.Value = 0, chr(0168), chr(0254))

In VS, this displays like the following image:User generated imageBut after I deploy the report and run it in SSRS it looks like the following, making it difficult for the client to review the data in the report.User generated imageIf my client exports this from SSRS to a .pdf file, it renders properly, but the client needs to export the report to Word (so that it can be edited) and when they do, that column automatically resizes itself so that these stacked checkboxes display horizontally.  My client recognizes that they can simply resize the column, but would prefer not to have to do so.User generated imageI've tried inserting a carriage return/line feed between each character in the report textbox expression, but that results in extra spacing between the checkboxes.

I've also tried using 'X' and 'o' with the wingdings font, which places an X inside the checkbox, but the formatting issue still persists.

Does anyone have any recommendations?
Avatar of John Tsioumpris
John Tsioumpris
Flag of Greece image

Well you are not alone with this problem..lets say that a lot of people want to display checkboxes on SSRS reports....well this guy here has developed an image based solution that looks good
(Potentially stupid question)  Why are we displaying a checkbox, which implies user interaction, on an SSRS report which by definition does not allow user interaction?

It would be more intuitive to display something that does not imply that it's editable, such as the value itself, or as John says come up with an image.
Avatar of Dale Fye

ASKER

John,

I'll take a look at that article.

Jim,

Because the SSRS report has to emulate a state approved form.  The checkbox is not designed to be editable, but to merely replicate the appearance of this state approved form.

I've mentioned to the client that if they need to edit the report, after running it, then those changes should go in the database, but have lost that argument.
Ahh.  That would do it.  The image route will probably be less aggrevation then trying to get a checkbox to render correctly both in SSRS and in an export to Word.
Split the single row into three rows (red lines), and then remove the borders between the rows where it's supposed to look like a single row (yellow area):
User generated image
Russell,

I attempted to do that, but was unable to merge the cells in other columns that should span multiple rows, in many cases 5 or 6 lines of text.

Dale
ASKER CERTIFIED SOLUTION
Avatar of Dale Fye
Dale Fye
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial