| Summary: | Numbers not formatting as currency when using it as a Style | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | SuperTime <jayagolani> | ||||||||
| Component: | BIRT | Assignee: | Birt-Report-inbox <Birt-Report-inbox> | ||||||||
| Status: | VERIFIED FIXED | QA Contact: | mindan xu <mindan.xu> | ||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | bluesoldier, jkoch, rlu | ||||||||
| Version: | 2.3.2 | ||||||||||
| Target Milestone: | 3.7.0 | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Windows XP | ||||||||||
| Whiteboard: | Obsolete | ||||||||||
| Attachments: |
|
||||||||||
Can you please try BIRT 2.5.0 build? I tried to set the font color blue in Style "CurrencySymbol". It worked out. The font color setting in the Style does work for me too. The issue is with the Format Number option. I don't have 2.5.0 installed so I cannot try that out. What's meaning "The issue is the formatting is not being applied when it is applied as a style." ? This means, if I select the column and goto format number use currency formatting it works. But If I select the column and apply the style "CurrencySymbol" then I cannot see the currency format on previewing the report. Note: the CurrencySymbol style is configured for format number option as type currency. (In reply to comment #4) > This means, if I select the column and goto format number use currency > formatting it works. But If I select the column and apply the style > "CurrencySymbol" then I cannot see the currency format on previewing the > report. > Note: the CurrencySymbol style is configured for format number option as type > currency. > Checked the report, the format in Style CurrentcySymbol is: <structure name="numberFormat"> <property name="category">Custom</property> <property name="pattern">�###,##0.00</property> </structure> while, the format in the MSRP cell is <structure name="numberFormat"> <property name="category">Currency</property> <property name="pattern">#,##0.00</property> </structure> You can see that the format in the style is "Custom", can you please try to set it "Currency" too? Created attachment 143909 [details]
Style applied on MSRP data element
Please see the attached sample report. Notice I have updated Number format of the style to Currency with a dollar symbol. And the style has been applied to the MSRP data element on the report. When I cilck on the preview tab I do not see the style being applied to the data element.
However if you go back to the report layout and apply the style at the table level and then preview the report, it works.
So the issue is that if the style is being applied at the data element level, it does not work. But if the style is applied to the table level, it then works.
(In reply to comment #6) > Created an attachment (id=143909) [details] > Style applied on MSRP data element > > Please see the attached sample report. Notice I have updated Number format of > the style to Currency with a dollar symbol. And the style has been applied to > the MSRP data element on the report. When I cilck on the preview tab I do not > see the style being applied to the data element. The report has some issues. Please remove line 996 to 998. <structure name="numberFormat"> <property name="category">Unformatted</property> </structure> If this snippet exists for MSRP data, it won't use the numberFormat in style "CurrencySymbol". BTW, can you please try latest BIRT 2.6.0 build? Format number by style works on build 2.6.2.v20101118-0630. Set as fixed. Created attachment 183368 [details]
simple report
Verify the bug |
Created attachment 137202 [details] Sample Report Build ID: M20090211-1700 Steps To Reproduce: 1. Take any sample report (see attached) and add a new Style Named "Currency Symbol". 2. Apply the style to field named "MSRP" which is of type float. 3.Preview the report in the preivew tab as well as the birt viewer, notice the formatting does not apply. Note: If you apply currency formatting directly to the field named ["MSRP"] by (select field -> properties->format number) it works just fine. The issue is the formatting is not being applied when it is applied as a style. More information: