Using HTML Templates

You can base exported HTML reports on your own template HTML files. This enables you to add your own logos, and in-house formatting.

Available Tokens

The following tokens can be used in a HTML template file:

Token Name

Description

$TITLE$

Report Title

$DATE$

Date on which the report was generated

$TABLEHEADS$

Header columns of the table

$TABLEDATA$

Table data

Incorporating Tokens in a HTML File

When exporting an HTML Report, the Database Viewer automatically adds HTML code for table rows (<TR> tags) and table cells (<TD> tags) to preserve the tabular layout. This means that your $TABLEHEADS$ and $TABLEDATA$ tokens must be enclosed inside a HTML table. For example:

<TABLE> add your tokens here </TABLE>

You should keep this in mind when creating HTML templates, as the Database Viewer does not insert <TABLE> tags.

Notes

    Table formatting can be overwritten by colors specified in the Database Viewer's HTML Report dialog.

    To increase control over the layout of your reports, add a style sheet section to your template page (inside the <HEAD> tag of your HTML file).

    To reformat an HTML report after it has been generated by the Database Viewer, use an HTML authoring tool.

    Template files can be referenced in the DBVIEWER command prompt, along with other parameters, to automatically generate HTML reports based on a specified SQL data view. For more information, see Starting the Database Viewer from a Command Line.