***Update ***
Function created:
for condensing a large character string and removing any carriage returns (such as in a comments field).
Function shortcomment(byval commentstring as string, stringlength as integer) as string
if commentstring="" or isnothing(commentstring)
return commentstring
else
commentstring=replace(commentstring, chr(10)," ")
if commentstring.length >stringlengthcommentstring=left(commentstring, stringlength) & "....."
return commentstring
else
return commentstring
end if
end if
end function
to implement:
=code.shortcomment(Fields!comments.Value, 10)
where 10 is the condensed length
Showing posts with label Left. Show all posts
Showing posts with label Left. Show all posts
Thursday, 22 October 2009
Thursday, 15 October 2009
Condensing large character string and removing carriage returns - SSRS
Useful formula for condensing a large character string and removing any carriage returns (such as in a comments field).
=iif(len(Replace((Fields!Comments.Value),CHR(10)," "))>25, (left(Replace((Fields!Comments.Value),CHR(10)," "),25) & "....."),Fields!Comments.Value)
...next stage will be to create a function...
http://sqlreportingservicescrystalreports.blogspot.com/2009/10/condensing-large-character-string-and_22.html
=iif(len(Replace((Fields!Comments.Value),CHR(10)," "))>25, (left(Replace((Fields!Comments.Value),CHR(10)," "),25) & "....."),Fields!Comments.Value)
...next stage will be to create a function...
http://sqlreportingservicescrystalreports.blogspot.com/2009/10/condensing-large-character-string-and_22.html
Subscribe to:
Posts (Atom)