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

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];

      // this is legacy code ..
      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


  }


  protected void buildDataset()
  {
    final DataRow dataRow = getDataRow();
    final Object categoryObject = dataRow.get(getCategoryColumn());
    if (categoryObject instanceof Comparable == false)
    {
      return;
    }

    final Comparable categoryComparable = (Comparable) categoryObject;

    // I love to be paranoid!
    final DefaultCategoryDataset categoryDataset = (DefaultCategoryDataset) getDataSet();

    final int maxIndex = this.valueColumns.size();
    for (int i = 0; i < maxIndex; i++)
    {
      final Comparable seriesName = querySeriesValue(i);
      final Object valueObject = dataRow.get(getValueColumn(i));
      final Number value = (valueObject instanceof Number) ? (Number) valueObject : null;
      final Number existingValue = CollectorFunctionUtil.queryExistingValueFromDataSet(categoryDataset, categoryComparable, seriesName);
      if (existingValue != null)
      {
        if (value != null)
View Full Code Here

    return new DefaultCategoryDataset();
  }

  protected void buildDataset()
  {
    final DataRow dataRow = getDataRow();
    final Object categoryObject = dataRow.get(getCategoryColumn());
    if (categoryObject instanceof Comparable == false)
    {
      return;
    }

    final Comparable categoryComparable = (Comparable) categoryObject;

    // I love to be paranoid!
    final DefaultCategoryDataset categoryDataset = (DefaultCategoryDataset) getDataSet();

    final int maxIndex = this.valueColumns.size();
    for (int i = 0; i < maxIndex; i++)
    {
      final Comparable seriesName = querySeriesValue(i);
      if (seriesName == null)
      {
        continue;
      }
      final Object valueObject = dataRow.get(getValueColumn(i));

      final Number value = (valueObject instanceof Number) ? (Number) valueObject : null;

      final Number existingValue =
          CollectorFunctionUtil.queryExistingValueFromDataSet(categoryDataset, seriesName, categoryComparable);
View Full Code Here

    if (context == null)
    {
      throw new NullPointerException();
    }

    final DataRow parameterData = context.getParameterData();
    final ReportEnvironmentDataRow envDataRow = new ReportEnvironmentDataRow(context.getReportEnvironment());
    final DataFactory dataFactory = context.getDataFactory();
    PerformanceLoggingStopWatch sw = context.getPerformanceMonitorContext().createStopWatch
            (PerformanceTags.REPORT_PARAMETER_QUERY, new FormattedMessage("query={%s}", getQueryName()));
    try
View Full Code Here

    final ProcessingContext reportContext = flowController.getReportContext();
    final DefaultDataAttributeContext dac = new DefaultDataAttributeContext
        (reportContext.getOutputProcessorMetaData(), reportContext.getResourceBundleFactory().getLocale());

    final DataRow dataRow = flowController.getMasterRow().getGlobalView();
    final DataSchema dataSchema = flowController.getMasterRow().getDataSchema();

    // final Locale locale = reportContext.getResourceBundleFactory().getLocale();
    final AutoGeneratorFieldDescription[] fieldDescriptions = computeFields(dataRow, dataSchema, dac);
View Full Code Here

    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

    PerformanceLoggingStopWatch sw = performanceMonitorContext.createStopWatch
        (PerformanceTags.REPORT_QUERY, new FormattedMessage("query={%s}", query));
    try
    {
      DataRow params = new QueryDataRowWrapper(parameters, queryTimeout, queryLimit, sortConstraints);
      TableModel reportData;
      if (designTime && dataFactory instanceof DataFactoryDesignTimeSupport) {
        DataFactoryDesignTimeSupport designTimeSupport = (DataFactoryDesignTimeSupport) dataFactory;
        reportData = designTimeSupport.queryDesignTimeStructure(query, params);
      }
View Full Code Here

    if (innerRow == null)
    {
      throw new NullPointerException();
    }

    final DataRow globalView = innerRow.getGlobalView();
    final String[] names = globalView.getColumnNames();
    final int cols = names.length;
    this.dataAttributes = new HashMap<String,DataAttributes>();
    this.outerNames = new String[cols];
    this.innerNames = outerNames;
    final Object[] values = new Object[cols];
    final DataSchema dataSchema = innerRow.getDataSchema();
    for (int i = 0; i < cols; i++)
    {
      final String name = names[i];
      if (name == null)
      {
        throw new IllegalStateException("Every column must have a name.");
      }
      outerNames[i] = name;
      values[i] = globalView.get(name);

      dataAttributes.put(name, dataSchema.getAttributes(name));
    }
    setData(outerNames, values);
  }
View Full Code Here

    if (groupIndex < getGroupCount() ||
        getGroupCount() == 0)
    {
      rowAdded = false;

      final DataRow dataRow = extractDataRow(event);
      final Object groupValue;
      if (groupIndex < getGroupCount())
      {
        final String fieldName = getGroup(groupIndex);
        if (fieldName != null)
        {
          groupValue = dataRow.get(fieldName);
        }
        else
        {
          groupValue = extractFieldFromGroup(relationalGroup, dataRow);
        }
View Full Code Here

        if (groupIndex < getGroupCount())
        {
          final String fieldName = getGroup(groupIndex);
          if (fieldName != null)
          {
            final DataRow dataRow = extractDataRow(event);
            groupValue = dataRow.get(fieldName);
          }
          else
          {
            groupValue = null;
          }
View Full Code Here

TOP

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

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.