Setting Number Of Decimal Places

G

gziotek

Allow me to describe how I would like to set the number of decimal
places displayed in a report. Here is it:

* values in tables are stored to three decimal places
* report prints out to two decimal places
* In some vary rare cases, we actually use three decimal places - in
which case our report formatted to show two decimal places is not
adequate
* I would like to set up the report to display three decimal places,
but only if 3 decimal places are used
* Logically, I would think that you would need to set your query and
report to 3 decimal places, and somehow suppress the 3rd decimal place
if it is "0"

Does that make sense?? Seems simple, but I don't know how to do that.
Off the hop, you would think that if you set the number of decimal
places to "AUTO", that would do the trick - but as we all know, numbers
stores as 26.000 (just for an example) would appear on the report as
26.

Simply stated, my number list would have to look something like this in
my report:

$26.00
$123.45
$87.547
$67.10

Any ideas??
 
W

Wayne Morgan

Set the Format property of the textbox to:

0.00#

This should force two decimal places with the third one optional.
 
A

Albert D.Kallal

Use the format command

format(myvalue,"$#,##.00#")

for the above, you get


2 $2.00
22 $22.00
22.1 $22.10
22.11 $22.11
22.111 $22.111

222.111 $222.111
2222.111 $2,222.111
22222.111 $22,222.111

222222 $222,222.00
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top