# 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

| Type                                                                         | Name        | Summary |
| ---------------------------------------------------------------------------- | ----------- | ------- |
| [String](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/string) | [CSV](#csv) |         |
| [String](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/string) | [DB](#db)   |         |
| [String](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/string) | [JRD](#jrd) |         |
| [String](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/string) | [XML](#xml) |         |

## Constants Detailed

### CSV

**Type**\
[String](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/string)

**Sample**

```js
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](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/string)

**Sample**

```js
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](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/string)

**Sample**

```js
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](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/string)

**Sample**

```js
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)
```

***
