Jump to content
We've recently updated our Privacy Statement, available here ×

gail26

Members
  • Posts

    9
  • Joined

  • Last visited

gail26's Achievements

Rookie

Rookie (2/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Hi, is it possible to have a static label or text field to be printed ONLY on preview/screen and remove/hide it when user click print? Thanks in advance,
  2. From Report Inspector window click the Field you want to change to BigDecimal>Its property will show to property window, right side of your window, change the field class to java.mat.BigDecimal
  3. Have you tried it yourself? Try to right click your chart>click 'Chart Data'>Under Dataset Run you will see a 'Connection/Datasource exp' tab, change its Connection/Datasource expression to 'Use Connection Expression' in combobox.> Then choose 'parameters' tab>Click 'Add' button>Another window will show, choose dataset parameter name from your subdataset and value expression from main dataset Goodluck! Hope it helps
  4. You can use short-hand conditional statement. SYNTAX: ( <condition> ? exp1 : exp2 ) variable will return exp1 if condition is true, else exp2 will be returned. it is like if(<condition>) { exp1 } else { exp2 } GoodLuck
  5. I found the answer here http://jasperforge.org/plugins/espforum/view.php?group_id=83&forumid=101&topicid=20105 , by jmurray's reply to OP
  6. Hi, I have this variable expression that checks which type of formula to use. One of this formula divides a Bigdecimal to another bigdecimal. The problem/error occurs when divisor is decimal like .94, 1.94 ... butiReport runs and gives no error when divisor is whole number like 1,2,3.. Here is the error message: Error filling print... Error evaluating expression : Source text : ( new java.lang.Boolean($F{FormulaUsed} == 1) ? ($V{LandedResult}.divide($P{WS_Divisor_SUB})).multiply($P{WS_Multiplier_SUB}) : $V{LandedResult}.multiply( $P{WS_Multiplier_SUB} ) )net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression : Source text : ( new java.lang.Boolean($F{FormulaUsed} == 1) ? ($V{LandedResult}.divide($P{WS_Divisor_SUB})).multiply($P{WS_Multiplier_SUB}) : $V{LandedResult}.multiply( $P{WS_Multiplier_SUB} ) ) at net.sf.jasperreports.engine.fill.JREvaluator.evaluateEstimated(JREvaluator.java:259) at net.sf.jasperreports.engine.fill.JRCalculator.evaluateEstimated(JRCalculator.java:580) at net.sf.jasperreports.engine.fill.JRCalculator.estimateVariables(JRCalculator.java:179) at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:789) at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:1478) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:125) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:942) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:841) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:58) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:417) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:247) at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:877) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997) Caused by: java.lang.ArithmeticException: Non-terminating decimal expansion; no exact representable decimal result. at java.math.BigDecimal.divide(BigDecimal.java:1603) at RptCosting_subreport1_1305178664932_958323.evaluateEstimated(RptCosting_subreport1_1305178664932_958323:544) at net.sf.jasperreports.engine.fill.JREvaluator.evaluateEstimated(JREvaluator.java:246) Code:( new java.lang.Boolean($F{FormulaUsed} == 1) ? ($V{LandedResult}.divide($P{WS_Divisor_SUB})).multiply($P{WS_Multiplier_SUB}) : $V{LandedResult}.multiply( $P{WS_Multiplier_SUB} ))
  7. I am new to iReport too and there might be better solution. Create another parameter that will construct your where clause. On this parameter it will check both parameter if they are null or not using conditional statement.
  8. I was able to solve it by using java language. Thanks,Gail Code:( new File("D:\\images\\Products\\" + $F{ProductID} + ".jpg").exists()? "D:\\images\\Products\\" + $F{ProductID} + ".jpg": "D:\\images\\Products\\NO_IMAGE.jpg")
  9. Hi, I am new to iReport, I just want to ask how to check if string is a valid path? I am trying to load pictures of a product, images where name after their product ID (e.g. M257.jpg), and I want to check this if M257.jpg exist on a specific path... Thanks in advance, Gail
×
×
  • Create New...