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!

problem in rounding, concatenation

Status
Not open for further replies.

dlkraft

Programmer
Dec 5, 2000
47
US
I am reporting from a query. I am trying to concatentate two numeric values into a formula field I am naming "account" and insert a 0 between the two values. Extra decimals are appearing.

The fields I am concatenating are "Gldept" and "Natcl."

I am trying to change them into text fields for the combination. Even using the following formula with round() I get extra decimals:

IF {Query.Glacct} = 0 and {Query.Natcl} < 1000 then ToText (round({Query.Gldept})) + ToText (round(0))+ ToText (round({Query.Natcl}))

Can you help in removing these dang decimals? Thanks!

Dave


 
Totext reformats the rounded numeric. Try:

.. then ToText ({Query.Gldept},0) + '0' +
ToText ({Query.Natcl},0)


For more format options lookup ToText in the CR Help Ken Hamady
Crystal Reports Training and a
Quick Reference Guide to VB/Crystal
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top