 		WHERE DATE(ehTimeStamp) >= '#parm.reportDateFrom#'
 		AND DATE(ehTimeStamp) <= '#parm.reportDateTo#'
 		AND eiClass = 'sale'
-        GROUP BY catTitle, prodTitle, siUnitSize, hh
+        GROUP BY groupTitle, catTitle, prodTitle, siUnitSize, hh
 	</cfquery>
 </cfif>
 <body>

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

	<cfif StructKeyExists(variables,"QItemAnalysis")>
		<cfoutput>
			<cfset DayRange = reportDateTo - reportDateFrom + 1>
			<cfset currProd = 0>
			<cfset totCount = 0>
			<cfset products = {}>
			<cfset productArray = []>
			<cfset block = {}>
			<cfset totals = {}>
			<cfloop query="QItemAnalysis">
				<cfset block = {}>
				<cfset block.groupTitle = groupTitle>
				<cfset block.catTitle = catTitle>
				<cfset block.prodTitle = prodTitle>
				<cfset block.siUnitSize = siUnitSize>
				
				<cfif !StructKeyExists(products,prodID)>
					<cfset StructInsert(products,prodID,block)>
					<cfset ArrayAppend(productArray,prodID)>
				</cfif>
				<cfset theProduct = StructFind(products,prodID)>
				<cfif !StructKeyExists(theProduct,hh)>
					<cfset StructInsert(theProduct,hh,recCount)>
				</cfif>
			</cfloop>
			
			<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>Group</th>
					<th>Category</th>
					<th>Product</th>
					<th>Size</th>
