INPUT_TYPE

Overview

This abstract class defines constants for specifying input types in the JasperReports plugin for Servoy, supporting formats like XML, CSV, custom datasources, and JDBC. These constants integrate with the plugins.jasperReports.runReport method to streamline report generation, enabling dynamic data handling and flexible compatibility with various data sources.

Constants Summarized

Constants Detailed

CSV

Type String

Sample

var $parameters = null; //...
var $repfile = 'report.jrxml';
var $xmlDataCombined = plugins.file.readTXTFile('/path/to/datasource.xml');
var $locale = 'en';
plugins.jasperReports.runReport(
			plugins.jasperReports.INPUT_TYPE.XML,
			$xmlDataCombined,
			'/node/to/iterate/on',
			$repfile,
			null,
	    	OUTPUT_FORMAT.VIEW,
			$parameters,
			null)

DB

Type String

Sample

var $parameters = null; //...
var $repfile = 'report.jrxml';
var $xmlDataCombined = plugins.file.readTXTFile('/path/to/datasource.xml');
var $locale = 'en';
plugins.jasperReports.runReport(
			plugins.jasperReports.INPUT_TYPE.XML,
			$xmlDataCombined,
			'/node/to/iterate/on',
			$repfile,
			null,
	    	OUTPUT_FORMAT.VIEW,
			$parameters,
			null)

JRD

Type String

Sample

var $parameters = null; //...
var $repfile = 'report.jrxml';
var $xmlDataCombined = plugins.file.readTXTFile('/path/to/datasource.xml');
var $locale = 'en';
plugins.jasperReports.runReport(
			plugins.jasperReports.INPUT_TYPE.XML,
			$xmlDataCombined,
			'/node/to/iterate/on',
			$repfile,
			null,
	    	OUTPUT_FORMAT.VIEW,
			$parameters,
			null)

XML

Type String

Sample

var $parameters = null; //...
var $repfile = 'report.jrxml';
var $xmlDataCombined = plugins.file.readTXTFile('/path/to/datasource.xml');
var $locale = 'en';
plugins.jasperReports.runReport(
			plugins.jasperReports.INPUT_TYPE.XML,
			$xmlDataCombined,
			'/node/to/iterate/on',
			$repfile,
			null,
	    	OUTPUT_FORMAT.VIEW,
			$parameters,
			null)

Last updated