Description
BIRT Ant Task can be used to run and render BIRT reports.
Depending on BIRT version in use, it can render reports to several output formats like HTML, PDF, DOC, PPT, XLS or POSTSCRIPT. HTML report can be generated as 'reportlet' so the result can be then simply integrated into another HTML page or site.
In addition it provides also possibility to specify report parameters, localization and HTML encoding.
Parameters
| Attribute |
Type |
Description |
Required |
| mode |
ModeEnum
|
Report generation mode. The value should be one of RUN, RENDER, RUNRENDER.
|
Yes. |
| format |
String
|
Target format of the rendered report. The value should be one of HTML, PDF, DOC, PPT, XLS, POSTSCRIPT (for BIRT 2.3) or value associated with additional emitter.
Applicable for RENDER and RUNRENDER modes only.
|
No. Default value is HTML.
|
| outputdir |
String/Path
|
Path to output directory for reports. In a fact the outputDirectory is root for output, because the generator copies structures of an input. It means that if the input is structured into several subdirectories, the outputDirectory is root and the same structure of directories is created for generated reports. See examples.
|
No. By default the report output is generated into same folder as report definition.
|
| birthome |
String/Path |
Absolute path to the BIRT Runtime installation folder. Overrides BIRT_HOME environment variable if set.
|
No if BIRT_HOME environment variable is defined.
|
| encoding |
String
|
The output encoding.
Applicable for HTML format in RENDER and RUNRENDER modes only.
|
No. Default is UTF-8.
|
| htmlreportlet |
Boolean
|
Marks that the HTML output will be embeddable directly into another HTML page (output does not contain <html>, <head> and <body> tags).
Applicable for HTML format in RENDER and RUNRENDER modes only.
|
No. Default value is false.
|
| locale |
String
|
The output locale.
Applicable for RUN and RUNRENDER modes only.
|
No. Default value is en.
|
| page |
Integer
|
Page number to be rendred.
Applicable for RENDER mode only.
|
No. By default all pages are rendered.
|
| parameterfile |
String/Path
|
Path to property file which containing default values of the parameters.
NOTE: Parameters explicitly defined as task attributes or child elements overrides values from parameter file.
|
No.
|
Parameters Specified as Nested Elements
input
Mandatory task's input nested element is path-like structure to specify reports to be generated.
param
Element param can be used to pass parameter to the report generation processing. There can be zero, one or more param elements. Element param has two attributes as defined in following table.
| Attribute |
Type |
Description |
Required |
| name |
String
|
Name of the parameter to be passed. |
Yes. |
| value |
String
|
Value of the parameter to be passed. |
Yes. |
Examples
<birtReport mode="run">
<input>
<filelist dir="${basedir}/src/reports">
<file name="dashboards/scrumTeam1.rptdesign" />
<file name="dashboards/scrumTeam2.rptdesign" />
<file name="release_notes.rptdesign" />
</filelist>
</input>
<param name="last_version" value="2.3-RC3" />
</birtReport>
|
|
|
|
|