Report Bursting
Elixir Repertoire Server provides a solution that allows splitting of a rendered report based on the grouping to be sent to a specific printer or physical folder. One can configure the "rules" for splitting.
Configuring the Server for Report Bursting
Report bursting is specified in “\RepertoireServer\config\ERS2-Config.xml”. In this example, one defines two targets: a
PrintTarget? to direct the print job to a specific printer and a
SplitTarget?.
Defining a PrintTarget?
You can define a
PrintTarget? in the EREngine-config.xml as follows:
<ers:target name="printer-target-1">
<class="com.elixirtech.ers2.target.PrintTarget" description="">
<ers:property name="printer-name"></ers:property>
</ers:target>
Of course you can choose any name/description and enter any value for printer-name.
If you leave printer-name empty, or omit it altogether, then the default printer is used.
The printer name can be a UNC name for a network printer, ie \\server\printername,
where in this case we can define as <ers:property name="printer-name">\\elixir\Printer</ers:property>.
Note that you can override the printer-name dynamically when submitting your request
by changing the rendering property.
Because
PrintTarget? runs in the same JVM as ERS, it may not be suited for high volume
use. You can still use the
FileTarget? and run a separate spooler process to compare
performance.Of course this built-in
PrintTarget? will always be simplest to configure and
administer.
Defining a SplitTarget? (Glint format supported only)
The
SplitTarget? specifies how the report will be split based on the table of content (TOC) generated in the Glint output.
To enable this function, add a new target to the configuration:
<ers:target name="splitter" class="com.elixirtech.ers2.target.SplitTarget" description="">
<ers:property name="split">1</ers:property>
<ers:when test="first">
<ers:target-ref name="output1">
<ers:property name="filename">first.glint</ers:property>
</ers:target-ref>
</ers:when>
<ers:when test="sec(.*)">
<ers:target-ref name="output2">
<ers:property name="filename">${1}.glint</ers:property>
</ers:target-ref>
</ers:when>
<ers:when test=".*">
<ers:target-ref name="output1">
<ers:property name="filename">unhandled-
${0}.glint</ers:property>
</ers:target-ref>
</ers:when>
</ers:target>
When the
SplitTarget? receives the rendered glint file, it will open it and break it into four
chunks at the TOC positions. You will notice <ers:property
name="split">1</ers:property> indicates to break at the top level splits. You might
choose to break at any tree depth.
Next, the
SplitTarget? will look up the destination by comparing the TOC title with each
when test clause in sequence.
The first section "first" will match <ers:when test="first"> so the first chunk will
get sent to the target named "output1". The property for filename "first.glint" will
override any value set within target1.
The next section "second" will match <ers:when test="sec(.*)"> because matching
supports full regular expression syntax. In this case, "sec" followed by any characters. This
chunk will go to the output2 target, with the filename "ond.glint" - Regular expression
substitution being allowed here - ${1} is the content that matches the first (..).
The next two sections "third" and "fourth" don't match either of the first two targets,
so they match the "catch all" target <ers:when test=".*"> (you can leave the test attribute
off, if you like, as well). These two sections are therefore sent to output1 with the
filenames "unhandled-third.glint" and "unhandled-fourth.glint" - the ${0} is standard
RegEx? substitution for the entire matching string.
Create report to support Report Bursting
Creating a report to support Report Bursting requires setting a Table of Contents (TOC) data
value either at Section Header or Group Header. This value will used by the
SplitTarget? to
determine how the whole section will be handled as described above.
Here is one example using Section Header TOC:
1. Create a report template with four Sections.
2. Put an indicate label on each of the four pages, eg “This is page 1”.
3. Make sure the Render Sequence table includes all four.
4. Render to check that you can see all four Sections.
5. Go to the Section Header of each Section and choose Table of Contents from the
property sheet.
a. For Section 1, enter a literal string: first
b. For Section 2, enter a literal string: second
c. Do the same for Section 3 and 4.
d. In each case make sure the TOC Enabled checkbox is ticked.
You can now trigger the report generation by using creating a render job in Repertoire Server (please refer to user manual) to render this report with the target set to be “splitter”. You will then check that four files are generated into the respective folders.
Note that the glint output can also be sent for direct printing using a
PrintTarget? in combination with the
SplitTarget? to achieve distributed printing to various target printers.
--
ShihHor? - 10 Jun 2007