Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Format Number 0 to display as '-'
hseeram
Hello,
Is it possible to display as "-" if the number value is 0?
Thanks
hseeram
Find more posts tagged with
Comments
bhanley
Check out data mapping. It is a BIRT feature intended to do just this.<br />
<br />
There is a sample to help you out in the DevShare:<br />
<br />
<a class='bbc_url' href='
http://www.birt-exchange.org/devshare/birt-report-designers/805-data-mapping-example/'>Data
mapping example - Tips & Tricks - BIRT Exchange</a><br />
<br />
Good Luck!
hseeram
Thank You, This fixed if the value 0. but the numbers are not displaying in comma seperated format.
My reqirement is that If the number is in thousands then I need to format the number in commas, and if the number value is 0 then I should be able to display as '-'.
I am able to display one kind of format but not able to do both. Can we do both in BIRT?
mwilliams
hseeram,
So, when you do mapping to replace '0' with '-', you lose the formatting you put on the numbers?
hseeram
Michel,
That is correct. After mapping '0' to '-' I loose the formatting on the numbers.
Hari
bhanley
Have you applied the appropriate formatting to the Cell? You can select the cell, and scroll down through the Properties to "<strong class='bbc'>Format Number</strong>". Select the appropriate formatting to have the numbers formatted correctly.<br />
<br />
I updated the mapping sample from the DevShare to do this for you as an example.<br />
<br />
The custom numeric formatting mask used in the sample is <strong class='bbc'><em class='bbc'>###,###,##0</em></strong><br />
<br />
Good Luck!