Check box in Reporting services Cells
Hi All, Can any one knows that how to create a Check box in reporting services and accoring to some conditiontrue check box should be checked. Thanks Rahul
December 10th, 2007 2:06pm

Hello, If your checkboxes are only "read-only", I mean they are not to be modified by the user viewing the report, you can use the tip used to see KPIs in SSRS : - Put 2 embbeded images in your report (representing one check box checked and one that is not, named "Checked" and "Unchecked" for example) - Insert an image object and display one of the two images using a conditional expression (the "Use this image" in the properties of the image). This should be something like "=Iif(conditionnal_Expression = true, "Checked", "Unchecked")" If you want your users to check/uncheck the checkboxes, this should be using custom controls I guess... Regards, Mathieu
Free Windows Admin Tool Kit Click here and download it now
December 10th, 2007 2:47pm

When faced with the same problem some time ago, I used a similar technique. However instead of using an image object, I used a textbox with the font set to wingdings. For the value property, I used an IIF statement and set the values to the wingding characters displaying a checkbox and empty checkbox. Tim
December 10th, 2007 3:27pm

Hi Mathieu, Thanks for your reply. but i m NOT geeting the check box in a cell .I m usingbelow expression and font name i put wingdings. =iif((Sum(Fields!Q4a.Value, "DataSource1"))=1,"Checked","Unchecked") Can any one other can do please tell.. Regards, Rahul
Free Windows Admin Tool Kit Click here and download it now
December 11th, 2007 9:21am

Hello, Sorry but I am not sure to understand. This tip works even if the checkbox is not in a cell. You can do it in a textbox for example. I just made a quick test in the Report Designer Preview with Webdings (thanks for this tip VBTim !) and it works fine. If you do it with Webdings, your conditional expression should look something like : =iif((Sum(Fields!Q4a.Value, "DataSource1"))=1,"a","r") Can you tell me more ? Regards, Mathieu
December 11th, 2007 12:09pm

Thanks alot Mathieu, my problem is solved with your above message. but i m getting only click symbol. Can we get a check box also ? like if =iif((Sum(Fields!Q4a.Value, "DataSource1"))=1,"a","r") if Exp value is true then "check box" is clicked other wise not. Thanks Mathieu
Free Windows Admin Tool Kit Click here and download it now
December 11th, 2007 2:45pm

Your expression doesn't make any sense. You are summing up a values in the data set. The above expression will only return a single value for the report (hence the same symbol). Are you sure you want to use the dataset scope?
December 12th, 2007 5:28am

My Problem is solved , thanks man. One more thing i want to Merge two vertical cells..IN A TABLE like 3 rows and1 single cell will appear. Thanks. you told me that we can create a check box also how we can do that ... can upls explain more in ur above example This should be something like "=iif(conditionnal_Expression = true, "Checked", "Unchecked")" we can do this but what else i have to make changes in properties ?? Font name ? what is IMAGE OBJECT how we can use it pls tell me ? Regards Rahul
Free Windows Admin Tool Kit Click here and download it now
December 12th, 2007 1:42pm

As noted above, you can either use a font with a checkbox icon in it, like Wingdings, and set the value to the character you want to show. Or, you can add an image to your table (the image control is in the toolbox with the other controls). Then set the value to the name of one of 2 static images (embedded in the report definition). SSRS does not allow for vertical merging of table cells. You can stick a rectangle (or table) inside of a table cell and put several items on top of each other. SSRS 2008 will allow for cell merging in the headers. Even if we did it, cell merging wouldn't work when the rows / columns weren't at the same group scope.
December 12th, 2007 6:56pm

Thanks for your healp. Its very helpful. .....:
Free Windows Admin Tool Kit Click here and download it now
February 13th, 2008 5:05pm

Hi, i got other simple suggestion. I used the CommercialPi BT Font and the following Expression: =iif(<Expr>, ")","(")I rekon, it looks better for what i am doing.
January 28th, 2010 12:22am

I used CommercialPi BT Font and the following expression= iif(Expression, ")" ,"(" )It looks good to me, thanks for the help in this post.
Free Windows Admin Tool Kit Click here and download it now
January 28th, 2010 12:25am

This is just for anyone who is searching for a solution for merging vertically, depending on what you need a merged cell to do. I ran into the same problem where I had a long description that was supposed to display on one side with a whole bunch of seperate fields on the other side. Looks like this: Column 1 Column 2 Description is quite Price: 1 long and detailed Total: 1 What I did was split the description into pieces based on approximately how much would fit in the span of the column (in this case 40 characters). If the string was longer than 40 characters then I included up to the last space before 40. For the second row If the string was longer than 40 characters then I included from the last space before 40 +1. So I ended up with the first row being "Description is quite" and the second row "long and detailed" Here are the IIf statements I used. The first part of the IIf covers if the string had been split across 2 rows by a CRLF to display it accordingly. --1st line =IIf(InstrRev(Mid(Fields!CostStructureNote.Value, 1,40), vbCRLF) <> 0, Mid(Fields!CostStructureNote.Value, 1, InstrRev(Mid(Fields!CostStructureNote.Value, 1,40), vbCRLF)), IIf(Len(Fields!CostStructureNote.Value) >= 40, Mid(Fields!CostStructureNote.Value, 1, InstrRev(Mid(Fields!CostStructureNote.Value, 1,40), " ")), Mid(Fields!CostStructureNote.Value, 1,40))) --2nd line =IIf(InstrRev(Mid(Fields!CostStructureNote.Value, 1,40), vbCRLF) <> 0, Mid(Fields!CostStructureNote.Value, InstrRev(Mid(Fields!CostStructureNote.Value, 1,40), vbCRLF)+2),IIf(Len(Fields!CostStructureNote.Value) >= 40, Mid(Fields!CostStructureNote.Value, InstrRev(Mid(Fields!CostStructureNote.Value, 1,40), " ")+1), "")) **had to do the CRLF + 2 instead of +1 because the next character is apparently the space after the CRLF ^^ Anyways, hope this helps someone. It worked for me.
July 9th, 2010 9:02pm

I use wingdings 2 font : and following expression iif(Expression, "Q", "R") it really looks nice.
Free Windows Admin Tool Kit Click here and download it now
September 24th, 2010 9:30am

Is anyone else as bothered as I am that there isn't a checkbox control? I get that we're developers and love finding our way around this stuff... but using an iif expression to do character substitutions based on the value of the field... seems kinda clunky for a MS product, no? Ah well... back to the grind. Thanks to Abhay above by the way, saved me some time in finding images of checked and unchecked boxes to use... Mike Devenney
December 14th, 2010 9:47am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics