Search in sources :

Example 1 with ReportParameterValues

use of org.pentaho.reporting.engine.classic.core.util.ReportParameterValues in project head by mifos.

the class PentahoReportsServiceImpl method addParametersToReport.

private void addParametersToReport(MasterReport report, Map<String, AbstractPentahoParameter> params) throws ReflectionException, IOException {
    ReportParameterValues rptParamValues = report.getParameterValues();
    ReportParameterDefinition paramsDefinition = report.getParameterDefinition();
    params.put("mifosLogoPath", getLogoParameterForReport());
    for (ParameterDefinitionEntry paramDefEntry : paramsDefinition.getParameterDefinitions()) {
        String paramName = paramDefEntry.getName();
        AbstractPentahoParameter parameter = params.get(paramName);
        if (parameter != null) {
            Object val = this.paramParser.parseParamValue(parameter, paramDefEntry);
            if (val != null && (!val.getClass().isArray() || Array.getLength(val) > 0)) {
                rptParamValues.put(paramName, val);
            }
        }
    }
}
Also used : ReportParameterDefinition(org.pentaho.reporting.engine.classic.core.parameters.ReportParameterDefinition) AbstractPentahoParameter(org.mifos.reports.pentaho.params.AbstractPentahoParameter) ParameterDefinitionEntry(org.pentaho.reporting.engine.classic.core.parameters.ParameterDefinitionEntry) ReportParameterValues(org.pentaho.reporting.engine.classic.core.util.ReportParameterValues)

Example 2 with ReportParameterValues

use of org.pentaho.reporting.engine.classic.core.util.ReportParameterValues in project pentaho-kettle by pentaho.

the class PentahoReportingOutput method processReport.

@VisibleForTesting
public void processReport(Object[] r, String sourceFilename, String targetFilename, ProcessorType outputProcessorType, Boolean createParentFolder) throws KettleException {
    try {
        // Load the master report from the PRPT
        // 
        MasterReport report = loadMasterReport(sourceFilename, getTrans());
        // Set the parameters values that are present in the various fields...
        // 
        ReportParameterValues values = report.getParameterValues();
        ReportParameterDefinition definition = report.getParameterDefinition();
        for (String parameterName : meta.getParameterFieldMap().keySet()) {
            String fieldName = meta.getParameterFieldMap().get(parameterName);
            if (fieldName != null) {
                int index = getInputRowMeta().indexOfValue(fieldName);
                if (index < 0) {
                    throw new KettleException(BaseMessages.getString(PKG, "PentahoReportingOutput.Exception.CanNotFindField", fieldName));
                }
                Class<?> clazz = findParameterClass(definition, parameterName);
                Object value = null;
                if (clazz != null) {
                    if (clazz.equals(String.class)) {
                        value = getInputRowMeta().getString(r, index);
                    } else if (clazz.equals((new String[0]).getClass())) {
                        value = getInputRowMeta().getString(r, index).split("\t");
                    } else if (clazz.equals(Date.class)) {
                        value = getInputRowMeta().getDate(r, index);
                    } else if (clazz.equals(byte.class) || clazz.equals(Byte.class)) {
                        value = getInputRowMeta().getInteger(r, index).byteValue();
                    } else if (clazz.equals(Short.class) || clazz.equals(short.class)) {
                        value = getInputRowMeta().getInteger(r, index).shortValue();
                    } else if (clazz.equals(Integer.class) || clazz.equals(int.class)) {
                        value = getInputRowMeta().getInteger(r, index).intValue();
                    } else if (clazz.equals(Long.class) || clazz.equals(long.class)) {
                        value = getInputRowMeta().getInteger(r, index);
                    } else if (clazz.equals(Double.class) || clazz.equals(double.class)) {
                        value = getInputRowMeta().getNumber(r, index);
                    } else if (clazz.equals(Float.class) || clazz.equals(float.class)) {
                        value = getInputRowMeta().getNumber(r, index).floatValue();
                    } else if (clazz.equals(Number.class)) {
                        value = getInputRowMeta().getBigNumber(r, index).floatValue();
                    } else if (clazz.equals(Boolean.class) || clazz.equals(boolean.class)) {
                        value = getInputRowMeta().getBoolean(r, index);
                    } else if (clazz.equals(BigDecimal.class)) {
                        value = getInputRowMeta().getBigNumber(r, index);
                    } else if (clazz.equals((new byte[0]).getClass())) {
                        value = getInputRowMeta().getBinary(r, index);
                    } else {
                        value = getInputRowMeta().getValueMeta(index).convertToNormalStorageType(r[index]);
                    }
                    values.put(parameterName, value);
                } else {
                    // This parameter was not found, log this as a warning...
                    // 
                    logBasic(BaseMessages.getString(PKG, "PentahoReportingOutput.Log.ParameterNotFoundInReport", parameterName, sourceFilename));
                }
            }
        }
        Runnable exportTask;
        PentahoReportingSwingGuiContext context = new PentahoReportingSwingGuiContext();
        switch(outputProcessorType) {
            case PDF:
                exportTask = new ReportExportTask(report, context, targetFilename, createParentFolder) {

                    protected ReportProcessor createReportProcessor(OutputStream fout) throws Exception {
                        PdfOutputProcessor outputProcessor = new PdfOutputProcessor(report.getConfiguration(), fout, report.getResourceManager());
                        return new PageableReportProcessor(report, outputProcessor);
                    }
                };
                break;
            case CSV:
                exportTask = new ReportExportTask(report, context, targetFilename, createParentFolder) {

                    protected ReportProcessor createReportProcessor(OutputStream fout) throws Exception {
                        ReportStructureValidator validator = new ReportStructureValidator();
                        if (validator.isValidForFastProcessing(report) == false) {
                            StreamCSVOutputProcessor target = new StreamCSVOutputProcessor(fout);
                            return new StreamReportProcessor(report, target);
                        } else {
                            return new FastCsvExportProcessor(report, fout);
                        }
                    }
                };
                break;
            case Excel:
                exportTask = new ReportExportTask(report, context, targetFilename, createParentFolder) {

                    protected ReportProcessor createReportProcessor(OutputStream fout) throws Exception {
                        ReportStructureValidator validator = new ReportStructureValidator();
                        if (validator.isValidForFastProcessing(report) == false) {
                            final FlowExcelOutputProcessor target = new FlowExcelOutputProcessor(report.getConfiguration(), fout, report.getResourceManager());
                            target.setUseXlsxFormat(false);
                            return new FlowReportProcessor(report, target);
                        } else {
                            return new FastExcelExportProcessor(report, fout, false);
                        }
                    }
                };
                break;
            case Excel_2007:
                exportTask = new ReportExportTask(report, context, targetFilename, createParentFolder) {

                    protected ReportProcessor createReportProcessor(OutputStream fout) throws Exception {
                        ReportStructureValidator validator = new ReportStructureValidator();
                        if (validator.isValidForFastProcessing(report) == false) {
                            final FlowExcelOutputProcessor target = new FlowExcelOutputProcessor(report.getConfiguration(), fout, report.getResourceManager());
                            target.setUseXlsxFormat(true);
                            return new FlowReportProcessor(report, target);
                        } else {
                            return new FastExcelExportProcessor(report, fout, true);
                        }
                    }
                };
                break;
            case StreamingHTML:
                exportTask = new ReportExportTask(report, context, targetFilename, createParentFolder) {

                    protected String filename, suffix;

                    protected ContentLocation targetRoot;

                    @Override
                    protected void execute() throws Exception {
                        FileObject targetDirectory = targetFile.getParent();
                        FileObjectRepository targetRepository = new FileObjectRepository(targetDirectory);
                        targetRoot = targetRepository.getRoot();
                        suffix = getSuffix(targetPath);
                        filename = IOUtils.getInstance().stripFileExtension(targetFile.getName().toString());
                        ReportProcessor reportProcessor = createReportProcessor(null);
                        try {
                            reportProcessor.processReport();
                        } finally {
                            reportProcessor.close();
                        }
                    }

                    protected ReportProcessor createReportProcessor(OutputStream fout) throws Exception {
                        ReportStructureValidator validator = new ReportStructureValidator();
                        if (validator.isValidForFastProcessing(report) == false) {
                            final HtmlOutputProcessor outputProcessor = new StreamHtmlOutputProcessor(report.getConfiguration());
                            final HtmlPrinter printer = new AllItemsHtmlPrinter(report.getResourceManager());
                            printer.setContentWriter(targetRoot, new DefaultNameGenerator(targetRoot, filename, suffix));
                            // $NON-NLS-1$
                            printer.setDataWriter(null, null);
                            printer.setUrlRewriter(new FileSystemURLRewriter());
                            outputProcessor.setPrinter(printer);
                            return new StreamReportProcessor(report, outputProcessor);
                        } else {
                            FastHtmlContentItems printer = new FastHtmlContentItems();
                            printer.setContentWriter(targetRoot, new DefaultNameGenerator(targetRoot, filename, suffix));
                            // $NON-NLS-1$
                            printer.setDataWriter(null, null);
                            printer.setUrlRewriter(new FileSystemURLRewriter());
                            return new FastHtmlExportProcessor(report, printer);
                        }
                    }
                };
                break;
            case PagedHTML:
                exportTask = new ReportExportTask(report, context, targetFilename, createParentFolder) {

                    protected String filename, suffix;

                    protected ContentLocation targetRoot;

                    @Override
                    protected void execute() throws Exception {
                        FileObject targetDirectory = targetFile.getParent();
                        FileObjectRepository targetRepository = new FileObjectRepository(targetDirectory);
                        targetRoot = targetRepository.getRoot();
                        suffix = getSuffix(targetPath);
                        Path p = Paths.get(targetFile.getName().getPath());
                        filename = IOUtils.getInstance().stripFileExtension(p.getFileName().toString());
                        ReportProcessor reportProcessor = createReportProcessor(null);
                        try {
                            reportProcessor.processReport();
                        } finally {
                            reportProcessor.close();
                        }
                    }

                    protected ReportProcessor createReportProcessor(OutputStream fout) throws Exception {
                        final FlowHtmlOutputProcessor outputProcessor = new FlowHtmlOutputProcessor();
                        final HtmlPrinter printer = new AllItemsHtmlPrinter(report.getResourceManager());
                        printer.setContentWriter(targetRoot, new DefaultNameGenerator(targetRoot, filename, suffix));
                        printer.setDataWriter(targetRoot, new DefaultNameGenerator(targetRoot, "content"));
                        printer.setUrlRewriter(new FileSystemURLRewriter());
                        outputProcessor.setPrinter(printer);
                        return new FlowReportProcessor(report, outputProcessor);
                    }
                };
                break;
            case RTF:
                exportTask = new ReportExportTask(report, context, targetFilename, createParentFolder) {

                    protected ReportProcessor createReportProcessor(OutputStream fout) throws Exception {
                        StreamRTFOutputProcessor target = new StreamRTFOutputProcessor(report.getConfiguration(), fout, report.getResourceManager());
                        return new StreamReportProcessor(report, target);
                    }
                };
                break;
            default:
                exportTask = null;
                break;
        }
        if (exportTask != null) {
            exportTask.run();
        }
        if (context.getStatusType() == StatusType.ERROR) {
            KettleVFS.getFileObject(targetFilename, getTransMeta()).delete();
            if (context.getCause() != null) {
                throw context.getCause();
            }
            throw new KettleStepException(context.getMessage());
        }
        ResultFile resultFile = new ResultFile(ResultFile.FILE_TYPE_GENERAL, KettleVFS.getFileObject(targetFilename, getTransMeta()), getTransMeta().getName(), getStepname());
        resultFile.setComment("This file was created with a Pentaho Reporting Output step");
        addResultFile(resultFile);
    } catch (Throwable e) {
        throw new KettleException(BaseMessages.getString(PKG, "PentahoReportingOutput.Exception.UnexpectedErrorRenderingReport", sourceFilename, targetFilename, outputProcessorType.getDescription()), e);
    }
}
Also used : KettleException(org.pentaho.di.core.exception.KettleException) StreamCSVOutputProcessor(org.pentaho.reporting.engine.classic.core.modules.output.table.csv.StreamCSVOutputProcessor) KettleStepException(org.pentaho.di.core.exception.KettleStepException) FlowExcelOutputProcessor(org.pentaho.reporting.engine.classic.core.modules.output.table.xls.FlowExcelOutputProcessor) OutputStream(java.io.OutputStream) FastHtmlContentItems(org.pentaho.reporting.engine.classic.core.modules.output.fast.html.FastHtmlContentItems) StreamRTFOutputProcessor(org.pentaho.reporting.engine.classic.core.modules.output.table.rtf.StreamRTFOutputProcessor) ReportStructureValidator(org.pentaho.reporting.engine.classic.core.modules.output.fast.validator.ReportStructureValidator) FileObjectRepository(org.pentaho.di.trans.steps.pentahoreporting.urlrepository.FileObjectRepository) StreamHtmlOutputProcessor(org.pentaho.reporting.engine.classic.core.modules.output.table.html.StreamHtmlOutputProcessor) FlowHtmlOutputProcessor(org.pentaho.reporting.engine.classic.core.modules.output.table.html.FlowHtmlOutputProcessor) HtmlOutputProcessor(org.pentaho.reporting.engine.classic.core.modules.output.table.html.HtmlOutputProcessor) ReportParameterDefinition(org.pentaho.reporting.engine.classic.core.parameters.ReportParameterDefinition) PageableReportProcessor(org.pentaho.reporting.engine.classic.core.modules.output.pageable.base.PageableReportProcessor) FileSystemURLRewriter(org.pentaho.reporting.engine.classic.core.modules.output.table.html.FileSystemURLRewriter) FlowReportProcessor(org.pentaho.reporting.engine.classic.core.modules.output.table.base.FlowReportProcessor) FastHtmlExportProcessor(org.pentaho.reporting.engine.classic.core.modules.output.fast.html.FastHtmlExportProcessor) FileObject(org.apache.commons.vfs2.FileObject) FastCsvExportProcessor(org.pentaho.reporting.engine.classic.core.modules.output.fast.csv.FastCsvExportProcessor) ReportParameterValues(org.pentaho.reporting.engine.classic.core.util.ReportParameterValues) Path(java.nio.file.Path) PdfOutputProcessor(org.pentaho.reporting.engine.classic.core.modules.output.pageable.pdf.PdfOutputProcessor) DefaultNameGenerator(org.pentaho.reporting.libraries.repository.DefaultNameGenerator) FlowHtmlOutputProcessor(org.pentaho.reporting.engine.classic.core.modules.output.table.html.FlowHtmlOutputProcessor) FlowReportProcessor(org.pentaho.reporting.engine.classic.core.modules.output.table.base.FlowReportProcessor) ReportProcessor(org.pentaho.reporting.engine.classic.core.layout.output.ReportProcessor) PageableReportProcessor(org.pentaho.reporting.engine.classic.core.modules.output.pageable.base.PageableReportProcessor) StreamReportProcessor(org.pentaho.reporting.engine.classic.core.modules.output.table.base.StreamReportProcessor) ResultFile(org.pentaho.di.core.ResultFile) BigDecimal(java.math.BigDecimal) ResourceLoadingException(org.pentaho.reporting.libraries.resourceloader.ResourceLoadingException) KettleFileException(org.pentaho.di.core.exception.KettleFileException) ResourceCreationException(org.pentaho.reporting.libraries.resourceloader.ResourceCreationException) ResourceKeyCreationException(org.pentaho.reporting.libraries.resourceloader.ResourceKeyCreationException) KettleStepException(org.pentaho.di.core.exception.KettleStepException) KettleException(org.pentaho.di.core.exception.KettleException) MalformedURLException(java.net.MalformedURLException) ResourceException(org.pentaho.reporting.libraries.resourceloader.ResourceException) FastExcelExportProcessor(org.pentaho.reporting.engine.classic.core.modules.output.fast.xls.FastExcelExportProcessor) MasterReport(org.pentaho.reporting.engine.classic.core.MasterReport) AllItemsHtmlPrinter(org.pentaho.reporting.engine.classic.core.modules.output.table.html.AllItemsHtmlPrinter) ContentLocation(org.pentaho.reporting.libraries.repository.ContentLocation) StreamHtmlOutputProcessor(org.pentaho.reporting.engine.classic.core.modules.output.table.html.StreamHtmlOutputProcessor) FileObject(org.apache.commons.vfs2.FileObject) StreamReportProcessor(org.pentaho.reporting.engine.classic.core.modules.output.table.base.StreamReportProcessor) AllItemsHtmlPrinter(org.pentaho.reporting.engine.classic.core.modules.output.table.html.AllItemsHtmlPrinter) HtmlPrinter(org.pentaho.reporting.engine.classic.core.modules.output.table.html.HtmlPrinter) VisibleForTesting(com.google.common.annotations.VisibleForTesting)

Example 3 with ReportParameterValues

use of org.pentaho.reporting.engine.classic.core.util.ReportParameterValues in project pentaho-platform by pentaho.

the class JFreeReportComponent method getJarDataFactory.

private PentahoTableDataFactory getJarDataFactory() throws Exception {
    PentahoTableDataFactory factory = null;
    JFreeReportAction jFreeReportAction = (JFreeReportAction) getActionDefinition();
    try {
        org.pentaho.actionsequence.dom.IActionResource actionResource = jFreeReportAction.getDataJar().getJar();
        if (actionResource != null) {
            DataSource dataSource = new ActivationHelper.PentahoStreamSourceWrapper(actionResource.getDataSource());
            InputStream in = dataSource.getInputStream();
            try {
                // not being able to read a single char is definitly a big boo ..
                if (in.read() == -1) {
                    // $NON-NLS-1$
                    throw new Exception(Messages.getInstance().getErrorString("JFreeReport.ERROR_0009_REPORT_JAR_UNREADABLE"));
                } else {
                    final ClassLoader loader = ReportUtils.createJarLoader(getSession(), getResource(actionResource.getName()));
                    if (loader == null) {
                        throw new Exception(Messages.getInstance().getString(// $NON-NLS-1$
                        "JFreeReportDataComponent.ERROR_0035_COULD_NOT_CREATE_CLASSLOADER"));
                    } else if (!isDefinedInput(AbstractJFreeReportComponent.DATACOMPONENT_CLASSLOCINPUT)) {
                        throw new Exception(Messages.getInstance().getErrorString(// $NON-NLS-1$
                        "JFreeReport.ERROR_0012_CLASS_LOCATION_MISSING"));
                    } else {
                        // Get input parameters, and set them as properties in the report
                        // object.
                        final ReportParameterValues reportProperties = new ReportParameterValues();
                        IActionInput[] actionInputs = jFreeReportAction.getInputs();
                        for (IActionInput element : actionInputs) {
                            final Object paramValue = element.getValue();
                            if (paramValue instanceof Object[]) {
                                final Object[] values = (Object[]) paramValue;
                                final StringBuffer valuesBuffer = new StringBuffer();
                                // TODO support non-string items
                                for (int z = 0; z < values.length; z++) {
                                    if (z == 0) {
                                        valuesBuffer.append(values[z].toString());
                                    } else {
                                        valuesBuffer.append(',').append(values[z].toString());
                                    }
                                }
                                reportProperties.put(element.getName(), valuesBuffer.toString());
                            } else {
                                reportProperties.put(element.getName(), paramValue);
                            }
                        }
                        final DataFactory dataFactory = new PentahoDataFactory(loader);
                        final TableModel model = dataFactory.queryData(jFreeReportAction.getDataJar().getDataClass(), new ParameterDataRow(reportProperties));
                        factory = new PentahoTableDataFactory(AbstractJFreeReportComponent.DATACOMPONENT_DEFAULTINPUT, model);
                    }
                }
            } catch (Exception e) {
                // $NON-NLS-1$
                throw new Exception(Messages.getInstance().getErrorString("JFreeReport.ERROR_0009_REPORT_JAR_UNREADABLE"));
            }
        }
    } catch (FileNotFoundException e1) {
        throw new Exception(Messages.getInstance().getErrorString("JFreeReport.ERROR_0010_REPORT_JAR_MISSING", // $NON-NLS-1$
        jFreeReportAction.getDataJar().toString()));
    }
    return factory;
}
Also used : JFreeReportAction(org.pentaho.actionsequence.dom.actions.JFreeReportAction) IActionResource(org.pentaho.actionsequence.dom.IActionResource) PentahoTableDataFactory(org.pentaho.platform.plugin.action.jfreereport.helper.PentahoTableDataFactory) ByteArrayInputStream(java.io.ByteArrayInputStream) InputStream(java.io.InputStream) FileNotFoundException(java.io.FileNotFoundException) PentahoDataFactory(org.pentaho.platform.plugin.action.jfreereport.helper.PentahoDataFactory) PentahoTableDataFactory(org.pentaho.platform.plugin.action.jfreereport.helper.PentahoTableDataFactory) DataFactory(org.pentaho.reporting.engine.classic.core.DataFactory) ParameterDataRow(org.pentaho.reporting.engine.classic.core.ParameterDataRow) PrintException(javax.print.PrintException) FileNotFoundException(java.io.FileNotFoundException) UnsupportedEncodingException(java.io.UnsupportedEncodingException) ContentIOException(org.pentaho.reporting.libraries.repository.ContentIOException) ReportProcessingException(org.pentaho.reporting.engine.classic.core.ReportProcessingException) ResourceException(org.pentaho.reporting.libraries.resourceloader.ResourceException) IOException(java.io.IOException) DataSource(javax.activation.DataSource) IActionInput(org.pentaho.actionsequence.dom.IActionInput) PentahoDataFactory(org.pentaho.platform.plugin.action.jfreereport.helper.PentahoDataFactory) TableModel(javax.swing.table.TableModel) PentahoTableModel(org.pentaho.platform.plugin.action.jfreereport.helper.PentahoTableModel) ReportParameterValues(org.pentaho.reporting.engine.classic.core.util.ReportParameterValues)

Example 4 with ReportParameterValues

use of org.pentaho.reporting.engine.classic.core.util.ReportParameterValues in project pentaho-platform by pentaho.

the class JFreeReportDataComponent method getJarDataFactory.

@SuppressWarnings("unused")
private PentahoTableDataFactory getJarDataFactory() throws Exception {
    PentahoTableDataFactory factory = null;
    if (isDefinedResource(AbstractJFreeReportComponent.DATACOMPONENT_JARINPUT)) {
        final IActionSequenceResource resource = getResource(AbstractJFreeReportComponent.DATACOMPONENT_JARINPUT);
        final InputStream in;
        try {
            in = resource.getInputStream(RepositoryFilePermission.READ, LocaleHelper.getLocale());
            try {
                // not being able to read a single char is definitly a big boo ..
                if (in.read() == -1) {
                    // $NON-NLS-1$
                    throw new Exception(Messages.getInstance().getErrorString("JFreeReport.ERROR_0009_REPORT_JAR_UNREADABLE"));
                } else {
                    final ClassLoader loader = ReportUtils.createJarLoader(getSession(), resource);
                    if (loader == null) {
                        throw new Exception(Messages.getInstance().getString(// $NON-NLS-1$
                        "JFreeReportDataComponent.ERROR_0035_COULD_NOT_CREATE_CLASSLOADER"));
                    } else if (!isDefinedInput(AbstractJFreeReportComponent.DATACOMPONENT_CLASSLOCINPUT)) {
                        throw new Exception(Messages.getInstance().getErrorString(// $NON-NLS-1$
                        "JFreeReport.ERROR_0012_CLASS_LOCATION_MISSING"));
                    } else {
                        final String classLocation = getInputStringValue(AbstractJFreeReportComponent.DATACOMPONENT_CLASSLOCINPUT);
                        // Get input parameters, and set them as properties in the report
                        // object.
                        final ReportParameterValues reportProperties = new ReportParameterValues();
                        final Set paramNames = getInputNames();
                        final Iterator it = paramNames.iterator();
                        while (it.hasNext()) {
                            final String paramName = (String) it.next();
                            final Object paramValue = getInputValue(paramName);
                            if (paramValue instanceof Object[]) {
                                final Object[] values = (Object[]) paramValue;
                                final StringBuffer valuesBuffer = new StringBuffer();
                                // TODO support non-string items
                                for (int i = 0; i < values.length; i++) {
                                    if (i == 0) {
                                        valuesBuffer.append(values[i].toString());
                                    } else {
                                        valuesBuffer.append(',').append(values[i].toString());
                                    }
                                }
                                reportProperties.put(paramName, valuesBuffer.toString());
                            } else {
                                reportProperties.put(paramName, paramValue);
                            }
                        }
                        final DataFactory dataFactory = new PentahoDataFactory(loader);
                        final TableModel model = dataFactory.queryData(classLocation, new ParameterDataRow(reportProperties));
                        factory = new PentahoTableDataFactory(AbstractJFreeReportComponent.DATACOMPONENT_DEFAULTINPUT, model);
                    }
                }
            } catch (Exception e) {
                // $NON-NLS-1$
                throw new Exception(Messages.getInstance().getErrorString("JFreeReport.ERROR_0009_REPORT_JAR_UNREADABLE"));
            }
        } catch (FileNotFoundException e1) {
            throw new Exception(Messages.getInstance().getErrorString("JFreeReport.ERROR_0010_REPORT_JAR_MISSING", // $NON-NLS-1$
            resource.getAddress()));
        }
    }
    return factory;
}
Also used : Set(java.util.Set) IPentahoResultSet(org.pentaho.commons.connection.IPentahoResultSet) PentahoTableDataFactory(org.pentaho.platform.plugin.action.jfreereport.helper.PentahoTableDataFactory) InputStream(java.io.InputStream) FileNotFoundException(java.io.FileNotFoundException) PentahoTableDataFactory(org.pentaho.platform.plugin.action.jfreereport.helper.PentahoTableDataFactory) DataFactory(org.pentaho.reporting.engine.classic.core.DataFactory) PentahoDataFactory(org.pentaho.platform.plugin.action.jfreereport.helper.PentahoDataFactory) ParameterDataRow(org.pentaho.reporting.engine.classic.core.ParameterDataRow) FileNotFoundException(java.io.FileNotFoundException) IActionSequenceResource(org.pentaho.platform.api.engine.IActionSequenceResource) Iterator(java.util.Iterator) PentahoDataFactory(org.pentaho.platform.plugin.action.jfreereport.helper.PentahoDataFactory) PentahoTableModel(org.pentaho.platform.plugin.action.jfreereport.helper.PentahoTableModel) TableModel(javax.swing.table.TableModel) ReportParameterValues(org.pentaho.reporting.engine.classic.core.util.ReportParameterValues)

Aggregations

ReportParameterValues (org.pentaho.reporting.engine.classic.core.util.ReportParameterValues)4 FileNotFoundException (java.io.FileNotFoundException)2 InputStream (java.io.InputStream)2 TableModel (javax.swing.table.TableModel)2 PentahoDataFactory (org.pentaho.platform.plugin.action.jfreereport.helper.PentahoDataFactory)2 PentahoTableDataFactory (org.pentaho.platform.plugin.action.jfreereport.helper.PentahoTableDataFactory)2 PentahoTableModel (org.pentaho.platform.plugin.action.jfreereport.helper.PentahoTableModel)2 DataFactory (org.pentaho.reporting.engine.classic.core.DataFactory)2 ParameterDataRow (org.pentaho.reporting.engine.classic.core.ParameterDataRow)2 ReportParameterDefinition (org.pentaho.reporting.engine.classic.core.parameters.ReportParameterDefinition)2 ResourceException (org.pentaho.reporting.libraries.resourceloader.ResourceException)2 VisibleForTesting (com.google.common.annotations.VisibleForTesting)1 ByteArrayInputStream (java.io.ByteArrayInputStream)1 IOException (java.io.IOException)1 OutputStream (java.io.OutputStream)1 UnsupportedEncodingException (java.io.UnsupportedEncodingException)1 BigDecimal (java.math.BigDecimal)1 MalformedURLException (java.net.MalformedURLException)1 Path (java.nio.file.Path)1 Iterator (java.util.Iterator)1