Report formats

Introduction

A format defines a way of how the report output should be rendered. A format is defined by creating an XML file. A format consists of a pointer to a format type, which is the actual implementation of the output rendering, and configuration information for that format type.

To make the format available to the user, you should link to it from the format index file.

Built-in report formats

A number of built-in report formats are available. In the format index file, these can be addressed by using "xrp" as special value in the dir attribute.

The following table lists these format types:

dir

name

xrp

html

xrp

xml

xrp

pdf

xrp

excel

xrp

dynchart

Defining formats

Location of the format files

Format files should be put in:

<conf.home>/reports/customformats/<report-definition-id>/<dir>/<name>.xml

The <dir> and <name> in the above path can be freely choosen.

Content of the format files

Basic syntax

The minimal content of a format file is:

<?xml version="1.0"?>
<f:format xmlns:f="http://outerx.org/xreporter/format/1.0">
  <f:info>
    <f:formattype>html</f:formattype>
    <f:name>HTML</f:name>
  </f:info>
</f:format>

The <f:formattype> specifies a format type, thus the implementation behind this format.

The <f:name> is the label to be shown to the user.

The full official syntax of the file is this:

<?xml version="1.0"?>
<f:format xmlns:f="http://outerx.org/xreporter/format/1.0">
  <f:info>
    <f:formattype outputPipe="OutputPipe">html</f:formattype>
    <f:name>HTML</f:name>
    <f:chunking enabled="true" size="50"/>
  </f:info>
</f:format>

The outputPipe attribute on f:formattype names the pipeline of the formattype that should be called. The default is "OutputPipe".

The f:chunking element configures the chunking options.

More

Next to the f:info element, the format file can contain arbitrary other content which can be used to influence / configure the formattype implementation. The available configuration depends on the format type, see the format type config reference.

Using formats

Formats can be put into use by linking to them from a format index file.

Comments (0)