Tech News

Reports in Triaster Server 2011

Home

Report Exchange was introduced in Triaster Server 10, as a simple way of implementing custom reports. Making additional reports available was merely a matter of adding the new report definition file (an XSL transform) to the Report Exchange folder.

In Triaster Server 2011, the report definition files have changed, but are still stored in a single, dedicated folder: Triaster\TriasterServer2011\reports

Although a report is now defined by two files - an XSL transform to create the data, and an XML file to define the way in which the report data is displayed - creating custom reports has arguably become easier. A comparison of the old- and new-style XSLT files show the newer ones are significantly simpler. As with the previous system, the easiest way to create a new report is to take a copy of an existing one that most closely matches the one required, and change it to suit.

Report XSLT file

The old-style XSLTs created HTML output from Catalogue XML files. The new-style ones create XML files, and so don't include the extra HTML-generating code of the old, making their structure more straightforward to understand.

tech_1

Report XML file

The report XML file defines:

  • general information as viewed in the report listing on the Reports page.
  • the report layout - columns, captions, sort-order, etc.

General information

General report information is near the beginning of the file.

<name>Contents</name>
<description>This report shows all activities, maps and process owners.</description>
<category>1. General</category>
<version>1.1</version>
<lastModified>01/05/12</lastModified>
<pictureURL>icon_reports_contents.png</pictureURL>

It's this that defines how a report is listed on the main Reports page.

Transform file

This is the XSL transform, which, in association with the XML file, defines the report.

<transformFile>contents.xslt</transformFile>

Columns

Columns correspond to the columns of data as they are displayed in the report.

<column>
<fieldname>Name</fieldname>
<caption>Activity Name</caption>
<visibleindex>1</visibleindex>
<sortindex>-1</sortindex>
<groupindex>-1</groupindex>
<sortorder>0</sortorder>
<type>normal</type>
<displayformat></displayformat>
</column>

  • fieldname - relates to a field, defined later in the XML file
  • caption- column header caption
  • visibleindex - order in which columns are displayed (from 0 onwards)
  • sortindex - order in which columns are sorted (-1 for items not sorted; from 0 onwards for sorted items)
  • groupindex - order in which columns are grouped (-1 for items not grouped; from 0 onwards for grouped items)
  • sortorder - 0 - not sorted; 1 - ascending; 2 - descending

Any column requires a corresponding field.

Fields

The fields correspond to elements defined in the XSL transform file.

In the XSLT, you may have an element called 'Name', which, in the case of the Contents report, takes its value from an Activity's name:

<xsl:choose>
<xsl:when test="string-length(Name)>0" >
<xsl:element name="Name">
<xsl:value-of select="Name" />
</xsl:element>
</xsl:when>
</xsl:choose>

The element 'Name' will be defined as a field in the XML file.

<field>
<name>Name</name>
<datatype>xs:string</datatype>
</field>

More information

This has been an introduction to reports as used in Triaster Server 2011, which, in conjunction with the existing reports as examples, may help in constructing your own reports. Some more detailed hints are available in the article 'Reports in Triaster Server 2011' found at: http://knowledgebase.triaster.co.uk/help-for-library-administrators/triaster-server/reports-triaster-server-2011

Register to receive product release notifications

SIGN UP FOR CONNECTOR

Sign up for Connector
Industry best practice and knowledge in our ‘best of breed’ newsletter.
Published bi-annually.

Signup here