Generating HTML Reports Automatically

You can use tokens in the command line of a view to automatically supply the view details and to configure the view to be displayed. You can also use command line options to suppress the Viewer's user interface. This enables you to create a scheduled job that generates an HTML report from the Database Viewer. To do this, you must specify:

    A Template HTML file.

    An output filename for the exported HTML.

    The /NOGUI command switch to hide the interface.

To customize a database view to auto-save the data in HTML format:

1    Right-click a view in the Console and click Customize to open the Customize Command Launch dialog.

2    Select the Command Launch tab.

3    In the Command Line field, enter the /NOGUI parameter to suppress user interface of the Database Viewer. For example:

$DSNACCESS /NOGUI "title=Network Summary" "SQL=NetworkSummary.sql" TEMPLATE=MyTemplate.html" "REPORT=NetStats.html"

where:

$DSNACCESS supplies the DSN, Username and Password used to access the current Site database from the Console.

SQL=NetworkSummary.sql specifies the SQL expression to select data from the database.

TEMPLATE=MyTemplate.html specifies HTML template that controls the layout of the HTML file.

REPORT=NetStats.html specifies the name of the output file.

4    Click OK to save your changes and close the dialog.

Related Topics

Using Tokens in the Database Viewer Command Line