 					</cfloop>
 					<th>#grandTotal#</th>
 				</tr>
+
 			</table>
 		</cfoutput>
 	</cfif>

	<cfif StructKeyExists(variables,"QItemAnalysis")>
		<cfoutput>
			<cfset DayRange = reportDateTo - reportDateFrom + 1>
			<table class="tableList" border="1">
				<tr>
					<th colspan="28">From: #DateFormat(reportDateFrom,"ddd dd-mmm-yy")# To: #DateFormat(reportDateTo,"ddd dd-mmm-yy")# #DayRange# Days</th>
				</tr>
				<tr>
					<th>Category</th>
					<th>Product</th>
					<th>Size</th>

					</cfloop>
					<th>Total</th>
				</tr>
				
				<cfloop array="#productArray#" index="prodrec">
					<cfset theProduct = StructFind(products,prodrec)>
					<tr>
						<td>#theProduct.groupTitle#</td>
						<td>#theProduct.catTitle#</td>
						<td>#theProduct.prodTitle#</td>
						<td>#theProduct.siUnitSize#</td>
						<cfset lineTotal = 0>
						<cfloop from="#startHour#" to="#endHour#" index="i">
							<cfif StructKeyExists(theProduct,i)>
								<cfset theValue = StructFind(theProduct,i)>
								<cfset lineTotal += theValue>
									<cfif StructKeyExists(totals,i)>
										<cfset oldValue = StructFind(totals,i)>
										<cfset StructUpdate(totals,i,oldValue + theValue)>
									<cfelse>
										<cfset StructInsert(totals,i,theValue)>
									</cfif>
								<td align="center">#theValue#</td>
							<cfelse>
								<td></td>
							</cfif>
						</cfloop>
						<td align="center">#lineTotal#</td>
					</tr>
				</cfloop>

				<cfset grandTotal = 0>
				<tr>
					<th colspan="4">Totals</th>
					<cfloop from="#startHour#" to="#endHour#" index="i">
						<cfif StructKeyExists(totals,i)>
							<cfset hourTotal = StructFind(totals,i)>
