1

One of my columns has a value that looks like this -> "$5.95 (Park costs)"

and I need to display the value in column in SSRS report like this:

$5.95
(Park costs)

but font size of "(Park costs)" must be smaller than the price.

Is something like that even possible? To somehow make text that does not contain a number, dot or dollar sign smaller?

Bernard Polman
  • 795
  • 2
  • 14
  • 31

1 Answers1

0

You can do this. You'll need to split up each component of the text column and then place each half in a placeholder. You can then format each placeholder individually.

This solution assumes that your column always contains a "(". If not you should be able to modify it to suit.

I Generated some test data and and placed it in a normal table (tablix) control.

I then added some new columns for testing that each part was working as expected.

The expression for "Cost" column is

=TRIM(LEFT(Fields!MyColumn.Value,InStr(Fields!MyColumn.Value, "(") -1))

The expression for the "Caption" column is

=TRIM(RIGHT(Fields!MyColumn.Value, LEN(Fields!MyColumn.Value) - InStr(Fields!MyColumn.Value, "(") + 1))

Once this was working OK I added the "Final Column".

To add a placeholder, click inside the textbox so the cursor appears then right-click and choose "Create Placeholder"

enter image description here

I added two placeholders with a space between then and set the values to the expressions above respectively. I then right clicked the placeholders chose "Placeholder Properties" and formatted each individually.

The final output looks like this. (I left the test columns in for clarity)

enter image description here

Alan Schofield
  • 19,839
  • 3
  • 22
  • 35