<?xml version="1.0"?>
<!DOCTYPE report >
<Report fontSize="8" orientation="landscape">
	<ReportHeader>
		<Output>
			<Image value="'logo.jpg'" type="'jpeg'" width="50" height="50"/>
			<Line/>
			<Line fontSize="12">
				<literal width="8"/>
				<field value="header.name" align="left" col="1"/>
			</Line>
			<Line fontSize="12">
				<literal width="8"/>
				<field value="header.name2" align="left" col="1"/>
			</Line>
			<Line/>
			<Line fontsize="4"/>
			<HorizontalLine size="4" bgcolor="'white'"/>
			<HorizontalLine size="2" bgcolor="'black'"/>
			<HorizontalLine size="4" bgcolor="'white'"/>
		</Output>				
	</ReportHeader>

	<PageHeader>
		<Output>
			<Line fontSize="11">
				<field value="header.report_name" width="40" align="left" col="1"/>
			</Line>
			<Line fontSize="11">
				<literal>From: </literal>
				<field value="stod(m.start_date)" align="left"/>				
				<literal> To: </literal>
				<field value="stod(m.end_date)" align="left"/>				
			</Line>
			<HorizontalLine size="4" bgcolor="'white'"/>
		</Output>
	</PageHeader>		
	<Breaks>	
		<Break name="break0" newpage="no" headernewpage="yes">
			<BreakHeader>
				<Output>
					<Line>
						<field value="g0_name" width="20" align="left" col="1"/>					
					</Line>
				</Output>								
			</BreakHeader>
			<BreakFields>
				<BreakField value="g0_name"/>
			</BreakFields>
			<BreakFooter>
				<Output>
					<HorizontalLine size="4" bgcolor="'white'"/>
					<HorizontalLine size="2" bgcolor="'black'"/>
					<HorizontalLine size="4" bgcolor="'white'"/>
					<Line>
						<field value="g0_name" width="20" align="left" col="1"/>					
						<literal width="6"/>
						<field value="v.g0_netsales" format="'%$.2d'" width="16" align="right" col="7"/>
						<literal width="1"/>
						<field value="v.g0_foodsales" format="'%$.2d'" width="16" align="right" col="8"/>
						<literal width="1"/>
						<field value="v.g0_pfoodnet" format="'%.2d%'" width="7" align="right" col="9"/>
						<literal width="1"/>
						<field value="v.g0_nonfood" format="'%$.2d'" width="13" align="right" col="10"/>
						<literal width="1"/>
						<field value="v.g0_pnonfood" format="'%.2d%'" width="7" align="right" col="11"/>
						<literal width="1"/>
						<field value="v.g0_totaltax" format="'%$.2d'" width="13" align="right" col="12"/>
						<literal width="1"/>
						<field value="v.g0_giftsales" format="'%$.2d'" width="12" align="right" col="13"/>
						<literal width="1"/>
						<field value="v.g0_giftcert" format="'%$.2d'" width="12" align="right" col="14"/>
						<literal width="1"/>
						<field value="v.g0_deposits" format="'%$.2d'" width="16" align="right" col="15"/>
						<literal width="1"/>
						<field value="v.g0_os" format="'%$.2d'" color="'black:red'" width="12" align="right" col="16"/>
					</Line>
					<HorizontalLine size="4" bgcolor="'white'"/>
					<HorizontalLine size="2" bgcolor="'black'"/>
					<HorizontalLine size="4" bgcolor="'white'"/>
				</Output>
			</BreakFooter>
		</Break>
		<Break name="break1" newpage="no" headernewpage="yes">
			<BreakHeader>
				<Output>
					<Line>
						<literal width="1"/>
						<field value="g1_name" width="20" align="left" col="2"/>					
					</Line>
				</Output>								
			</BreakHeader>
			<BreakFields>
				<BreakField value="g1_name"/>
			</BreakFields>
			<BreakFooter>
				<Output>
					<HorizontalLine size="1" bgcolor="'black'" indent="1"/>
					<Line>
						<literal width="1"/>
						<field value="g1_name" width="20" align="left" col="2"/>					
						<literal width="5"/>
						<field value="v.g1_netsales" format="'%$.2d'" width="16" align="right" col="7"/>
						<literal width="1"/>
						<field value="v.g1_foodsales" format="'%$.2d'" width="16" align="right" col="8"/>
						<literal width="1"/>
						<field value="v.g1_pfoodnet" format="'%.2d%'" width="7" align="right" col="9"/>
						<literal width="1"/>
						<field value="v.g1_nonfood" format="'%$.2d'" width="13" align="right" col="10"/>
						<literal width="1"/>
						<field value="v.g1_pnonfood" format="'%.2d%'" width="7" align="right" col="11"/>
						<literal width="1"/>
						<field value="v.g1_totaltax" format="'%$.2d'" width="13" align="right" col="12"/>
						<literal width="1"/>
						<field value="v.g1_giftsales" format="'%$.2d'" width="12" align="right" col="13"/>
						<literal width="1"/>
						<field value="v.g1_giftcert" format="'%$.2d'" width="12" align="right" col="14"/>
						<literal width="1"/>
						<field value="v.g1_deposits" format="'%$.2d'" width="16" align="right" col="15"/>
						<literal width="1"/>
						<field value="v.g1_os" format="'%$.2d'" color="'black:red'" width="12" align="right" col="16"/>
					</Line>
					<HorizontalLine size="1" bgcolor="'black'" indent="1"/>
					<Line/>
				</Output>						
			</BreakFooter>
		</Break>
		<Break name="break2" newpage="no" headernewpage="yes" surpressblank="yes">
			<BreakHeader>
				<Output>
					<Line>
						<literal width="2"/>
						<field value="g2_name" width="20" align="left" col="3"/>					
					</Line>
				</Output>					
			</BreakHeader>
			<BreakFields>
				<BreakField value="g2_name"/>
			</BreakFields>
			<BreakFooter>
				<Output>
					<HorizontalLine size="1" bgcolor="'black'" indent="2"/>
					<Line>
						<literal width="2"/>
						<field value="g2_name" width="20" align="left" col="3"/>					
						<literal width="4"/>
						<field value="v.g2_netsales" format="'%$.2d'" width="16" align="right" col="7"/>
						<literal width="1"/>
						<field value="v.g2_foodsales" format="'%$.2d'" width="16" align="right" col="8"/>
						<literal width="1"/>
						<field value="v.g2_pfoodnet" format="'%.2d%'" width="7" align="right" col="9"/>
						<literal width="1"/>
						<field value="v.g2_nonfood" format="'%$.2d'" width="13" align="right" col="10"/>
						<literal width="1"/>
						<field value="v.g2_pnonfood" format="'%.2d%'" width="7" align="right" col="11"/>
						<literal width="1"/>
						<field value="v.g2_totaltax" format="'%$.2d'" width="13" align="right" col="12"/>
						<literal width="1"/>
						<field value="v.g2_giftsales" format="'%$.2d'" width="12" align="right" col="13"/>
						<literal width="1"/>
						<field value="v.g2_giftcert" format="'%$.2d'" width="12" align="right" col="14"/>
						<literal width="1"/>
						<field value="v.g2_deposits" format="'%$.2d'" width="16" align="right" col="15"/>
						<literal width="1"/>
						<field value="v.g2_os" format="'%$.2d'" color="'black:red'" width="12" align="right" col="16"/>
					</Line>
					<HorizontalLine size="1" bgcolor="'black'" indent="2"/>
					<Line/>
				</Output>						
			</BreakFooter>
		</Break>
		<Break name="break3" newpage="no" headernewpage="yes" surpressblank="yes">
			<BreakHeader>
				<Output>
					<Line>
						<literal width="3"/>
						<field value="g3_name" width="20" align="left" col="4"/>					
					</Line>
				</Output>
			</BreakHeader>
			<BreakFields>
				<BreakField value="g3_name"/>
			</BreakFields>
			<BreakFooter>
				<Output>
					<HorizontalLine size="1" bgcolor="'black'" indent="3"/>
					<Line>
						<literal width="3"/>
						<field value="g3_name" width="20" align="left" col="4"/>					
						<literal width="3"/>
						<field value="v.g3_netsales" format="'%$.2d'" width="16" align="right" col="7"/>
						<literal width="1"/>
						<field value="v.g3_foodsales" format="'%$.2d'" width="16" align="right" col="8"/>
						<literal width="1"/>
						<field value="v.g3_pfoodnet" format="'%.2d%'" width="7" align="right" col="9"/>
						<literal width="1"/>
						<field value="v.g3_nonfood" format="'%$.2d'" width="13" align="right" col="10"/>
						<literal width="1"/>
						<field value="v.g3_pnonfood" format="'%.2d%'" width="7" align="right" col="11"/>
						<literal width="1"/>
						<field value="v.g3_totaltax" format="'%$.2d'" width="13" align="right" col="12"/>
						<literal width="1"/>
						<field value="v.g3_giftsales" format="'%$.2d'" width="12" align="right" col="13"/>
						<literal width="1"/>
						<field value="v.g3_giftcert" format="'%$.2d'" width="12" align="right" col="14"/>
						<literal width="1"/>
						<field value="v.g3_deposits" format="'%$.2d'" width="16" align="right" col="15"/>
						<literal width="1"/>
						<field value="v.g3_os" format="'%$.2d'" color="'black:red'" width="12" align="right" col="16"/>
					</Line>
					<HorizontalLine size="1" bgcolor="'black'" indent="3"/>
					<Line/>
				</Output>						
			</BreakFooter>
		</Break>
		<Break name="break4" newpage="no" headernewpage="yes" surpressblank="yes">
			<BreakHeader>
				<Output>
					<Line>
						<literal width="4"/>
						<field value="g4_name" width="20" align="left" col="5"/>					
					</Line>
				</Output>
			</BreakHeader>
			<BreakFields>
				<BreakField value="g4_name"/>
			</BreakFields>
			<BreakFooter>
				<Output>
					<HorizontalLine size="1" bgcolor="'black'" indent="4"/>
					<Line>
						<literal width="4"/>
						<field value="g4_name" width="20" align="left" col="5"/>					
						<literal width="2"/>
						<field value="v.g4_netsales" format="'%$.2d'" width="16" align="right" col="7"/>
						<literal width="1"/>
						<field value="v.g4_foodsales" format="'%$.2d'" width="16" align="right" col="8"/>
						<literal width="1"/>
						<field value="v.g4_pfoodnet" format="'%.2d%'" width="7" align="right" col="9"/>
						<literal width="1"/>
						<field value="v.g4_nonfood" format="'%$.2d'" width="13" align="right" col="10"/>
						<literal width="1"/>
						<field value="v.g4_pnonfood" format="'%.2d%'" width="7" align="right" col="11"/>
						<literal width="1"/>
						<field value="v.g4_totaltax" format="'%$.2d'" width="13" align="right" col="12"/>
						<literal width="1"/>
						<field value="v.g4_giftsales" format="'%$.2d'" width="12" align="right" col="13"/>
						<literal width="1"/>
						<field value="v.g4_giftcert" format="'%$.2d'" width="12" align="right" col="14"/>
						<literal width="1"/>
						<field value="v.g4_deposits" format="'%$.2d'" width="16" align="right" col="15"/>
						<literal width="1"/>
						<field value="v.g4_os" format="'%$.2d'" color="'black:red'" width="12" align="right" col="16"/>
					</Line>
					<HorizontalLine size="1" bgcolor="'black'" indent="4"/>
					<Line/>
				</Output>				
			</BreakFooter>
		</Break>
	</Breaks>			

	<Variables>
		<Variable name="netsales" value="fxpval(foodsales_amount,2)+fxpval(nonfood_amount,2)" type="expression"/>
		<Variable name="pfoodnet" value="fxpval(foodsales_amount,2)/v.netsales*100" type="expression"/>
		<Variable name="pnonfood" value="fxpval(nonfood_amount,2)/v.netsales)*100" type="expression"/>
		<Variable name="os" value="(v.netsales+fxpval(totaltax_amount,2)+fxpval(paidin_amount,2)-fxpval(paidout_amount,2)-fxpval(giftcert_amount,2)+fxpval(giftsales_amount,2)-fxpval(totaldeposits_amount,2))*-1" type="expression"/>
		
		<Variable name="g0_netsales" value="v.netsales" type="sum" resetonbreak=""/>
		<Variable name="g1_netsales" value="v.netsales" type="sum" resetonbreak="break1"/>
		<Variable name="g2_netsales" value="v.netsales" type="sum" resetonbreak="break2"/>
		<Variable name="g3_netsales" value="v.netsales" type="sum" resetonbreak="break3"/>
		<Variable name="g4_netsales" value="v.netsales" type="sum" resetonbreak="break4"/>

		<Variable name="g0_foodsales" value="fxpval(foodsales_amount,2)" type="sum" resetonbreak=""/>
		<Variable name="g1_foodsales" value="fxpval(foodsales_amount,2)" type="sum" resetonbreak="break1"/>
		<Variable name="g2_foodsales" value="fxpval(foodsales_amount,2)" type="sum" resetonbreak="break2"/>
		<Variable name="g3_foodsales" value="fxpval(foodsales_amount,2)" type="sum" resetonbreak="break3"/>
		<Variable name="g4_foodsales" value="fxpval(foodsales_amount,2)" type="sum" resetonbreak="break4"/>

		<Variable name="g0_pfoodnet" value="v.pfoodnet" type="average" resetonbreak=""/>
		<Variable name="g1_pfoodnet" value="v.pfoodnet" type="average" resetonbreak="break1"/>
		<Variable name="g2_pfoodnet" value="v.pfoodnet" type="average" resetonbreak="break2"/>
		<Variable name="g3_pfoodnet" value="v.pfoodnet" type="average" resetonbreak="break3"/>
		<Variable name="g4_pfoodnet" value="v.pfoodnet" type="average" resetonbreak="break4"/>

		<Variable name="g0_nonfood" value="fxpval(nonfood_amount,2)" type="sum" resetonbreak=""/>
		<Variable name="g1_nonfood" value="fxpval(nonfood_amount,2)" type="sum" resetonbreak="break1"/>
		<Variable name="g2_nonfood" value="fxpval(nonfood_amount,2)" type="sum" resetonbreak="break2"/>
		<Variable name="g3_nonfood" value="fxpval(nonfood_amount,2)" type="sum" resetonbreak="break3"/>
		<Variable name="g4_nonfood" value="fxpval(nonfood_amount,2)" type="sum" resetonbreak="break4"/>

		<Variable name="g0_pnonfood" value="v.pnonfood" type="average" resetonbreak=""/>
		<Variable name="g1_pnonfood" value="v.pnonfood" type="average" resetonbreak="break1"/>
		<Variable name="g2_pnonfood" value="v.pnonfood" type="average" resetonbreak="break2"/>
		<Variable name="g3_pnonfood" value="v.pnonfood" type="average" resetonbreak="break3"/>
		<Variable name="g4_pnonfood" value="v.pnonfood" type="average" resetonbreak="break4"/>

		<Variable name="g0_totaltax" value="fxpval(totaltax_amount,2)" type="sum" resetonbreak=""/>
		<Variable name="g1_totaltax" value="fxpval(totaltax_amount,2)" type="sum" resetonbreak="break1"/>
		<Variable name="g2_totaltax" value="fxpval(totaltax_amount,2)" type="sum" resetonbreak="break2"/>
		<Variable name="g3_totaltax" value="fxpval(totaltax_amount,2)" type="sum" resetonbreak="break3"/>
		<Variable name="g4_totaltax" value="fxpval(totaltax_amount,2)" type="sum" resetonbreak="break4"/>

		<Variable name="g0_giftsales" value="fxpval(giftsales_amount,2)" type="sum" resetonbreak=""/>
		<Variable name="g1_giftsales" value="fxpval(giftsales_amount,2)" type="sum" resetonbreak="break1"/>
		<Variable name="g2_giftsales" value="fxpval(giftsales_amount,2)" type="sum" resetonbreak="break2"/>
		<Variable name="g3_giftsales" value="fxpval(giftsales_amount,2)" type="sum" resetonbreak="break3"/>
		<Variable name="g4_giftsales" value="fxpval(giftsales_amount,2)" type="sum" resetonbreak="break4"/>

		<Variable name="g0_giftcert" value="fxpval(giftcert_amount,2)" type="sum" resetonbreak=""/>
		<Variable name="g1_giftcert" value="fxpval(giftcert_amount,2)" type="sum" resetonbreak="break1"/>
		<Variable name="g2_giftcert" value="fxpval(giftcert_amount,2)" type="sum" resetonbreak="break2"/>
		<Variable name="g3_giftcert" value="fxpval(giftcert_amount,2)" type="sum" resetonbreak="break3"/>
		<Variable name="g4_giftcert" value="fxpval(giftcert_amount,2)" type="sum" resetonbreak="break4"/>

		<Variable name="g0_deposits" value="fxpval(totaldeposits_amount,2)" type="sum" resetonbreak=""/>
		<Variable name="g1_deposits" value="fxpval(totaldeposits_amount,2)" type="sum" resetonbreak="break1"/>
		<Variable name="g2_deposits" value="fxpval(totaldeposits_amount,2)" type="sum" resetonbreak="break2"/>
		<Variable name="g3_deposits" value="fxpval(totaldeposits_amount,2)" type="sum" resetonbreak="break3"/>
		<Variable name="g4_deposits" value="fxpval(totaldeposits_amount,2)" type="sum" resetonbreak="break4"/>

		<Variable name="g0_os" value="v.os" type="sum" resetonbreak=""/>
		<Variable name="g1_os" value="v.os" type="sum" resetonbreak="break1"/>
		<Variable name="g2_os" value="v.os" type="sum" resetonbreak="break2"/>
		<Variable name="g3_os" value="v.os" type="sum" resetonbreak="break3"/>
		<Variable name="g4_os" value="v.os" type="sum" resetonbreak="break4"/>
	</Variables>

	<Detail>
		<FieldHeaders>
			<Output>
				<HorizontalLine size="1" bgcolor="'black'"/>
				<Line bgcolor="'0xe5e5e5'">
					<literal width="5"/>
					<literal width="55"/>
					<literal width="7" align="right" col="9">%Food</literal>
					<literal width="1"/>
					<literal width="13" align="right" col="10">Non Food</literal>
					<literal width="1"/>
					<literal width="7" align="right" col="11">%NON</literal>
					<literal width="1"/>
					<literal width="13" align="right" col="12">Total</literal>
					<literal width="1"/>
					<literal width="12" align="right" col="13">Gift</literal>
					<literal width="1"/>
					<literal width="12" align="right" col="14">Gift</literal>
					<literal width="1"/>
					<literal width="16" align="right" col="15">Total</literal>
					<literal width="1"/>
					<literal width="12" align="right" col="16">Over/</literal>
				</Line>
				<Line bgcolor="'0xe5e5e5'">
					<literal width="5"/>
					<literal width="20" col="6">Store</literal>
					<literal width="1"/>
					<literal width="16" align="right" col="7">Net Sales</literal>
					<literal width="1"/>
					<literal width="16" align="right" col="8">Food Sales</literal>
					<literal width="1"/>
					<literal width="7" align="right" col="9">Net</literal>
					<literal width="1"/>
					<literal width="13" align="right" col="10">Sales</literal>
					<literal width="1"/>
					<literal width="7" align="right" col="11">Food</literal>
					<literal width="1"/>
					<literal width="13" align="right" col="12">Tax</literal>
					<literal width="1"/>
					<literal width="12" align="right" col="13">Sales</literal>
					<literal width="1"/>
					<literal width="12" align="right" col="14">Redeemed</literal>
					<literal width="1"/>
					<literal width="16" align="right" col="15">Deposits</literal>
					<literal width="1"/>
					<literal width="12" align="right" col="16">Short</literal>
				</Line>
				<HorizontalLine size="1" bgcolor="'black'"/>
				<HorizontalLine size="4" bgcolor="'white'"/>
			</Output>
		</FieldHeaders>		
		<FieldDetails>
			<Output>
				<Line bgcolor="iif(r.detailcnt%2,'0xe5e5e5','white')">
					<literal width="5" bgcolor="'white'"/>
					<field value="name" width="20" align="left" col="6"/>
					<literal width="1"/>
					<field value="v.netsales" format="'%$.2d'" width="16" align="right" col="7"/>
					<literal width="1"/>
					<field value="fxpval(foodsales_amount,2)" format="'%$.2d'" width="16" align="right" col="8"/>
					<literal width="1"/>
					<field value="v.pfoodnet" format="'%.2d%'" width="7" align="right" col="9"/>
					<literal width="1"/>
					<field value="fxpval(nonfood_amount,2)" format="'%$.2d'" width="13" align="right" col="10"/>
					<literal width="1"/>
					<field value="v.pnonfood" format="'%.2d%'" width="7" align="right" col="11"/>
					<literal width="1"/>
					<field value="fxpval(totaltax_amount,2)" format="'%$.2d'" width="13" align="right" col="12"/>
					<literal width="1"/>
					<field value="fxpval(giftsales_amount,2)" format="'%$.2d'" width="12" align="right" col="13"/>
					<literal width="1"/>
					<field value="fxpval(giftcert_amount,2)" format="'%$.2d'" width="12" align="right" col="14"/>
					<literal width="1"/>
					<field value="fxpval(totaldeposits_amount,2)" format="'%$.2d'" width="16" align="right" col="15"/>
					<literal width="1"/>
					<field value="v.os" format="'%.2d'" color="'black:red'" width="12" align="right" col="16"/>
				</Line>
			</Output>
		</FieldDetails>
	</Detail>

	<PageFooter>
		<Output>
			<Line>
				<literal>Page: </literal>	
				<field value="r.pageno" width="3" align="right"/>
			</Line>
		</Output>
	</PageFooter>

	<ReportFooter>
	</ReportFooter>
</Report>
