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!

Conditional number formatting at run time...

Status
Not open for further replies.

BluByU

IS-IT--Management
Jul 29, 2003
35
US
Hello:

I have an emissions report that prints out emissions data to the precision of 2 decimal places. However, certain emissions are very small, so if a pollutant has an emissions amount of < 0.01, then I need to change the number field's formatting. I need 6 decimal places of precision and rounding to the same precision as well. What formula will perform this at run time?

I tried a suggestion I found in the Crystal Reports knowledge base, but it returned run time errors every time I ran the report. Thanks in advance for your help!
 
Right click the number and select format field->Number->Cusotmize->X 2 next to Decimals and place something like:

if {table.Amount} < .001 then
6
else
3

You'll also want to do something like this on the round formula (X 2 next to rounding).

If this doesn't work, please share what you tried and the error returned.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top