<?xml version="1.0" encoding="UTF-8"?>
<PGVReport access="PRIV_PUBLIC" icon="indis">
	<!-- $Id: individual.xml 6595 2009-12-21 21:47:10Z canajun2eh $ -->
	<PGVRTitle><PGVRvar var="pgv_lang[individual_report]" /></PGVRTitle>
	<PGVRDescription>Prints an individual record report</PGVRDescription>
	<PGVRInput name="pid" lookup="INDI" type="text" default=""><PGVRvar var="pgv_lang[enter_pid]" /></PGVRInput>
	<PGVRInput name="sources" type="checkbox" default="1"><PGVRvar var="pgv_lang[show_sources]" /></PGVRInput>
	<PGVRInput name="notes" type="checkbox" default="1"><PGVRvar var="pgv_lang[show_notes]" /></PGVRInput>
	<PGVRInput name="photos" type="select" default="highlighted" options="none,all,highlighted"><PGVRvar var="pgv_lang[show_photos]"/></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="18" />
	<!-- 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" />
	<!-- Source text - PGVRFootnoteTexts - required style name by the generator -->
	<PGVRStyle name="footnote" font="$fonts" size="8" />
	<!-- Links to sources - required style name by the generator -->
	<PGVRStyle name="footnotenum" font="$fonts" size="6" />
	<!-- Date text -->
	<PGVRStyle name="date" font="$fonts" size="8"/>
	<PGVRStyle name="label1" font="$fonts" size="9" />
	<PGVRStyle name="name" font="$fonts" size="10" />
	<PGVRStyle name="name1" font="$fonts" size="14" />
	<PGVRStyle name="text" font="$fonts" size="9" />

	<PGVRSetVar name="ignore" value="CHAN,NAME,SEX,SOUR,NOTE,OBJE,FAMC,FAMS,TITL,CHIL,HUSB,WIFE,_UID,_PGV_OBJS" />
	<!-- Section title background color -->
	<PGVRSetVar name="stbgcolor" value="#AAAAAA"/>
	<!-- set the default widths -->
	<PGVRSetVar name="width" value="433" />
	<PGVRSetVar name="width1" value="418" />
	<PGVRSetVar name="width2" value="233" />
	<PGVRSetVar name="dwidth" value="200" />
	<PGVRSetVar name="pwidth" value="436" />
	<!-- change the widths for no pictures -->
	<PGVRif condition="$photos=='none'">
		<PGVRSetVar name="width" value="0"/>
		<PGVRSetVar name="width1" value="0"/>
		<PGVRSetVar name="width2" value="0"/>
	</PGVRif>
	<!-- New Page for Sources controller if SOUR exist -->
	<PGVRSetVar name="source_exist" value="0" />

	<PGVRDoc pageSize="$pageSize" >
		<PGVRHeader>
			<PGVRCell align="center" newline="1" style="header"><PGVRvar var="pgv_lang[individual_report]" /></PGVRCell>
			<PGVRCell align="rightrtl" newline="1" style="pagenum"><PGVRvar var="pgv_lang[page]" /> <PGVRPageNum /> <PGVRvar var="pgv_lang[of]" /> <PGVRTotalPages /></PGVRCell>
		</PGVRHeader>
		<PGVRBody>
			<!-- set the gedcom context for this individual -->
			<PGVRGedcom id="$pid">
				<PGVRCell newline="1" style="name1"><PGVRGetPersonName id=""/></PGVRCell>
				<!-- show the persons images -->
				<PGVRif condition="$photos=='all'">
					<!-- This is an image not a text, so don't use text padding
					Reset also the last height after all the images has been printed
					set pagecheck to 0, the image function check is too
					and "trick" the X-position back to the margin with a newline -->
					<PGVRTextBox left="$pwidth" newline="1" pagecheck="0" padding="0" reseth="1" width="80">
						<PGVRRepeatTag tag="OBJE">
							<PGVRImage file="@FILE" width="80" ln="N"/>
						</PGVRRepeatTag>
					</PGVRTextBox>
				</PGVRif>
				<!-- show the person's Highlighted Image -->
				<PGVRif condition="$photos=='highlighted'">
					<PGVRHighlightedImage left="$pwidth" width="80"/>
				</PGVRif>

				<!-- print the person's facts -->
				<PGVRTextBox bgcolor="$stbgcolor" border="1" height="16" newline="1" width="$width">
					<PGVRText style="label1"><PGVRvar var="pgv_lang[personal_facts]" /></PGVRText>
				</PGVRTextBox>
				
				<!-- print level 1 sources -->
				<PGVRTextBox border="1" width="$width" height="16" newline="1">
					<PGVRText style="name"><PGVRGetPersonName id=""/> </PGVRText>
					<PGVRif condition="$sources==1">
						<PGVRRepeatTag tag="SOUR">
							<PGVRFootnote>
								<PGVRGedcom id="@SOUR">
									<PGVRGedcomValue tag="TITL" />
								</PGVRGedcom>
								<PGVRif condition="@PAGE!=''">: </PGVRif>
								<PGVRGedcomValue tag="SOUR:PAGE"/> <PGVRGedcomValue tag="SOUR:DATA:TEXT"/>	
							</PGVRFootnote>
							<PGVRSetVar name="source_exist" value="1"/>
						</PGVRRepeatTag>
					</PGVRif>
				</PGVRTextBox>
				<PGVRFacts ignore="$ignore" families="1">
					<PGVRTextBox border="1" width="$dwidth" height="16">
						<PGVRText style="pagenum"><PGVRvar var="factarray[@fact]" />  </PGVRText>
						<PGVRText style="text"><PGVRGedcomValue tag="@fact:DATE" /> </PGVRText>
						<!-- look for fact level 2 sources -->
						<PGVRif condition="$sources==1">
							<PGVRRepeatTag tag="@fact:SOUR">
								<PGVRFootnote>
									<PGVRGedcom id="@SOUR">
										<PGVRGedcomValue tag="TITL" />
									</PGVRGedcom>
									<PGVRif condition="@PAGE!=''">: </PGVRif>
									<PGVRGedcomValue tag="SOUR:PAGE"/> <PGVRGedcomValue tag="SOUR:DATA:TEXT"/>	
								</PGVRFootnote>
								<PGVRSetVar name="source_exist" value="1"/>
							</PGVRRepeatTag>
						</PGVRif>
					</PGVRTextBox>
					<!-- print a different layout for facts with descriptions -->
					<PGVRif condition="@desc!=''">
						<PGVRTextBox border="1" width="$width2" height="16" newline="1">
							<PGVRText style="text"><PGVRGedcomValue tag="@desc" />
								<!-- Print this only when it's needed -->
								<PGVRif condition="@PLAC!=''"> </PGVRif>
								<PGVRGedcomValue tag="@fact:PLAC" />
							</PGVRText>
							<PGVRGedcom id="@_PGVS">
								<PGVRif condition="@SEX=='M'">
									<PGVRText style="pagenum"> <PGVRvar var="pgv_lang[husband]" /></PGVRText>
								</PGVRif>
								<PGVRif condition="@SEX=='F'">
									<PGVRText style="pagenum"> <PGVRvar var="pgv_lang[wife]" /></PGVRText>
								</PGVRif>
								<PGVRText style="text"> <PGVRGetPersonName id="" /></PGVRText>
							</PGVRGedcom>
						</PGVRTextBox>
					</PGVRif>
					<!-- facts without descriptions -->
					<PGVRif condition="@desc==''">
						<PGVRTextBox border="1" width="$width2" height="16" newline="1">
							<PGVRif condition="@PLAC!=''">
								<PGVRText style="pagenum"><PGVRvar var="factarray[PLAC]" />   </PGVRText>
							</PGVRif>
							<PGVRText style="text">
								<PGVRGedcomValue tag="@fact:PLAC" /> <PGVRGedcomValue tag="@fact:TEMP" />
							</PGVRText>
							<PGVRGedcom id="@_PGVS">
								<PGVRif condition="@SEX=='M'">
									<PGVRText style="pagenum"> <PGVRvar var="pgv_lang[husband]" /></PGVRText>
								</PGVRif>
								<PGVRif condition="@SEX=='F'">
									<PGVRText style="pagenum"> <PGVRvar var="pgv_lang[wife]" /></PGVRText>
								</PGVRif>
								<PGVRText style="text"> <PGVRGetPersonName id="" /></PGVRText>
							</PGVRGedcom>
						</PGVRTextBox>
					</PGVRif>
				</PGVRFacts>

				<!-- print any level 1 notes -->
				<PGVRif condition="($notes==1) and (@NOTE!='')">
					<PGVRTextBox width="15" height="16" newline="1" padding="0"/>
					<PGVRTextBox border="1" width="$width" height="16" newline="1" bgcolor="$stbgcolor">
						<PGVRText style="label1"><PGVRvar var="pgv_lang[notes]" /></PGVRText>
					</PGVRTextBox>
					<PGVRRepeatTag tag="NOTE">
						<PGVRTextBox border="1" width="$width" height="16" newline="1">
							<PGVRText style="pagenum"><PGVRGedcomValue tag="NOTE" /><br/></PGVRText>
						</PGVRTextBox>
					</PGVRRepeatTag>
				</PGVRif>

				<!-- print family with parents and siblings -->
				<PGVRTextBox width="15" height="16" newline="1" padding="0"/>
				<PGVRTextBox border="1" width="$width" height="16" newline="1" bgcolor="$stbgcolor">
					<PGVRText style="label1"><PGVRvar var="pgv_lang[as_child]" /></PGVRText>
				</PGVRTextBox>
				<PGVRRepeatTag tag="FAMC">
					<PGVRGedcom id="@FAMC">
						<!-- father -->
						<PGVRGedcom id="@HUSB">
							<PGVRTextBox border="1" width="$width" height="16" newline="1">
								<PGVRText style="label1"><PGVRvar var="pgv_lang[father]" />  </PGVRText>
								<PGVRText style="name"> <PGVRGetPersonName id="" /> </PGVRText>
								<PGVRif condition="$sources==1">
									<PGVRRepeatTag tag="SOUR">
										<PGVRFootnote>
											<PGVRGedcom id="@SOUR">
												<PGVRGedcomValue tag="TITL" />
											</PGVRGedcom>
											<PGVRif condition="@PAGE!=''">: </PGVRif>
											<PGVRGedcomValue tag="SOUR:PAGE"/> <PGVRGedcomValue tag="SOUR:DATA:TEXT"/>	
										</PGVRFootnote>
										<PGVRSetVar name="source_exist" value="1"/>
									</PGVRRepeatTag>
								</PGVRif>
								<PGVRText style="text"> (<PGVRvar var="factarray[BIRT]" />: <PGVRGedcomValue tag="BIRT:DATE" /> <PGVRGedcomValue tag="BIRT:PLAC" /> - <PGVRvar var="factarray[DEAT]" />: <PGVRGedcomValue tag="DEAT:DATE" /> <PGVRGedcomValue tag="DEAT:PLAC" />)</PGVRText>
							</PGVRTextBox>
						</PGVRGedcom>
						<!-- mother -->
						<PGVRGedcom id="@WIFE">
							<PGVRTextBox border="1" width="$width" height="16" newline="1">
								<PGVRText style="label1"><PGVRvar var="pgv_lang[mother]" />  </PGVRText>
								<PGVRText style="name"> <PGVRGetPersonName id="" /> </PGVRText>
								<PGVRif condition="$sources==1">
									<PGVRRepeatTag tag="SOUR">
										<PGVRFootnote>
											<PGVRGedcom id="@SOUR">
												<PGVRGedcomValue tag="TITL" />
											</PGVRGedcom>
											<PGVRif condition="@PAGE!=''">: </PGVRif>
											<PGVRGedcomValue tag="SOUR:PAGE"/> <PGVRGedcomValue tag="SOUR:DATA:TEXT"/>	
										</PGVRFootnote>
										<PGVRSetVar name="source_exist" value="1"/>
									</PGVRRepeatTag>
								</PGVRif>
								<PGVRText style="text"> (<PGVRvar var="factarray[BIRT]" />: <PGVRGedcomValue tag="BIRT:DATE" /> <PGVRGedcomValue tag="BIRT:PLAC" /> - <PGVRvar var="factarray[DEAT]" />: <PGVRGedcomValue tag="DEAT:DATE" /> <PGVRGedcomValue tag="DEAT:PLAC" />)</PGVRText>
							</PGVRTextBox>
						</PGVRGedcom>
						<!-- siblings -->
						<PGVRRepeatTag tag="CHIL">
							<PGVRif condition="@CHIL!=$pid">
								<PGVRGedcom id="@CHIL">
								<PGVRTextBox border="1" left="15" width="$width1" height="16" newline="1">
									<!-- Brother -->
									<PGVRif condition="@SEX=='M'">
										<PGVRText style="label1"><PGVRvar var="pgv_lang[brother]" />  </PGVRText>
									</PGVRif>
									<!-- Sister -->
									<PGVRif condition="@SEX=='F'">
										<PGVRText style="label1"><PGVRvar var="pgv_lang[sister]" />  </PGVRText>
									</PGVRif>
									<!-- Unknown gender -->
									<PGVRif condition="(@SEX=='U') or (@SEX=='')">
										<PGVRText style="label1"><PGVRvar var="factarray[SEX]"/> <PGVRvar var="pgv_lang[stat_unknown]"/>  </PGVRText>
									</PGVRif>
									<PGVRText style="name"> <PGVRGetPersonName id="" /> </PGVRText>
									<PGVRif condition="$sources==1">
										<PGVRRepeatTag tag="SOUR">
											<PGVRFootnote>
												<PGVRGedcom id="@SOUR">
													<PGVRGedcomValue tag="TITL" />
												</PGVRGedcom>
												<PGVRif condition="@PAGE!=''">: </PGVRif>
												<PGVRGedcomValue tag="SOUR:PAGE"/> <PGVRGedcomValue tag="SOUR:DATA:TEXT"/>	
											</PGVRFootnote>
											<PGVRSetVar name="source_exist" value="1"/>
										</PGVRRepeatTag>
									</PGVRif>
									<PGVRText style="text"> (<PGVRvar var="factarray[BIRT]" />: <PGVRGedcomValue tag="BIRT:DATE" /> <PGVRGedcomValue tag="BIRT:PLAC" /> - <PGVRvar var="factarray[DEAT]" />: <PGVRGedcomValue tag="DEAT:DATE" /> <PGVRGedcomValue tag="DEAT:PLAC" />)</PGVRText>
								</PGVRTextBox>
							</PGVRGedcom>
						  </PGVRif>
						</PGVRRepeatTag>
					</PGVRGedcom>
				</PGVRRepeatTag>

				<!-- print family with spouse and children -->
				<PGVRRepeatTag tag="FAMS">
					<PGVRGedcom id="@FAMS">
						<!-- print wife if person is husband -->
						<PGVRif condition="$pid==@HUSB">
							<PGVRTextBox width="15" height="16" newline="1" padding="0"/>
							<PGVRTextBox border="1" width="$width" height="16" newline="1" bgcolor="$stbgcolor">
								<PGVRText style="label1"><PGVRvar var="pgv_lang[family_with]" /> <PGVRvar var="pgv_lang[wife]" /></PGVRText>
							</PGVRTextBox>
							<PGVRSetVar name="spid" value="@WIFE" />
						</PGVRif>
						<!-- print husband if person is wife -->
						<PGVRif condition="$pid==@WIFE">
							<PGVRTextBox width="15" height="16" newline="1" padding="0"/>
							<PGVRTextBox border="1" width="$width" height="16" newline="1" bgcolor="$stbgcolor">
								<PGVRText style="label1"><PGVRvar var="pgv_lang[family_with]" /> <PGVRvar var="pgv_lang[husband]" /></PGVRText>
							</PGVRTextBox>
							<PGVRSetVar name="spid" value="@HUSB" />
						</PGVRif>

						<!-- print information for spouse -->
						<PGVRGedcom id="$spid">
							<PGVRTextBox border="1" width="$width" height="16" newline="1">
								<PGVRif condition="@SEX=='M'">
									<PGVRText style="label1"><PGVRvar var="pgv_lang[husband]" />  </PGVRText>
								</PGVRif>
								<PGVRif condition="@SEX=='F'">
									<PGVRText style="label1"><PGVRvar var="pgv_lang[wife]" />  </PGVRText>
								</PGVRif>
								<PGVRText style="name"> <PGVRGetPersonName id="" /> </PGVRText>
								<PGVRif condition="$sources==1">
									<PGVRRepeatTag tag="SOUR">
										<PGVRFootnote>
											<PGVRGedcom id="@SOUR">
												<PGVRGedcomValue tag="TITL" />
											</PGVRGedcom>
											<PGVRif condition="@PAGE!=''">: </PGVRif>
											<PGVRGedcomValue tag="SOUR:PAGE"/> <PGVRGedcomValue tag="SOUR:DATA:TEXT"/>	
										</PGVRFootnote>
										<PGVRSetVar name="source_exist" value="1"/>
									</PGVRRepeatTag>
								</PGVRif>
								<PGVRText style="text"> (<PGVRvar var="factarray[BIRT]" />: <PGVRGedcomValue tag="BIRT:DATE" /> <PGVRGedcomValue tag="BIRT:PLAC" /> - <PGVRvar var="factarray[DEAT]" />: <PGVRGedcomValue tag="DEAT:DATE" /> <PGVRGedcomValue tag="DEAT:PLAC" />)</PGVRText>
							</PGVRTextBox>
						</PGVRGedcom>
						<!-- print children -->
						<PGVRRepeatTag tag="CHIL">
						  <PGVRif condition="@CHIL!=$pid">
							<PGVRGedcom id="@CHIL">
								<PGVRTextBox border="1" left="15" width="$width1" height="16" newline="1">
									<!-- Son -->
									<PGVRif condition="@SEX=='M'">
										<PGVRText style="label1"><PGVRvar var="pgv_lang[son]" />  </PGVRText>
									</PGVRif>
									<!-- Daughter -->
									<PGVRif condition="@SEX=='F'">
										<PGVRText style="label1"><PGVRvar var="pgv_lang[daughter]" />  </PGVRText>
									</PGVRif>
									<!-- Unknown gender -->
									<PGVRif condition="(@SEX=='U') or (@SEX=='')">
										<PGVRText style="label1"><PGVRvar var="factarray[SEX]"/> <PGVRvar var="pgv_lang[stat_unknown]"/>  </PGVRText>
									</PGVRif>
									<PGVRText style="name"> <PGVRGetPersonName id="" /> </PGVRText>
									<PGVRif condition="$sources==1">
										<PGVRRepeatTag tag="SOUR">
											<PGVRFootnote>
												<PGVRGedcom id="@SOUR">
													<PGVRGedcomValue tag="TITL" />
												</PGVRGedcom>
												<PGVRif condition="@PAGE!=''">: </PGVRif>
												<PGVRGedcomValue tag="SOUR:PAGE"/> <PGVRGedcomValue tag="SOUR:DATA:TEXT"/>	
											</PGVRFootnote>
											<PGVRSetVar name="source_exist" value="1"/>
										</PGVRRepeatTag>
									</PGVRif>
									<PGVRText style="text"> (<PGVRvar var="factarray[BIRT]" />: <PGVRGedcomValue tag="BIRT:DATE" /> <PGVRGedcomValue tag="BIRT:PLAC" /> - <PGVRvar var="factarray[DEAT]" />: <PGVRGedcomValue tag="DEAT:DATE" /> <PGVRGedcomValue tag="DEAT:PLAC" />)</PGVRText>
								</PGVRTextBox>
							</PGVRGedcom>
						  </PGVRif>
						</PGVRRepeatTag>
					</PGVRGedcom>
				</PGVRRepeatTag>
			</PGVRGedcom>

			<!-- print the sources -->
			<PGVRif condition="($sources==1) and ($source_exist==1)">
				<PGVRTextBox width="$width" newline="1">
					<PGVRText style="name1"><PGVRvar var="pgv_lang[sources]" /><br /><br /></PGVRText>
					<PGVRFootnoteTexts />
				</PGVRTextBox>
			</PGVRif>
		</PGVRBody>
		<PGVRFooter>
			<PGVRCell align="rightrtl" newline="1" style="date"><PGVRNow /></PGVRCell>
		</PGVRFooter>
	</PGVRDoc>
</PGVReport>
