<?xml version="1.0" encoding="UTF-8"?>
<PGVReport access="PRIV_USER" icon="place">
	<!-- $Id: addresslist.xml 6595 2009-12-21 21:47:10Z canajun2eh $ -->
	<PGVRDescription>Prints a list of addresses</PGVRDescription>
	<PGVRTitle><PGVRvar var="pgv_lang[address_list]" /></PGVRTitle>
	<PGVRInput name="address" type="text"><PGVRvar var="pgv_lang[filter_address]" /> </PGVRInput>
	<PGVRInput name="sortby" type="select" options="NAME,ID"><PGVRvar var="pgv_lang[sort_by]" /></PGVRInput>
	<PGVRInput name="email_in" type="select" options="all,noemail,onlyemail"><PGVRvar var="pgv_lang[include]"/> </PGVRInput>
	<PGVRInput name="pageSize" type="select" default="A4" options="letter,A3,A4,legal"><PGVRvar var="pgv_lang[page_size]" /></PGVRInput>
	<PGVRInput name="fonts" type="select" default="dejavusans" options="arialunicid0,dejavusans,helvetica"><PGVRvar var="pgv_lang[font]"/></PGVRInput>
	
	<!-- Header -->
	<PGVRStyle name="header" font="$fonts" size="16" style="b" />
	<!-- Page numbers text -->
	<PGVRStyle name="pagenum" font="$fonts" size="8"/>
	<!-- Standard text -->
	<PGVRStyle name="text" font="$fonts" size="9"/>
	<!-- Generated by style - required style name by the generator -->
	<PGVRStyle name="genby" font="$fonts" size="8" />
	<!-- Date Text-->
	<PGVRStyle name="date" font="$fonts" size="8"/>
	<!-- Column labels -->
	<PGVRStyle name="label" font="$fonts" size="10" style="b" />

	<PGVRDoc pageSize="$pageSize" >
		<PGVRHeader>
			<PGVRCell align="center" height="20" newline="1" style="header"><PGVRvar var="pgv_lang[address_list]" /></PGVRCell>
			<PGVRCell align="rightrtl" newline="1" style="pagenum"><PGVRvar var="pgv_lang[page]" /> <PGVRPageNum /> <PGVRvar var="pgv_lang[of]" /> <PGVRTotalPages /></PGVRCell>
			<PGVRTextBox border="1" height="12" width="40">
				<PGVRText style="label"> </PGVRText>
			</PGVRTextBox>
			<PGVRTextBox border="1" height="12" width="170">
				<PGVRText style="label"><PGVRvar var="pgv_lang[name]" /></PGVRText>
			</PGVRTextBox>
			<PGVRTextBox border="1" height="12" width="160">
				<PGVRText style="label"><PGVRvar var="factarray[ADDR]" /></PGVRText>
			</PGVRTextBox>
			<PGVRTextBox border="1" height="12" newline="1">
				<PGVRText style="label"><PGVRvar var="factarray[PHON]" /> / <PGVRvar var="factarray[_EMAIL]" /></PGVRText>
			</PGVRTextBox>
		</PGVRHeader>

		<PGVRBody>
			<PGVRSetVar name="email" value="" />
			<PGVRSetVar name="addrfilter" value="ADDR CONTAINS " />
			<PGVRSetVar name="addrfilter2" value="" />
			<PGVRif condition="$address != ''">
				<PGVRSetVar name="addrfilter2" value="ADDR SUBCONTAINS $address" />
			</PGVRif>
			<PGVRif condition="$email_in=='noemail'">
				<PGVRSetVar name="email" value="EMAIL EQUALS ''" />
			</PGVRif>
			<PGVRif condition="$email_in=='onlyemail'">
				<PGVRSetVar name="email" value="EMAIL CONTAINS ." />
				<PGVRif condition="$address==''">
					<PGVRSetVar name="addrfilter" value="EMAIL CONTAINS ." />
					<PGVRSetVar name="email" value="" />
				</PGVRif>
			</PGVRif>
			<PGVRList list="individual" filter1="$addrfilter" filter2="$addrfilter2" filter3="$email" sortby="$sortby">
				<PGVRTextBox width="40" height="52" border="1">
					<PGVRText style="text"><PGVRGedcomValue tag="@id" /></PGVRText>
				</PGVRTextBox>
				<PGVRTextBox width="170" height="52" border="1">
					<PGVRText style="text"><PGVRGetPersonName id="" /></PGVRText>
				</PGVRTextBox>
				<PGVRTextBox width="160" height="52" border="1">
					<PGVRText style="text"><PGVRGedcomValue tag="ADDR" /><PGVRGedcomValue tag="RESI:ADDR" /></PGVRText>
					<PGVRif condition="@ADDR:ADR1 != ''">
						<PGVRText style="text"><br /><PGVRGedcomValue tag="ADDR:ADR1" /></PGVRText>
					</PGVRif>
					<PGVRif condition="@ADDR:CITY != ''">
						<PGVRif condition="$POSTAL_CODE==false">
							<PGVRif condition="@ADDR:STAE != ''">
								<PGVRText style="text"><br /><PGVRGedcomValue tag="ADDR:POST" /> <PGVRGedcomValue tag="ADDR:CITY" />, <PGVRGedcomValue tag="ADDR:STAE" /> </PGVRText>
							</PGVRif>
							<PGVRif condition="@ADDR:STAE == ''">
								<PGVRText style="text"><br /><PGVRGedcomValue tag="ADDR:POST" /> <PGVRGedcomValue tag="ADDR:CITY" /></PGVRText>
							</PGVRif>
						</PGVRif>
						<PGVRif condition="$POSTAL_CODE==true">
							<PGVRif condition="@ADDR:STAE != ''">
								<PGVRText style="text"><br /><PGVRGedcomValue tag="ADDR:CITY" />, <PGVRGedcomValue tag="ADDR:STAE" /> <PGVRGedcomValue tag="ADDR:POST" /></PGVRText>
							</PGVRif>
							<PGVRif condition="@ADDR:STAE == ''">
								<PGVRText style="text"><br /><PGVRGedcomValue tag="ADDR:CITY" /> <PGVRGedcomValue tag="ADDR:POST" /></PGVRText>
							</PGVRif>
						</PGVRif>

					</PGVRif>
					<PGVRif condition="@ADDR:CTRY != ''">
						<PGVRText style="text"><br /><PGVRGedcomValue tag="ADDR:CTRY" /></PGVRText>
					</PGVRif>
				</PGVRTextBox>
				<PGVRTextBox height="52" border="1" newline="1">
					<PGVRText style="text">
						<PGVRvarLetter var="factarray[PHON]" />: <PGVRGedcomValue tag="PHON" /><br />
						<PGVRvarLetter var="factarray[FAX]" />: <PGVRGedcomValue tag="FAX" /><br />
						<PGVRvarLetter var="factarray[_EMAIL]" />: <PGVRGedcomValue tag="_EMAIL" /><PGVRGedcomValue tag="EMAIL" />
					</PGVRText>
				</PGVRTextBox>
			</PGVRList>
			<PGVRCell align="rightrtl" newline="1" style="label">
				<br /><PGVRvar var="pgv_lang[total_indis]" />: <PGVRListTotal />
			</PGVRCell>
		</PGVRBody>
		
		<PGVRFooter>
			<PGVRCell align="rightrtl" newline="1" style="date"><PGVRNow /></PGVRCell>
		</PGVRFooter>
	</PGVRDoc>
</PGVReport>
