This component is closely related to Jaspersoft’s report designer — iReport. It reads
and processes data from an input flow to create a report against a .jrxml report
template defined via iReport.
Component family |
Business Intelligence/Jasper |
|
Function |
Reads and processes data from an input flow to create a report |
|
Purpose |
This component allows you to use Jaspersoft’s iReport to create a |
|
Basic settings |
Jrxml file |
Report template file created via iReport. |
|
Temp path |
Path of temporary files. |
|
Destination path |
Path of the final report file. |
|
File name/Stream |
Name of the final report. |
|
Report type |
File type of the final report. |
Schema and Edit |
A schema is a row description. It defines the number of fields to be processed and passed on Since version 5.6, both the Built-In mode and the Repository mode are Click Edit schema to make changes to the schema. If the
|
|
|
|
Built-in: The schema is created |
|
|
Repository: The schema already |
|
Sync columns |
Click to synchronize the output file schema with the input file |
|
iReport |
Edit the command to provide the path of iReport’s execution file, |
|
Launch |
Click to run iReport. |
Advanced settings |
tStatCatcher Statistics |
Select this check box to collect log data at the component |
Specify Locale |
Select this check box to choose a locale from the Report Locale list. NoteThe first line of the Report |
|
Encoding |
Select an encoding mode from this list. You can select Custom from the list to enter an encoding |
|
Global Variables |
NB_LINE: the number of rows read by an input component or ERROR_MESSAGE: the error message generated by the A Flow variable functions during the execution of a component while an After variable To fill up a field or expression with a variable, press Ctrl + For further information about variables, see Talend Studio |
|
Usage |
This component is closely related to Jaspersoft’s report designer |
|
Limitation |
n/a |
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.
-
Drag and drop the following components from the Palette to the workspace: tFileInputDelimited and tJasperOutput.
-
Connect tFileInputDelimited and
tJasperOutput using a Row link.
-
Double-click the tFileInputDelimited
component to display its Basic settings
view. -
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. -
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”. -
Keep the default settings for the Row
Separator and Field
Separator fields. You can also change them as needed. -
Set 1 in the Header field and 0 in the
Footer field. Leave the Limit field empty. You can also change them as
needed. -
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.
-
Double-click tJasperOutput to display its
Basic settings view. -
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. -
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. -
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. -
Enter the name for the final report file generated during the job
execution in the File name/Stream field. -
Select the format for the final report file generated during the job
execution in the Report type field. -
Click Sync columns to retrieve the
schema from the previous component. -
Enter the path of execution file of Jaspersoft’s iReport in the iReport field, e.g. replacing __IREPORT_PATH__ with E:Program FilesJaspersoftiReport-4.1.1in. 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.