Uploaded image for project: 'Pentaho Reporting and Pentaho Report Designer'
  1. Pentaho Reporting and Pentaho Report Designer
  2. PRD-6010

Unable to perform simple calculations using count, sum and openformula

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Severity: Urgent
    • Resolution: Not a Bug
    • Affects Version/s: 8.0.0.4 GA, 8.1.0 GA
    • Fix Version/s: Backlog
    • Labels:
      None
    • Environment:
      Archlinux

      openjdk version "1.8.0_172"
      OpenJDK Runtime Environment (build 1.8.0_172-b11)
      OpenJDK 64-Bit Server VM (build 25.172-b11, mixed mode)
    • Story Points:
      0
    • Notice:
      When an issue is open, the "Fix Version/s" field conveys a target, not necessarily a commitment. When an issue is closed, the "Fix Version/s" field conveys the version that the issue was fixed in.
    • Sprint Team:
      Tatooine (Maint)
    • Steps to Reproduce:
      Hide

      Starting with the report design wizard

      • Create sample report using sampleQuery
      • Select productname and buyprice ( no group selected)
      • create function count with function name = countTest
      • create sum function for field name buyprice , name it sumTest
      • create open formula and perform some calculations (Example : [sumTest]/[countTest]*42), name it formulaTest
      • preview the report
      Show
      Starting with the report design wizard Create sample report using sampleQuery Select productname and buyprice ( no group selected) create function count with function name = countTest create sum function for field name buyprice , name it sumTest create open formula and perform some calculations (Example : [sumTest] / [countTest] *42), name it formulaTest preview the report

      Description

      In version everything works perfectly (8.0.0.0-28).
      The report designer with version 8.1.0.0-365 is unable to perform calculations and gives out the following error :

      2018-05-30 13:41:54,529 [2819214]  ERROR - org.pentaho.reporting.designer.core.util.exceptions.UncaughtExceptionsModel - Unexpected Error encountered:
      org.pentaho.reporting.engine.classic.core.InvalidReportStateException: Failed to evaluate formula-expression with error Failed to evaluate formula-expression with error LibFormulaErrorValue{errorCode=503, errorMessage=Arithmetic Error}
      	at org.pentaho.reporting.engine.classic.core.function.FormulaExpression.computeRegularValue(FormulaExpression.java:209)
      	at org.pentaho.reporting.engine.classic.core.function.FormulaExpression.getValue(FormulaExpression.java:223)
      	at org.pentaho.reporting.engine.classic.core.states.datarow.ExpressionEventHelper.evaluateSingleExpression(ExpressionEventHelper.java:640)
      	at org.pentaho.reporting.engine.classic.core.states.datarow.ExpressionEventHelper.fireReportInitializedEvent(ExpressionEventHelper.java:502)
      	at org.pentaho.reporting.engine.classic.core.states.datarow.ExpressionEventHelper.fireReportEvent(ExpressionEventHelper.java:51)
      	at org.pentaho.reporting.engine.classic.core.states.datarow.ExpressionDataRow.fireReportEvent(ExpressionDataRow.java:358)
      	at org.pentaho.reporting.engine.classic.core.states.datarow.GlobalMasterRow.fireReportEvent(GlobalMasterRow.java:331)
      	at org.pentaho.reporting.engine.classic.core.states.datarow.DefaultFlowController.fireReportEvent(DefaultFlowController.java:454)
      	at org.pentaho.reporting.engine.classic.core.states.process.ProcessState.fireReportEvent(ProcessState.java:1119)
      	at org.pentaho.reporting.engine.classic.core.states.process.BeginReportHandler.advance(BeginReportHandler.java:49)
      	at org.pentaho.reporting.engine.classic.core.states.process.ProcessState.advance(ProcessState.java:948)
      	at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.processPrepareLevels(AbstractReportProcessor.java:405)
      	at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.prepareReportProcessing(AbstractReportProcessor.java:505)
      	at org.pentaho.reporting.engine.classic.core.modules.output.pageable.graphics.PrintReportProcessor.getNumberOfPages(PrintReportProcessor.java:69)
      	at org.pentaho.reporting.engine.classic.core.modules.gui.base.PreviewPane$RepaginationRunnable.run(PreviewPane.java:238)
      	at org.pentaho.reporting.engine.classic.core.util.Worker.run(Worker.java:153)
      Caused by: org.pentaho.reporting.engine.classic.core.InvalidReportStateException: Failed to evaluate formula-expression with error LibFormulaErrorValue{errorCode=503, errorMessage=Arithmetic Error}
      	at org.pentaho.reporting.engine.classic.core.function.FormulaExpression.computeRegularValue(FormulaExpression.java:188)
      	... 15 more
      
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              vasco.marques Vasco Marques
              Reporter:
              haguga Harald Gantioler
              Votes:
              7 Vote for this issue
              Watchers:
              27 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: