Jul 20, 2006 #1 szaunbr Technical User Joined Jul 5, 2006 Messages 50 Location US I am working on a report and I need a number field to be exactly 6 digits long. If the number is smaller than 6 digits, I need filler zeros before it. How do I do this?
I am working on a report and I need a number field to be exactly 6 digits long. If the number is smaller than 6 digits, I need filler zeros before it. How do I do this?
Jul 20, 2006 #2 synapsevampire Programmer Joined Mar 23, 2002 Messages 20,180 Location US One approach is to use: whileprintingrecords; Stringvar MyFld:= totext({table.value},0,""); picture(MyFld,"000000") Looks about right... -k Upvote 0 Downvote
One approach is to use: whileprintingrecords; Stringvar MyFld:= totext({table.value},0,""); picture(MyFld,"000000") Looks about right... -k
Jul 20, 2006 1 #3 lbass Technical User Joined Feb 9, 2002 Messages 32,818 Location US You can use: totext({table.number},"000000") -LB Upvote 0 Downvote
Jul 20, 2006 Thread starter #4 szaunbr Technical User Joined Jul 5, 2006 Messages 50 Location US Thanks. That works. Just wondering though, is there any way to do this without changing it to text? Upvote 0 Downvote
Jul 20, 2006 #5 lbass Technical User Joined Feb 9, 2002 Messages 32,818 Location US Not that I'm aware of. -LB Upvote 0 Downvote