I want to make some text bold and underlined, if the the value of field in my database is, say "HD"
I mean, I have two fileds in the database. Text1 and Header. I display the Text1 in my report and if Header's value is "HD", then Text1 should be in bold and fontsize should be 12. Otherwise, just show it normally.
How to do it?
Thanks Furqan
Text = GetMOValue(moDisk, "systemname"); txtType. Text = GetMOValue(moDisk, "MediaType"); txtModel. Text = GetMOValue(moDisk, "Model"); txtFirmware. Text = GetMOValue(moDisk, "FirmwareRevision"); .....
Render html tags in SSRSDouble click on the TextBox that holds the Multiline custom field value. In General section, and Below Markup types > Selects “HTML – Interpret HTML tags as styles”.
In the SSRS report, We can change the background color and font color. Right-click on a column and goto text box property. In the Font option, we change the font, style color and so on.
It's like this earlier answer of mine which shows how to do a similar thing for text color. Select the Text1 cell in the report, and then from the Properties window, find "FontWeight" and hit the drop-down, and choose "Expression".
The expression you want will be something along the lines of:
=iif(Fields!Header.Value = "HD", "Bold", "Normal")
...basically, you're setting the Property "FontWeight" of Text1 to be "Bold" when Header is "HD", otherwise you're setting it to "Normal".
You'd do a similar thing for the FontSize property:
=iif(Fields!Header.Value = "HD", "12pt", "9pt")
(Obviously, set "9pt" to whatever font size is set normally at the moment!)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With