Jump to content

This topic is 7590 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

When my field, PRICE_1 appears in the text of one of my letters, the currency formatting is not picked up in all records. I have several records where the dollar sign and .00 are not appearing. Most records (text in the letters) are fine.

Thanks always for your help. Maxwell Morlay

Posted

Hi Maxwell,

As you might suspect, this is not a problem that is unique to you. In fact, it has been discussed numerous times on the Forum.

You will need to convert your number to Text in order to use it.

There are several calculations that will do this, but none of them are 100% accurate because they can be affected by the variables in numbers. (i.e. Positive, negative, number of places in the raw number, etc.) This calculation was submitted by Russ Baker a while back and will work as long as the rounding doesn't need to increase the dollars. (i.e. 1.999 will end up 1.00, in stead of 2.00)

If(RawNumber<0,"-","") &

"$" &

If(Length(NumToText(Int(Abs(RawNumber))))>12,Left(NumToText(Int(Abs(RawNumber))), Length(NumToText(Int(Abs(RawNumber))))-12)&",","") &

If(Length(NumToText(Int(Abs(RawNumber))))>9,Left(Right(NumToText(Int(Abs(RawNumber))),12), Length(Right(NumToText(Int(Abs(RawNumber))),12))-9)&",","") &

If(Length(NumToText(Int(Abs(RawNumber))))>6,Left(Right(NumToText(Int(Abs(RawNumber))),9), Length(Right(NumToText(Int(Abs(RawNumber))),9))-6)&",","") &

If(Length(NumToText(Int(Abs(RawNumber))))>3,Left(Right(NumToText(Int(Abs(RawNumber))),6), Length(Right(NumToText(Int(Abs(RawNumber))),6))-3)&",","") &

If(Length(NumToText(Int(Abs(RawNumber))))>0,Left(Right(NumToText(Int(Abs(RawNumber))),3), Length(Right(NumToText(Int(Abs(RawNumber))),3))-0),"") &

"." &

Right("00"&NumToText(Round((100*(Abs(RawNumber) - Int(Abs(RawNumber)))),0)),2)

The best way to accomplish this, and be 100% accurate in your output, is to create a separate layout (call it CopyLayout), and put one filed on it, and that would be a copy of your Raw Number, but format it in dollars the way you want it. Then create a script that goes to that layout, copies the formatted number, and then paste that into a text field to be used in your output.

Freeze Window

Go to Layout [

This topic is 7590 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.