cancel
Showing results for 
Search instead for 
Did you mean: 

Padding a field out with spaces to s set length

Former Member
0 Kudos

Post Author: danish

CA Forum: Formula

Hi,

I'm new at using Crystal Reports.

I am trying to pad a string out to a set length of 50. The initial string is of variable size depending on the data in the field.

Can anyone tell me how I can do this using a while do loop.

ie while field length < 50 add a space to field until field length = 50.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Post Author: danish

CA Forum: Formula

Thanks for that. Managed to work out how to do with while do but this will be helpful for future.

Former Member
0 Kudos

Post Author: Jagan

CA Forum: Formula

No need to loop, use ReplicateString.left({table.field} & ReplicateString(" ", 50), 50)