Apr 24, 2001 #1 LenaS Technical User Joined Nov 28, 2000 Messages 98 Location US How do I show leading zeros on a report or form?
Apr 24, 2001 #2 foxdev Programmer Joined Feb 11, 2000 Messages 1,995 Location US Use the PADL function, as in: [tt]padl(ltrim(str(27)), 10, '0')[/tt] will pad the number 27 with 8 leading zeros (10 characters overall). Robert Bradley http://www.lowcostprints.comhttp://www.foxdev.com Upvote 0 Downvote
Use the PADL function, as in: [tt]padl(ltrim(str(27)), 10, '0')[/tt] will pad the number 27 with 8 leading zeros (10 characters overall). Robert Bradley http://www.lowcostprints.comhttp://www.foxdev.com
Apr 24, 2001 Thread starter #3 LenaS Technical User Joined Nov 28, 2000 Messages 98 Location US Thanks. I'lll try that. Upvote 0 Downvote
Apr 24, 2001 #4 foxdev Programmer Joined Feb 11, 2000 Messages 1,995 Location US If you are using this approach, don't forget to use the decimals parameter with STR if your numbers will be fractional, i.e.: [tt]padl(ltrim(str(27.16, 10, 2)), 10, '0')[/tt] Robert Bradley http://www.lowcostprints.comhttp://www.foxdev.com Upvote 0 Downvote
If you are using this approach, don't forget to use the decimals parameter with STR if your numbers will be fractional, i.e.: [tt]padl(ltrim(str(27.16, 10, 2)), 10, '0')[/tt] Robert Bradley http://www.lowcostprints.comhttp://www.foxdev.com
Apr 24, 2001 #5 jimstarr Programmer Joined Feb 6, 2001 Messages 975 Location US On reports and forms you can also use the FORMAT property (=L) to display leading zeroes automatically. Jim Upvote 0 Downvote
On reports and forms you can also use the FORMAT property (=L) to display leading zeroes automatically. Jim