Server Administration > Reports > Creating a Report Recipe > Displaying Live and Ambiguous Fields in a Report Recipe
  
Displaying Live and Ambiguous Fields in a Report Recipe
If document versioning is enabled, users want a report that annotates live and ambiguous fields in report data.
For example:
<%version 1%>
<%description
<b>Data: </b>Item fields<br>
<b>Notes: </b>This report displays a listing of items in column format
(indicating live and ambiguous on versioned items),<br>
grouped by one item field, with item grouping totals displayed.<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=""
description="Text appearing at the bottom of the report page."
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>&reporttitle</title>
<%screenStyleSheet%>
<%printerStyleSheet%>
<script type="text/javascript">var line_count=0;</script>
</head>
<%dateformat%>
<%datetimeformat%>
<%sortby &sortby%>
<body>
<table class="display">
<thead>
<tr>
<td colspan="&#fields">
<table class="display">
<tr>
<td class="logo"><%logoURL%></td>
<td>
<div class="title">&reporttitle</div><p>
<div class="header">&reportheader</div>
</td>
</tr>
</table>
</td>
</tr>
<tr><td colspan="&#fields" class="date"><%currentdate%></td></tr>
<tr><td colspan="&#fields"><hr class="hr_default"></td></tr>
<tr>
<!-- Display issue field headings -->
<%iteratefields nogroupbyfields%>
<th class="heading1">&fielddisplayname</th>
<%/iteratefields%>
</tr>
<tr><td colspan="&#fields"><hr class="hr_default"></td></tr>
</thead>
<tfoot>
<tr><td colspan="&#fields" class="footer">&reportfooter</td></tr>
</tfoot>
<tbody>
<%groupby &groupby%>
<!-- Display group heading -->
<tr><td colspan="&#fields" class="grouping1"><%groupname%>: <%groupvalue%></td></tr>
<!-- Display issue field values -->
<%begindetail%>
<script type="text/javascript">line_count++; if (line_count%2 == 0)
{document.write("<tr class='even_row'>");} else
{document.write("<tr class='odd_row'>");}</script>
<%iteratefields nogroupbyfields%>
<td class="border">&fieldname<script>if ("&fieldislive" == "true")
{document.write("<img src=\"<%weburl%>images/ci/asterisk.png\
" alt=\"Live\" title=\"Live\">");}
if ("&fieldisambiguous" == "true")
{document.write("<img src=\"<%weburl%>images/ci/exclaim.png\
" alt=\"Ambiguous\" title=\"Ambiguous\">");}
</script></td>
<%/iteratefields%>
</tr>
<%enddetail%>
<!-- Display group count -->
<tr>
<td colspan="&#fields" class="right">
<span class="bold_color"><%groupname%> <%groupvalue%> Item Total: </span>
<span class="bold_color_italic"><%groupcount%></span>
</td>
</tr>
<tr><td colspan="&#fields"><hr class="hr_default"></td></tr>
<script type="text/javascript">line_count=0;</script>
<%endgroup%>
</tbody>
</table>
</body>
</html>