number of decimal

Andrej

Registered User.
Local time
Today, 10:43
Joined
Oct 17, 2007
Messages
40
have a problem in the report with a number of decimal
for instance, need to have a 2 decimal number in the column of numbers, but data in the column not is always number(<0.01)
any idea how can I get in the column of report with 2 decimal numbers in combination with strings
 
Just set the fields Format Property to "Standard" and the Decimal Points property to "2", both without the quotation marks.
 
thanks for advice, but if the field has strings and the numbers, setting this format doesn't shows 2 decimal.
 
First of all you table isn't normalized if it contains two data types. This will bite you when you least expect it.

You can use a conditional if statement to format the numeric values.
 
sorry for the late response,
the table is normalized, but the query it's modified in the sense that change the column in string type because the minimum has to be presented like <0.01 value.
numbers has a problem when value is 4.00 in the report is presented like 4.
is it possible to change that?
 
The query column should be

Code:
ColumnName:iif(QueryFieldName < 0.01, "<0.01",format(QueryFieldName,"#,##0.00")

This sets the field to "<0.01" when the QueryFieldName value is less than 0.01; otherwise the QueryFieldName value is displayed formatted correctly.

"#,##0.00" guarantees any number will be displayed in standard format with 2 decimals, i.e.

0.09 will display as "<0.01" a string.
25 will display as 25.00, a number.
1234.5678 will display as 1,234.57 (rounded), a number.

Having mixed datatypes in a single query column can potentially cause a multitude of probems which you obviously haven't stumbled onto yet.

Good luck
 
it works,
this is great, thank you.
it really helps me a lot
 

Users who are viewing this thread

Back
Top Bottom