Customizing Reports
  • 06 Jan 2025
  • 3 Minutes à lire
  • Sombre
    Lumière
  • PDF

Customizing Reports

  • Sombre
    Lumière
  • PDF

The content is currently unavailable in French. You are viewing the default English version.
Résumé de l’article

You can create customized reports to include your own logo, header, and footer design. Using eXtensible Stylesheet Language Transformations (XSLT) you can even convert the raw XML report data to different kinds of output formats, including HTML and CSV.

OneSpan Authentication Server includes default report templates for the standard reports included to create PDF and HTML reports. You can create custom report templates for standard reports and custom reports created yourself.

To customize a report, you need to do the following:

  1. Create a report template using one of the following formats:

    • XML (for PDF reports)
    • XSLT (for custom output formats, e.g. HTML and CSV)
  2. Upload and link the custom report template to a report via the Administration Web Interface.

    The custom report template will be linked with a specific report. It can also be linked with other reports. If you delete a custom template, the associated reports will revert to the default report template.

Whenever you create a report afterward, you can select a report template to be used for the final report output (see Figure: Report data flow).

Report data flow

Figure:  Report data flow

Creating a custom report template for PDF reports

A custom PDF report template defines the layout of a PDF report in XML format.

PDF report template

<VASCO>
  <PDFTemplate>
    <content>
      <image src="C:\pictures\logo.png"/>
      <header align="left">My left-aligned header</header>
      <footer align="right">My right-aligned footer</footer>
    </content>
    <layout>
      <orientation>Portrait</orientation>
      <paper-size>A4</paper-size>
    </layout>
  </PDFTemplate>
</VASCO>

The src attribute of the image element specifies the location of a header image, and should be an absolute file path.

The align attribute defines the alignment of the headers and footers. Possible values:

  • left
  • center
  • right

The orientation element defines the PDF report page orientation. Possible values:

  • Portrait
  • Landscape

The paper-size element defines the size of the PDF report when printed. For possible values, see Table: Possible paper-size element values.

Table:  Possible paper-size element values
ValuePaper size (in pts)
A02380x3368
A11684x2380
A21190x1684
A3842x1190
A4595x842
A5421x595
A6297x421
Letter612x792
Broadsheet1296x1584
Ledger1224x792
Tabloid792x1224
Executive522x756

Creating a custom report template for HTML reports

To customize reports for HTML output, you need to create an XSLT template. The structure of an XSLT template is considerably more complex than XML. To view the formatting structure, refer to the default XSLT files included with OneSpan Authentication Server. When you have created a custom report template for HTML reports, link it to the respective reports (see Linking a custom report template to reports).

Most of the standard reports have a corresponding default XSLT template to produce HTML output. You can view the corresponding XSLT template of a report (see Inspecting the templates currently linked to a report).

Creating a custom report template for CSV reports

You can use XSLT templates also to create CSV reports. When you have created a custom report template for CSV reports (see example), link it to the respective reports (see Linking a custom report template to reports).

The following is an example of an XSLT template used to create a CSV report:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output omit-xml-declaration="yes" indent="yes" encoding="utf-8" method="text"/>
  <xsl:template match="/">
    <xsl:text>Domain</xsl:text><xsl:text>;</xsl:text>
    <xsl:text>Orgunit</xsl:text><xsl:text>;</xsl:text>
    <xsl:text>Serial</xsl:text><xsl:text>;</xsl:text>
    <xsl:text>Digipass Type</xsl:text><xsl:text>;</xsl:text>
    <xsl:text>Applications</xsl:text><xsl:text>
</xsl:text>
    <xsl:for-each select="/report/domain">
      <xsl:for-each select="/report/domain/orgunit">
        <xsl:for-each select="/report/domain/orgunit/query/data">
          <xsl:value-of select="domain/@value"/><xsl:text>;</xsl:text>
          <xsl:value-of select="orgunit/@value"/><xsl:text>;</xsl:text>
          <xsl:value-of select="serial_no/@value"/><xsl:text>;</xsl:text>
          <xsl:value-of select="dp_type/@value"/><xsl:text>;</xsl:text>
          <xsl:value-of select="appl_names/@value"/><xsl:text>
</xsl:text>
        </xsl:for-each>
      </xsl:for-each>
    </xsl:for-each>
  </xsl:template>
</xsl:stylesheet>

If you link this XSLT template to the Unassigned DIGIPASS List report and create a report based on it, you will get a result like the following:

Domain;Orgunit;Serial;Digipass Type;Applications

master;;0055555555;DP270;APPL1,APPL2,APPL3

master;;0091234599;DPGO7;APPLI 1

master;;VES0000001;MOB30;AUTHENTICATE

master;;VES0000002;MOB30;AUTHENTICATE

master;;VES0000003;MOB30;AUTHENTICATE

Linking a custom report template to reports

Once you have created a custom report template, you can link it to a report.

To link a custom template to a report

  1. Log on to the Administration Web Interface.
  2. Select REPORTS > List. A full list of available reports appears.
  3. Click the report name of the desired report in the list.
  1. Switch to the Template tab.
  2. Click EDIT.
  3. Click Browse and locate the new template file.
  4. Type a template name and click UPLOAD.

    The new report template will be uploaded and associated with that report. The next time you create that report, you can select the custom report template to be used for the final report output.

Inspecting the templates currently linked to a report

You can view the corresponding XSLT template of a report.

To inspect the templates linked to a report

  1. Log on to the Administration Web Interface.
  2. Select REPORTS > List. A full list of available reports appears.
  3. Click the report name of the desired report in the list.
  1. Switch to the Template tab.
  2. Click the link of the desired report template to view.

    For most of the standard reports, you will have an HTML report template. Click HTML to open the XSLT template for the selected report.

    You cannot view the built-in default report templates for XML and PDF reports.


Cet article vous a-t-il été utile ?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.
ESC

Ozzy, facilitant la découverte de connaissances grâce à l’intelligence conversationnelle