summaryrefslogtreecommitdiff
path: root/resources/xml/reports/bdm_report.xml
blob: 9e610d21f64cc7a91be8b60ca718e7e34b897c85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
<?xml version="1.0" encoding="UTF-8" ?>
<Report>
	<Title><var var="I18N::translate('Vital records')" /></Title>
	<Description><var var="I18N::translate('A report of vital records for a given date or place.')" /></Description>
	<Input name="name" lookup="NAME" type="text"><var var="I18N::translate('Name')" /></Input>
	<Input name="bdmplace" lookup="PLAC" type="text"><var var="I18N::translate('Place')" /></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="deathdate1" lookup="DATE" type="text"><var var="I18N::translate('Death date range start')" /></Input>
	<Input name="deathdate2" lookup="DATE" type="text"><var var="I18N::translate('Death date range end')" /></Input>
	<Input name="sortby" type="select" default="BIRT:DATE" options="NAME=>I18N::translate('sort by name')|BIRT:DATE=>I18N::translate('sort by date of birth')|DEAT:DATE=>I18N::translate('sort by date of death')"><var var="I18N::translate('Sort order')" /></Input>
	<Input name="pageSize" type="select" options="A4=>I18N::translateContext('paper size','A4')|A3=>I18N::translateContext('paper size', 'A3')|US-Letter=>I18N::translateContext('paper size','Letter')|US-Tabloid=>I18N::translateContext('paper size','Tabloid')"><var var="I18N::translate('Page size')" /></Input>
	<!--
	<Input name="fonts" type="select" default="dejavusans" options="arialunicid0=>I18N::translateContext('font name', 'Arial')|dejavusans=>I18N::translateContext('font name', 'DejaVu')|helvetica=>I18N::translateContext('font name', 'Helvetica')"><var var="I18N::translate('Font')"/></Input>
	-->
	<SetVar name="fonts" value="dejavusans" />

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

	<Doc pageSize="$pageSize" orientation="landscape">
		<Header>
			<Cell align="center" newline="1" style="header">
				<var var="I18N::translate('Vital records')" />
				<if condition="$name!=''">
				    : <var var="name" /> 
				</if>
				<if condition="$bdmplace!=''">
					: <var var="bdmplace" />
				</if>
			</Cell>
			<Cell align="rightrtl" height="10" newline="1" style="pagenum"><var var="I18N::translate('Page')" /> <PageNum /> <var var="I18N::translate('of')" /> <TotalPages /></Cell>
			<!-- Name -->
			<SetVar name="fill" value="" />
			<if condition="$sortby=='NAME'">
				<SetVar name="fill" value="#AAAAAA" />
			</if>
			<TextBox bgcolor="$fill" border="1" height="12" width="205">
				<Text style="label"><var var="I18N::translate('Name')" /></Text>
			</TextBox>
			<!-- Birth -->
			<SetVar name="fill" value="" />
			<if condition="$sortby=='BIRT:DATE'">
				<SetVar name="fill" value="#AAAAAA" />
			</if>
			<TextBox bgcolor="$fill" border="1" height="12" width="165">
				<Text style="label">
					<var var="I18N::translate('Birth')" />
					<if condition="$birthdate1!='' or $birthdate2!=''">
						[
						<if condition="$birthdate1!=''">
							<var var="birthdate1" />
						</if>
						-
						<if condition="$birthdate2!=''">
							<var var="birthdate2" />
						</if>
						]
					</if>
				</Text>
			</TextBox>
			<!-- Marrige -->
			<SetVar name="fill" value="" />
			<if condition="$sortby=='MARR:DATE'">
				<SetVar name="fill" value="#AAAAAA" />
			</if>
			<TextBox bgcolor="$fill" border="1" height="12" width="165">
				<Text style="label"><var var="I18N::translate('Marriage')" /></Text>
			</TextBox>
			<!-- Death -->
			<SetVar name="fill" value="" />
			<if condition="$sortby=='DEAT:DATE'">
				<SetVar name="fill" value="#AAAAAA" />
			</if>
			<TextBox bgcolor="$fill" border="1" height="12" newline="1">
				<Text style="label">
					<var var="I18N::translate('Death')" />
					<if condition="$deathdate1!='' or $deathdate2!=''">
						[
						<if condition="$deathdate1!=''">
							<var var="deathdate1" />
						</if>
						-
						<if condition="$deathdate2!=''">
							<var var="deathdate2" />
						</if>
						]
					</if>
				</Text>
			</TextBox>
		</Header>

		<Body>
			<SetVar name="filter1" value="" />
			<if condition="$bdmplace!=''">
				<SetVar name="filter1" value=":PLAC CONTAINS $bdmplace" />
				<!-- todo: print only if BDM place is the searched place - use OR - search also on marriage place and date -->
			</if>

			<List list="individual" filter1="$filter1" filter2="BIRT:DATE GTE $birthdate1" filter3="BIRT:DATE LTE $birthdate2" filter4="DEAT:DATE GTE $deathdate1" filter5="DEAT:DATE LTE $deathdate2" filter6="NAME CONTAINS $name" sortby="$sortby">
				<SetVar name="spid" value="@ID" />

				<TextBox width="205" height="46">
					<Text style="text">
						<GetPersonName id="" /><br />
					</Text>
					<Text style="small">
						   <var var="I18N::translate('Father')" />
						: <Gedcom id="@FAMC"><GetPersonName id="@HUSB" /></Gedcom>
						<br />   <var var="I18N::translate('Mother')" />
						: <Gedcom id="@FAMC"><GetPersonName id="@WIFE" /></Gedcom>
					</Text>
				</TextBox>

				<TextBox width="165" height="46" border="0">
					<SetVar name="moreB" value="0" />
					<Text style="small">
						<RepeatTag tag="BIRT">
							<if condition="$moreB==1">
								<br />
							</if>
							<var var="I18N::translate('Date')" />
							: <GedcomValue tag="BIRT:DATE" />
							<br />  <var var="I18N::translate('Place')" />
							: <GedcomValue tag="BIRT:PLAC" />
							<br />  <var var="I18N::translate('Source')" />
							: <RepeatTag tag="BIRT:SOUR">
								<Gedcom id="@SOUR">
									<GedcomValue tag="TITL" />
								</Gedcom>
							</RepeatTag>
							<SetVar name="moreB" value="1" />
						</RepeatTag>
					</Text>
				</TextBox>

				<TextBox width="165" height="46" border="0">
					<SetVar name="more" value="0" />
					<RepeatTag tag="FAMS">
						<Text style="small">
							<Gedcom id="@FAMS">
								<if condition="$more==1">
									<br />
									________________________________
									<br />
								</if>
								<!-- todo: print the dates, places and sources of all the FAM MARR records -->
								<var var="I18N::translate('Date')" />
								: <GedcomValue tag="MARR:DATE" />
								<br />  <var var="I18N::translate('Place')" />
								: <GedcomValue tag="MARR:PLAC" />
								<br />  <var var="I18N::translate('Source')" />
								: <RepeatTag tag="MARR:SOUR">
									<Gedcom id="@SOUR">
										<GedcomValue tag="TITL" /> 
									</Gedcom>
								</RepeatTag>
								<br />
								<var var="I18N::translate('Spouse')" />
								: 
								<SetVar name="hpid" value="@HUSB"/>
								<SetVar name="wpid" value="@WIFE"/>
								<if condition="$spid==$wpid">
									<GetPersonName id="@HUSB" />
								</if>
								<if condition="$spid==$hpid">
									<GetPersonName id="@WIFE" />
								</if>
								<SetVar name="more" value="1" />
							</Gedcom>
						</Text>
					</RepeatTag>
				</TextBox>

				<TextBox border="0" height="46" newline="1">
					<SetVar name="moreD" value="0" />
					<Text style="small">
						<RepeatTag tag="DEAT">
							<if condition="$moreD==1">
								<br />
							</if>
							<var var="I18N::translate('Date')" />
							: <GedcomValue tag="DEAT:DATE" />
							<br />  <var var="I18N::translate('Place')" />
							: <GedcomValue tag="DEAT:PLAC" />
							<br />  <var var="I18N::translate('Source')" />
							: <RepeatTag tag="DEAT:SOUR">
								<Gedcom id="@SOUR">
									<GedcomValue tag="TITL" /> 
								</Gedcom>
							</RepeatTag>
							<SetVar name="moreD" value="1" />
						</RepeatTag>
					</Text>
				</TextBox>
				<Line />
			</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>