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

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


      configuration = ClassicEngineBoot.getInstance().getGlobalConfig();
      documentMetaData = new MemoryDocumentMetaData();
      reportEnvironment = new DefaultReportEnvironment(configuration);

      final ReportEnvironmentDataRow envDataRow = new ReportEnvironmentDataRow(reportEnvironment);
      parameterData = new CompoundDataRow(envDataRow, new ParameterDataRow());

    }
View Full Code Here


        contentBase = null;
        documentMetaData = new MemoryDocumentMetaData();
        reportEnvironment = new DefaultReportEnvironment(configuration);

        final ReportEnvironmentDataRow envDataRow = new ReportEnvironmentDataRow(reportEnvironment);
        parameterData = new CompoundDataRow(envDataRow, new ParameterDataRow());
      }
      else
      {
        this.resourceManager = report.getResourceManager();
        this.contentBase = report.getContentBase();
        final Object dataCacheEnabledRaw =
            report.getAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.DATA_CACHE);
        final boolean dataCacheEnabled = Boolean.FALSE.equals(dataCacheEnabledRaw) == false;
        this.dataFactory = new CachingDataFactory(report.getDataFactory().derive(), dataCacheEnabled);
        this.resourceBundleFactory = MasterReport.computeAndInitResourceBundleFactory
            (report.getResourceBundleFactory(), report.getReportEnvironment());
        this.reportEnvironment = report.getReportEnvironment();
        this.configuration = report.getConfiguration();
        final ReportEnvironmentDataRow envDataRow = new ReportEnvironmentDataRow(reportEnvironment);
        this.parameterData = new CompoundDataRow(envDataRow, new ParameterDataRow(report.getParameterValues()));

        dataFactory.initialize(configuration, report.getResourceManager(), report.getContentBase(), resourceBundleFactory);

        if (report.getBundle() != null)
        {
View Full Code Here

    }

    public void update(final ReportParameterValues properties)
    {
      final ReportEnvironmentDataRow envDataRow = new ReportEnvironmentDataRow(reportEnvironment);
      this.parameterData = new CompoundDataRow(envDataRow, new ParameterDataRow(properties));
    }
View Full Code Here

    this.dataContextStack = new FastStack(10);
    this.advanceRequested = false;
    this.parameters = parameters;

    this.dataRow = GlobalMasterRow.createReportRow
        (reportContext, schemaDefinition, new ParameterDataRow(parameters), parameterDefinitionEntries, includeStructuralPreprocessing);
  }
View Full Code Here

    {
      throw new NullPointerException();
    }

    final MasterDataRow masterRowWithoutData =
        dataRow.deriveSubDataRow(reportContext, dataFactory, new ParameterDataRow(parameters),
            dataRow.getParameterDefinitionEntries(), resourceBundleFactory);
    final ReportDataRow tableData;
    if (query != null)
    {
      tableData = ReportDataRow.createDataRow
View Full Code Here

    // create a view for the parameters of the report ...
    final MasterDataRow subReportDataRow;
    if (isGlobalImportOrExport(inputParameters))
    {
      final ParameterDataRow parameterRow = new ParameterDataRow(dataRow.getGlobalView());
      subReportDataRow = dataRow.deriveSubDataRow(reportContext, dataFactory, parameterRow, null, resourceBundleFactory);
    }
    else
    {
      final ParameterDataRow parameterRow = new ParameterDataRow(inputParameters, dataRow.getGlobalView());
      subReportDataRow = dataRow.deriveSubDataRow(reportContext, dataFactory, parameterRow, null, resourceBundleFactory);
    }

    final DefaultFlowController fc = new DefaultFlowController(this, subReportDataRow);
    fc.dataContextStack.push(new ReportDataContext(advanceRequested));
View Full Code Here

    final DefaultDataAttributes globalAttributes = getGlobalAttributes();
    final MetaSelectorRule[] indirectRules = getIndirectRules();
    final DirectFieldSelectorRule[] directRules = getDirectRules();
    final DataAttributeContext context = getContext();
    final ParameterDataRow parameters = masterRow.getParameterDataRow();
    final ExpressionDataRow expressionsRow = masterRow.getExpressionDataRow();
    final ReportDataRow massDataRow = masterRow.getReportDataRow();
    // imported data has been compiled in the subreport ...
    final ImportedVariablesDataRow importedDataRow = masterRow.getImportedDataRow();

    final DefaultDataSchema defaultDataSchema = new DefaultDataSchema();

    if (parameters != null)
    {
      final MasterDataRow parentRow = masterRow.getParentDataRow();
      if (parentRow == null)
      {
        processParameters(parameters, null, reportEnvironment,
            globalAttributes, indirectRules, directRules, defaultDataSchema);
      }
      else
      {
        // import the parameters that have been computed already ..
        final String[] parameterNames = parameters.getParentNames();
        final String[] innerNames = parameters.getColumnNames();
        for (int i = 0; i < parameterNames.length; i++)
        {
          final String name = parameterNames[i];
          final DataAttributes attributes = parentRow.getDataSchema().getAttributes(name);
          defaultDataSchema.setAttributes(innerNames[i], attributes);
View Full Code Here

  {
    this.columnNames = EMPTY_NAMES;
    this.dataFactoryException = null;

    final ParameterDefinitionEntry[] parameterDefinitions;
    final ParameterDataRow parameterRow;
    if (parent instanceof MasterReport)
    {
      final MasterReport mr = (MasterReport) parent;
      parameterDefinitions = mr.getParameterDefinition().getParameterDefinitions();
      final LinkedMap values = computeParameterValueSet(mr);
      parameterRow = new ParameterDataRow((String[]) values.keys(new String[values.size()]), values.values());
    }
    else if (parent instanceof SubReport)
    {
      final SubReport sr = (SubReport) parent;
      final ParameterMapping[] inputMappings = sr.getInputMappings();
      final Object[] values = new Object[inputMappings.length];
      final String[] names = new String[inputMappings.length];
      parameterDefinitions = null;
      for (int i = 0; i < inputMappings.length; i++)
      {
        final ParameterMapping inputMapping = inputMappings[i];
        names[i] = inputMapping.getAlias();
      }
      parameterRow = new ParameterDataRow(names, values);
    }
    else
    {
      parameterDefinitions = null;
      parameterRow = new ParameterDataRow();
    }

    final Expression[] expressions = parent.getExpressions().getExpressions();
    final DataSchemaCompiler dataSchemaCompiler =
        new DataSchemaCompiler(dataSchemaDefinition, dataAttributeContext, masterReportElement.getResourceManager());
View Full Code Here

    }

    // second run. Now with padding ..
    final ProcessingContext prc = new DefaultProcessingContext();
    final GlobalMasterRow gmr = GlobalMasterRow.createReportRow
        (prc, new DefaultDataSchemaDefinition(), new ParameterDataRow(), null, false);
    final TableModel data = createTableModel();
    MasterDataRow wdata = gmr.deriveWithQueryData(new ReportDataRow(data));
    int advanceCount = 0;
    wdata = wdata.startCrosstabMode(specification);
    logger.debug("Region:  " + wdata.getGlobalView().get("Region"));
View Full Code Here

  private static CrosstabSpecification buildCS()
  {
    final ProcessingContext prc = new DefaultProcessingContext();
    final GlobalMasterRow gmr = GlobalMasterRow.createReportRow
        (prc, new DefaultDataSchemaDefinition(), new ParameterDataRow(), null, false);
    final TableModel data = createTableModel();
    MasterDataRow wdata = gmr.deriveWithQueryData(new ReportDataRow(data));
    final CrosstabSpecification cs = new SortedMergeCrosstabSpecification
        (createDummyKey(), new String[]{"Product", "Time"});
    int advanceCount = 0;
View Full Code Here

TOP

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

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.