Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hey Guys, I have a small problem with reporting services. I have a text box with AreaCodes which I trim down when the length of the area codes is greater than 50 when I view the report which is fine and works like a treat. Like so

VB
=Fields!AreaCodes.Value.ToString().Substring(0, iif(CINT(TRIM(Fields!AreaCodes.Value.ToString()).Length) <= 50, CINT(TRIM(Fields!AreaCodes.Value.ToString()).Length), 50)) & IIF(Fields!AreaCodes.Value.ToString().Length >= 50, "...", "")


My problem is when I export to excel I don't want the above forumla to apply instead I want to trim it doen to the max characters allowed in a column by excel which is 255.

Any help is very much apreciated.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900