currency format

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Rebecca
Posts: 21
Joined: Fri May 27, 2005 12:46 am

currency format

Post by Rebecca »

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?
aware_support2
Posts: 595
Joined: Sun Apr 24, 2005 2:22 am
Contact:

Post by aware_support2 »

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.
Aware IM Support Team
Rebecca
Posts: 21
Joined: Fri May 27, 2005 12:46 am

Post by Rebecca »

I have tried specifying the format as you suggested but it still doesn't work. The format I have entered, on the Report Layout/Design of a Document Template, within a Text Element, looks like this:-
Total Amount: <<SUM PurchaseOrder.TotalCost,$#,##0.00>>
Am I putting the format in the wrong place?
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

Can you send us the bsv file with your configuration?
Aware IM Support Team
aware_support2
Posts: 595
Joined: Sun Apr 24, 2005 2:22 am
Contact:

Post by aware_support2 »

Try splitting this into two elements positioned next to each other. The first should be a Text element containing 'Total amount:'. The second should be a Tag element containing 'SUM PurchaseOrder.TotalCost,$#,##0.00' (without the angle brackets).
Aware IM Support Team
Rebecca
Posts: 21
Joined: Fri May 27, 2005 12:46 am

Post by Rebecca »

I split this into 2 elements (text and Tag) as suggested. This works if I put it in the summary band, but does not work in the Title band. Should it work in the title band?
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

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.
Aware IM Support Team
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

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.
Aware IM Support Team
Rebecca
Posts: 21
Joined: Fri May 27, 2005 12:46 am

Post by Rebecca »

This works just fine now. Thanks
Post Reply