MacFly Posted March 1, 2007 Share Posted March 1, 2007 Hi, Here is my problem,In my report, I have to display Double values with a specific pattern that comes from my xml data source. Apparently, JasperReport doesn't support dynamic pattern like this: Code:<textField pattern="$F{MY_PATTERN}".... So, the solution that I found is to declare a textFieldExpression of class String and convert it like this: Code:[code]new DecimalFormat($F{MY_PATTERN}).format($F{MY_VALUE}) it's works nice with html export, but with excel export, the cell's format is "General" instead of "Number" of course. :( Does somebody know how to resolve this problem?I don't want to use "printWhenExpression" because I have got to many different patterns. thanks in advance for your help! Regards, 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