Examples of OfficeGroup


Examples of com.sun.star.report.pentaho.model.OfficeGroup

        for (int i = 0; i < nodes.length; i++)
        {
            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];
                                        name = context.getName();
                                    }
                                    else if (val instanceof Term)
                                    {
                                        final Term term = (Term) val;
                                        final ContextLookup context = (ContextLookup) term.getHeadValue().getChildValues()[0];
                                        name = context.getName();
                                    }
                                    break;
                                }
                            }
                        }

                        final Object[] pair = new Object[2];
                        pair[0] = name;
                        pair[1] = group.getAttribute(OfficeNamespaces.OOREPORT_NS, "sort-ascending");
                        expressions.add(pair);
                    }
                }
                catch (ParseException ex)
                {
View Full Code Here

Examples of com.sun.star.report.pentaho.model.OfficeGroup

    private final ReportReadHandler rh;

    public GroupReadHandler(final ReportReadHandler _rh)
    {
        rh = _rh;
        group = new OfficeGroup();
        groupInstanceSection = new OfficeGroupInstanceSection();
        groupInstanceSection.setNamespace(JFreeReportInfo.REPORT_NAMESPACE);
        groupInstanceSection.setType("group-instance");
        group.addNode(groupInstanceSection);
        functionHandlers = new ArrayList();
View Full Code Here

Examples of com.sun.star.report.pentaho.model.OfficeGroup

    super.initialize(node, flowController, parent);
    state = OfficeGroupLayoutController.STATE_PROCESS_REPEATING_HEADER;
    variablesCollection = new VariablesCollection(computeVariablesPrefix());


    final OfficeGroup group = (OfficeGroup) getElement();
    final OfficeGroupSection header = group.getHeader();
    repeatHeader = (header != null && header.isRepeatSection());

    final OfficeGroupSection footer = group.getFooter();
    repeatFooter = (footer != null && footer.isRepeatSection());
  }
View Full Code Here

Examples of com.sun.star.report.pentaho.model.OfficeGroup

      if (!repeatHeader)
      {
        return controller;
      }

      final OfficeGroup group = (OfficeGroup) getElement();
      final OfficeGroupSection header = group.getHeader();
      controller.waitForJoin = true;
      return processChild(controller, header, getFlowController());
    }

    if (state == OfficeGroupLayoutController.STATE_PROCESS_REPEATING_FOOTER)
    {

      final OfficeGroupLayoutController controller =
          (OfficeGroupLayoutController) clone();
      controller.state = OfficeGroupLayoutController.STATE_PROCESS_NORMAL_FLOW;

      if (!repeatFooter)
      {
        return controller;
      }

      final OfficeGroup group = (OfficeGroup) getElement();
      final OfficeGroupSection footer = group.getFooter();
      controller.waitForJoin = true;
      return processChild(controller, footer, getFlowController());
    }

    return super.processContent(target);
View Full Code Here

Examples of com.sun.star.report.pentaho.model.OfficeGroup

        for (int i = 0; i < nodes.length; i++)
        {
            final Node node = nodes[i];
            if (node instanceof OfficeGroup)
            {
                final OfficeGroup group = (OfficeGroup) node;
                final FormulaExpression exp = (FormulaExpression) group.getGroupingExpression();
                if ( exp == null )
                    continue;

                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];
                                        name = context.getName();
                                    }
                                    else if (val instanceof Term)
                                    {
                                        final Term term = (Term) val;
                                        final ContextLookup context = (ContextLookup) term.getHeadValue().getChildValues()[0];
                                        name = context.getName();
                                    }
                                    break;
                                }
                            }
                        }

                        final Object[] pair = new Object[2];
                        pair[0] = name;
                        pair[1] = group.getAttribute(OfficeNamespaces.OOREPORT_NS, "sort-ascending");
                        expressions.add(pair);
                    }
                }
                catch (ParseException ex)
                {
View Full Code Here

Examples of com.sun.star.report.pentaho.model.OfficeGroup

      if (!repeatHeader)
      {
        return controller;
      }

      final OfficeGroup group = (OfficeGroup) getElement();
      final OfficeGroupSection header = group.getHeader();
      controller.waitForJoin = true;
      return processChild(controller, header, getFlowController());
    }

    if (state == OfficeGroupLayoutController.STATE_PROCESS_REPEATING_FOOTER)
    {

      final OfficeGroupLayoutController controller =
          (OfficeGroupLayoutController) clone();
      controller.state = OfficeGroupLayoutController.STATE_PROCESS_NORMAL_FLOW;

      if (!repeatFooter)
      {
        return controller;
      }

      final OfficeGroup group = (OfficeGroup) getElement();
      final OfficeGroupSection footer = group.getFooter();
      controller.waitForJoin = true;
      return processChild(controller, footer, getFlowController());
    }

    return super.processContent(target);
View Full Code Here

Examples of com.sun.star.report.pentaho.model.OfficeGroup

    private final ReportReadHandler rh;

    public GroupReadHandler(final ReportReadHandler _rh)
    {
        rh = _rh;
        group = new OfficeGroup();
        groupInstanceSection = new OfficeGroupInstanceSection();
        groupInstanceSection.setNamespace(JFreeReportInfo.REPORT_NAMESPACE);
        groupInstanceSection.setType("group-instance");
        group.addNode(groupInstanceSection);
        functionHandlers = new ArrayList();
View Full Code Here

Examples of com.sun.star.report.pentaho.model.OfficeGroup

    super.initialize(node, flowController, parent);
    state = OfficeGroupLayoutController.STATE_PROCESS_REPEATING_HEADER;
    variablesCollection = new VariablesCollection(computeVariablesPrefix());


    final OfficeGroup group = (OfficeGroup) getElement();
    final OfficeGroupSection header = group.getHeader();
    repeatHeader = (header != null && header.isRepeatSection());

    final OfficeGroupSection footer = group.getFooter();
    repeatFooter = (footer != null && footer.isRepeatSection());
  }
View Full Code Here

Examples of com.sun.star.report.pentaho.model.OfficeGroup

        for (int i = 0; i < nodes.length; i++)
        {
            final Node node = nodes[i];
            if (node instanceof OfficeGroup)
            {
                final OfficeGroup group = (OfficeGroup) node;
                final FormulaExpression exp = (FormulaExpression) group.getGroupingExpression();
                if (exp == null)
                {
                    continue;
                }

                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();
                        if (parameters[0] instanceof ContextLookup)
                        {
                            final ContextLookup context = (ContextLookup) parameters[0];
                            name = context.getName();
                        }
                        for (int j = 0; j < reportFunctions.length; j++)
                        {
                            if (reportFunctions[j] instanceof FormulaExpression)
                            {
                                final FormulaExpression reportExp = (FormulaExpression) reportFunctions[j];

                                if (reportExp.getName().equals(name))
                                {
                                    LValue val = parser.parse(reportExp.getFormulaExpression());
                                    while( !(val instanceof ContextLookup))
                                    {
                                        if (val instanceof Term)
                                        {
                                            val = ((Term)val).getHeadValue();
                                        }
                                        else if (val instanceof FormulaFunction)
                                        {
                                            final FormulaFunction reportFunction = (FormulaFunction) val;
                                            val = reportFunction.getChildValues()[0];
                                        }
                                    }
                                    if (val instanceof ContextLookup)
                                    {
                                        final ContextLookup context = (ContextLookup) val;
                                        name = context.getName();
                                    }
                                    break;
                                }
                            }
                        }

                        final Object[] pair = new Object[2];
                        pair[0] = name;
                        pair[1] = group.getAttribute(OfficeNamespaces.OOREPORT_NS, "sort-ascending");
                        expressions.add(pair);
                    }
                }
                catch (ParseException ex)
                {
View Full Code Here

Examples of com.sun.star.report.pentaho.model.OfficeGroup

        super.initialize(node, flowController, parent);
        state = OfficeGroupLayoutController.STATE_PROCESS_REPEATING_HEADER;
        variablesCollection = new VariablesCollection(computeVariablesPrefix());


        final OfficeGroup group = (OfficeGroup) getElement();
        final OfficeGroupSection header = group.getHeader();
        repeatHeader = (header != null && header.isRepeatSection());

        final OfficeGroupSection footer = group.getFooter();
        repeatFooter = (footer != null && footer.isRepeatSection());
    }
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.