RDLC Expression to Trim Value IF begins with

29 Views Asked by At

I am creating a report for Business Central and unfortunately this change can't be made within AL so I'm having to try an expression change for the field in RDLC.

The field is currently, =Fields!HighDescription.Value

I need to get rid of leading values if the value pulled in begins with: RS-BE

Here is what I have tried with no success yet:

=IIf(Left(Fields!HighDescription.Value, 6) = "RS-BE", Mid(Fields!HighDescription.Value, 6), Fields!HighDescription.Value)


=Switch(Left(Fields!HighDescription.Value, 6) = "RS-BE", Mid(Fields!HighDescription.Value, 6), True, Fields!HighDescription.Value)


=IIf(Left(Trim(Fields!HighDescription.Value), 6) = "RS-BE", Trim(Mid(Fields!HighDescription.Value, 6)), Trim(Fields!HighDescription.Value))

These expressions did not change anything and brought in the values as normal.

0

There are 0 best solutions below