Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Padding cells to comply with length requirements for upload to ASCII

Status
Not open for further replies.

lmauro

Technical User
Nov 2, 2010
1
US
I am working with Crystal 2008. I am extracting name, social, and amount of retirement contribution. I have to format this info to fit the "template" in order to upload.

How do I "pad" {fname} to make it 20 in length?
For example it should look like:
{fname} {lname} {Middle}
Kellie Long Ann

Instead it looks like this:
KellieLongAnn

Someone said I should export to excel and use the REPT function with cocantenate. Doesn't crystal have a function like this?


 
I'm not sure what happens after the upload, but in CR, you could pad by using:

{fname}+replicatestring(" ", 20-len({fname}))

You would need to set the font to a nonproportional font like Courier though.

Another option is to use the space function, like this:

{fname}+space(20-len({fname}))

...again with the non-proportional font.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top