Good Wonderful Monday Morning!
I am working on a report that will be used for exporting payroll information into a Fixed Width ASCII text file. I have around 25 fields that need to be exported. A quick example of the format is as follows:
Field Start Length
SSN 1 11
MiscValue 12 2
LastName 14 36
FirstName 50 20
MiddleInit 70 1
etc.
1. Anyway, can anyone suggest an easy way to do this through a Crystal Formula? Delimited exports are easy enough, but the fixed width is giving me a problem. I have found one way to do this in a knowledgebase article but it is tedious to do with 25 fields. (
The article involves checking the current length and specifying a required length. Use an IF statement to compare them. Truncate the field if the current length is longer or replicate spaces if the required lengh is longer.
I was wondering if someone might know a function to accomplish this in a better and more efficient fashion.
2. Additionally, the 25 fields run over 400 characters. I believe a string formula can only contain 255 characters max. Assuming I can get the fixed width working, can anyone suggest a way to start at character 256 with a second formula?
Thanks so much for the time!
I am working on a report that will be used for exporting payroll information into a Fixed Width ASCII text file. I have around 25 fields that need to be exported. A quick example of the format is as follows:
Field Start Length
SSN 1 11
MiscValue 12 2
LastName 14 36
FirstName 50 20
MiddleInit 70 1
etc.
1. Anyway, can anyone suggest an easy way to do this through a Crystal Formula? Delimited exports are easy enough, but the fixed width is giving me a problem. I have found one way to do this in a knowledgebase article but it is tedious to do with 25 fields. (
The article involves checking the current length and specifying a required length. Use an IF statement to compare them. Truncate the field if the current length is longer or replicate spaces if the required lengh is longer.
I was wondering if someone might know a function to accomplish this in a better and more efficient fashion.
2. Additionally, the 25 fields run over 400 characters. I believe a string formula can only contain 255 characters max. Assuming I can get the fixed width working, can anyone suggest a way to start at character 256 with a second formula?
Thanks so much for the time!