bgao16 Posted June 22, 2010 Share Posted June 22, 2010 Hi, all:I am trying to display a text instead of numbers in a text field, such as($F{CommStatus}==2 ? "Comm Failed" : "Normal"), but I got the error message likeError filling print... Error evaluating expression : Source text : ($F{COMMSTATUS}==2 ? "Comm Failed":"Normal") net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression : Source text : ($F{COMMSTATUS}==2 ? "Comm Failed":"Normal") I am using 3.7.3. Any idea what's wrong with this? Thx! Link to comment Share on other sites More sharing options...
slow Posted June 23, 2010 Share Posted June 23, 2010 I suppose your CommStatus is an Integer or a BigDecimal... so the correct form is:$F{CommStatus}.IntValue()==2 ? "Comm Failed" : "Normal" _________________________________________if it works... give me KARMA points please! : ) _________________________________________listening: Nine Inch Nails - Complication 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