I am currently working on an ASCII report. Each field must start at the same point. I have come to a field based on employee middle names. The problem lies in that some employees have middle names and some do not. The field length for the Middle Name is 12. For those employees that have a middle name the spacing works fine, it is for those employees that do not. It seems that if the field is blank then it is not picked up and therefore there is no spacing put in.
eeEmployee.EInitial is a string type field.
I have been trying to play around with the following formula:
if Length ({eeEmployee.EInitial}) = 1 then Picture ({eeEmployee.EInitial},"x___________" )
else if Length ({eeEmployee.EInitial}) = 2 then Picture ({eeEmployee.EInitial},"xx__________"
else if Length ({eeEmployee.EInitial}) = 3 then Picture ({eeEmployee.EInitial},"xxx_________"
else if Length ({eeEmployee.EInitial}) = 4 then Picture ({eeEmployee.EInitial},"xxxx________" )
else if Length ({eeEmployee.EInitial}) = 5 then Picture ({eeEmployee.EInitial},"xxxxx_______" )
else if Length ({eeEmployee.EInitial}) = 6 then Picture ({eeEmployee.EInitial},"xxxxxx______" )
else if Length ({eeEmployee.EInitial}) = 7 then Picture ({eeEmployee.EInitial},"xxxxxxx_____" )
else if Length ({eeEmployee.EInitial}) = 8 then Picture ({eeEmployee.EInitial},"xxxxxxxx____" )
else if Length ({eeEmployee.EInitial}) = 9 then Picture ({eeEmployee.EInitial},"xxxxxxxxx___" )
else if Length ({eeEmployee.EInitial}) = 10 then Picture ({eeEmployee.EInitial},"xxxxxxxxxx__" )
else if Length ({eeEmployee.EInitial}) = 11 then Picture ({eeEmployee.EInitial},"xxxxxxxxxxx_" )
else if Length ({eeEmployee.EInitial}) = 12 then Picture ({eeEmployee.EInitial},"xxxxxxxxxxxx" )
else if IsNull ({eeEmployee.EInitial}) then "____________" else
""
Thank you for your help,
eeEmployee.EInitial is a string type field.
I have been trying to play around with the following formula:
if Length ({eeEmployee.EInitial}) = 1 then Picture ({eeEmployee.EInitial},"x___________" )
else if Length ({eeEmployee.EInitial}) = 2 then Picture ({eeEmployee.EInitial},"xx__________"
else if Length ({eeEmployee.EInitial}) = 3 then Picture ({eeEmployee.EInitial},"xxx_________"
else if Length ({eeEmployee.EInitial}) = 4 then Picture ({eeEmployee.EInitial},"xxxx________" )
else if Length ({eeEmployee.EInitial}) = 5 then Picture ({eeEmployee.EInitial},"xxxxx_______" )
else if Length ({eeEmployee.EInitial}) = 6 then Picture ({eeEmployee.EInitial},"xxxxxx______" )
else if Length ({eeEmployee.EInitial}) = 7 then Picture ({eeEmployee.EInitial},"xxxxxxx_____" )
else if Length ({eeEmployee.EInitial}) = 8 then Picture ({eeEmployee.EInitial},"xxxxxxxx____" )
else if Length ({eeEmployee.EInitial}) = 9 then Picture ({eeEmployee.EInitial},"xxxxxxxxx___" )
else if Length ({eeEmployee.EInitial}) = 10 then Picture ({eeEmployee.EInitial},"xxxxxxxxxx__" )
else if Length ({eeEmployee.EInitial}) = 11 then Picture ({eeEmployee.EInitial},"xxxxxxxxxxx_" )
else if Length ({eeEmployee.EInitial}) = 12 then Picture ({eeEmployee.EInitial},"xxxxxxxxxxxx" )
else if IsNull ({eeEmployee.EInitial}) then "____________" else
""
Thank you for your help,