<%@ include file="/includes.jsp"%>
<link rel="stylesheet" href="../webapp.css" type="text/css" />
<body>

	<br />
		<table width="70%"><tr><td><tags:table title="${title}">
		<c:choose>
			<c:when test="${title eq 'Patients Report'}"><tiles:insertTemplate template ="patientReport.jsp" /></c:when>
			<c:when test="${title eq 'Report Of Users Added'}"><tiles:insertTemplate template ="userReport.jsp" /></c:when>
			<c:when test="${title eq 'Report of Users Logged In'}"><tiles:insertTemplate template ="userLoggInReport.jsp" /></c:when>
		</c:choose>
		<table class="table">
			<c:if test="${error ne null}">
			<tr><td align="center"><font color="Red"><c:out value="${error }"/></font></td></tr></c:if>
			<c:forEach var="row" items="${results }" varStatus="resultsStatus">
				<c:choose>
					<c:when test="${resultsStatus.count == 1}">
						<tr>
							<c:forEach var="item" items="${row}">
								<th><c:out value="${item }"/></th>
							</c:forEach>
						</tr>
					</c:when>
					<c:otherwise>
						<tr>
							<c:forEach var="item" items="${row}">
								<td align="center"><c:out value="${item }"/></td>
							</c:forEach>
						</tr>
					</c:otherwise>
				</c:choose>
			</c:forEach>
		</table></tags:table></td></tr></table>
<c:if test="${results != null }">
	<br />
		&#160;<a
		href="generalReports.form?task=<c:out value="${param['task']}"/>&amp;view=csv"
		title="Download CSV">Download CSV <img
		src="../images/16x16/database_save.png" alt="Download" />
	</a>
	<br />
</c:if>

<br/>
<a href="generalReport.jsp" class="noPrint"><img src="../images/16x16/action_back.png" border="0"/>Back</a>

</body>