Package org.pentaho.reporting.engine.classic.core

Examples of org.pentaho.reporting.engine.classic.core.InvalidReportStateException


      writeElementAttributes(box);
      return true;
    }
    catch (IOException e)
    {
      throw new InvalidReportStateException(e.getMessage(), e);
    }
  }
View Full Code Here


    {
      xmlWriter.writeCloseTag();
    }
    catch (IOException e)
    {
      throw new InvalidReportStateException(e.getMessage(), e);
    }
  }
View Full Code Here

        xmlWriter.writeTag(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "spacer", attributeList, XmlWriter.CLOSE);
      }
    }
    catch (IOException e)
    {
      throw new InvalidReportStateException(e.getMessage(), e);
    }
  }
View Full Code Here

      writeElementAttributes(node);
      xmlWriter.writeCloseTag();
    }
    catch (IOException e)
    {
      throw new InvalidReportStateException(e.getMessage(), e);
    }

  }
View Full Code Here

      writeElementAttributes(box);
      return true;
    }
    catch (IOException e)
    {
      throw new InvalidReportStateException(e.getMessage(), e);
    }
  }
View Full Code Here

          final Object evaluate = initFormula.evaluate();
          if (Boolean.TRUE.equals(failOnError))
          {
            if (evaluate instanceof ErrorValue)
            {
              throw new InvalidReportStateException(String.format
                  ("Failed to evaluate formula-expression with error %s",// NON-NLS
                      evaluate));
            }
          }
          return evaluate;
        }
        finally
        {
          context.close();
        }
      }

      // if the code above did not trigger, compute a regular thing ..
      return computeRegularValue();
    }
    catch (Exception e)
    {
      if (FormulaFunction.logger.isDebugEnabled())
      {
        final Configuration config = getReportConfiguration();
        if ("true".equals(config.getConfigProperty(
            "org.pentaho.reporting.engine.classic.core.function.LogFormulaFailureCause")))
        {
          FormulaFunction.logger.debug("Failed to compute the initial value [" + formulaExpression + ']', e);
        }
        else
        {
          FormulaFunction.logger.debug("Failed to compute the initial value [" + formulaExpression + ']');
        }
      }
      if (Boolean.TRUE.equals(failOnError))
      {
        throw new InvalidReportStateException(String.format
            ("Failed to evaluate formula-function with error %s",// NON-NLS
                e.getMessage()), e);
      }
      return LibFormulaErrorValue.ERROR_UNEXPECTED_VALUE;
    }
View Full Code Here

  {
    if (formulaError != null)
    {
      if (Boolean.TRUE.equals(failOnError))
      {
        throw new InvalidReportStateException(String.format
            ("Previously failed to evaluate formula-expression with error %s",// NON-NLS
                formulaError));
      }
      return LibFormulaErrorValue.ERROR_UNEXPECTED_VALUE;
    }

    try
    {
      if (compiledFormula == null)
      {
        compiledFormula = new Formula(formulaExpression);
      }
      final ExpressionRuntime expressionRuntime = getRuntime();
      final ReportFormulaContext context =
          new ReportFormulaContext(getFormulaContext(), expressionRuntime);
      try
      {
        compiledFormula.initialize(context);
        final Object evaluate = compiledFormula.evaluate();
        if (Boolean.TRUE.equals(failOnError))
        {
          if (evaluate instanceof ErrorValue)
          {
            throw new InvalidReportStateException(String.format
                ("Failed to evaluate formula-expression with error %s",// NON-NLS
                    evaluate));
          }
        }
        return evaluate;
      }
      finally
      {
        context.close();
      }
    }
    catch (Exception e)
    {
      formulaError = e;
      if (FormulaFunction.logger.isDebugEnabled())
      {
        final Configuration config = getReportConfiguration();
        if ("true".equals(config.getConfigProperty(
            "org.pentaho.reporting.engine.classic.core.function.LogFormulaFailureCause")))
        {
          FormulaFunction.logger.debug("Failed to compute the regular value [" + formulaExpression + ']', e);
        }
        else
        {
          FormulaFunction.logger.debug("Failed to compute the regular value [" + formulaExpression + ']');
        }
      }
      if (Boolean.TRUE.equals(failOnError))
      {
        throw new InvalidReportStateException(String.format
            ("Failed to evaluate formula-function with error %s",// NON-NLS
                e.getMessage()), e);
      }
      return LibFormulaErrorValue.ERROR_UNEXPECTED_VALUE;
    }
View Full Code Here

        return startBox(box, "block");
      }
    }
    catch (IOException e)
    {
      throw new InvalidReportStateException(e.getMessage(), e);
    }
  }
View Full Code Here

        xmlWriter.writeTag(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "spacer", attributeList, XmlWriter.CLOSE);
      }
    }
    catch (IOException e)
    {
      throw new InvalidReportStateException(e.getMessage(), e);
    }
  }
View Full Code Here

      writeElementAttributes(node);
      xmlWriter.writeCloseTag();
    }
    catch (IOException e)
    {
      throw new InvalidReportStateException(e.getMessage(), e);
    }
  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.InvalidReportStateException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.