- 17 Jan 2025
- 3 Minutes à lire
- SombreLumière
- PDF
Customizing Reports
- Mis à jour le 17 Jan 2025
- 3 Minutes à lire
- SombreLumière
- PDF
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:
Create a report template using one of the following formats:
- XML (for PDF reports)
- XSLT (for custom output formats, e.g. HTML and CSV)
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).
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.
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
- Log on to the OneSpan Authentication Server Administration Web Interface (see Accessing OneSpan Authentication Server Appliance Configuration Tool and OneSpan Authentication Server Administration Web Interface).
- Select REPORTS > List. A full list of available reports appears.
- Click the report name of the desired report in the list.
- Switch to the Template tab.
- Click EDIT.
- Click Browse and locate the new template file.
- 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
- Log on to the OneSpan Authentication Server Administration Web Interface (see Accessing OneSpan Authentication Server Appliance Configuration Tool and OneSpan Authentication Server Administration Web Interface).
- Select REPORTS > List. A full list of available reports appears.
- Click the report name of the desired report in the list.
- Switch to the Template tab.
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.