honeyani Posted October 14, 2008 Share Posted October 14, 2008 Hi All,We have a doubt ..How to set currency pattern in iReport .On the generated excel sheet default existing values as well as on user updation positive value should be represented as $ xxxxxx.xxx ,negative value ($xxxxxx.xxx) in red.We tried the below pattern$#,#####0.00_);[Red]($#,#####0.00)This works for the below values : $0.000$x.000$xx.000$xxx.00If we remove 1000's seperator it works for thousand values, it fails for lakh values.Why?i.e.,For bigger values the color change is not happening on the Excel sheetPlease guide us with your valuable suggestions at the earliest. Thanks,Ani Link to comment Share on other sites More sharing options...
honeyani Posted October 15, 2008 Author Share Posted October 15, 2008 Please find a detailed description about the issue faced as below.. Output obtained: Revised Budget / Encumber ($10.00) (red) ($10000.00) (red) ($20.00)(red) ($10,030.000)(red) ($1.60)(red) [Red] $0.00 (black) In iReport tool custom pattern that we have specified for Revised Budget text field placed in detail band is as below : $######0.00_);[Red]($######0.00) We require a color change to red if user updates the field value as a negative number and if user enters positive input the value should be in black as above. We use XML file as Data source here , When the value is in lakhs ,its not displayed in excel sheet instead we get ‘[Red] ‘ as in 6th row .What is the reson behind? Any ways to set this color change option to the mentioned field? Requirement : Positive values should be represented in black color as in 7th row,negative value shoud be represented in red color along with braces as in 1-5 rows. Any mistake in the way we are setting the patter? Waiting for your reply.. Thx, Ani Link to comment Share on other sites More sharing options...
honeyani Posted October 15, 2008 Author Share Posted October 15, 2008 Avoid my previous reply - formatted one i'm pasting here...Please find a detailed description about the issue faced as below..Output obtained:Revised Budget / Encumber($10.00) (red)($10000.00) (red)($20.00)(red)($10,030.000)(red)($1.60)(red)[Red]$0.00 (black) In iReport tool custom pattern that we have specified for Revised Budget text field placed in detail band is as below :$######0.00_);[Red]($######0.00)We require a color change to red if user updates the field value as a negative number and if user enters positive input the value should be in black as above. We use XML file as Data source here , When the value is in lakhs ,its not displayed in excel sheet instead we get ‘[Red] ‘ as in 6th row .What is the reson behind?Any ways to set this color change option to the mentioned field? Requirement : Positive values should be represented in black color as in 7th row,negative value shoud be represented in red color along with braces as in 1-5 rows.Any mistake in the way we are setting the patter?Waiting for your reply at the earliest..Thx, Ani Link to comment Share on other sites More sharing options...
honeyani Posted October 15, 2008 Author Share Posted October 15, 2008 Hi All,I fixed this issue on my own.Just have set 'net.sf.jasperreports.print.keep.full.text' to true for custom element property on iReport tool.It works fine now.Thanks,Anitha Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now