Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Masking a field

Status
Not open for further replies.

Drus

Technical User
Jan 29, 2002
43
US
I have account numbers in the below format:

54000-1


I need them to appear in a 9 digit format, by removing the "-" and adding 3 zeros to the end. So the above number becomes like this:

540001000

Any ideas? Andrew Hagenbach
OPUS SYSTEMS, INC.
916.503.3173
ahagenbach@opus-sys.com
 
Create a formula such as:
-----------------------------------
{Acct_N}[1-5] + {Acct_N}[7] + "000"
-----------------------------------

Cheers,
- Ido CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
If the field is always as you show above - 5 digits, the dash and 1 digit - the following will do the job for you.

left({your.field},5)&right({your.field},1)&"000" Mike
If you're not part of the solution, you're part of the precipitate.
 
Small correction for my 1st message above:

Create a formula such as:
-----------------------------------
{Acct_N}[1 to 5] + {Acct_N}[7] + "000"
-----------------------------------

Cheers,
- Ido CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top