I am trying to export a concatenated record with 2 numeric fields at the end to a text file using the following format. The first field is 15 positions...4 decimal places and I want to display the decimal and have leading spaces to fill the field. The 2nd field is 10 positions....2 decimal places and should have leading spaces to fill the field.
{@empno_4}+" "+"1"+" "+{@ecode_subscript}+" "+ReplicateString (" ",11 - Len(ToText({prearn.curhours},0,"")))+ToText(Truncate({prearn.curhours}),0,"") +Right(ToText({prearn.curhours},4,""),4)
+" "+ReplicateString (" ",8 - Len(ToText({prearn.curamount},0,""))) + ToText(Truncate({prearn.curamount}),0,"") +Right(ToText({prearn.curamount},2,""),2)
Here is what my record looks like when exported. Note that the 2nd numeric field is not appearing at all and the first has no decimal point.
0017 1 01 40000
{@empno_4}+" "+"1"+" "+{@ecode_subscript}+" "+ReplicateString (" ",11 - Len(ToText({prearn.curhours},0,"")))+ToText(Truncate({prearn.curhours}),0,"") +Right(ToText({prearn.curhours},4,""),4)
+" "+ReplicateString (" ",8 - Len(ToText({prearn.curamount},0,""))) + ToText(Truncate({prearn.curamount}),0,"") +Right(ToText({prearn.curamount},2,""),2)
Here is what my record looks like when exported. Note that the 2nd numeric field is not appearing at all and the first has no decimal point.
0017 1 01 40000