<?xml version="1.0" encoding="UTF-8"?>
<PGVReport access="PRIV_PUBLIC" icon="cfamily">
<!-- $Id: relativelist_ext.xml 6595 2009-12-21 21:47:10Z canajun2eh $ -->
	<PGVRTitle><PGVRvar var="pgv_lang[relatives_report_ext]" /></PGVRTitle>
	<PGVRDescription>Prints a list of individuals related to a specific person</PGVRDescription>
	<PGVRInput name="pid" lookup="INDI" type="text"><PGVRvar var="pgv_lang[enter_pid]" /></PGVRInput>
	<PGVRInput name="relatives" type="select" options="child-family,spouse-family,direct-ancestors,ancestors,descendants,all"><PGVRvar var="pgv_lang[choose_relatives]" /></PGVRInput>
	<PGVRInput name="sortby" type="select" default="BIRT:DATE" options="none,ID,NAME,BIRT:DATE,DEAT: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="14" />
	<!-- 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 text -->
	<PGVRStyle name="date" font="$fonts" size="8"/>
	<PGVRStyle name="text" font="$fonts" size="10" />
	<PGVRStyle name="bold" font="$fonts" size="10" style="b" />
	<PGVRStyle name="mini" font="$fonts" size="8" />
	<PGVRStyle name="minibold" font="$fonts" size="8" style="b" />
	<PGVRStyle name="label" font="$fonts" size="10" style="b" />

	<PGVRSetVar name="height1" value="14" />
	<PGVRSetVar name="height2" value="10" />
	<PGVRSetVar name="width1" value="45" />
	<PGVRSetVar name="width2" value="150" />
	<PGVRSetVar name="width3" value="120" />
	<PGVRSetVar name="width4" value="120" />
	<PGVRSetVar name="width5" value="150" />
	<PGVRSetVar name="width6" value="150" />
	<PGVRSetVar name="widthB2" value="280" />
	<PGVRSetVar name="widthB3" value="40" />
	<PGVRSetVar name="widthB4" value="375" />
	<PGVRSetVar name="leftbdp" value="$width1+$width2" />

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

			<PGVRSetVar name="fill" value="" />
			<PGVRif condition="$sortby=='ID'">
				<PGVRSetVar name="fill" value="#AAAAAA" />
			</PGVRif>
			<PGVRCell bgcolor="$fill" border="1" height="$height1" style="label" width="$width1"> </PGVRCell>

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

			<PGVRSetVar name="fill" value="" />
			<PGVRif condition="$sortby=='BIRT:DATE'">
				<PGVRSetVar name="fill" value="#AAAAAA" />
			</PGVRif>
			<PGVRCell bgcolor="$fill" border="1" height="$height1" style="label" width="$width3"> <PGVRvar var="factarray[BIRT]" /></PGVRCell>

			<PGVRSetVar name="fill" value="" />
			<PGVRif condition="$sortby=='DEAT:DATE'">
				<PGVRSetVar name="fill" value="#AAAAAA" />
			</PGVRif>
			<PGVRCell bgcolor="$fill" border="1" height="$height1" style="label" width="$width4"> <PGVRvar var="factarray[DEAT]" /></PGVRCell>

			<PGVRCell border="1" height="$height1" style="label" width="$width5"> <PGVRvar var="pgv_lang[father]" /></PGVRCell>
			<PGVRCell border="1" height="$height1" newline="1" style="label"> <PGVRvar var="pgv_lang[mother]" /></PGVRCell>
		</PGVRHeader>

		<PGVRBody>
			<PGVRRelatives id="$pid" group="$relatives" sortby="$sortby">
				<PGVRSetVar name="sex" value="@SEX" />
				<!-- 1. Block -->
				<PGVRTextBox height="$height1" width="$width1">
					<PGVRText style="bold"><PGVRGedcomValue tag="@id" /></PGVRText>
				</PGVRTextBox>
				<PGVRTextBox height="$height1" width="$width2">
					<PGVRText style="bold"><PGVRGetPersonName id="" /></PGVRText>
				</PGVRTextBox>
				<PGVRTextBox height="$height1" width="$width3">
					<PGVRText style="text"><PGVRGedcomValue tag="BIRT:DATE" truncate="20" /><br/></PGVRText>
					<PGVRText style="mini"><PGVRGedcomValue tag="BIRT:PLAC" /></PGVRText>
				</PGVRTextBox>
				<PGVRTextBox height="$height1" width="$width4">
					<PGVRText style="text"><PGVRGedcomValue tag="DEAT:DATE" truncate="20" /><br/></PGVRText>
					<PGVRText style="mini"><PGVRGedcomValue tag="DEAT:PLAC" /></PGVRText>
				</PGVRTextBox>
				<!-- If FAMC is empty all lines will be ignored. So, don't place any newline break in here -->
				<PGVRGedcom id="@FAMC">
					<PGVRTextBox height="$height1" width="$width5">
						<PGVRGedcom id="@HUSB">
							<PGVRText style="text"><PGVRGetPersonName id="" /> (<PGVRGedcomValue tag="@id" />)</PGVRText>
						</PGVRGedcom>
					</PGVRTextBox>
					<PGVRTextBox height="$height1" newline="1">
						<PGVRGedcom id="@WIFE">
							<PGVRText style="text"><PGVRGetPersonName id="" /> (<PGVRGedcomValue tag="@id" />)</PGVRText>
						</PGVRGedcom>
					</PGVRTextBox>
				</PGVRGedcom>
				<!-- one way or the other, we need a new line -->
				<PGVRif condition="@FAMC==''">
					<PGVRTextBox height="2" newline="1"/>
				</PGVRif>
				<!-- 2. Block -->
<!--				<PGVRTextBox height="$height2" left="$leftbdp" width="$width3">
					<PGVRText style="mini"><PGVRGedcomValue tag="BIRT:PLAC" /></PGVRText>
				</PGVRTextBox>
				<PGVRTextBox height="$height2" newline="1" width="$width4">
					<PGVRText style="mini"><PGVRGedcomValue tag="DEAT:PLAC" /></PGVRText>
				</PGVRTextBox>
-->				<!-- 3. Block -->
				<PGVRRepeatTag tag="FAMS">
					<PGVRGedcom id="@FAMS">
						<PGVRTextBox height="$height2" left="$width1" width="$widthB2">
							<PGVRif condition="$sex=='M'">
								<PGVRText style="mini">
									<PGVRvar var="pgv_lang[family]" /> (<PGVRGedcomValue tag="@id" />) <PGVRvar var="pgv_lang[with]" /> <PGVRGetPersonName id="@WIFE" /> (<PGVRGedcom id="@WIFE"><PGVRGedcomValue tag="@id" /></PGVRGedcom>) <PGVRGedcomValue tag="MARR:DATE" />
								</PGVRText>
							</PGVRif>
							<PGVRif condition="$sex=='F'">
								<PGVRText style="mini">
									<PGVRvar var="pgv_lang[family]" /> (<PGVRGedcomValue tag="@id" />) <PGVRvar var="pgv_lang[with]" /> <PGVRGetPersonName id="@HUSB" /> (<PGVRGedcom id="@HUSB"><PGVRGedcomValue tag="@id" /></PGVRGedcom>) <PGVRGedcomValue tag="MARR:DATE" />
								</PGVRText>
							</PGVRif>
						</PGVRTextBox>
						<PGVRTextBox height="$height2" width="50">
							<PGVRText style="minibold"><PGVRvar var="pgv_lang[children]" />:</PGVRText>
						</PGVRTextBox>
						<PGVRTextBox height="$height2" newline="1">
							<PGVRSetVar name="morechildren" value="0" />
							<PGVRRepeatTag tag="CHIL">
								<PGVRGedcom id="@CHIL">
									<PGVRText style="mini">
										<!-- Print this only when more then one child exist -->
										<PGVRif condition="$morechildren==1">, </PGVRif>
										<PGVRGetPersonName id="" /> (<PGVRGedcomValue tag="@id" />)
									</PGVRText>
									<PGVRSetVar name="morechildren" value="1" />
								</PGVRGedcom>
							</PGVRRepeatTag>
						</PGVRTextBox>
					</PGVRGedcom>
				</PGVRRepeatTag>

				<!-- keep distance between line -->
				<PGVRTextBox height="2" newline="1" padding="0"/>
				<PGVRLine />
				<PGVRTextBox height="2" newline="1" padding="0"/>

			</PGVRRelatives>
			<PGVRCell align="rightrtl" height="15" 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>
