<?xml version="1.0" encoding="UTF-8"?>
<Report>
	<!-- $Id$ -->
	<Title><var var="i18n::translate('Birth Date and Place Report')" /></Title>
	<Description>Prints a list of individuals matching specific name and/or birth criteria</Description>
	<Input name="name" lookup="NAME" type="text"><var var="i18n::translate('Name')" /></Input>
	<Input name="birthplace" lookup="PLAC" type="text"><var var="i18n::translate('Birth Place contains')" /></Input>
	<Input name="birthdate1" lookup="DATE" type="text"><var var="i18n::translate('Birth Date range start')" /></Input>
	<Input name="birthdate2" lookup="DATE" type="text"><var var="i18n::translate('Birth Date range end')" /></Input>
	<Input name="sortby" type="select" default="NAME" options="none=>i18n::translate('None')|ID=>i18n::translate('ID number')|NAME=>i18n::translate('Name')|BIRT:DATE=>i18n::translate('Date of birth')"><var var="i18n::translate('Sort by')" /></Input>
	<Input name="pageSize" type="select" default="A4" options="letter=>i18n::translate_c('paper size','Letter')|A3=>i18n::translate_c('paper size', 'A3')|A4=>i18n::translate_c('paper size','A4')|legal=>i18n::translate_c('paper size','Legal')"><var var="i18n::translate('Page size')" /></Input>
	<Input name="fonts" type="select" default="dejavusans" options="arialunicid0=>i18n::translate_c('font name', 'Arial')|dejavusans=>i18n::translate_c('font name', 'DejaVu')|helvetica=>i18n::translate_c('font name', 'Helvetica')"><var var="i18n::translate('Font')"/></Input>

	<!-- Header -->
	<Style name="header" font="$fonts" size="16" style="b"/>
	<!-- Page numbers text -->
	<Style name="pagenum" font="$fonts" size="8"/>
	<!-- Generated by style - required style name by the generator -->
	<Style name="genby" font="$fonts" size="8"/>
	<!-- Column labels -->
	<Style name="label" font="$fonts" size="10" style="b"/>
	<!-- Standard text -->
	<Style name="text" font="$fonts" size="9"/>
	<!-- Date text -->
	<Style name="date" font="$fonts" size="8"/>

	<Doc pageSize="$pageSize" orientation="landscape" >
		<Header>
			<Cell align="center" height="20" newline="1" style="header"><var var="i18n::translate('Birth Date and Place Report')" /></Cell>
			<Cell align="rightrtl" newline="1" style="pagenum"><var var="i18n::translate('Page')" /> <PageNum /> <var var="i18n::translate('of')" /> <TotalPages /></Cell>

			<SetVar name="fill" value="" />
			<if condition="($sortby=='NAME') or ($sortby=='ID')"><SetVar name="fill" value="#AAAAAA" /></if>
			<Cell bgcolor="$fill" border="1" width="200" style="label"><var var="i18n::translate('Name')" /></Cell>

			<SetVar name="fill" value="" />
			<if condition="$sortby=='BIRT:DATE'"><SetVar name="fill" value="#AAAAAA" /></if>
			<Cell bgcolor="$fill" border="1" width="100" style="label"><var var="i18n::translate('Date')" /></Cell>

			<Cell border="1" width="225" style="label"><var var="i18n::translate('Place')" /></Cell>
			<Cell border="1" newline="1" style="label"><var var="i18n::translate('Source')" /></Cell>
		</Header>

		<Body>
			<List list="individual" filter1="BIRT:PLAC CONTAINS $birthplace" filter2="BIRT:DATE GTE $birthdate1" filter3="BIRT:DATE LTE $birthdate2" filter4="NAME CONTAINS $name" sortby="$sortby">
				<Cell width="200" style="text"><GetPersonName id="" /> - (<GedcomValue tag="@id" />)</Cell>
				<Cell width="100" style="text"><GedcomValue tag="BIRT:DATE" newline="1" /></Cell>
				<Cell width="225" style="text"><GedcomValue tag="BIRT:PLAC" /></Cell>
				<Cell newline="1" style="text">
					<!-- Only with multiple sources use line feed (br) -->
					<SetVar name="usebr" value="0"/>
					<RepeatTag tag="BIRT:SOUR">
						<if condition="$usebr==1"><br /></if>
						<Gedcom id="@SOUR">
							<GedcomValue tag="TITL" />
						</Gedcom>
						<SetVar name="usebr" value="1"/>
					</RepeatTag>
				</Cell>
			</List>
			<Cell align="rightrtl" height="24" newline="1" style="label"><br/><var var="i18n::translate('Total individuals')"/>: <ListTotal/></Cell>
		</Body>
		<Footer>
			<Cell align="rightrtl" newline="1" style="date"><Now/></Cell>
		</Footer>
	</Doc>
</Report>
