Jump to content
Changes to the Jaspersoft community edition download ×

Easy question for iReports expression


michaelwjoyner
Go to solution Solved by Thomas Zimmer,

Recommended Posts

For some reason, this expression is causing an error:

$F{media_stock_target_price} - $F{media_stock_target_cost} / $F{media_stock_target_price}[/code]

THANKS IN ADVANCE!!!

Error filling print... Error evaluating expression :     Source text : $F{media_stock_target_price}-$F{media_stock_target_cost}/$F{media_stock_target_price}Setting up the file resolver... net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression :     Source text : $F{media_stock_target_price}-$F{media_stock_target_cost}/$F{media_stock_target_price}     at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:203)     at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:591)     at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:559)     at net.sf.jasperreports.engine.fill.JRFillElement.evaluateExpression(JRFillElement.java:966)     at net.sf.jasperreports.engine.fill.JRFillTextField.evaluateText(JRFillTextField.java:456)     at net.sf.jasperreports.engine.fill.JRFillTextField.evaluate(JRFillTextField.java:440)     at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:259)     at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:455)     at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2044)     at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillGroupHeader(JRVerticalFiller.java:639)     at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillGroupHeaders(JRVerticalFiller.java:561)     at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportContent(JRVerticalFiller.java:306)     at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFille

 

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Solution

hard to as long you do not give more information... the error says that the expression cannot be evaluated. so, what can be wrong? 

possibly one of the fields is null? or the field "media_stock_target_price" is zero? (but in this case, as far as I know, you would get a "division by zero"  error)

check the datatypes and all possible contents of the fields! check the needed datatype of the element the expression is used in (TextField or sth like this?)

Cheers, Thomas

http://www.thomaszimmer.net

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...