Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Formatting Scipt not working with grouping into PDF
aglass
Hi,
I have a piece of script that I put onto some data elements which looks at the unit name and depending on what it says formats some data in a different way. This piece of script works perfectly when added to tables and exported to PDF but when I add a group on location the script no longer functions and the formatting reverts back to default.
However when the report is run into the web viewer format all the formatting works correctly with or without the group on location. I then tried the export to PDF from the web viewer option and the formatting disappeared.
Does anyone have any ideas what could cause the script to stop working when exporting to PDF when the table is grouped on location?
The script in question is:
if (this.getRowData().getColumnValue("UnitName")=="Percentage"){
this.setDisplayValue(BirtMath.round(this.getValue(),this.getRowData().getColumnValue("DecimalDigits"))/100);
this.getStyle().numberFormat = "###,###,###,###.#####%";
} else {
this.setDisplayValue(BirtMath.round(this.getValue(),this.getRowData().getColumnValue("DecimalDigits")));
this.getStyle().numberFormat = "###,###,###,###.#####";
}
Which is added to the onRender option of the data element.
Any help would be greatly appreciated.
Regards,
Tony
Find more posts tagged with
Comments
mwilliams
Can you recreate this issue with a report made with the sample database?