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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Numbers appearing as text

Status
Not open for further replies.

AntonioPerera

Vendor
Jan 29, 2006
91
AU
Crystal reports 11

I am incorporating some number fields into a formula.

E.g :
Batch number - 110
Entry number - 1
Sequence number - 1802

My formula is :
Batch number&"-"&Entry Number&"-"&Sequence number

I want my result to look like this

110-1-1802

However, it appears as :

110.00-1.00-1,802.00


Please let me know how I can achieve my desired output
 
AntonioPerera,

The following formula should give you the desired results:
Code:
ToText({Batch},"0")&"-"&ToText({Entry},"0")&"-"&ToText({Sequence},"0")

Hope this helps!

Mike
---------------------------------------------------------------
"To be alive is to revel in the moments, in the sunrise and the sunset, in the sudden and brief episodes of love and adventure,
in the hours of companionship. It is, most of all, to never be paralyzed by your fears of a future that no one can foretell."
 
ToText({Batch},0,"")&"-"&ToText({Entry},0,"")&"-"&ToText({Sequence},0,"")

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top