What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

How can I adjust the order of report elements?

Votes:

0

Is it possible to change the order of the elements in a report? How can I do this?

how-to modify-templates prtg reporting template

Created on Nov 9, 2017 2:05:03 PM by  Brandy Greger [Paessler Support]



1 Reply

Accepted Answer

Votes:

0

This article applies to PRTG Network Monitor 17.4.35 or later

Changing the Order of Report Elements

You can reorganize, remove, or modify elements in report templates according to your needs.

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.

Note: Good knowledge of HTML is a minimum requirement to make any of the following modifications! Please note that modifications are unsupported.

Make a backup of every file you are going to change!

  • Step 1: In the \webroot\reporttemplates\ subfolder of your PRTG installation, locate the main report template file of the report you want to change the layout for, for example "A30 Graph with Data Table - Graph 1m - Table 1m.htm".
  • Step 2: Once you've found the right template file, duplicate it and save it with a custom name.
    Tip: Choose a filename with a leading 0 (zero) and your template will appear at the top of the list later on. The entries in the dropdown list are sorted alphabetically based on the filenames.
  • Step 3: Open the file with a text editor. You may need to open the editor as an administrator user to be write-enabled.
  • Step 4: Choose a name for your report template and write it into the HTML comment in the first line of the source code. The format is "category: name". Category (with grey background) and name will appear in the template selection dropdown in the PRTG web interface later on. Save the HTM file.
  • Step 5: In the source code of the duplicated file, search for the code snippet with the <#report> tag, for example #report type="list" name="details\Graph plus 30day graph and Table.htm
  • Step 6: In this include call, change the filename of the HTM file that is called. For example, append _custom to the filename call. The changed line will look like this: #report type="list" name="details\Graph plus 30day graph and Table_custom.htm
  • Step 7: Go to the \webroot\reporttemplates\details subfolder of your PRTG installation.
  • Step 8: Find the HTM file that is called in the source code of the main report template file (see Step 5).
  • Step 9: Duplicate this HTM file and save it with the custom name you used in Step 6. For example, append _custom to the filename. Make sure the resulting file name matches the one you used in Step 6.
  • Step 10: Open the duplicated file. It may look like this:
<div class="onereport report<@counter>">
	<#include file="includes\printheading.htm">

	<h1><#objectproperty name="name">: <b><#objectproperty id="<@objectid>" name="name"></b></h1>

	<table cellspacing=0 class="overview">
		<tr class=even>
			<td class=title><#lang key="html.reporttemplates.reporttimespan" default="Report Time Span">:</td>
			<td colspan=6><#report type="startdate"> - <#report type="enddate"></td>
		</tr>
		<tr class=odd>
			<td class=title><#lang key="html.reporttemplates.reporthours" default="Report Hours">:</td>
			<td colspan=6><#report type="reporthours"></td>
		</tr>
		<tr class=even>
			<td class=title><#lang key="html.reporttemplates.sensortype" default="Sensor Type">:</td>
			<td colspan=6><#objectstatus name="type" id="<@objectid>"> (<#objectstatus id="<@objectid>" name="interval"> <#lang key="html.reporttemplates.interval" default="Interval">)</td>
		</tr>
		<tr class=odd>
			 ...
		</tr>
		<@loop>
	</table>

	<div class="reportgraph">
	<#report type="chart" graphid="<@subid>" repsensid="<@objectid>" avg="<@graphaverage>" sdate="<@start>" edate="<@end>" width=850 height=270 graphstyling="baseFontSize='12'%20showLegend='0'" tooltexts="1" refreshable="true">
    <div style="width:850px"><#report type="legend" repnodeid="<@subid>" repsensid="<@objectid>" width="850"></div>

	<#report type="chart" graphid="<@subid>" repsensid="<@objectid>" avg="3600" sdate="<@start>" edate="<@end>" startoff="-30" endoff="0"	 width=850 height=150 graphstyling="baseFontSize='9'%20showLegend='0'" tooltexts="1" datastyling="drawAnchors='1'%20anchorRadius='1'%20lineThickness='1'" refreshable="true">
	</div>
         ...

 	<#include file="includes\printfooter.htm">
</div>
  • Step 11: Each placeholder, separated by <# and >, adds one HTML element to the report, for example <#lang key="html.reporttemplates.reporttimespan" default="Report Time Span">. To change their order, simply change the order of the lines. You can also delete single lines if you do not want a certain element to appear in the report at all. You can even try to add lines from other report templates here.
  • Step 12: Save the HTM file.
  • Step 13: In PRTG, create a report using your new template and check the result of your modifications.

See Also

Created on Nov 9, 2017 2:17:20 PM by  Brandy Greger [Paessler Support]

Last change on Mar 23, 2018 12:41:47 PM by  Brandy Greger [Paessler Support]




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.