Examples of FormulaExpression


Examples of org.jfree.report.expressions.FormulaExpression

        {
            final Node node = nodes[i];
            if (node instanceof OfficeGroup)
            {
                final OfficeGroup group = (OfficeGroup) node;
                final FormulaExpression exp = (FormulaExpression) group.getGroupingExpression();

                try
                {
                    final String expression = exp.getFormulaExpression();
                    if ( expression == null)
                        continue;
                    final FormulaFunction function = (FormulaFunction) parser.parse(expression);
                    final LValue[] parameters = function.getChildValues();
                    if (parameters.length > 0)
                    {
                        String name = parameters[0].toString();
                        for (int j = 0; j < reportFunctions.length; j++)
                        {
                            if (reportFunctions[j] instanceof FormulaExpression)
                            {
                                final FormulaExpression reportExp = (FormulaExpression) reportFunctions[j];

                                if (reportExp.getName().equals(name))
                                {
                                    final LValue val = (LValue) parser.parse(reportExp.getFormulaExpression());
                                    if (val instanceof FormulaFunction)
                                    {
                                        final FormulaFunction reportFunction = (FormulaFunction) val;
                                   
                                        final ContextLookup context = (ContextLookup) reportFunction.getChildValues()[0];
View Full Code Here

Examples of org.jfree.report.expressions.FormulaExpression

        super.startParsing(attrs);

        final String groupExpr = attrs.getValue(OfficeNamespaces.OOREPORT_NS, "group-expression");
        if (groupExpr != null)
        {
            final FormulaExpression function = new FormulaExpression();
            function.setFormula(groupExpr);
            groupInstanceSection.setGroupingExpression(function);
        }
    }
View Full Code Here

Examples of org.jfree.report.expressions.FormulaExpression

        super.startParsing(attrs);

        final String formula = attrs.getValue(OfficeNamespaces.OOREPORT_NS, "formula");
        if (formula != null)
        {
            final FormulaExpression valueExpression = new FormulaExpression();
            valueExpression.setFormula(formula);
            element.setValueExpression(valueExpression);
        }

    // * Print-Repeated-Values
    // * Print-In-First-New-Section
 
View Full Code Here

Examples of org.jfree.report.expressions.FormulaExpression

                attrs.getValue(OfficeNamespaces.OOREPORT_NS, OfficeToken.STYLE_NAME);
        if (stylename == null)
        {
            throw new ParseException("Required attribute 'style-name' is missing.", getLocator());
        }
        final FormulaExpression valueExpression = new FormulaExpression();
        valueExpression.setFormula(formula);

        final String enabledText = attrs.getValue(OfficeNamespaces.OOREPORT_NS, "enabled");
        final boolean enabled = (enabledText == null || OfficeToken.TRUE.equals(enabledText));
        final FormatCondition formatCondition =
                new FormatCondition(valueExpression, stylename, enabled);
View Full Code Here

Examples of org.jfree.report.expressions.FormulaExpression

            function.setFormula(formula);
            this.expression = function;
        }
        else
        {
            final FormulaExpression expression = new FormulaExpression();
            expression.setFormula(formula);
            this.expression = expression;
        }

        expression.setName(name);
        expression.setDeepTraversing(OfficeToken.TRUE.equals(deepTraversing));
        final String preEvaluated = attrs.getValue(OfficeNamespaces.OOREPORT_NS, "pre-evaluated");
        expression.setPrecompute(OfficeToken.TRUE.equals(preEvaluated));
    }
View Full Code Here

Examples of org.jfree.report.expressions.FormulaExpression

//        final String preserveIRI = attrs.getValue(OfficeNamespaces.OOREPORT_NS, OfficeToken.PRESERVE_IRI);
        if (formula != null && formula.length() != 0)
        {
            // now, the evaulated content ends up in the 'content' attribute of the
            // element.
            final FormulaExpression valueExpression = new FormulaExpression();
            valueExpression.setFormula(formula);
            contentElement.setFormula(valueExpression);
        }

        contentElement.setNamespace(OfficeNamespaces.FORM_NS);
        contentElement.setType(OfficeToken.IMAGE);
View Full Code Here

Examples of org.jfree.report.expressions.FormulaExpression

        (OfficeNamespaces.OOREPORT_NS, "preserve-IRI");
    if (formula != null && formula.length() != 0)
    {
      // now, the evaulated content ends up in the 'content' attribute of the
      // element.
      final FormulaExpression valueExpression = new FormulaExpression();
      valueExpression.setFormula(formula);
      contentElement.setFormula(valueExpression);
    }

    contentElement.setNamespace(OfficeNamespaces.FORM_NS);
    contentElement.setType("image");
View Full Code Here

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

    }

    String s = propertyReadHandler.getResult();
    if (StringUtils.isEmpty(s, true) == false)
    {
      final FormulaExpression formulaExpression = new FormulaExpression();
      if (s.startsWith("report:"))
      {
        s = "=" + s.substring("report:".length()).trim();
      }
      else
      {
        s = s.trim();
      }
      if (s.endsWith(";"))
      {
        s = s.substring(0, s.length() - 1);
      }
      formulaExpression.setFormula(s);
      return formulaExpression;
    }
    return null;
  }
View Full Code Here

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

  public IndexDataGeneratorFunction()
  {
    this.pageFunction = new PageFunction();
    this.indexSeparator = ".";
    this.model = new TypedTableModel();
    this.dataFormula = new FormulaExpression();
    this.dataStorage = new TreeMap();
  }
View Full Code Here

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

    super.doneParsing();
    expressions = new HashMap();
    for (int i = 0; i < styleExpressions.size(); i++)
    {
      final ElementStyleExpressionReadHandler handler = (ElementStyleExpressionReadHandler) styleExpressions.get(i);
      final FormulaExpression expression = new FormulaExpression();
      expression.setFormula(ReportDesignerParserUtil.normalizeFormula(handler.getFormula()));
      expressions.put(handler.getStyleKey(), expression);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.