Format Number in Report

denileigh

Registered User.
Local time
Today, 14:57
Joined
Dec 9, 2003
Messages
212
Hello,

I have a column in a report that I am adding up to total an invoice as normal such as 1234.56.

I also need to kick that total out in a 500byte line on the bottom of the report so I have a text field (62) that says =[text54] and this works fine however, I need that field to always have 10 characters will zeros as needed...for example:

0000123456

Can anyone help me with the formatting for that?

Thanks!
 
Hi -

Try playing with this:

Code:
x = 1234.56
y = format(str(x * 100), "0000000000")
? y
0000123456

HTH - Bob
 
Thanks for your help but I'm still a little confused.

I need to type all that in the text box?

Also, sometimes the number may be 1234.56 and sometimes the total bay be 12345.67 but at all times I need it to display as ten characters with leading zeros. Does that make sense?

Basically I need to be whatever the total in say [text43] is to display in say [text62] in the above format (ie: 0000123456 or 0001234567)

Thanks so much!
 
Hi -

In your report footer, add a text box. In Properties:

1) Show Format blank

2) Under Data, show control source as:
=Format(Str(Sum([Total])*100),"0000000000").
...assuming your field is [Total]. Correct as necessary.

As seen in my previous example, this will return up to a 10 character total, prefixed with 0's

Bob
 

Users who are viewing this thread

Back
Top Bottom