Server Administration > Reports > Creating a Report Recipe > Adding Group Computations to a Report Recipe
Adding Group Computations to a Report Recipe
Users want a report that allows them to perform calculations between different fields in a grouping report. This allows for complex metrics on the grouped items in the report.
Add group computation tags to a grouping report recipe to perform computations between different item fields. Group computations are applied to multiple fields in a group of items.
For example:
<%version 1%>
<%description <b>Description: </b>This is a report that uses
Windchill RVS group compute report tags.<br><br>%>
<%param name="reporttitle" type="String" prompt="Report Title"
value="" description="Descriptive title for your report."%>
<%param name="reportheader" type="MultiString" prompt="Report
Header" value="" description="Text appearing at the top of the
report page."%>
<%param name="reportfooter" type="MultiString" prompt="Report
Footer" value="Confidential - Internal Use Only"
description="Text appearing at the bottom of the report page."%>
<%param name="groupcomputeheading" type="String" prompt="Group
Compute Heading" value="Group Metrics" description="This is
displayed at the top of the group compute area."%>
<title>Group Compute Report</title>

<%sortby &sortby%>
<span class="logo"><%logoURL%></span>
<p class="title">&reporttitle</p>
<p class="header">&reportheader</p>
<div align="right" class="date"><%currentdate%></div>
<table class="display">
<tr><td colspan="&#fields"><hr class="hr_default"></td></tr>
<!-- Display item field headings -->
<th class="heading1">&fielddisplayname</th>
<tr><td colspan="&#fields"><hr class="hr_default"></td></tr>
<%groupby &groupby%>
<!-- Display first group heading -->
<td colspan="&#fields" class="grouping1">
<%groupname%>: <%groupvalue%>
<!-- Display item field values -->
<td class="border">&fieldname</td>
<!-- Display group compute -->
<tr class="right">
<td colspan="&#fields">
<table class="list2">
<th colspan="2">&groupcomputeheading</th>
<td class="bold"><%groupcomputelabel%></td>
<tr><td colspan="&#fields"><hr class="hr_default"></td></tr>
<tr><td colspan="&#fields"><hr class="hr_default"></td></tr>
<span class="footer">&reportfooter</span>
<div align="center">
<a href="<%weburl%>im/runreport?selection=&currentReportName">
<img src="<%weburl%>Report_Recipe/re-run_report.gif"
align="middle" border="0">