Cut off Characters
Posted: Mon Nov 18, 2024 1:43 pm
Hello, how can I hide or cut off characters in Stimulsoft starting from a “ “ (space)? The length of the text varies, so Stimulsoft needs to search for the space and then remove the characters after it.
For example: “Hallo Welt” — “Welt” should no longer be displayed.
I already tried that.
For example: “Hallo Welt” — “Welt” should no longer be displayed.
I already tried that.
Code: Select all
IIF(
Substring(EMPLOYEES.LASTNAME, 0, 1) == " ",
Left(EMPLOYEES.LASTNAME, 0),
IIF(
Substring(EMPLOYEES.LASTNAME, 1, 1) == " ",
Left(EMPLOYEES.LASTNAME, 1),
IIF(
Substring(EMPLOYEES.LASTNAME, 2, 1) == " ",
Left(EMPLOYEES.LASTNAME, 2),
IIF(
Substring(EMPLOYEES.LASTNAME, 3, 1) == " ",
Left(EMPLOYEES.LASTNAME, 3),
IIF(
Substring(EMPLOYEES.LASTNAME, 4, 1) == " ",
Left(EMPLOYEES.LASTNAME, 4),
EMPLOYEES.LASTNAME
)
)
)
)
)