This example leads you step by steps through the process of creating
an individual report template in the DocBook format. It will also be helpfull
to look through the examples if you want to create a report in another format
as there are only minor differences. A list of differences can be found
here.
Also note the Tutorial: Creating individual
Report Templates
The following example header describes the appearance of a header for a report templates:
################### TEMPLATE HEADER #####################
##targetType="docbook"
##templateEncoding="Cp1252"
##targetEncoding="UTF-8"
###########################################################
<?xml version="1.0" encoding="UTF-8"?>
The parameter targetType identifies the report
template as a template for DocBooks. "Cp1252" will be used as character
encoding (parameter templateEncoding). The
targetEncoding for DocBooks has to be "UTF-8".
The XML Header can be found below the template header (as required for DocBooks).
Back...
The following XML snippet shows the most common elements used by the ARCWAY Cockpit report generation in a simple example.
A report template that contains a header and this DocBook block can already
be used to generate a report. Test this first draft as described
here.
Back...
The following example extends the DocBook example with some velocity directives:
A report template that contains a header and this
DocBook block with velocity directives can already be used to generate a
report. Test this first draft as described
here.
Back...
The following example changes and extends the velocity example with dynamically inserted Cockpit data:
A report template that contains a header and this
DocBook block with velocity directives and Cockpit
data can be used to generate a complete report. Add the
ARCWAY format template to your project and test this
complete draft as described
here.
Back...
Change the example above as described here to create a report template for other formats.
Use the following header when creating the report template with a
common Windows text editor and the generated report is supposed to be
a XML document, but not a DocBook:
################### TEMPLATE HEADER #####################
##targetType="xml"
##templateEncoding="Cp1252"
##targetEncoding="UTF-8"
###########################################################
<?xml version="1.0" encoding="UTF-8"?>
The parameter targetType identifies the report
template as a template for XML documents. "Cp1252" will be used as character
encoding (parameter templateEncoding). The
targetEncoding for XMl files has to be "UTF-8".
The XML Header can be found below the template header (as required for XML files).
Use the following header when creating the report template with a
common Windows text editor and the generated report is supposed to be
a CSV document:
################### TEMPLATE HEADER #####################
##targetType="csv"
##templateEncoding="Cp1252"
##targetEncoding="Cp1252"
###########################################################
The parameter targetType identifies the report
template as a template for CSV documents. "Cp1252" will be used as character
encoding (parameter templateEncoding) and as the
targetEncoding for the generated CSV file.
Zurück...
For a report template for XML documents simply change the header of the report template as described in the section above (Example Header (other Formats))
Have a look the following instructions to created a report template for csv documents: