Results 1 to 2 of 2

Thread: Leading zeros

  1. #1
    Join Date
    Aug 2004
    Posts
    9

    Unanswered: Leading zeros

    I'm using CR 10. One of my "number" fields is not keeping the leading zeros. The leading zero box is checked for this field. Any ideas how I can "add" the leading zeros so I have nine digits in this field?

    Thanks

  2. #2
    Join Date
    Oct 2003
    Posts
    357

    Thumbs up

    Hi, Create a new formula field having this code
    Code:
    Stringvar n:={DatabaseFiled}";
    numbervar co:=len(n);
    
    select  co
    case  9 : n            case  8 : "0" & n 
    case  7 : "00" & n     case  6 : "000" & n
    case  5 : "0000" & n   case  4 : "00000" & n
    case  3 : "000000" & n case  2 : "0000000" & n
    case  1 : "00000000" & n
    and place this formula in the details section

    Madhivanan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •