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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Field Positioning - indicate start position

Status
Not open for further replies.

kpeak

IS-IT--Management
Mar 10, 2004
12
US
I am looking for a way to create my report so that I can start each field in a specific position for exporting purposes. I have several outside companies that we create payroll files for that send me their file specs and I do not see a way in Crystal to tell it what position to start a field.

I have research concatenation and also export options but am not getting a warm fuzzy that it will work exactly right.

 
Concatenation allows for it by padding fields, I do this often.

An example would be for a length 25:

{table.field}+replicatestring(" ",25-len(trim(table.field})))

The length of a string which can be output is 254 per formula using CR 8.5 and below.

You'd have to convert numeric/dates, etc.

Hopefully this assures you and helps, otherwise post specific concerns.

-k
 
In order to properly export to a text format do I have to convert all of the number and date fields to strings?
Since I have not done so, it appears to cutoff these fields and display only a portion.
Thanks
 
That's dependent upon the output requirements and whether the exported formats would match them.

As for cutting fields off, that would depend upon how you've created your current objects, whether you've checked allow field clipping (numerics), etc.

Converting them all to strings is one simple means by which you can control the exact number of characters for every field, although you might do so using the original data types too in most cases.

If you have specific questions, please post them, your posts are just asking if it can be done, which it can.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top