Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to show tick for a true value in Report

Status
Not open for further replies.

AndyH1

Programmer
Jan 11, 2004
350
GB
I have a field 'EnvironmentalServices' which I am showing in an Report using Report Builder 2. The field is boolean and the customer wants the report to show a tick if this field is true, otherwise nothing. The tick would just be to show if true (ie it doesn't need to be a checkbox)

I'm fairly new to Report Builder (just got into it last week) but I assume there is no built in tick and I'd have to display a tick image.

I assume I select the text box properties for the field and choose general and the select the fx button next to value and need to replace the
=Fields!EnvironmentalServices.Value

with something like

if Fields!EnvironmentalServices.Value = 1 then show image else ""

but am unclear how I do this conditional statement or how to reference an image in this context

Can anyone advise?

Hope someone can help - really struggling with this
Thanks
AndyH1

 
Just to update. Ive been trying the following
First I tried

IIF(Fields!EnvironmentalServices.Value = 1, "Yes", "No")

which works fine for giving Yes or No. However if I try to incorporate html such as:

=IIF(Fields!EnvironmentGoodsServices.Value = 1, "<span style='font-family:Webdings;font-size:1.5em'>&#252;</span>", "")

Then what displays is <span style='font-family:Webdings;font-size:1.5em'>A</span> and not a tick sysmbol. This is because the report writer converts any angular brackets into &lt; and &gt; ie the html generated by report writer is:

&lt;span style='font-family:Webdings;font-size:1.5em'&gt;A&lt;/span&gt;

so its not converted. can anyone advise how I add a tick, I assume using the <img> tag will also give the same problem





 
Figured out a way to do this

=IIF(Fields!EnvironmentalServices.Value = 1, "a", "")

then set font (to webdings) and size under text box properties.

Works though not very elegant, but webdings is on most Windows machines since 1997 so should be ok. Anyone got better ideas though? (for example how to do an image)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top