currency format
currency format
I have an attribute that has a currency format of $#,##0.00 . When this attribute is used in a report, in a calcuation using SUM, the format does not work. There is no dollar sign, and only one decimal place. How can I ensure that the report appears with the currency format?
-
- Posts: 595
- Joined: Sun Apr 24, 2005 2:22 am
- Contact:
Since calculations may involve multiple attributes, the system does not apply the format defined for any of the attributes to the operation result. If you use a calculation in a report you will need to specify the format for the operation result, for example:
SUM Transaction.Amount WHERE (Transaction IN Account.Transactions), $#,##0.00
However, since the SUM function operates on a single attribute the system could apply the format of that attribute to the function result. This functionality will be added to the system and will be available in the next update. Until then you can specify the desired format as described above.
Remember also that if the format $#,##0.00 is defined for a numerical attribute that is entered on a form, the system will require the user to type the $ sign when entering the value. If this behaviour is undesirable, consider using format #,##0.00 for the attribute and adding the $ sign to the attribute label on forms (for example: 'Amount, $') and other places where the attribute value is displayed such as reports, documents, etc.
SUM Transaction.Amount WHERE (Transaction IN Account.Transactions), $#,##0.00
However, since the SUM function operates on a single attribute the system could apply the format of that attribute to the function result. This functionality will be added to the system and will be available in the next update. Until then you can specify the desired format as described above.
Remember also that if the format $#,##0.00 is defined for a numerical attribute that is entered on a form, the system will require the user to type the $ sign when entering the value. If this behaviour is undesirable, consider using format #,##0.00 for the attribute and adding the $ sign to the attribute label on forms (for example: 'Amount, $') and other places where the attribute value is displayed such as reports, documents, etc.
Aware IM Support Team
-
- Posts: 7525
- Joined: Sun Apr 24, 2005 12:36 am
- Contact:
-
- Posts: 595
- Joined: Sun Apr 24, 2005 2:22 am
- Contact:
-
- Posts: 7525
- Joined: Sun Apr 24, 2005 12:36 am
- Contact:
The fact that it doesn't work when placed in the Title section is a bug. There is a workaround though. Add the condition to the SUM expression that is guaranteed to return true, for example:
'SUM PurchaseOrder.TotalCost WHERE(PurchaseOrder.TotalCost>0),$#,##0.00'
This will work even if placed in the Title section.
'SUM PurchaseOrder.TotalCost WHERE(PurchaseOrder.TotalCost>0),$#,##0.00'
This will work even if placed in the Title section.
Aware IM Support Team
-
- Posts: 7525
- Joined: Sun Apr 24, 2005 12:36 am
- Contact:
We have just discovered a simpler and nicer work around:
rather than adding a condition to the SUM expression in the Title band, leave the expression as is, select it, open the property dialog, click on the "Evaluation Time" button. In the dialog that appears make sure that "At the end of the report" radio button is selected and click OK on this dialog (this last step is what makes the difference). Click OK on the property dialog to save the changes to the tag element. Save the report.
It should work fine after that.
We will be fixing this problem shortly.
rather than adding a condition to the SUM expression in the Title band, leave the expression as is, select it, open the property dialog, click on the "Evaluation Time" button. In the dialog that appears make sure that "At the end of the report" radio button is selected and click OK on this dialog (this last step is what makes the difference). Click OK on the property dialog to save the changes to the tag element. Save the report.
It should work fine after that.
We will be fixing this problem shortly.
Aware IM Support Team