I want to change the following aspects of a report:
- Header image
- Contents of header / footer
- Order of report elements
- Graph sizes
How can I do this?
I want to change the following aspects of a report:
How can I do this?
how-to modify-templates prtg reporting template
Created on Feb 2, 2010 2:17:32 PM by
Roland Grau [Paessler Support]
(343)
●3
●2
Last change on Mar 15, 2010 4:00:18 PM by
Daniel Zobel [Paessler Support]
(21,383)
●3
●3
This article applies to PRTG Network Monitor 7, 8, and 9
PRTG Network Monitor includes a powerful reporting engine that allows to generate a variety of reports in order to review your network's data the way you need. Every other day customers ask how they can change the look of the reports.
This Knowledge Base article was written for technical savvy users with good technical knowledge (especially as regards HTML and file templates). We do not encourage modifying the template files that come with PRTG!
The reason is that we cannot supply updates and/or bug-fixes for template files that have been changed by users when we publish new versions of PRTG. Also, editing template files is not covered by our usual support offering due to the complex nature of this process.
Our recommendation is to stick with the report options included in the web interface unless it's unavoidable. Please see the manual section "Reports" to check if you can create your reports with the functionality provided by the web interface.
However, if you still want to change templates, this article cannot go into every detail, but it will give you a brief overview of the possibilities you have, in order to do the following:
Make a backup of every file you are going to change!
Every time a PRTG update is installed all template files are overwritten to provide updates and bug fixes for these files. That is one reason why modifying report templates is not officially supported.
Report templates, images and include files are located in the "website" folder of your PRTG installation directory and spread across several subfolders. Whenever you are performing a PRTG update installation, all original PRTG template files will be overwritten. To avoid losing your changes please create your own report template files with different file names: simply copy the file that you want to start from and use a different name. To keep changed images please write-protect them using Windows Explorer. You should additionally back up all modified files.
The file "reportheader.png" in the "website\images" folder is used as the header image for all reports. You can replace this image with your own.
A template consists of several template files. When creating a report, the web engine pastes all these "includes" together into one HTML file to generate the report. In order to modify a report template, changes to the main file, to one of the include files, or both are necessary.
Please note: Good knowledge of HTML is a minimum requirement to make any of the following modifications!
In PRTG's web interface, you can already add "Introduction" and "Footer Comments" to your reports (one text shows up on the first page of the report, the other at the end of the report) .
If this isn't enough for your needs, you can create custom header and footer HTM files and add a separate report template for every report you want to use your customized header and/or footer files with.
includes\reportheader.htm
and/or
includes\reportfooter.htm
includes\reportheader_custom.htm
resp.
includes\reportfooter_custom.htm
This will include the changed header/footer files in your report template.
You can change the order of elements for a certain report.
<!--Graph with Data Table: Graph 15 min interval, Table 15 min interval-->
<!--1-->
<#lang key="html.reporttemplates.title" default="Report" var="title">
<#include file="includes\reportheader.htm" varexpand="title" title=" | @title">
<#objectproperty name="reportheader">
<#report type="list" name="details\Graph plus 30day graph and Table.htm" graphaverage="900" tableaverage="900">
<#cropmsg>
<#objectproperty name="reportfooter">
<#include file="includes\reportfooter.htm">
Graphs are added to reports as include files. To change the appearance of a graph, you can create a custom graph include file and add a separate main report template file, in which you are using your custom graph file.
<#report type="list" name="details\Graph plus 30day graph and Table.htm" graphaverage="900" tableaverage="900">
This is the place where the graph is included. Remember the HTM file name.
<#report type="list" name="details\Graph plus 30day graph and Table_custom.htm" graphaverage="900" tableaverage="900">
<#report type="chart" graphid="<@subid>" repsensid="<@objectid>" avg="<@graphaverage>" sdate="<@start>" edate="<@end>" width=850 height=630 graphstylefile="graphstyling.htm" animationandinteraction="1" datastylefile="graphdatastyling.htm" animationstylefile="graphanimationstyling.htm" graphstyling="baseFontSize='12'%20showLegend='0'" tooltexts="1" datastyling="drawAnchors='1'%20anchorRadius='1'%20lineThickness='2'" refreshable="true">
Due to the complex nature of the placeholder arrangement in the source files, we cannot go into any detail regarding the use of placeholders in report templates. As mentioned above, we rather recommend using one of the provided templates to assure you can always use the latest report template versions.
Created on Feb 2, 2010 2:46:06 PM by
Roland Grau [Paessler Support]
(343)
●3
●2
Last change on Oct 31, 2011 9:11:58 AM by
Daniel Zobel [Paessler Support]
(21,383)
●3
●3
Please log in or register to enter your reply.
1 comment