I have a report showing text data in a field from SQL Server database. Sometimes users need to put special code at the end of the text, so they put that code between two $. In the SSRS report I need to hide that code and the two $ and show only the text itself.
For example if I have the below text from SQL database:
My Name is AAAA. $z123$
I need it to be seen as:
My Name is AAAA.
Currently I am using the below code in SSRS, but it is only working if the text has the special code. If the text doesn't have the special code it is showing an error:
=Mid(Fields!DESCRIPTION.Value ,1,InStr(Fields!DESCRIPTION.Value ,"$") - 1)