Examples of DataRow


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

    {
      buildAutoGeneratedDataSet(categoryDataset);
      return;
    }

    final DataRow dataRow = getDataRow();
    final Object categoryObject = dataRow.get(getCategoryColumn());
    final Comparable categoryComparable;
    if (categoryObject instanceof Comparable)
    {
      categoryComparable = (Comparable) categoryObject;
    }
    else
    {
      // ok, we need some better error management here. Its a
      // prototype :)
      categoryComparable = ("CATEGORYSETCOLL.USER_ERROR_CATEGORY_NOT_COMPARABLE"); //$NON-NLS-1$
    }

    // I love to be paranoid!
    final String[] seriesNames = getSeriesName();
    final int maxIndex = Math.min(seriesNames.length, this.valueColumns.size());
    for (int i = 0; i < maxIndex; i++)
    {
      String seriesName = seriesNames[i];
      final String column = (String) valueColumns.get(i);
      final Object valueObject = dataRow.get(column);
      if (isSeriesColumn())
      {
        final Object tmp = dataRow.get(seriesName);
        if (tmp != null)
        {
          seriesName = tmp.toString();
        }
      }
View Full Code Here

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

    buildDataset();
  }

  private void buildAutoGeneratedDataSet(final DefaultCategoryDataset categoryDataset)
  {
    final DataRow dataRow = getDataRow();
    // generatedReport == true

    // if the generatedReport flag is true, then we are dynamically
    // generating the number of columns in the report ...

    // We expect additional information in order to get the dataset
    // built properly:
    // ignoreColumns and categoryStartColumn

    final String[] columnNames = dataRow.getColumnNames();
    for (int i = categoryStartColumn; i < columnNames.length; i++)
    {
      String seriesName = columnNames[i];

      // TODO What is this all about??
      if (!seriesName.startsWith("Summary_"))
      {
        continue;
      }

      if (ignoreColumns.contains(seriesName))
      {
        continue;
      }

      seriesName = seriesName.substring(8, seriesName.length() - 10);
      final Object valueObject = dataRow.get(seriesName);

      final Number value = (valueObject instanceof Number) ? (Number) valueObject : null;
      categoryDataset.addValue(value, seriesName, seriesName);
    }
  }
View Full Code Here

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

    if (retval == null || retval.length != size)
    {
      retval = new Object[size];
    }

    final DataRow dataRow = getDataRow();
    for (int i = 0; i < size; i++)
    {
      final String field = (String) fields.get(i);
      if (field == null)
      {
        retval[i] = null;
        continue;
      }
      final Object fieldValue = dataRow.get(field);
      if (isUrlEncodeValues())
      {
        if (fieldValue == null)
        {
          retval[i] = null;
View Full Code Here

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

    if (fieldValues == null || fieldValues.length != size)
    {
      fieldValues = new Object[size];
    }

    final DataRow dataRow = getDataRow();
    for (int i = 0; i < size; i++)
    {
      final String field = (String) fields.get(i);
      if (field != null)
      {
        fieldValues[i] = dataRow.get(field);
      }
    }
    return fieldValues;
  }
View Full Code Here

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

   *
   * @return the value of the function.
   */
  public Object getValue()
  {
    final DataRow dataRow = getDataRow();
    // get the row directly as a Number
    final Object o = dataRow.get(field);
    // check if that thing is a Number
    if (o instanceof Date)
    {
      return o;
    }
View Full Code Here

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

    if (currentDataRow.isAdvanceable() == false || nextDataRow == null)
    {
      return true;
    }

    final DataRow nextView = nextDataRow.getGlobalView();
    Group g = rootGroup;
    while (g != null)
    {
      if (g.isGroupChange(nextView))
      {
View Full Code Here

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

   *
   * @return the value of the function.
   */
  public Object getValue()
  {
    final DataRow dataRow = getDataRow();
    // get the row directly as a Number
    final Object o = dataRow.get(field);
    // check if that thing is a Number
    if (o instanceof Number)
    {
      return o;
    }
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.