User guide
16-24 ExtremeWare EPICenter Software Installation and User Guide
Dynamic Reports
Adding a User-Defined Report to the Reports Menu
To add a new user-defined report to the report menu, simply place the HTML file into the
<epicenter_install_dir>/user/reports/html/userdefined directory.TheEPICenter
server automatically creates a link on the Reports menu for files in the userdefined
directory. It will usethe report file names asthe report names. They will appear below the
heading User Defined Reports at the bottom of the left-hand panel of the Reports page.
The file names must conform to two restrictions:
• They must use
.html as the extension. .htm is not supported.
• The file name may not contain spaces.
If you want to create a set of hierarchical reports, you can create a subdirectory under the
userdefined directory tocontain subordinate HTMLfilesthat shouldnot have a directlink
from the Reports menu.
If you put files into the
userdefined directory that were originally in the
<epicenter_install_dir>/user/reports/html directory, be sure you also copy
the report stylesheet (
reportstylesheet.css) into the userdefined directory.
Debugging
The EPICenter software provides a mechanism that you can use to debug any Tcl
procedures you write.
Debugging is done in the Tcl shell thatis shipped with the EPICenter software.You do not
need to view your reports through a browser to debug them.
To debug Tcl code you have created or modified, follow these steps:
1 Run
<epicenter_install_dir>/tcl/bin/tclsh83d.exe to invoke the Tcl shell.
2 Change to the
<epicenter_install_dir>/user/reports/tcl directory.
3 Execute the command
source extrdebug.tcl within the Tcl shell.
This sets up the Tcl packages required, and also establish a connection with the
database using the EPICenter software external API.
4 Now, run thecommand
extr::ExecuteExtrCommand which parses your Tcl code and
displays the resulting HTML file.
ExecuteExtrCommand takes the following arguments:
— The name of the HTML file that will generate the report.