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

Examples of org.pentaho.reporting.engine.classic.core.function.FormulaExpression


    }

    this.field = null;
    if (valueExpression == null)
    {
      valueExpression = new FormulaExpression();
    }
    this.valueExpression.setFormula(formula);
    if ("field".equals(valueExpression.getFormulaNamespace()))
    {
      DataRowDataSource.logger.warn(
View Full Code Here


                                    final String formula,
                                    final ValidationResult result,
                                    final ParameterDefinitionEntry entry,
                                    final Object defaultValue)
  {
    final FormulaExpression fe = new FormulaExpression();
    fe.setFormula(formula);
    fe.setRuntime(runtime);
    final Object value = fe.getValue();
    if (value == null)
    {
      final Exception error = fe.getFormulaError();
      if (error != null)
      {
        if (result != null)
        {
          result.addError(entry.getName(),
View Full Code Here

    {
      element.setAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.FIELD, getFieldname());
    }
    if (getFormula() != null)
    {
      final FormulaExpression formulaExpression = new FormulaExpression();
      formulaExpression.setFormula(getFormula());
      element.setAttributeExpression(AttributeNames.Core.NAMESPACE, AttributeNames.Core.VALUE, formulaExpression);
    }
    if (getNullValue() != null)
    {
      element.setAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.NULL_VALUE, getNullValue());
View Full Code Here

  public FormulaPieURLGenerator(final ExpressionRuntime runtime,
                                final String formula)
  {
    this.runtime = runtime;
    this.formulaExpression = new FormulaExpression();
    this.formulaExpression.setFormula(formula);
  }
View Full Code Here

  public FormulaCategoryURLGenerator(final ExpressionRuntime runtime,
                                     final String formula)
  {
    this.runtime = runtime;
    this.formulaExpression = new FormulaExpression();
    this.formulaExpression.setFormula(formula);
  }
View Full Code Here

    {
      element.setAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.FIELD, getFieldname());
    }
    if (getFormula() != null)
    {
      final FormulaExpression formulaExpression = new FormulaExpression();
      formulaExpression.setFormula(getFormula());
      element.setAttributeExpression(AttributeNames.Core.NAMESPACE, AttributeNames.Core.VALUE, formulaExpression);
    }

    element.setAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.NULL_VALUE, getNullString());
    return element;
View Full Code Here

    {
      element.setAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.FIELD, getFieldname());
    }
    if (getFormula() != null)
    {
      final FormulaExpression formulaExpression = new FormulaExpression();
      formulaExpression.setFormula(getFormula());
      element.setAttributeExpression(AttributeNames.Core.NAMESPACE, AttributeNames.Core.VALUE, formulaExpression);
    }
    if (startAngle != null)
    {
      element.setAttribute(SparklineAttributeNames.NAMESPACE, SparklineAttributeNames.START_ANGLE, startAngle);
View Full Code Here

    {
      element.setAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.FIELD, getFieldname());
    }
    if (getFormula() != null)
    {
      final FormulaExpression formulaExpression = new FormulaExpression();
      formulaExpression.setFormula(getFormula());
      element.setAttributeExpression(AttributeNames.Core.NAMESPACE, AttributeNames.Core.VALUE, formulaExpression);
    }
    if (spacing != null)
    {
      element.setAttribute(SparklineAttributeNames.NAMESPACE, SparklineAttributeNames.SPACING, spacing);
View Full Code Here

    {
      element.setAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.FIELD, getFieldname());
    }
    if (getFormula() != null)
    {
      final FormulaExpression formulaExpression = new FormulaExpression();
      formulaExpression.setFormula(getFormula());
      element.setAttributeExpression(AttributeNames.Core.NAMESPACE, AttributeNames.Core.VALUE, formulaExpression);
    }
    if (spacing != null)
    {
      element.setAttribute(SparklineAttributeNames.NAMESPACE, SparklineAttributeNames.SPACING, spacing);
View Full Code Here

    setShowStandaloneProperties(false);
    setExpressionsOnly(true);
    designerContext = context;
    if (expression == null)
    {
      setExpression(new FormulaExpression());
    }
    else
    {
      setExpression(expression.getInstance());
    }
    if (super.performEdit() == false)
    {
      return null;
    }

    this.wrapper.stopEditing();
    if (this.expression instanceof FormulaExpression)
    {
      final FormulaExpression formulaExpression = (FormulaExpression) this.expression;
      if (StringUtils.isEmpty(formulaExpression.getFormula()))
      {
        return null;
      }
    }
    return this.expression;
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.function.FormulaExpression

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.