<?xml version="1.0" encoding="UTF-8"?>
<PGVReport>
	<!-- $Id$ -->
	<PGVRTitle><PGVRvar var="i18n::translate('Death Date and Place Report')" /></PGVRTitle>
	<PGVRDescription>Prints a list of individuals matching specific name and/or death criteria</PGVRDescription>
	<PGVRInput name="name" lookup="NAME" type="text"><PGVRvar var="i18n::translate('Name')" /></PGVRInput>
	<PGVRInput name="deathplace" lookup="PLAC" type="text"><PGVRvar var="i18n::translate('Death Place contains')" /></PGVRInput>
	<PGVRInput name="deathdate1" lookup="DATE" type="text"><PGVRvar var="i18n::translate('Death Date range start')" /></PGVRInput>
	<PGVRInput name="deathdate2" lookup="DATE" type="text"><PGVRvar var="i18n::translate('Death Date range end')" /></PGVRInput>
	<PGVRInput name="sortby" type="select" default="NAME" options="none,ID,NAME,DEAT:DATE"><PGVRvar var="i18n::translate('Sort by')" /></PGVRInput>
	<PGVRInput name="adlist" type="select" default="none" options="none,_MARNM,HUSB"><PGVRvar var="i18n::translate('Name List')" /></PGVRInput>
	<PGVRInput name="pageSize" type="select" default="A4" options="letter,A3,A4,legal"><PGVRvar var="i18n::translate('Page size')" /></PGVRInput>
	<PGVRInput name="fonts" type="select" default="dejavusans" options="arialunicid0,dejavusans,helvetica"><PGVRvar var="i18n::translate('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" />
	<!-- Column labels -->
	<PGVRStyle name="label" font="$fonts" size="10" style="b"/>
	<!-- 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"/>

	<PGVRDoc pageSize="$pageSize" orientation="landscape">
		<PGVRHeader>
			<PGVRCell align="center" height="20" newline="1" style="header"><PGVRvar var="i18n::translate('Death Date and Place Report')" /></PGVRCell>
			<PGVRCell align="rightrtl" newline="1" style="pagenum"><PGVRvar var="i18n::translate('Page')" /> <PGVRPageNum /> <PGVRvar var="i18n::translate('of')" /> <PGVRTotalPages /></PGVRCell>

			<PGVRSetVar name="fill" value="" />
			<PGVRif condition="($sortby=='NAME') or ($sortby=='ID')"><PGVRSetVar name="fill" value="#AAAAAA" /></PGVRif>
			<PGVRTextBox bgcolor="$fill" border="1" width="200">
				<PGVRText style="label"><PGVRvar var="i18n::translate('Name')" /></PGVRText>
			</PGVRTextBox>

			<PGVRSetVar name="fill" value="" />
			<PGVRif condition="$sortby=='DEAT:DATE'">
				<PGVRSetVar name="fill" value="#AAAAAA" />
			</PGVRif>
			<PGVRTextBox bgcolor="$fill" border="1" width="100">
				<PGVRText style="label"><PGVRvar var="i18n::translate('Date')" /></PGVRText>
			</PGVRTextBox>

			<PGVRTextBox border="1" width="225">
				<PGVRText style="label"><PGVRvar var="i18n::translate('Place')" /></PGVRText>
			</PGVRTextBox>

			<PGVRTextBox border="1" newline="1">
			  <PGVRText style="label"><PGVRvar var="i18n::translate('Source')" /></PGVRText>
			</PGVRTextBox>
		</PGVRHeader>

		<PGVRBody>
			<PGVRList list="individual" filter1="DEAT:PLAC CONTAINS $deathplace" filter2="DEAT:DATE GTE $deathdate1" filter3="DEAT:DATE LTE $deathdate2" filter4="NAME CONTAINS $name" sortby="$sortby">
				<PGVRTextBox width="200">
					<PGVRText style="text"><PGVRGetPersonName id="" /> - (<PGVRGedcomValue tag="@id" />)
						<PGVRif condition="$adlist=='_MARNM'">
							<PGVRRepeatTag tag="NAME:_MARNM">
								<br /><PGVRGedcomValue tag="_MARNM" />
							</PGVRRepeatTag>
						</PGVRif>
						<PGVRif condition="($adlist=='HUSB') and (@SEX=='F')">
							<PGVRRepeatTag tag="FAMS">
								<PGVRGedcom id="@FAMS:@HUSB">
									<br /><PGVRGetPersonName id="" />
								</PGVRGedcom>
							</PGVRRepeatTag>
						</PGVRif>
					</PGVRText>
				</PGVRTextBox>
				<PGVRTextBox width="100">
					<PGVRText style="text"><PGVRGedcomValue tag="DEAT:DATE" newline="1" /></PGVRText>
				</PGVRTextBox>
				<PGVRTextBox width="225">
					<PGVRText style="text"><PGVRGedcomValue tag="DEAT:PLAC" /></PGVRText>
				</PGVRTextBox>
				<PGVRTextBox newline="1">
					<!-- Only with multiple sources use line feed (br) -->
					<PGVRSetVar name="usebr" value="0"/>
					<PGVRText style="text">
						<PGVRRepeatTag tag="DEAT:SOUR">
							<PGVRGedcom id="@SOUR">
								<PGVRif condition="$usebr==1"><br /></PGVRif>
								<PGVRGedcomValue tag="TITL" />
							</PGVRGedcom>
							<PGVRSetVar name="usebr" value="1"/>
						</PGVRRepeatTag>
					</PGVRText>
				</PGVRTextBox>
			</PGVRList>
			<PGVRCell align="rightrtl" height="24" newline="1" style="label"><br/><PGVRvar var="i18n::translate('Total individuals')"/>: <PGVRListTotal/></PGVRCell>
		</PGVRBody>
		<PGVRFooter>
			<PGVRCell align="rightrtl" newline="1" style="date"><PGVRNow/></PGVRCell>
		</PGVRFooter>
	</PGVRDoc>
</PGVReport>
