In a report you may want to get a part of a string value by considering a character or characters.
Such a situation we have to use Mid and InStr functions.
Assume that the Description filed value contains "/".
If we want to get the string before that "/", we can use the below expression in the report text box field.
InStr function provides at which location that the "/' character exists.
You can get the last part after the "/" character by using the below expression
Such a situation we have to use Mid and InStr functions.
Assume that the Description filed value contains "/".
If we want to get the string before that "/", we can use the below expression in the report text box field.
1: Mid(Fields!Description.Value,1,InStr(Fields!Description.Value,"/")-1)
InStr function provides at which location that the "/' character exists.
You can get the last part after the "/" character by using the below expression
1: Mid(Fields!Description.Value,InStr(Fields!Description.Value,"/")+1,Len(Fields!Description.Value))
No comments:
Post a Comment