Scenario: Generating a report against a .jrxml template - 6.1

Talend Components Reference Guide

EnrichVersion
6.1
EnrichProdName
Talend Big Data
Talend Big Data Platform
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for Big Data
Talend Open Studio for Data Integration
Talend Open Studio for Data Quality
Talend Open Studio for ESB
Talend Open Studio for MDM
Talend Real-Time Big Data Platform
task
Data Governance
Data Quality and Preparation
Design and Development
EnrichPlatform
Talend Studio

The following Job reads data from a .csv file and creates a .pdf report based on an existing .jrxml report template. Note that the template file should be created via Jaspersoft's iReport based on a file that shares the same schema with the source .csv file of this job.

Setting up the Job

  1. Drag and drop the following components from the Palette to the workspace: tFileInputDelimited and tJasperOutput.

  2. Connect tFileInputDelimited and tJasperOutput using a Row link.

Configuring the input component

  1. Double-click the tFileInputDelimited component to display its Basic settings view.

  2. Select Built-In from the Property Type drop-down list.

    Note

    You can select Repository from the Property Type drop-down list to fill in the relevant fields automatically if the relevant metadata has been stored locally in the Repository. For more information about Metadata, see the Talend Studio User Guide.

  3. Fill in the File name/Stream field to give the path and name of the source file, e.g. "C:/Documents and Settings/Andy ZHANG/nom.csv".

  4. Keep the default settings for the Row Separator and Field Separator fields. You can also change them as needed.

  5. Set 1 in the Header field and 0 in the Footer field. Leave the Limit field empty. You can also change them as needed.

  6. Select Built-In from the Schema drop-down list and click Edit schema to define the data structure of the input file. In this case, the input file has 2 columns: Nom and Prenom.

Configuring the output component

  1. Double-click tJasperOutput to display its Basic settings view.

  2. Enter the full path of the report template file created via Jaspersoft's iReport in the Jrxml file field. You can click the three-dot button to browse.

    Note

    The schema of the file, which is used to create a .jrxml template file via iReport, should be the same as that of the source file that is used to create the report.

  3. Enter the path for the temporary files generated during the job execution in the Temp path field. You can click the three-dot button to browse.

  4. Enter the path for the final report file generated during the job execution in the Destination path field. You can click the three-dot button to browse.

  5. Enter the name for the final report file generated during the job execution in the File name/Stream field.

  6. Select the format for the final report file generated during the job execution in the Report type field.

  7. Click Sync columns to retrieve the schema from the previous component.

  8. Enter the path of execution file of Jaspersoft's iReport in the iReport field, e.g. replacing __IREPORT_PATH__\ with E:\Program Files\Jaspersoft\iReport-4.1.1\bin\. You can click the Launch button to run iReport.

    Note

    This step is not mandatory. Yet, this helps you conveniently access the iReport software for relevant operations, e.g. creating a report template, etc.

Job execution

  1. Press CTRL+S to save your Job.

  2. Press F6 to execute it.

    You can find the file out.pdf in the folder specified in the Destination path field.