<?xml version="1.0" encoding="UTF-8"?>
<PGVReport access="PRIV_NONE" icon="indis">
	<PGVRTitle><PGVRvar var="pgv_lang[missing_facts_report]" /></PGVRTitle>
	<PGVRDescription>Prints a list of individuals who has missing information</PGVRDescription>
	<PGVRInput name="pid" type="text" default="" lookup="INDI"><PGVRvar var="pgv_lang[enter_pid]"/></PGVRInput>
	<PGVRInput name="relatives" type="select" default="direct-ancestors" options="child-family,spouse-family,direct-ancestors,ancestors,descendants,all"><PGVRvar var="pgv_lang[choose_relatives]"/></PGVRInput>
	<PGVRInput name="maxgen" type="select" default="*" options="*,1,2,3,4,5,6,7,8,9,10"><PGVRvar var="pgv_lang[generations]"/></PGVRInput>
	<PGVRInput name="pageSize" type="select" default="A4" options="A3,A4,letter,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>
	
	<PGVRInput name="fsour" type="checkbox" default="0"><PGVRvar var="pgv_lang[sources_to_events]" /></PGVRInput>
	<PGVRInput name="fbirth" type="checkbox" default="1"><PGVRvar var="factarray[BIRT]"/></PGVRInput>
	<PGVRInput name="fbapm" type="checkbox" default="1"><PGVRvar var="factarray[BAPM]"/> / <PGVRvar var="factarray[CHR]"/></PGVRInput>
	<PGVRInput name="ffcom" type="checkbox" default="0"><PGVRvar var="factarray[FCOM]"/></PGVRInput>
	<PGVRInput name="fconf" type="checkbox" default="0"><PGVRvar var="factarray[CONF]"/></PGVRInput>
	<PGVRInput name="fdeat" type="checkbox" default="1"><PGVRvar var="factarray[DEAT]"/></PGVRInput>
	<PGVRInput name="freli" type="checkbox" default="0"><PGVRvar var="factarray[RELI]"/></PGVRInput>

	<!-- Header -->
	<PGVRStyle name="header" font="$fonts" size="18" style="b"/>
	<!-- Generated by style - required style name by the generator -->
	<PGVRStyle name="genby" font="$fonts" size="8"/>
	<!-- Page numbers text -->
	<PGVRStyle name="pagenum" font="$fonts" size="8"/>
	<!-- Date Text - CSS Style name -->
	<PGVRStyle name="date" font="$fonts" size="8"/>
	<!-- Column list labels - CSS Style name -->
	<PGVRStyle name="list_label" font="$fonts" size="9" style="b"/>
	<!-- List values - CSS Style name -->
	<PGVRStyle name="list_value" font="$fonts" size="9"/>


	<PGVRSetVar name="name" value="300" />
	<PGVRSetVar name="printname" value="0" />
	<PGVRSetVar name="vspace" value="5" />
	<PGVRSetVar name="nrrelatives" value="0" />
	<PGVRSetVar name="nrprinted" value="0" />
	<PGVRSetVar name="nrevent" value="0" />
	<PGVRSetVar name="nrmissingevent" value="0" />

	<PGVRDoc pageSize="$pageSize">
		<PGVRHeader>
			<PGVRCell align="center" newline="1" style="header"><PGVRvar var="pgv_lang[missing_facts_report]" /></PGVRCell>
			<PGVRCell align="rightrtl" newline="1" style="pagenum"><PGVRvar var="pgv_lang[page]"/> <PGVRPageNum/> / <PGVRTotalPages/></PGVRCell>
			<PGVRCell align="center" border="1" style="list_label" width="$name"><PGVRvar var="pgv_lang[name]" /></PGVRCell>
			<PGVRCell align="center" border="1" newline="1" style="list_label"><PGVRvar var="factarray[EVEN]" /></PGVRCell>
		</PGVRHeader>

		<PGVRBody>

			<PGVRRelatives id="$pid" group="$relatives" maxgen="$maxgen" sortby="NAME">
				<!-- Relatives counter -->
				<PGVRSetVar name="nrrelatives" value="$nrrelatives + 1" />
				<PGVRSetVar name="printname" value="0" />
				<!-- Birth -->
				<PGVRif condition="$fbirth=='1'">
					<!-- Total Event Counter -->
					<PGVRSetVar name="nrevent" value="$nrevent + 2" />
					<PGVRif condition="@BIRT:DATE==''">
						<!-- Missing event counter -->
						<PGVRSetVar name="nrmissingevent" value="$nrmissingevent + 1" />
						<PGVRif condition="$printname=='0'">
							<PGVRCell style="list_value" width="$name"><PGVRGetPersonName id="" /> - (<PGVRGedcomValue tag="@id" />)</PGVRCell>
							<PGVRSetVar name="printname" value="1" />
						</PGVRif>
						<PGVRCell newline="1" style="list_value"><PGVRvar var="factarray[BIRT:DATE]" /></PGVRCell>
					</PGVRif>
					<PGVRif condition="@BIRT:PLAC==''">
						<!-- Missing event counter -->
						<PGVRSetVar name="nrmissingevent" value="$nrmissingevent + 1" />
						<PGVRif condition="$printname=='1'">
							<PGVRCell style="list_value" width="$name"> </PGVRCell>
						</PGVRif>
						<PGVRif condition="$printname=='0'">
							<PGVRCell style="list_value" width="$name"><PGVRGetPersonName id="" /> - (<PGVRGedcomValue tag="@id" />)</PGVRCell>
							<PGVRSetVar name="printname" value="1" />
						</PGVRif>
						<PGVRCell newline="1" style="list_value"><PGVRvar var="factarray[BIRT:PLAC]" /></PGVRCell>
					</PGVRif>
					<PGVRif condition="$fsour=='1'">
						<!-- Total Event Counter -->
						<PGVRSetVar name="nrevent" value="$nrevent + 1" />
						<PGVRif condition="@BIRT:SOUR==''">
							<!-- Missing event counter -->
							<PGVRSetVar name="nrmissingevent" value="$nrmissingevent + 1" />
							<PGVRif condition="$printname=='1'">
								<PGVRCell style="list_value" width="$name"> </PGVRCell>
							</PGVRif>
							<PGVRif condition="$printname=='0'">
								<PGVRCell style="list_value" width="$name"><PGVRGetPersonName id="" /> - (<PGVRGedcomValue tag="@id" />)</PGVRCell>
								<PGVRSetVar name="printname" value="1" />
							</PGVRif>
							<PGVRCell newline="1" style="list_value"><PGVRvar var="factarray[BIRT]" /> <PGVRvar var="factarray[SOUR]" /></PGVRCell>
						</PGVRif>
					</PGVRif>
				</PGVRif>

				<!-- Baptism / Christining -->
				<PGVRif condition="$fbapm=='1'">
					<!-- Total Event Counter -->
					<PGVRSetVar name="nrevent" value="$nrevent + 2" />
					<PGVRSetVar name="printbapm" value="0" />
					<!-- Baptism -->
					<PGVRif condition="(@CHR:DATE=='') and (@CHR:PLAC=='') and (@CHR:SOUR=='')">
						<PGVRif condition="@BAPM:DATE==''">
							<PGVRSetVar name="nrmissingevent" value="$nrmissingevent + 1" />
							<PGVRif condition="$printname=='1'">
								<PGVRCell style="list_value" width="$name"> </PGVRCell>
							</PGVRif>
							<PGVRif condition="$printname=='0'">
								<PGVRCell style="list_value" width="$name"><PGVRGetPersonName id="" /> - (<PGVRGedcomValue tag="@id" />)</PGVRCell>
								<PGVRSetVar name="printname" value="1" />
							</PGVRif>
							<PGVRCell newline="1" style="list_value"><PGVRvar var="factarray[BAPM:DATE]" /></PGVRCell>
						</PGVRif>
						<PGVRif condition="@BAPM:PLAC==''">
							<PGVRSetVar name="nrmissingevent" value="$nrmissingevent + 1" />
							<PGVRif condition="$printname=='1'">
								<PGVRCell style="list_value" width="$name"> </PGVRCell>
							</PGVRif>
							<PGVRif condition="$printname=='0'">
								<PGVRCell style="list_value" width="$name"><PGVRGetPersonName id="" /> - (<PGVRGedcomValue tag="@id" />)</PGVRCell>
								<PGVRSetVar name="printname" value="1" />
							</PGVRif>
							<PGVRCell newline="1" style="list_value"><PGVRvar var="factarray[BAPM:PLAC]" /></PGVRCell>
						</PGVRif>
						<PGVRif condition="$fsour=='1'">
							<PGVRSetVar name="nrevent" value="$nrevent + 1" />
							<PGVRif condition="@BAPM:SOUR==''">
								<PGVRSetVar name="nrmissingevent" value="$nrmissingevent + 1" />
								<PGVRif condition="$printname=='1'">
									<PGVRCell style="list_value" width="$name"> </PGVRCell>
								</PGVRif>
								<PGVRif condition="$printname=='0'">
									<PGVRCell style="list_value" width="$name"><PGVRGetPersonName id="" /> - (<PGVRGedcomValue tag="@id" />)</PGVRCell>
									<PGVRSetVar name="printname" value="1" />
								</PGVRif>
								<PGVRCell newline="1" style="list_value"><PGVRvar var="factarray[BAPM]" /> <PGVRvar var="factarray[SOUR]" /></PGVRCell>
							</PGVRif>
						</PGVRif>
						<PGVRSetVar name="printbapm" value="1" />
					</PGVRif>
					
					<!-- Christining -->
					<PGVRif condition="((@CHR:DATE=='') or (@CHR:PLAC=='')) and ($printbapm==0)">
						<PGVRif condition="@CHR:DATE==''">
							<PGVRSetVar name="nrmissingevent" value="$nrmissingevent + 1" />
							<PGVRif condition="$printname=='1'">
								<PGVRCell style="list_value" width="$name"> </PGVRCell>
							</PGVRif>
							<PGVRif condition="$printname=='0'">
								<PGVRCell style="list_value" width="$name"><PGVRGetPersonName id="" /> - (<PGVRGedcomValue tag="@id" />)</PGVRCell>
								<PGVRSetVar name="printname" value="1" />
							</PGVRif>
							<PGVRCell newline="1" style="list_value"><PGVRvar var="factarray[CHR:DATE]" /></PGVRCell>
						</PGVRif>
						<PGVRif condition="@CHR:PLAC==''">
							<PGVRSetVar name="nrmissingevent" value="$nrmissingevent + 1" />
							<PGVRif condition="$printname=='1'">
								<PGVRCell style="list_value" width="$name"> </PGVRCell>
							</PGVRif>
							<PGVRif condition="$printname=='0'">
								<PGVRCell style="list_value" width="$name"><PGVRGetPersonName id="" /> - (<PGVRGedcomValue tag="@id" />)</PGVRCell>
								<PGVRSetVar name="printname" value="1" />
							</PGVRif>
							<PGVRCell newline="1" style="list_value"><PGVRvar var="factarray[CHR:PLAC]" /></PGVRCell>
						</PGVRif>
						<PGVRif condition="$fsour=='1'">
							<PGVRSetVar name="nrevent" value="$nrevent + 1" />
							<PGVRif condition="@CHR:SOUR==''">
								<PGVRSetVar name="nrmissingevent" value="$nrmissingevent + 1" />
								<PGVRif condition="$printname=='1'">
									<PGVRCell style="list_value" width="$name"> </PGVRCell>
								</PGVRif>
								<PGVRif condition="$printname=='0'">
									<PGVRCell style="list_value" width="$name"><PGVRGetPersonName id="" /> - (<PGVRGedcomValue tag="@id" />)</PGVRCell>
									<PGVRSetVar name="printname" value="1" />
								</PGVRif>
								<PGVRCell newline="1" style="list_value"><PGVRvar var="factarray[CHR]" /> <PGVRvar var="factarray[SOUR]" /></PGVRCell>
							</PGVRif>
						</PGVRif>
					</PGVRif>
				</PGVRif>

				<!-- FCOM -->
				<PGVRif condition="$ffcom=='1'">
					<PGVRSetVar name="nrevent" value="$nrevent + 2" />
					<PGVRif condition="@FCOM:DATE==''">
						<PGVRSetVar name="nrmissingevent" value="$nrmissingevent + 1" />
						<PGVRif condition="$printname=='1'">
							<PGVRCell style="list_value" width="$name"> </PGVRCell>
						</PGVRif>
						<PGVRif condition="$printname=='0'">
							<PGVRCell style="list_value" width="$name"><PGVRGetPersonName id="" /> - (<PGVRGedcomValue tag="@id" />)</PGVRCell>
							<PGVRSetVar name="printname" value="1" />
						</PGVRif>
						<PGVRCell newline="1" style="list_value"><PGVRvar var="factarray[FCOM]" /> <PGVRvar var="factarray[DATE]" /></PGVRCell>
					</PGVRif>
					<PGVRif condition="@FCOM:PLAC==''">
						<PGVRSetVar name="nrmissingevent" value="$nrmissingevent + 1" />
						<PGVRif condition="$printname=='1'">
							<PGVRCell style="list_value" width="$name"> </PGVRCell>
						</PGVRif>
						<PGVRif condition="$printname=='0'">
							<PGVRCell style="list_value" width="$name"><PGVRGetPersonName id="" /> - (<PGVRGedcomValue tag="@id" />)</PGVRCell>
							<PGVRSetVar name="printname" value="1" />
						</PGVRif>
						<PGVRCell newline="1" style="list_value"><PGVRvar var="factarray[FCOM]" /> <PGVRvar var="factarray[PLAC]" /></PGVRCell>
					</PGVRif>
					<PGVRif condition="$fsour=='1'">
						<PGVRSetVar name="nrevent" value="$nrevent + 1" />
						<PGVRif condition="@FCOM:SOUR==''">
							<PGVRSetVar name="nrmissingevent" value="$nrmissingevent + 1" />
							<PGVRif condition="$printname=='1'">
								<PGVRCell style="list_value" width="$name"> </PGVRCell>
							</PGVRif>
							<PGVRif condition="$printname=='0'">
								<PGVRCell style="list_value" width="$name"><PGVRGetPersonName id="" /> - (<PGVRGedcomValue tag="@id" />)</PGVRCell>
								<PGVRSetVar name="printname" value="1" />
							</PGVRif>
							<PGVRCell newline="1" style="list_value"><PGVRvar var="factarray[FCOM]" /> <PGVRvar var="factarray[SOUR]" /></PGVRCell>
						</PGVRif>
					</PGVRif>
				</PGVRif>

				<!-- CONF -->
				<PGVRif condition="$fconf=='1'">
					<PGVRSetVar name="nrevent" value="$nrevent + 2" />
					<PGVRif condition="@CONF:DATE==''">
						<PGVRSetVar name="nrmissingevent" value="$nrmissingevent + 1" />
						<PGVRif condition="$printname=='1'">
							<PGVRCell style="list_value" width="$name"> </PGVRCell>
						</PGVRif>
						<PGVRif condition="$printname=='0'">
							<PGVRCell style="list_value" width="$name"><PGVRGetPersonName id="" /> - (<PGVRGedcomValue tag="@id" />)</PGVRCell>
							<PGVRSetVar name="printname" value="1" />
						</PGVRif>
						<PGVRCell newline="1" style="list_value"><PGVRvar var="factarray[CONF]" /> <PGVRvar var="factarray[DATE]" /></PGVRCell>
					</PGVRif>
					<PGVRif condition="@CONF:PLAC==''">
						<PGVRSetVar name="nrmissingevent" value="$nrmissingevent + 1" />
						<PGVRif condition="$printname=='1'">
							<PGVRCell style="list_value" width="$name"> </PGVRCell>
						</PGVRif>
						<PGVRif condition="$printname=='0'">
							<PGVRCell style="list_value" width="$name"><PGVRGetPersonName id="" /> - (<PGVRGedcomValue tag="@id" />)</PGVRCell>
							<PGVRSetVar name="printname" value="1" />
						</PGVRif>
						<PGVRCell newline="1" style="list_value"><PGVRvar var="factarray[CONF]" /> <PGVRvar var="factarray[PLAC]" /></PGVRCell>
					</PGVRif>
					<PGVRif condition="$fsour=='1'">
						<PGVRSetVar name="nrevent" value="$nrevent + 1" />
						<PGVRif condition="@CONF:SOUR==''">
							<PGVRSetVar name="nrmissingevent" value="$nrmissingevent + 1" />
							<PGVRif condition="$printname=='1'">
								<PGVRCell style="list_value" width="$name"> </PGVRCell>
							</PGVRif>
							<PGVRif condition="$printname=='0'">
								<PGVRCell style="list_value" width="$name"><PGVRGetPersonName id="" /> - (<PGVRGedcomValue tag="@id" />)</PGVRCell>
								<PGVRSetVar name="printname" value="1" />
							</PGVRif>
							<PGVRCell newline="1" style="list_value"><PGVRvar var="factarray[CONF]" /> <PGVRvar var="factarray[SOUR]" /></PGVRCell>
						</PGVRif>
					</PGVRif>
				</PGVRif>

				<!-- DEAT -->
				<PGVRif condition="$fdeat=='1'">
					<PGVRSetVar name="nrevent" value="$nrevent + 2" />
					<PGVRif condition="@DEAT:DATE==''">
						<PGVRSetVar name="nrmissingevent" value="$nrmissingevent + 1" />
						<PGVRif condition="$printname=='1'">
							<PGVRCell style="list_value" width="$name"> </PGVRCell>
						</PGVRif>
						<PGVRif condition="$printname=='0'">
							<PGVRCell style="list_value" width="$name"><PGVRGetPersonName id="" /> - (<PGVRGedcomValue tag="@id" />)</PGVRCell>
							<PGVRSetVar name="printname" value="1" />
						</PGVRif>
						<PGVRCell newline="1" style="list_value"><PGVRvar var="factarray[DEAT:DATE]" /></PGVRCell>
					</PGVRif>
					<PGVRif condition="@DEAT:PLAC==''">
						<PGVRSetVar name="nrmissingevent" value="$nrmissingevent + 1" />
						<PGVRif condition="$printname=='1'">
							<PGVRCell style="list_value" width="$name"> </PGVRCell>
						</PGVRif>
						<PGVRif condition="$printname=='0'">
							<PGVRCell style="list_value" width="$name"><PGVRGetPersonName id="" /> - (<PGVRGedcomValue tag="@id" />)</PGVRCell>
							<PGVRSetVar name="printname" value="1" />
						</PGVRif>
						<PGVRCell newline="1" style="list_value"><PGVRvar var="factarray[DEAT:PLAC]" /></PGVRCell>
					</PGVRif>
					<PGVRif condition="$fsour=='1'">
						<PGVRSetVar name="nrevent" value="$nrevent + 1" />
						<PGVRif condition="@DEAT:SOUR==''">
							<PGVRSetVar name="nrmissingevent" value="$nrmissingevent + 1" />
							<PGVRif condition="$printname=='1'">
								<PGVRCell style="list_value" width="$name"> </PGVRCell>
							</PGVRif>
							<PGVRif condition="$printname=='0'">
								<PGVRCell style="list_value" width="$name"><PGVRGetPersonName id="" /> - (<PGVRGedcomValue tag="@id" />)</PGVRCell>
								<PGVRSetVar name="printname" value="1" />
							</PGVRif>
							<PGVRCell newline="1" style="list_value"><PGVRvar var="factarray[DEAT]" /> <PGVRvar var="factarray[SOUR]" /></PGVRCell>
						</PGVRif>
					</PGVRif>
				</PGVRif>

				<!-- RELI -->
				<PGVRif condition="$freli=='1'">
					<PGVRSetVar name="nrevent" value="$nrevent + 1" />
					<PGVRif condition="@RELI==''">
						<PGVRSetVar name="nrmissingevent" value="$nrmissingevent + 1" />
						<PGVRif condition="$printname=='1'">
							<PGVRCell style="list_value" width="$name"> </PGVRCell>
						</PGVRif>
						<PGVRif condition="$printname=='0'">
							<PGVRCell style="list_value" width="$name"><PGVRGetPersonName id="" /> - (<PGVRGedcomValue tag="@id" />)</PGVRCell>
							<PGVRSetVar name="printname" value="1" />
						</PGVRif>
						<PGVRCell newline="1" style="list_value"><PGVRvar var="factarray[RELI]" /></PGVRCell>
					</PGVRif>
				</PGVRif>

				<PGVRif condition="$printname=='1'">
					<PGVRSetVar name="nrprinted" value="$nrprinted + 1" />
					<PGVRTextBox height="1" newline="1" padding="0"/>
					<PGVRLine />
					<PGVRTextBox height="1" newline="1" padding="0"/>
				</PGVRif>

			</PGVRRelatives>

			<PGVRTextBox height="$vspace" newline="1" padding="0"/>
			<PGVRCell align="rightrtl" newline="1" style="list_label"><PGVRvar var="pgv_lang[total_indis]"/>: <PGVRvar var="nrprinted"/> / <PGVRvar var="nrrelatives"/></PGVRCell>
			<PGVRCell align="rightrtl" newline="1" style="list_label"><PGVRvar var="pgv_lang[stat_events]"/>: <PGVRvar var="nrmissingevent"/> / <PGVRvar var="nrevent"/></PGVRCell>
			<PGVRTextBox height="$vspace" newline="1" padding="0"/>

		</PGVRBody>

		<PGVRFooter>
			<PGVRCell align="rightrtl" newline="1" style="date"><PGVRNow/></PGVRCell>
		</PGVRFooter>
	</PGVRDoc>
</PGVReport>
