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

Examples of org.pentaho.reporting.engine.classic.core.util.ReportParameterValues


      logger.debug("On Validate Single Parameter: " + trustedParameterContext.getParameterData());
      logger.debug("On Validate Single Parameter: " + untrustedValue);
      logger.debug("On Validate Single Parameter: ------------------------------");
    }
    final String parameterName = parameterDefinitionEntry.getName();
    final ReportParameterValues tempValue = new ReportParameterValues(trustedParameterContext.getTrustedValues());
    tempValue.put(parameterName, untrustedValue);
    final Object computedValue = FormulaParameterEvaluator.computePostProcessingValue
        (result, trustedParameterContext, tempValue, parameterDefinitionEntry, untrustedValue, defaultValue);

    if (isValueMissingForMandatoryParameterCheck(parameterDefinitionEntry, computedValue))
    {
View Full Code Here


    private TrustedParameterContext(final ParameterContext context)
    {
      this.context = context;
      this.environmentDataRow = new ReportEnvironmentDataRow(context.getReportEnvironment());
      this.trustedValues = new ReportParameterValues();
    }
View Full Code Here

    setElementType(new MasterReportType());
    setResourceBundleFactory(new LibLoaderResourceBundleFactory());

    this.reportConfiguration = new HierarchicalConfiguration
        (ClassicEngineBoot.getInstance().getGlobalConfig());
    this.parameterValues = new ReportParameterValues();

    setPageDefinition(null);

    final TableDataFactory dataFactory = new TableDataFactory();
    dataFactory.addTable("default", new DefaultTableModel());
View Full Code Here

  public static ReportParameterValues evaluate(final ValidationResult result,
                                        final ReportParameterDefinition parameterDefinition,
                                        final ParameterContext parameterContext)
  {

    final ReportParameterValues parameterValues = new ReportParameterValues();
    parameterValues.putAll(parameterContext.getParameterData());
    final ParameterDefinitionEntry[] entries = parameterDefinition.getParameterDefinitions();
    for (int i = 0; i < entries.length; i++)
    {
      final ParameterDefinitionEntry entry = entries[i];
      try
      {
        final Object o = computePostProcessingValue
            (result, parameterContext, parameterValues, entry, parameterValues.get(entry.getName()),
                entry.getDefaultValue(parameterContext));
        parameterValues.put(entry.getName(), o);
      }
      catch (ReportProcessingException e)
      {
        if (logger.isDebugEnabled())
        {
View Full Code Here

      putValue(Action.NAME, messages.getString("PreviewParametersDialog.Ok"));
    }

    public void actionPerformed(final ActionEvent aEvt)
    {
      final ReportParameterValues properties = parametersPanel.getReportParameterValues();
      if (properties != null)
      {
        final ReportParameterValues reportParameters = masterReport.getParameterValues();
        final String[] strings = properties.getColumnNames();
        for (int i = 0; i < strings.length; i++)
        {
          final String propertyName = strings[i];
          reportParameters.put(propertyName, properties.get(propertyName));
        }
      }
      confirmed = true;
      dispose();
    }
View Full Code Here

    }
    catch (ReportDataFactoryException e)
    {
      e.printStackTrace();
      // this may fail if the datasource is not there or the report is really messed up ..
      this.reportParameterValues = new ReportParameterValues(report.getParameterValues());
    }

    parameterComponents = new ArrayList<ParameterComponent>();
    // we are using a very simple model here (for now).
    parameterContext.update(report);
View Full Code Here

            o.setText(message);
          }
        }

        // Set the updated and validated parameter values as new values.
        final ReportParameterValues parameterValues = validationResult.getParameterValues();
        for (final String columnName : parameterValues.getColumnNames())
        {
          final Object value = parameterValues.get(columnName);
          if (value != null)
          {
            reportParameterValues.put(columnName, value);
          }
        }
View Full Code Here

    private void applyReportParameters()
    {
      final ReportParameterDefinition theParamterDefinition = reportJob.getParameterDefinition();
      if (theParamterDefinition.getParameterCount() > 0)
      {
        final ReportParameterValues properties = parametersPanel.getReportParameterValues();
        final ReportParameterValues reportParameters = reportJob.getParameterValues();
        final String[] strings = properties.getColumnNames();
        for (int i = 0; i < strings.length; i++)
        {
          final String propertyName = strings[i];
          reportParameters.put(propertyName, properties.get(propertyName));
        }
      }
    }
View Full Code Here

    final MasterReport report = new MasterReport();
    report.setAttribute(AttributeNames.Wizard.NAMESPACE, "wizard-spec", wizardSpecification);

    final ProcessingContext processingContext = new DefaultProcessingContext();
    final DefaultFlowController flowController = new DefaultFlowController
        (processingContext, report.getDataSchemaDefinition(), new ReportParameterValues(),
            new NoOpPerformanceMonitorContext());

    final WizardProcessor processor = new WizardProcessor();
    final MasterReport masterReport = processor.performPreProcessing(report, flowController);
View Full Code Here

     */
    public void run()
    {
      try
      {
        resultTableModel = dataFactory.queryData(query, new ReportParameterValues());
        dataFactory.close();
      }
      catch (ReportDataFactoryException e)
      {
        exception = e;
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.util.ReportParameterValues

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.