Jump to content
Changes to the Jaspersoft community edition download ×

print when condition


kirthish

Recommended Posts

HI There,

I am getting problrm when comparing the two bigdecimals like this

 

(($F{QTY_RQD}.subtract($F{BAL_QTY})) > $V{temp}) ?

(($F{QTY_RQD}.subtract($F{BAL_QTY}))) :

(($V{temp}))

 

 

and the following error is showing can anyone help me .its urgent.

 

net.sf.jasperreports.engine.JRException:ÂErrorsÂwereÂencounteredÂwhenÂcompilingÂreportÂexpressionsÂclassÂfile: 1.ÂTheÂoperatorÂ>ÂisÂundefinedÂforÂtheÂargumentÂtype(s)Âjava.math.BigDecimal,Âjava.math.BigDecimal ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂvalueÂ=Â(java.math.BigDecimal)(((((java.math.BigDecimal)field_QTY_RQD.getValue()).subtract(((java.math.BigDecimal)field_BAL_QTY.getValue())))Â>Â((java.math.BigDecimal)variable_temp.getValue()))Â? ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ<----------------------------------------------------------------------------------------------------------------------------------------------------------------> 2.ÂTheÂoperatorÂ>ÂisÂundefinedÂforÂtheÂargumentÂtype(s)Âjava.math.BigDecimal,Âjava.math.BigDecimal ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂvalueÂ=Â(java.math.BigDecimal)(((((java.math.BigDecimal)field_QTY_RQD.getOldValue()).subtract(((java.math.BigDecimal)field_BAL_QTY.getOldValue())))Â>Â((java.math.BigDecimal)variable_temp.getOldValue()))Â? ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ<-------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3.ÂTheÂoperatorÂ>ÂisÂundefinedÂforÂtheÂargumentÂtype(s)Âjava.math.BigDecimal,Âjava.math.BigDecimal ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂvalueÂ=Â(java.math.BigDecimal)(((((java.math.BigDecimal)field_QTY_RQD.getValue()).subtract(((java.math.BigDecimal)field_BAL_QTY.getValue())))Â>Â((java.math.BigDecimal)variable_temp.getEstimatedValue()))Â? ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ<-------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3Âerrors ÂÂÂÂatÂnet.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:193) ÂÂÂÂatÂnet.sf.jasperreports.engine.design.JRDefaultCompiler.compileReport(JRDefaultCompiler.java:105) ÂÂÂÂatÂnet.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:127) ÂÂÂÂatÂnet.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:109) ÂÂÂÂatÂit.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:529) ÂÂÂÂatÂjava.lang.Thread.run(UnknownÂSource)

Compilation running time: 1,051.

 

 

Thanks & Regards

 

K.Kirthish

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Please try to use

(($F{QTY_RQD}.subtract($F{BAL_QTY}) > $V{temp}) ? ($F{QTY_RQD}.subtract($F{BAL_QTY}) : ($V{temp})

 

if it is returning bigdecimal value then use

 

new BigDecimal((($F{QTY_RQD}.subtract($F{BAL_QTY}) > $V{temp}) ? ($F{QTY_RQD}.subtract($F{BAL_QTY}) : ($V{temp}))

 

Regards:

Ritesh Kumar

Post edited by: singhipst, at: 2007/06/25 12:02

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...