Friday, March 23, 2012

Reporting Services 2000 - Substring

Hello,

I'd like to display the first character of a string in a text field in Reporting Services 2000. First I check to see if the field is blank, if it is then do nothing. If the field is not blank, then display the first character.

IIF(LEN(Fields!ALADD2.Value) = 0, "", Fields!ALADD2.Value.SUBSTRING(0,1))

The text box displays #Error when the string is empty. Any ideas as to what I'm doing wrong? Thanks in advance.

Hi,

Use this

IIF(Fields!ALADD2.Value = "", "", left(Fields!ALADD2.Value,1))

Philippe

sql

No comments:

Post a Comment