Search code examples
reporting-servicesexpressionbold

SSRS Reporting Services - Bold numbers alternately with non bold


I would like to give me some help with an expression. Im using SSRS Reporting Services and i would like to make an expression for a value with 25 characters from SQL, in which alternatively every 4 characters, the characters will be bold like

RF16900018000000123456789

Do you have any idea how i can do this without using HTML tags?

I am not an ssrs expert and so i find it very difficult to create such an expression with my knowledge.


Solution

  • You can do this using a series of placeholders.

    In this example, I have a table showing the original data and then to the right there is a column that will contain 7 placeholders. (I only show the first one/two here)

    enter image description here

    To add a placeholder, click inside the textbox so you get a cursor in there, then right-click and choose "Create Placeholder". Create 7 of these and then set the value expression in turn to the following

    =Mid(Fields!myText.Value, 1, 4)
    =Mid(Fields!myText.Value, 5, 4)
    =Mid(Fields!myText.Value, 9, 4)
    =Mid(Fields!myText.Value, 13, 4)
    =Mid(Fields!myText.Value, 17, 4)
    =Mid(Fields!myText.Value, 21, 4)
    =Mid(Fields!myText.Value, 25, 1)
    

    Note: The final expression selects only 1 character

    Now just click each alternate placeholder and set the font to bold, that's it.

    The final design looks like this...

    enter image description here

    Here's the result.

    enter image description here