<?xml version="1.0" encoding="UTF-8"?>
<PGVReport access="PRIV_PUBLIC" icon="sfamily">
	<!-- $Id: marrlist.xml 6595 2009-12-21 21:47:10Z canajun2eh $ -->
	<PGVRTitle><PGVRvar var="pgv_lang[marr_report]" /></PGVRTitle>
	<PGVRDescription>Prints a list of families matching specific name and/or marriage criteria</PGVRDescription>
	<PGVRInput name="name" lookup="NAME" type="text"><PGVRvar var="pgv_lang[name]" /></PGVRInput>
	<PGVRInput name="marrplace" lookup="PLAC" type="text"><PGVRvar var="pgv_lang[marrplace]" /> </PGVRInput>
	<PGVRInput name="marrdate1" lookup="DATE" type="text"><PGVRvar var="pgv_lang[marrdate1]" /></PGVRInput>
	<PGVRInput name="marrdate2" lookup="DATE" type="text"><PGVRvar var="pgv_lang[marrdate2]" /></PGVRInput>
	<PGVRInput name="sortby" type="select" options="NAME,MARR:DATE"><PGVRvar var="pgv_lang[sort_by]" /></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"/>
	<!-- Generated by style - required style name by the generator -->
	<PGVRStyle name="genby" font="$fonts" size="8" />
	<!-- Date tetx -->
	<PGVRStyle name="date" font="$fonts" size="8"/>
	<PGVRStyle name="text" font="$fonts" size="9" />
	<PGVRStyle name="spouse" font="$fonts" size="8" />
	<PGVRStyle name="label" font="$fonts" size="10" style="b"/>

	<PGVRDoc pageSize="$pageSize" orientation="landscape">
		<PGVRHeader>
			<PGVRCell align="center" height="20" newline="1" style="header"><PGVRvar var="pgv_lang[marr_report]" /></PGVRCell>
			<PGVRCell align="rightrtl" height="10" newline="1" style="pagenum"><PGVRvar var="pgv_lang[page]" /> <PGVRPageNum /> <PGVRvar var="pgv_lang[of]" /> <PGVRTotalPages /></PGVRCell>

			<PGVRSetVar name="fill" value="" />
			<PGVRif condition="$sortby=='NAME'">
				<PGVRSetVar name="fill" value="#AAAAAA" />
			</PGVRif>
			<PGVRTextBox bgcolor="$fill" border="1" height="12" width="200">
				<PGVRText style="label"><PGVRvar var="pgv_lang[name]" /></PGVRText>
			</PGVRTextBox>

			<PGVRSetVar name="fill" value="" />
			<PGVRif condition="$sortby=='MARR:DATE'">
				<PGVRSetVar name="fill" value="#AAAAAA" />
			</PGVRif>
			<PGVRTextBox bgcolor="$fill" border="1" height="12" width="100">
				<PGVRText style="label"><PGVRvar var="factarray[DATE]" /></PGVRText>
			</PGVRTextBox>

			<PGVRTextBox border="1" height="12" width="225">
				<PGVRText style="label"><PGVRvar var="factarray[PLAC]" /></PGVRText>
			</PGVRTextBox>

			<PGVRTextBox border="1" height="12" newline="1">
				<PGVRText style="label"><PGVRvar var="factarray[SOUR]" /></PGVRText>
			</PGVRTextBox>
		</PGVRHeader>

		<PGVRBody>
			<PGVRSetVar name="printedFamilies" value="0" />
			<PGVRList list="family" filter1="MARR:PLAC CONTAINS $marrplace" filter2="MARR:DATE GTE $marrdate1" filter3="MARR:DATE LTE $marrdate2" sortby="$sortby">
			<!-- filter4 should be: filter4="NAME CONTAINS $name", but the family name doesn't exist as a field in the database,
					so we can't use that.  -->
				<PGVRSetVar name="skipFamily" value="no" />
				<PGVRif condition="$name!=''">
					<PGVRSetVar name="skipFamily" value="yes" />
					<PGVRGedcom id="@HUSB">
						<PGVRif condition="stristr(@NAME,$name)!==false">
							<PGVRSetVar name="skipFamily" value="no" />
						</PGVRif>
					</PGVRGedcom>
					<PGVRGedcom id="@WIFE">
						<PGVRif condition="stristr(@NAME,$name)!==false">
							<PGVRSetVar name="skipFamily" value="no" />
						</PGVRif>
					</PGVRGedcom>
				</PGVRif>
				<PGVRif condition="$skipFamily=='no'">
					<PGVRSetVar name="printedFamilies" value="$printedFamilies+1" />

					<PGVRTextBox height="12" width="200">
						<PGVRText style="text"><PGVRGetPersonName id="@HUSB" /></PGVRText>
						<PGVRText style="spouse">
							<br />   <PGVRGetPersonName id="@WIFE" />  (<PGVRGedcomValue tag="@id" />)
						</PGVRText>
					</PGVRTextBox>

					<PGVRTextBox height="12" width="100">
						<PGVRText style="text"><PGVRGedcomValue tag="MARR:DATE" newline="1" /></PGVRText>
					</PGVRTextBox>

					<PGVRTextBox height="12" width="225">
						<PGVRText style="text"><PGVRGedcomValue tag="MARR:PLAC" /></PGVRText>
					</PGVRTextBox>

					<PGVRTextBox height="12" newline="1">
						<!-- Only with multiple sources use line feed (br) -->
						<PGVRSetVar name="usebr" value="0"/>
						<PGVRText style="text">
							<PGVRRepeatTag tag="MARR:SOUR">
								<PGVRGedcom id="@SOUR">
									<PGVRif condition="$usebr==1"><br /></PGVRif>
									<PGVRGedcomValue tag="TITL" />
								</PGVRGedcom>
								<PGVRSetVar name="usebr" value="1"/>
							</PGVRRepeatTag>
						</PGVRText>
					</PGVRTextBox>

				</PGVRif>
			</PGVRList>
			<PGVRCell align="rightrtl" height="24" newline="1" style="label"><br/><PGVRvar var="pgv_lang[total_fams]"/>: <PGVRvar var="printedFamilies" /></PGVRCell>
		</PGVRBody>
		<PGVRFooter>
			<PGVRCell align="rightrtl" newline="1" style="date"><PGVRNow/></PGVRCell>
		</PGVRFooter>
	</PGVRDoc>
</PGVReport>
