https://gramps-project.org/wiki/api.php?action=feedcontributions&user=Ander882&feedformat=atomGramps - User contributions [en]2024-03-29T12:44:59ZUser contributionsMediaWiki 1.31.3https://gramps-project.org/wiki/index.php?title=Gramps_4.1_Wiki_Manual_-_Reports_-_part_2&diff=52348Gramps 4.1 Wiki Manual - Reports - part 22014-11-06T18:01:24Z<p>Ander882: /* Rules for groups */</p>
<hr />
<div>{{grampsmanualcopyright}}<br />
<br />
{{man index|Gramps 4.1 Wiki Manual - Reports - part 1|Gramps_4.1_Wiki_Manual_-_Reports_-_part_3|4.1}}<br />
<br />
{{languages|Gramps_4.1_Wiki_Manual_-_Reports - part 2}}<br />
<br />
{{#vardefine:chapter|11.2}}<br />
{{#vardefine:figure|0}}<br />
<br />
Back to [[Gramps_4.1_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
This section describes the substitution values that can be used in the different reports available in Gramps.<br />
<br />
= Substitution Values =<br />
<br />
Many of the graphical reports allow you to customize the information that is displayed on the reports. Variable substitution is the method that is used to substitute a particular symbol (key) for specific information about the person in the database.<br />
<br />
{|<br />
|-<br />
|Example: <br />
|Will show as: (the person is alive)<br />
|-<br />
|<pre>$n<br />
b. $b{ at $B}<br />
d. $d< at >$D</pre><br />
|<pre>Smith, Edwin Michael<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA<br />
d.</pre><br />
|}<br />
<br />
----<br />
{|<br />
|-<br />
|1<br />
|A list of all available variables (The Substitution Keys) follows. If you wish to display names, date, or place information differently, you may use [[#Format Strings|Format Strings]] to accomplish this.<br />
|-<br />
|2<br />
|There are also [[#Control Variables|Control Variables]] to display special characters (like the dollar sign).<br />
|-<br />
|3<br />
|You can also use [[#Grouping|Grouping]] to optionally display information. Line 2 above, uses grouping to display ' at ' only when the birth place is known.<br />
|-<br />
|4<br />
|Along with [[#Events|Events]] you can print almost anything.<br />
|-<br />
|5<br />
|Finally, [[#Separators|Separators]], to make your life complete. Line 3 above, uses this to display ' at ' only when both the birth date and place is known.<br />
|-<br />
|}<br />
<br />
<br />
== The Substitution Keys ==<br />
<br />
{|<br />
|-<br />
| colspan="2"|'''Personal variables'''<br />
| colspan="2"|'''Marital variables'''<br />
|-<br />
|$n<br />
|Displays the person's name<br />
|$s<br />
|Displays the name of the person's spouse<br />
|-<br />
|$i<br />
|Displays the GRAMPS ID for the person.<br />
|$j<br />
|Displays the GRAMPS ID for the marriage.<br />
|-<br />
|$b<br />
|Displays the person's date of birth <br />
|$m<br />
|Displays the marriage date of the person and the spouse.<br />
|-<br />
|$B<br />
|Displays the person's place of birth <br />
|$M<br />
|Displays the place of the marriage of the person and the spouse.<br />
|-<br />
|$d<br />
|Displays the person's date of death <br />
|$v<br />
|Displays the divorce date of the person and the spouse.<br />
|-<br />
|$D<br />
|Displays the person's place of death <br />
|$V<br />
|Displays the place of the divorce of the person and the spouse.<br />
|-<br />
|$a<br />
|Displays an attribute about the person.<br />
see [[#Attributes|Attributes]] for more<br />
|$u<br />
|Displays an attribute about the marriage.<br />
see [[#Attributes|Attributes]] for more<br />
|-<br />
|$e<br />
|Displays event information about the person.<br />
See [[#Events|Events]] for more<br />
|$t<br />
|Displays an event information about the marriage.<br />
See [[#Events|Events]] for more<br />
|}<br />
<br />
All of the Marital variables are defined by the person's preferred spouse in Gramps. If the person has never been married, then these variables will not display anything.<br />
<br />
<br />
==== Other Substitution Keys ====<br />
<br />
$T Displays Todays date.<br />
<br />
<br />
=== Default displayed formats ===<br />
<br />
{|<br />
|-<br />
|$n $s<br />
|Names will be displayed as set in 'Name format:' on the Display tab in Gramps preferences<br />
|-<br />
|$B $D $M $V<br />
|Places will display the Place title by default<br />
|-<br />
|$b $d $m $v $T<br />
|Dates will be displayed as set in 'Date format:' on the Display tab in Gramps preferences<br />
|-<br />
|$e $t<br />
|Events will display the description by default<br />
|}<br />
<br />
<br />
----<br />
=== Deprecated variables ===<br />
<br />
Some of the old variables were deprecated because [[#Format Strings|Format Strings]] have replaced them. So here is a list of those variables and how to achieve their results:<br />
<br />
{| {{prettytable}}<br />
|-<br />
!Old Variable<br />
!How to display it now<br />
!What is displayed<br />
|-<br />
|$f<br />
|$n<br />
|Name - as by Gramps name display under Preferences<br />
|-<br />
|$n<br />
|$n(g f)<br />
|Name - FirstName LastName<br />
|-<br />
|$N<br />
|$n(f, g)<br />
|Name - LastName, FirstName (note the explicit comma)<br />
|-<br />
|$nC<br />
|$n(g F)<br />
|Name - FirstName LastName in UPPER case<br />
|-<br />
|$NC<br />
|$n(F, g)<br />
|Name - LastName in UPPER case, FirstName<br />
|-<br />
|$by<br />
|$b(yyyy)<br />
|Date of birth, year only<br />
|-<br />
|$dy<br />
|$d(yyyy)<br />
|Date of death, year only<br />
|-<br />
|$my<br />
|$m(yyyy)<br />
|Date of preferred marriage, year only<br />
|-<br />
|$p<br />
|$s<br />
|Preferred spouse's name as by Gramps name display under Preferences<br />
|-<br />
|$s<br />
|$s(g f)<br />
|Preferred spouse's name - FirstName LastName<br />
|-<br />
|$S<br />
|$s(f, g)<br />
|Preferred spouse's name - LastName, FirstName<br />
|-<br />
|$sC<br />
|$s(g F)<br />
|Preferred spouse's name - FirstName LastName in UPPER case<br />
|-<br />
|$SC<br />
|$s(F, g)<br />
|Preferred spouse's name - LastName in UPPER case, FirstName<br />
|}<br />
<br />
== Format Strings ==<br />
<br />
Format strings are used to display names and dates differently than those assigned under Gramps Preferences. Here is the syntax for a format string:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''(format string)<br />
where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'nsijbmBMdvDVauet'<br />
<br />
A format string is any text, separators or format codes (defined below) to display information about the person.<br />
<br />
=== Formatting names ===<br />
<br />
For names ($n $s) you may use the following formatting codes to display the name differently.<br />
<br />
{|<br />
|-<br />
|t<br />
|Title<br />
|<br />
|f<br />
|Given name<br />
|-<br />
|x<br />
|Common name. Call name if existing, otherwise first first name<br />
|<br />
|c<br />
|Call name<br />
|-<br />
|n<br />
|Nick name<br />
|<br />
|s<br />
|Suffix<br />
|-<br />
|l<br />
|Surname<br />
|<br />
|g<br />
|Family nickname<br />
|}<br />
<br />
These codes can be uppercased to uppercase the result.<br />
<br />
{|<br />
|-<br />
|Example code<br />
|Displays<br />
|-<br />
|<pre>$n(L, f) ($n(c)), $n(L, f){ ($n(c))}<br />
$s(f l s)</pre><br />
|<pre>SMITH, Edwin Michael (), SMITH, Edwin Michael<br />
Janice Ann Adams</pre><br />
|}<br />
<br />
<br />
<blockquote>Note:<br />
If you want to print a character 'c' within the format string (or any one of the other format codes), you will need to first add a '&#92;' in front of it. See [[#Control Variables|Control Variables]] for more.</blockquote><br />
<br />
<blockquote>Note:<br />
the curly brackets { } are used to hide information. Here it is used around ' ($n(c))' to not display ' ()' if the person does not have a call name. See [[#Grouping|Grouping]] for more.</blockquote><br />
<br />
----<br />
<br />
=== Formatting Dates ===<br />
<br />
For all of the date variables ($b $d $m $v) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|yyyy<br />
|The year as a four digit number<br />
|<br />
|yyy<br />
|The year, with a minimum of three digits<br />
|-<br />
|yy<br />
|The year, from 00 to 99<br />
|<br />
|y<br />
|The year, from 0 to 99<br />
|-<br />
|mmmm<BR><br />
MMMM<br />
|The full name of the month<BR><br />
The full name IN CAPS<br />
|<br />
|mmm<BR><br />
MMM<br />
|The abbreviated name of the month<BR><br />
The abbreviated name IN CAPS<br />
|-<br />
|mm<br />
|The month, from 00 to 12<br />
|<br />
|m<br />
|The month, from 0 to 12<br />
|-<br />
|dd<br />
|The day, from 00 to 31<br />
|<br />
|d<br />
|The day, from 0 to 31<br />
|-<br />
|o<br />
|The date type (modifier)<br />
|<br />
|<br />
|<br />
|}<br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$b(mmm-dd yy)<br />
$m(yyyy/mmm/d)<br />
$b(mmm-dd yy)</pre><br />
|<pre>May-24 61<br />
1995/May/27<br />
Jun-04 85</pre><br />
|}<br />
<br />
{{man note| For date types (modifier) |Only "Before", "After", and "About" are supported at this time. all others will not display anything.<BR><br />
And for date span and date ranges, only the starting (first) date is displayed.}}<br />
<br />
----<br />
<br />
=== Formatting Places ===<br />
<br />
For all of the place variables ($B $D $M $V) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|e<br />
|Street<br />
|<br />
|l<br />
|Locality<br />
|-<br />
|c<br />
|City<br />
|<br />
|u<br />
|County<br />
|-<br />
|s<br />
|State<br />
|<br />
|p<br />
|Postal Code<br />
|-<br />
|n<br />
|Country<br />
|<br />
|t<br />
|Title<br />
|-<br />
|x<br />
|Longitude<br />
|<br />
|y<br />
|Latitude<br />
|}<br />
These codes can be uppercased to uppercase the result. <br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
----<br />
<br />
=== Rules for format strings. ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Anything will print inside a format string<br />
|-<br />
|1a<br />
|you will have to use [[#Control Variables|Control Variables]] to display things like ')' and format codes<br />
|-<br />
|2<br />
|Separators can be within format strings.<br />
|-<br />
|3<br />
|At least ONE format code has to display something for the ENTIRE format string to display<br />
|}<br />
<br />
----<br />
<br />
=== Examples ===<br />
<br />
{|<br />
|-<br />
|code<br />
|gives<br />
|-<br />
|<pre>$n(f l)<br />
b. $b {at $B<br />
{d. $d $D</pre><br />
|<pre>Edwin Michael Smith<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA</pre>The person is still alive (or has no information present) so the line was removed.<br />
|}<br />
<br />
<br />
<br />
== Control Variables ==<br />
<br />
Control variables allow you to print characters that are special to Substitution values within a display.<br />
<br />
For example the dollar character '$' is used to note the start of a variable. If you wish to print a dollar character you would use a control character like '&#92;$'<br />
<br />
Control Variables<br />
<br />
{|<br />
|-<br />
|&#92;$<br />
|Displays a single '$'<br />
|<br />
|&#92;&#92;<br />
|Displays a single '&#92;'<br />
|-<br />
|&#92;(<br />
|Displays a single '('<br />
|<br />
|&#92;)<br />
|Displays a single ')'<br />
|-<br />
|&#92;{<br />
|Displays a single '{'<br />
|<br />
|&#92;}<br />
|Displays a single '}'<br />
|-<br />
|&#92;<<br />
|Displays a single '<'<br />
|<br />
|&#92;><br />
|Displays a single '>'<br />
|}<br />
<br />
Basically anything that comes after a '&#92;' will be printed.<br />
<br />
----<br />
Note:<br />
When you are inside a format string, you may need to use this to display a character that would normally be a format code. <br />
<br />
{|<br />
|-<br />
|Example:<br />
|would give<br />
|-<br />
|<pre>$b(m hi mom)<br />
$b(m hi \mo\m)</pre><br />
|<pre>5 hi 5o5<br />
5 hi mom</pre><br />
|}<br />
<br />
as this person was born on the fifth month.<br />
<br />
== Grouping ==<br />
<br />
There are instances where you do not want certain text to be displayed. Take the example:<br />
<br />
{|<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died on $d at $D</pre><br />
|<pre>died on 1975-06-26 at </pre> <br />
|<pre>died on at Reno, Washoe Co., NV</pre><br />
|-<br />
| colspan="3"|Neither of these are very acceptable.<br />
|-<br />
| colspan="3"|But with groups (denoted by {}), you can optionally print information if a variable within contains information.<br />
|-<br />
| colspan="3"|For example:<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died{ on $d}{ at $D}</pre><br />
|<pre>died on 1975-06-26</pre><br />
|<pre>died at Reno, Washoe Co., NV</pre><br />
|}<br />
<br />
which is what we want.<br />
<br />
----<br />
=== Rules for groups ===<br />
<br />
A group will only display if there is at least one variable that displays something. So if a group only has text and/or variables where the information is not known, the entire group will not print.<br />
<br />
Groups can also be nested. If this happens (like below), the outer group will only display if there is at least one variable that displays something within the outer group or any of the sub groups.<br />
<br />
Groups can also be used to remove text. If you wish to not display the entire line, '-' at the start of a line will remove the entire line from the display if the above rule is true.<br />
<br />
If you do not wish to have the display code above (for death information) displayed (the person is alive, or you do not yet know the information), modify the code to look like<br />
<pre>-{died{ on $d}{ at $D}</pre><br />
<br />
----<br />
<br />
=== Examples: ===<br />
<br />
This will hide '(' and ')' if the divorce information is not known (or still married).<br />
<br />
<pre>m. $m $M {- ($v(yyyy))</pre><br />
<br />
<br />
Only display some spouse information if married or remove the entire line if never married:<br />
<pre>{$s $m(yyyy) {- $v(\(yyyy\))}}</pre><br />
<br />
== Attributes ==<br />
<br />
Attributes do not have a format string. Instead the attribute name is placed inside []. Here is the syntax for an attribute:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name] where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'au'<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$a[Profession]<br />
$a[Social Security Number]<br />
$a[Total \$ bequeathed]</pre><br />
|<pre>Programmer<br />
7A3-29-F1C6<br />
3.00USD</pre><br />
|}<br />
<br />
<br />
----<br />
== Events ==<br />
<br />
Events have the same starting structure as attributes, $e or $t and the event name in [] but events have an extra format string after the name to display the description, date, place, id, and attributes associated with it. Each of these items can be displayed with a , a 'n', 'd', 'D', 'i', and 'a' respectively in the format string. Here is the syntax for an event:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name](format string) where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'et'<br />
<br />
=== Event format strings ===<br />
<br />
The Event format string is used to display information about the event. Here are the format codes to display parts of the event:<br />
<br />
{|<br />
|-<br />
|n<br />
|Description<br />
|<br />
|i<br />
|Event ID<br />
|-<br />
|d<br />
|Event Date&#42;<br />
|<br />
|D<br />
|Event Place&#42;<br />
|-<br />
|a<br />
|An attributes for the event&#42;&#42;<br />
|<br />
|<br />
|<br />
|}<br />
<br />
&#42;These variables can themselves have format strings. Date and a place can be formatted with format string as defined in [[#Format strings|Format strings]].<br />
<br />
&#42;&#42;Attribute needs to have the attribute name in [] and are formatted as above.<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$e[First Communion](d(yyyy-mm-d))<br />
$e[Bar Mitzvah](n&lt; at &gt; D)<br />
$e[Birth](d(yyyy mm/dd) D)</pre><br />
|<pre>2009-11-6<br />
Jerry's Bar Mitzah at Opas house<br />
2007 05/23 Grandmothers house</pre><br />
|}<br />
<br />
<br />
And:<br />
<br />
{|<br />
|-<br />
|<pre>$b(yyyy-Mmm-dd)<br />
$M</pre><br />
|is the same as<br />
|<pre>$e[Birth](d(yyyy-Mmm-dd))<br />
$t[Marriage](D)</pre><br />
|}<br />
<br />
<br />
----<br />
<br />
=== Notes for attributes and events: ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Attribute and event names are mandatory. '$a' or '$a[]' will not display anything.<br />
|-<br />
|2<br />
|Attributes and event names may have special characters within them. Most notably ']' and ')'. If this is the case, you will need to use [[#Control Variables|Control Variables]]<br />
|}<br />
<br />
== Separators ==<br />
<br />
Separators are special 'text only' groups inside '&lt;' and '&gt;' that conditionally display a separator (like ', ' or ' - ') between two groups, variables, format codes or text.<br />
<br />
Separators are displayed conditionally depending on these rules:<br />
<br />
# A variable that does '''not''' display anything will remove itself and a separator that is to the left of it from the display line only.<br />
# If there is not a separator to the left, the same variable will remove itself and a separator that is to the right of it from the displayed line. <br />
# If there are two separators together, the left one will be removed from the display line and the right is kept.<br />
# Separators at the start or end of the display line (or format strings) are removed<br />
<br />
=== Example: ===<br />
{|<br />
|-<br />
|<pre>$s(f l s)&lt;, &gt;$m(yyyy)&lt; @ &gt;$M&lt; - &gt;$v(&#92;(yyyy&#92;))</pre><br />
|}<br />
<br />
Here are some things that may happen:<br />
<br />
{|<br />
|-<br />
|If '''none''' of the variables are known<br />
|None of the separators will display<br />
|-<br />
|If only one variable '''is''' known<br />
|Only that variable will print. No separators will print.<br />
|-<br />
|If only the spouse's name '''is not''' known<br />
|The first separator will not display<br />
|-<br />
|If only the marriage date '''is not''' known<br />
|The first separator does not display. We will be left with:<br />
Jane Doe&lt; - &gt;{ … }And only the divorce date needs to be known to print the second separator.<br />
|-<br />
|If only the divorce date '''is not''' known<br />
|the second separator will not display<br />
|}<br />
<br />
<br />
Separators can be inside format strings:<br />
<br />
$n(&lt;0&gt;T&lt; &gt;L&lt;, &gt;f&lt; &gt;s)<br />
<br />
Unlike groups, separators can not cross over/out of format strings. So the separator &lt;0&gt; will NEVER display. No matter what is on the left hand side of the variable.<br />
<br />
----<br />
<br />
Here is a useful example:<br />
{|<br />
|-<br />
|<pre>{({b. $b}<, >{d. $d})}</pre><br />
|}<br />
<br />
This will:<br />
{|<br />
|-<br />
| Only print the outside () if either the birth or death date displays<br />
|-<br />
| Only displays the center separator if both dates are known.<br />
|-<br />
| So here are some thing that could display<br />
{|<br />
|-<br />
| <pre>(b. 1970-4-8)</pre><br />
| <pre>(d. 2012-3-9)</pre><br />
| <pre>(b. 1970-4-8, d. 2012-3-9)</pre><br />
| or the line does not print at all.<br />
|}<br />
|-<br />
| We will not see things like:<br />
{|<br />
|-<br />
| <pre>()</pre><br />
| <pre>(, )</pre><br />
| <pre>(b.)</pre><br />
| <pre>(b., )</pre><br />
| <pre>(d.)</pre><br />
|-<br />
| <pre>(, d.)</pre><br />
| <pre>(b. 1970-4-8, )</pre><br />
| <pre>(b. 1970-4-8, d.)</pre><br />
| <pre>(, d. 2012-3-9)</pre><br />
| <pre>(b., d. 2012-3-9)</pre><br />
|}<br />
|}<br />
Back to [[Gramps_4.1_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
{{-}}<br />
<br />
{{man index|Gramps 4.1 Wiki Manual - Reports - part 1|Gramps_4.1_Wiki_Manual_-_Reports_-_part_3|4.1}}<br />
<br />
{{languages}}<br />
<br />
[[Category:Documentation]]<br />
[[Category:Plugins]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Gramps_4.2_Wiki_Manual_-_Reports_-_part_2&diff=52347Gramps 4.2 Wiki Manual - Reports - part 22014-11-06T18:00:27Z<p>Ander882: /* Rules for groups */</p>
<hr />
<div>{{grampsmanualcopyright}}<br />
<br />
{{man index|Gramps 4.1 Wiki Manual - Reports - part 1|Gramps_4.1_Wiki_Manual_-_Reports_-_part_3|4.1}}<br />
<br />
{{languages|Gramps_4.1_Wiki_Manual_-_Reports - part 2}}<br />
<br />
{{#vardefine:chapter|11.2}}<br />
{{#vardefine:figure|0}}<br />
<br />
Back to [[Gramps_4.1_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
This section describes the substitution values that can be used in the different reports available in Gramps.<br />
<br />
= Substitution Values =<br />
<br />
Many of the graphical reports allow you to customize the information that is displayed on the reports. Variable substitution is the method that is used to substitute a particular symbol (key) for specific information about the person in the database.<br />
<br />
{|<br />
|-<br />
|Example: <br />
|Will show as: (the person is alive)<br />
|-<br />
|<pre>$n<br />
b. $b{ at $B}<br />
d. $d< at >$D</pre><br />
|<pre>Smith, Edwin Michael<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA<br />
d.</pre><br />
|}<br />
<br />
----<br />
{|<br />
|-<br />
|1<br />
|A list of all available variables (The Substitution Keys) follows. If you wish to display names, date, or place information differently, you may use [[#Format Strings|Format Strings]] to accomplish this.<br />
|-<br />
|2<br />
|There are also [[#Control Variables|Control Variables]] to display special characters (like the dollar sign).<br />
|-<br />
|3<br />
|You can also use [[#Grouping|Grouping]] to optionally display information. Line 2 above, uses grouping to display ' at ' only when the birth place is known.<br />
|-<br />
|4<br />
|Along with [[#Events|Events]] you can print almost anything.<br />
|-<br />
|5<br />
|Finally, [[#Separators|Separators]], to make your life complete. Line 3 above, uses this to display ' at ' only when both the birth date and place is known.<br />
|-<br />
|}<br />
<br />
<br />
== The Substitution Keys ==<br />
<br />
{|<br />
|-<br />
| colspan="2"|'''Personal variables'''<br />
| colspan="2"|'''Marital variables'''<br />
|-<br />
|$n<br />
|Displays the person's name<br />
|$s<br />
|Displays the name of the person's spouse<br />
|-<br />
|$i<br />
|Displays the GRAMPS ID for the person.<br />
|$j<br />
|Displays the GRAMPS ID for the marriage.<br />
|-<br />
|$b<br />
|Displays the person's date of birth <br />
|$m<br />
|Displays the marriage date of the person and the spouse.<br />
|-<br />
|$B<br />
|Displays the person's place of birth <br />
|$M<br />
|Displays the place of the marriage of the person and the spouse.<br />
|-<br />
|$d<br />
|Displays the person's date of death <br />
|$v<br />
|Displays the divorce date of the person and the spouse.<br />
|-<br />
|$D<br />
|Displays the person's place of death <br />
|$V<br />
|Displays the place of the divorce of the person and the spouse.<br />
|-<br />
|$a<br />
|Displays an attribute about the person.<br />
see [[#Attributes|Attributes]] for more<br />
|$u<br />
|Displays an attribute about the marriage.<br />
see [[#Attributes|Attributes]] for more<br />
|-<br />
|$e<br />
|Displays event information about the person.<br />
See [[#Events|Events]] for more<br />
|$t<br />
|Displays an event information about the marriage.<br />
See [[#Events|Events]] for more<br />
|}<br />
<br />
All of the Marital variables (if not defined by the report) are defined by the person's preferred spouse in Gramps. If the person has never been married, then these variables will not display anything.<br />
<br />
These codes can be uppercased to uppercase the result. <br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
==== Other Substitution Keys ====<br />
<br />
$T Displays Todays date. Standard Date format code apply<br />
<br />
<br />
$G Displays information about Gramsp, the database, and the researcher.<br />
<br />
These are the formatting codes you can use on the $G variable only:<br />
{|<br />
|-<br />
|v<br />
|Gramps Version number<br />
|<br />
|<br />
|<br />
|-<br />
|t<br />
|Researchers Name<br />
|<br />
|d<br />
|Database Name<br />
|-<br />
|e<br />
|Researchers Street<br />
|<br />
|l<br />
|Researchers Locality<br />
|-<br />
|c<br />
|Researchers City<br />
|<br />
|s<br />
|Researchers State<br />
|-<br />
|p<br />
|Researchers Postal Code<br />
|<br />
|n<br />
|Researchers Country<br />
|-<br />
|o<br />
|Researchers Phone<br />
|<br />
|m<br />
|Researchers Email<br />
|}<br />
<br />
=== Default displayed formats ===<br />
<br />
{|<br />
|-<br />
|$n $s<br />
|Names will be displayed as set in 'Name format:' on the Display tab in Gramps preferences<br />
|-<br />
|$B $D $M $V<br />
|Places will display the Place title by default<br />
|-<br />
|$b $d $m $v $T<br />
|Dates will be displayed as set in 'Date format:' on the Display tab in Gramps preferences<br />
|-<br />
|$e $t<br />
|Events will display the description by default<br />
|}<br />
<br />
<br />
----<br />
=== Deprecated variables ===<br />
<br />
Some of the old variables were deprecated because [[#Format Strings|Format Strings]] have replaced them. So here is a list of those variables and how to achieve their results:<br />
<br />
{| {{prettytable}}<br />
|-<br />
!Old Variable<br />
!How to display it now<br />
!What is displayed<br />
|-<br />
|$f<br />
|$n<br />
|Name - as by Gramps name display under Preferences<br />
|-<br />
|$n<br />
|$n(g f)<br />
|Name - FirstName LastName<br />
|-<br />
|$N<br />
|$n(f, g)<br />
|Name - LastName, FirstName (note the explicit comma)<br />
|-<br />
|$nC<br />
|$n(g F)<br />
|Name - FirstName LastName in UPPER case<br />
|-<br />
|$NC<br />
|$n(F, g)<br />
|Name - LastName in UPPER case, FirstName<br />
|-<br />
|$by<br />
|$b(yyyy)<br />
|Date of birth, year only<br />
|-<br />
|$dy<br />
|$d(yyyy)<br />
|Date of death, year only<br />
|-<br />
|$my<br />
|$m(yyyy)<br />
|Date of preferred marriage, year only<br />
|-<br />
|$p<br />
|$s<br />
|Preferred spouse's name as by Gramps name display under Preferences<br />
|-<br />
|$s<br />
|$s(g f)<br />
|Preferred spouse's name - FirstName LastName<br />
|-<br />
|$S<br />
|$s(f, g)<br />
|Preferred spouse's name - LastName, FirstName<br />
|-<br />
|$sC<br />
|$s(g F)<br />
|Preferred spouse's name - FirstName LastName in UPPER case<br />
|-<br />
|$SC<br />
|$s(F, g)<br />
|Preferred spouse's name - LastName in UPPER case, FirstName<br />
|}<br />
<br />
== Format Strings ==<br />
<br />
Format strings are used to display names and dates differently than those assigned under Gramps Preferences. Here is the syntax for a format string:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''(format string)<br />
where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'nsijbmBMdvDVauet'<br />
<br />
A format string is any text, separators or format codes (defined below) to display information about the person.<br />
<br />
=== Formatting names ===<br />
<br />
The $n and $s variables will print the the preferred name within Gramps only. If you wish to print an alternate name, put the name within [] as followes:<br />
<pre>$n[Also Known As]<br />
$s[Married Name](L, f)</pre><br />
and then an addictional format strings.<br />
<br />
<br />
For names ($n $s) you may use the following formatting codes to display the name differently.<br />
<br />
{|<br />
|-<br />
|t<br />
|Title<br />
|<br />
|f<br />
|Given name<br />
|-<br />
|x<br />
|Common name. Call name if existing, otherwise first first name<br />
|<br />
|c<br />
|Call name<br />
|-<br />
|n<br />
|Nick name<br />
|<br />
|s<br />
|Suffix<br />
|-<br />
|l<br />
|Surname<br />
|<br />
|g<br />
|Family nickname<br />
|}<br />
<br />
These codes can be uppercased to uppercase the result.<br />
<br />
{|<br />
|-<br />
|Example code<br />
|Displays<br />
|-<br />
|<pre>$n(L, f) ($n(c)), $n(L, f){ ($n(c))}<br />
$s(f l s)</pre><br />
|<pre>SMITH, Edwin Michael (), SMITH, Edwin Michael<br />
Janice Ann Adams</pre><br />
|}<br />
<br />
<br />
<blockquote>Note:<br />
If you want to print a character 'c' within the format string (or any one of the other format codes), you will need to first add a '&#92;' in front of it. See [[#Control Variables|Control Variables]] for more.</blockquote><br />
<br />
<blockquote>Note:<br />
the curly brackets { } are used to hide information. Here it is used around ' ($n(c))' to not display ' ()' if the person does not have a call name. See [[#Grouping|Grouping]] for more.</blockquote><br />
<br />
----<br />
<br />
=== Formatting Dates ===<br />
<br />
For all of the date variables ($b $d $m $v) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
!colspan=2|For:<br />
regular dates<br />
Starting dates<br />
|<br />
!colspan=2|For:<br />
Ending dates (ranges)<br />
|-<br />
|yyyy<br />
|The year as a four digit number<br />
|<br />
|zzzz<br />
|The ending year as a four digit number<br />
|-<br />
|yyy<br />
|The year, with a minimum of three digits<br />
|<br />
|zzz<br />
|The ending year, with a minimum of three digits<br />
|-<br />
|yy<br />
|The year, from 00 to 99<br />
|<br />
|zz<br />
|The year, from 00 to 99<br />
|-<br />
|y<br />
|The year, from 0 to 99<br />
|<br />
|z<br />
|The year, from 0 to 99<br />
|-<br />
|mmmm<BR><br />
MMMM<br />
|The full name of the month<BR><br />
The full name IN CAPS<br />
|<br />
|nnnn<BR><br />
NNNN<br />
|The full name of the ending month<BR><br />
The full name IN CAPS<br />
|-<br />
|mmm<BR><br />
MMM<br />
|The abbreviated name of the month<BR><br />
The abbreviated name IN CAPS<br />
|<br />
|nnn<BR><br />
NNN<br />
|The abbreviated name of the ending month<BR><br />
The abbreviated name IN CAPS<br />
|-<br />
|mm<br />
|The month, from 00 to 12<br />
|<br />
|nn<br />
|The ending month, from 00 to 12<br />
|-<br />
|m<br />
|The month, from 0 to 12<br />
|<br />
|n<br />
|The ending month, from 0 to 12<br />
|-<br />
|dd<br />
|The day, from 00 to 31<br />
|<br />
|ee<br />
|The ending day, from 00 to 31<br />
|-<br />
|dd<br />
|The day, from 0 to 31<br />
|<br />
|e<br />
|The ending day, from 0 to 31<br />
|-<br />
|o<br />
|The date type (modifier)<br><br />
Only displays ("About", "Before", "After")<br />
|<br />
|t<br />
|The Text Comment<br />
|}<br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$b(mmm-dd yy)<br />
$m(yyyy/mmm/d)<br />
$b(mmm-dd yy)</pre><br />
|<pre>May-24 61<br />
1995/May/27<br />
Jun-04 85</pre><br />
|}<br />
<br />
{{man note| For date types (modifier) |Only "Before", "After", and "About" are supported at this time. all others will not display anything.<BR><br />
And for date span and date ranges, only the starting (first) date is displayed.}}<br />
<br />
----<br />
<br />
=== Formatting Places ===<br />
<br />
For all of the place variables ($B $D $M $V) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|e<br />
|Street<br />
|<br />
|l<br />
|Locality<br />
|-<br />
|c<br />
|City<br />
|<br />
|u<br />
|County<br />
|-<br />
|s<br />
|State<br />
|<br />
|p<br />
|Postal Code<br />
|-<br />
|n<br />
|Country<br />
|<br />
|t<br />
|Title<br />
|-<br />
|x<br />
|Longitude<br />
|<br />
|y<br />
|Latitude<br />
|}<br />
These codes can be uppercased to uppercase the result. <br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
----<br />
<br />
=== Rules for format strings. ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Anything will print inside a format string<br />
|-<br />
|1a<br />
|you will have to use [[#Control Variables|Control Variables]] to display things like ')' and format codes<br />
|-<br />
|2<br />
|Separators can be within format strings.<br />
|-<br />
|3<br />
|At least ONE format code has to display something for the ENTIRE format string to display<br />
|}<br />
<br />
----<br />
<br />
=== Examples ===<br />
<br />
{|<br />
|-<br />
|code<br />
|gives<br />
|-<br />
|<pre>$n(f l)<br />
b. $b {at $B<br />
{d. $d $D</pre><br />
|<pre>Edwin Michael Smith<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA</pre>The person is still alive (or has no information present) so the line was removed.<br />
|}<br />
<br />
<br />
<br />
== Control Variables ==<br />
<br />
Control variables allow you to print characters that are special to Substitution values within a display.<br />
<br />
For example the dollar character '$' is used to note the start of a variable. If you wish to print a dollar character you would use a control character like '&#92;$'<br />
<br />
Control Variables<br />
<br />
{|<br />
|-<br />
|&#92;$<br />
|Displays a single '$'<br />
|<br />
|&#92;&#92;<br />
|Displays a single '&#92;'<br />
|-<br />
|&#92;(<br />
|Displays a single '('<br />
|<br />
|&#92;)<br />
|Displays a single ')'<br />
|-<br />
|&#92;{<br />
|Displays a single '{'<br />
|<br />
|&#92;}<br />
|Displays a single '}'<br />
|-<br />
|&#92;<<br />
|Displays a single '<'<br />
|<br />
|&#92;><br />
|Displays a single '>'<br />
|}<br />
<br />
Basically anything that comes after a '&#92;' will be printed.<br />
<br />
----<br />
Note:<br />
When you are inside a format string, you may need to use this to display a character that would normally be a format code. <br />
<br />
{|<br />
|-<br />
|Example:<br />
|would give<br />
|-<br />
|<pre>$b(m hi mom)<br />
$b(m hi \mo\m)</pre><br />
|<pre>5 hi 5o5<br />
5 hi mom</pre><br />
|}<br />
<br />
as this person was born on the fifth month.<br />
<br />
== Grouping ==<br />
<br />
There are instances where you do not want certain text to be displayed. Take the example:<br />
<br />
{|<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died on $d at $D</pre><br />
|<pre>died on 1975-06-26 at </pre> <br />
|<pre>died on at Reno, Washoe Co., NV</pre><br />
|-<br />
| colspan="3"|Neither of these are very acceptable.<br />
|-<br />
| colspan="3"|But with groups (denoted by {}), you can optionally print information if a variable within contains information.<br />
|-<br />
| colspan="3"|For example:<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died{ on $d}{ at $D}</pre><br />
|<pre>died on 1975-06-26</pre><br />
|<pre>died at Reno, Washoe Co., NV</pre><br />
|}<br />
<br />
which is what we want.<br />
<br />
----<br />
=== Rules for groups ===<br />
<br />
A group will only display if there is at least one variable that displays something. So if a group only has text and/or variables where the information is not known, the entire group will not print.<br />
<br />
Groups can also be nested. If this happens (like below), the outer group will only display if there is at least one variable that displays something within the outer group or any of the sub groups.<br />
<br />
Groups can also be used to remove text. If you wish to not display the entire line, '-' at the start of a line will remove the entire line from the display if the above rule is true.<br />
<br />
If you do not wish to have the display code above (for death information) displayed (the person is alive, or you do not yet know the information), modify the code to look like<br />
<pre>-{died{ on $d}{ at $D}</pre><br />
<br />
----<br />
<br />
=== Examples: ===<br />
<br />
This will hide '(' and ')' if the divorce information is not known (or still married).<br />
<br />
<pre>m. $m $M {- ($v(yyyy))</pre><br />
<br />
<br />
Only display some spouse information if married or remove the entire line if never married:<br />
<pre>{$s $m(yyyy) {- $v(\(yyyy\))}}</pre><br />
<br />
== Attributes ==<br />
<br />
Attributes do not have a format string. Instead the attribute name is placed inside []. Here is the syntax for an attribute:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name] where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'au'<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$a[Profession]<br />
$a[Social Security Number]<br />
$a[Total \$ bequeathed]</pre><br />
|<pre>Programmer<br />
7A3-29-F1C6<br />
3.00USD</pre><br />
|}<br />
<br />
<br />
----<br />
== Events ==<br />
<br />
Events have the same starting structure as attributes, $e or $t and the event name in [] but events have an extra format string after the name to display the description, date, place, id, and attributes associated with it. Each of these items can be displayed with a , a 'n', 'd', 'D', 'i', and 'a' respectively in the format string. Here is the syntax for an event:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name](format string) where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'et'<br />
<br />
=== Event format strings ===<br />
<br />
The Event format string is used to display information about the event. Here are the format codes to display parts of the event:<br />
<br />
{|<br />
|-<br />
|n<br />
|Description<br />
|<br />
|i<br />
|Event ID<br />
|-<br />
|d<br />
|Event Date&#42;<br />
|<br />
|D<br />
|Event Place&#42;<br />
|-<br />
|a<br />
|An attributes for the event&#42;&#42;<br />
|<br />
|<br />
|<br />
|}<br />
<br />
&#42;These variables can themselves have format strings. Date and a place can be formatted with format string as defined in [[#Format strings|Format strings]].<br />
<br />
&#42;&#42;Attribute needs to have the attribute name in [] and are formatted as above.<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$e[First Communion](d(yyyy-mm-d))<br />
$e[Bar Mitzvah](n&lt; at &gt; D)<br />
$e[Birth](d(yyyy mm/dd) D)</pre><br />
|<pre>2009-11-6<br />
Jerry's Bar Mitzah at Opas house<br />
2007 05/23 Grandmothers house</pre><br />
|}<br />
<br />
<br />
And:<br />
<br />
{|<br />
|-<br />
|<pre>$b(yyyy-Mmm-dd)<br />
$M</pre><br />
|is the same as<br />
|<pre>$e[Birth](d(yyyy-Mmm-dd))<br />
$t[Marriage](D)</pre><br />
|}<br />
<br />
<br />
----<br />
<br />
=== Notes for attributes and events: ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Attribute and event names are mandatory. '$a' or '$a[]' will not display anything.<br />
|-<br />
|2<br />
|Attributes and event names may have special characters within them. Most notably ']' and ')'. If this is the case, you will need to use [[#Control Variables|Control Variables]]<br />
|}<br />
<br />
== Separators ==<br />
<br />
Separators are special 'text only' groups inside '&lt;' and '&gt;' that conditionally display a separator (like ', ' or ' - ') between two groups, variables, format codes or text.<br />
<br />
Separators are displayed conditionally depending on these rules:<br />
<br />
# A variable that does '''not''' display anything will remove itself and a separator that is to the left of it from the display line only.<br />
# If there is not a separator to the left, the same variable will remove itself and a separator that is to the right of it from the displayed line. <br />
# If there are two separators together, the left one will be removed from the display line and the right is kept.<br />
# Separators at the start or end of the display line (or format strings) are removed<br />
<br />
=== Example: ===<br />
{|<br />
|-<br />
|<pre>$s(f l s)&lt;, &gt;$m(yyyy)&lt; @ &gt;$M&lt; - &gt;$v(&#92;(yyyy&#92;))</pre><br />
|}<br />
<br />
Here are some things that may happen:<br />
<br />
{|<br />
|-<br />
|If '''none''' of the variables are known<br />
|None of the separators will display<br />
|-<br />
|If only one variable '''is''' known<br />
|Only that variable will print. No separators will print.<br />
|-<br />
|If only the spouse's name '''is not''' known<br />
|The first separator will not display<br />
|-<br />
|If only the marriage date '''is not''' known<br />
|The first separator does not display. We will be left with:<br />
Jane Doe&lt; - &gt;{ … }And only the divorce date needs to be known to print the second separator.<br />
|-<br />
|If only the divorce date '''is not''' known<br />
|the second separator will not display<br />
|}<br />
<br />
<br />
Separators can be inside format strings:<br />
<br />
$n(&lt;0&gt;T&lt; &gt;L&lt;, &gt;f&lt; &gt;s)<br />
<br />
Unlike groups, separators can not cross over/out of format strings. So the separator &lt;0&gt; will NEVER display. No matter what is on the left hand side of the variable.<br />
<br />
----<br />
<br />
Here is a useful example:<br />
{|<br />
|-<br />
|<pre>{({b. $b}<, >{d. $d})}</pre><br />
|}<br />
<br />
This will:<br />
{|<br />
|-<br />
| Only print the outside () if either the birth or death date displays<br />
|-<br />
| Only displays the center separator if both dates are known.<br />
|-<br />
| So here are some thing that could display<br />
{|<br />
|-<br />
| <pre>(b. 1970-4-8)</pre><br />
| <pre>(d. 2012-3-9)</pre><br />
| <pre>(b. 1970-4-8, d. 2012-3-9)</pre><br />
| or the line does not print at all.<br />
|}<br />
|-<br />
| We will not see things like:<br />
{|<br />
|-<br />
| <pre>()</pre><br />
| <pre>(, )</pre><br />
| <pre>(b.)</pre><br />
| <pre>(b., )</pre><br />
| <pre>(d.)</pre><br />
|-<br />
| <pre>(, d.)</pre><br />
| <pre>(b. 1970-4-8, )</pre><br />
| <pre>(b. 1970-4-8, d.)</pre><br />
| <pre>(, d. 2012-3-9)</pre><br />
| <pre>(b., d. 2012-3-9)</pre><br />
|}<br />
|}<br />
Back to [[Gramps_4.1_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
{{-}}<br />
<br />
{{man index|Gramps 4.1 Wiki Manual - Reports - part 1|Gramps_4.1_Wiki_Manual_-_Reports_-_part_3|4.1}}<br />
<br />
{{languages}}<br />
<br />
[[Category:Documentation]]<br />
[[Category:Plugins]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Gramps_4.2_Wiki_Manual_-_Reports_-_part_2&diff=52346Gramps 4.2 Wiki Manual - Reports - part 22014-11-06T17:59:19Z<p>Ander882: /* Rules for groups */</p>
<hr />
<div>{{grampsmanualcopyright}}<br />
<br />
{{man index|Gramps 4.1 Wiki Manual - Reports - part 1|Gramps_4.1_Wiki_Manual_-_Reports_-_part_3|4.1}}<br />
<br />
{{languages|Gramps_4.1_Wiki_Manual_-_Reports - part 2}}<br />
<br />
{{#vardefine:chapter|11.2}}<br />
{{#vardefine:figure|0}}<br />
<br />
Back to [[Gramps_4.1_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
This section describes the substitution values that can be used in the different reports available in Gramps.<br />
<br />
= Substitution Values =<br />
<br />
Many of the graphical reports allow you to customize the information that is displayed on the reports. Variable substitution is the method that is used to substitute a particular symbol (key) for specific information about the person in the database.<br />
<br />
{|<br />
|-<br />
|Example: <br />
|Will show as: (the person is alive)<br />
|-<br />
|<pre>$n<br />
b. $b{ at $B}<br />
d. $d< at >$D</pre><br />
|<pre>Smith, Edwin Michael<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA<br />
d.</pre><br />
|}<br />
<br />
----<br />
{|<br />
|-<br />
|1<br />
|A list of all available variables (The Substitution Keys) follows. If you wish to display names, date, or place information differently, you may use [[#Format Strings|Format Strings]] to accomplish this.<br />
|-<br />
|2<br />
|There are also [[#Control Variables|Control Variables]] to display special characters (like the dollar sign).<br />
|-<br />
|3<br />
|You can also use [[#Grouping|Grouping]] to optionally display information. Line 2 above, uses grouping to display ' at ' only when the birth place is known.<br />
|-<br />
|4<br />
|Along with [[#Events|Events]] you can print almost anything.<br />
|-<br />
|5<br />
|Finally, [[#Separators|Separators]], to make your life complete. Line 3 above, uses this to display ' at ' only when both the birth date and place is known.<br />
|-<br />
|}<br />
<br />
<br />
== The Substitution Keys ==<br />
<br />
{|<br />
|-<br />
| colspan="2"|'''Personal variables'''<br />
| colspan="2"|'''Marital variables'''<br />
|-<br />
|$n<br />
|Displays the person's name<br />
|$s<br />
|Displays the name of the person's spouse<br />
|-<br />
|$i<br />
|Displays the GRAMPS ID for the person.<br />
|$j<br />
|Displays the GRAMPS ID for the marriage.<br />
|-<br />
|$b<br />
|Displays the person's date of birth <br />
|$m<br />
|Displays the marriage date of the person and the spouse.<br />
|-<br />
|$B<br />
|Displays the person's place of birth <br />
|$M<br />
|Displays the place of the marriage of the person and the spouse.<br />
|-<br />
|$d<br />
|Displays the person's date of death <br />
|$v<br />
|Displays the divorce date of the person and the spouse.<br />
|-<br />
|$D<br />
|Displays the person's place of death <br />
|$V<br />
|Displays the place of the divorce of the person and the spouse.<br />
|-<br />
|$a<br />
|Displays an attribute about the person.<br />
see [[#Attributes|Attributes]] for more<br />
|$u<br />
|Displays an attribute about the marriage.<br />
see [[#Attributes|Attributes]] for more<br />
|-<br />
|$e<br />
|Displays event information about the person.<br />
See [[#Events|Events]] for more<br />
|$t<br />
|Displays an event information about the marriage.<br />
See [[#Events|Events]] for more<br />
|}<br />
<br />
All of the Marital variables (if not defined by the report) are defined by the person's preferred spouse in Gramps. If the person has never been married, then these variables will not display anything.<br />
<br />
These codes can be uppercased to uppercase the result. <br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
==== Other Substitution Keys ====<br />
<br />
$T Displays Todays date. Standard Date format code apply<br />
<br />
<br />
$G Displays information about Gramsp, the database, and the researcher.<br />
<br />
These are the formatting codes you can use on the $G variable only:<br />
{|<br />
|-<br />
|v<br />
|Gramps Version number<br />
|<br />
|<br />
|<br />
|-<br />
|t<br />
|Researchers Name<br />
|<br />
|d<br />
|Database Name<br />
|-<br />
|e<br />
|Researchers Street<br />
|<br />
|l<br />
|Researchers Locality<br />
|-<br />
|c<br />
|Researchers City<br />
|<br />
|s<br />
|Researchers State<br />
|-<br />
|p<br />
|Researchers Postal Code<br />
|<br />
|n<br />
|Researchers Country<br />
|-<br />
|o<br />
|Researchers Phone<br />
|<br />
|m<br />
|Researchers Email<br />
|}<br />
<br />
=== Default displayed formats ===<br />
<br />
{|<br />
|-<br />
|$n $s<br />
|Names will be displayed as set in 'Name format:' on the Display tab in Gramps preferences<br />
|-<br />
|$B $D $M $V<br />
|Places will display the Place title by default<br />
|-<br />
|$b $d $m $v $T<br />
|Dates will be displayed as set in 'Date format:' on the Display tab in Gramps preferences<br />
|-<br />
|$e $t<br />
|Events will display the description by default<br />
|}<br />
<br />
<br />
----<br />
=== Deprecated variables ===<br />
<br />
Some of the old variables were deprecated because [[#Format Strings|Format Strings]] have replaced them. So here is a list of those variables and how to achieve their results:<br />
<br />
{| {{prettytable}}<br />
|-<br />
!Old Variable<br />
!How to display it now<br />
!What is displayed<br />
|-<br />
|$f<br />
|$n<br />
|Name - as by Gramps name display under Preferences<br />
|-<br />
|$n<br />
|$n(g f)<br />
|Name - FirstName LastName<br />
|-<br />
|$N<br />
|$n(f, g)<br />
|Name - LastName, FirstName (note the explicit comma)<br />
|-<br />
|$nC<br />
|$n(g F)<br />
|Name - FirstName LastName in UPPER case<br />
|-<br />
|$NC<br />
|$n(F, g)<br />
|Name - LastName in UPPER case, FirstName<br />
|-<br />
|$by<br />
|$b(yyyy)<br />
|Date of birth, year only<br />
|-<br />
|$dy<br />
|$d(yyyy)<br />
|Date of death, year only<br />
|-<br />
|$my<br />
|$m(yyyy)<br />
|Date of preferred marriage, year only<br />
|-<br />
|$p<br />
|$s<br />
|Preferred spouse's name as by Gramps name display under Preferences<br />
|-<br />
|$s<br />
|$s(g f)<br />
|Preferred spouse's name - FirstName LastName<br />
|-<br />
|$S<br />
|$s(f, g)<br />
|Preferred spouse's name - LastName, FirstName<br />
|-<br />
|$sC<br />
|$s(g F)<br />
|Preferred spouse's name - FirstName LastName in UPPER case<br />
|-<br />
|$SC<br />
|$s(F, g)<br />
|Preferred spouse's name - LastName in UPPER case, FirstName<br />
|}<br />
<br />
== Format Strings ==<br />
<br />
Format strings are used to display names and dates differently than those assigned under Gramps Preferences. Here is the syntax for a format string:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''(format string)<br />
where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'nsijbmBMdvDVauet'<br />
<br />
A format string is any text, separators or format codes (defined below) to display information about the person.<br />
<br />
=== Formatting names ===<br />
<br />
The $n and $s variables will print the the preferred name within Gramps only. If you wish to print an alternate name, put the name within [] as followes:<br />
<pre>$n[Also Known As]<br />
$s[Married Name](L, f)</pre><br />
and then an addictional format strings.<br />
<br />
<br />
For names ($n $s) you may use the following formatting codes to display the name differently.<br />
<br />
{|<br />
|-<br />
|t<br />
|Title<br />
|<br />
|f<br />
|Given name<br />
|-<br />
|x<br />
|Common name. Call name if existing, otherwise first first name<br />
|<br />
|c<br />
|Call name<br />
|-<br />
|n<br />
|Nick name<br />
|<br />
|s<br />
|Suffix<br />
|-<br />
|l<br />
|Surname<br />
|<br />
|g<br />
|Family nickname<br />
|}<br />
<br />
These codes can be uppercased to uppercase the result.<br />
<br />
{|<br />
|-<br />
|Example code<br />
|Displays<br />
|-<br />
|<pre>$n(L, f) ($n(c)), $n(L, f){ ($n(c))}<br />
$s(f l s)</pre><br />
|<pre>SMITH, Edwin Michael (), SMITH, Edwin Michael<br />
Janice Ann Adams</pre><br />
|}<br />
<br />
<br />
<blockquote>Note:<br />
If you want to print a character 'c' within the format string (or any one of the other format codes), you will need to first add a '&#92;' in front of it. See [[#Control Variables|Control Variables]] for more.</blockquote><br />
<br />
<blockquote>Note:<br />
the curly brackets { } are used to hide information. Here it is used around ' ($n(c))' to not display ' ()' if the person does not have a call name. See [[#Grouping|Grouping]] for more.</blockquote><br />
<br />
----<br />
<br />
=== Formatting Dates ===<br />
<br />
For all of the date variables ($b $d $m $v) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
!colspan=2|For:<br />
regular dates<br />
Starting dates<br />
|<br />
!colspan=2|For:<br />
Ending dates (ranges)<br />
|-<br />
|yyyy<br />
|The year as a four digit number<br />
|<br />
|zzzz<br />
|The ending year as a four digit number<br />
|-<br />
|yyy<br />
|The year, with a minimum of three digits<br />
|<br />
|zzz<br />
|The ending year, with a minimum of three digits<br />
|-<br />
|yy<br />
|The year, from 00 to 99<br />
|<br />
|zz<br />
|The year, from 00 to 99<br />
|-<br />
|y<br />
|The year, from 0 to 99<br />
|<br />
|z<br />
|The year, from 0 to 99<br />
|-<br />
|mmmm<BR><br />
MMMM<br />
|The full name of the month<BR><br />
The full name IN CAPS<br />
|<br />
|nnnn<BR><br />
NNNN<br />
|The full name of the ending month<BR><br />
The full name IN CAPS<br />
|-<br />
|mmm<BR><br />
MMM<br />
|The abbreviated name of the month<BR><br />
The abbreviated name IN CAPS<br />
|<br />
|nnn<BR><br />
NNN<br />
|The abbreviated name of the ending month<BR><br />
The abbreviated name IN CAPS<br />
|-<br />
|mm<br />
|The month, from 00 to 12<br />
|<br />
|nn<br />
|The ending month, from 00 to 12<br />
|-<br />
|m<br />
|The month, from 0 to 12<br />
|<br />
|n<br />
|The ending month, from 0 to 12<br />
|-<br />
|dd<br />
|The day, from 00 to 31<br />
|<br />
|ee<br />
|The ending day, from 00 to 31<br />
|-<br />
|dd<br />
|The day, from 0 to 31<br />
|<br />
|e<br />
|The ending day, from 0 to 31<br />
|-<br />
|o<br />
|The date type (modifier)<br><br />
Only displays ("About", "Before", "After")<br />
|<br />
|t<br />
|The Text Comment<br />
|}<br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$b(mmm-dd yy)<br />
$m(yyyy/mmm/d)<br />
$b(mmm-dd yy)</pre><br />
|<pre>May-24 61<br />
1995/May/27<br />
Jun-04 85</pre><br />
|}<br />
<br />
{{man note| For date types (modifier) |Only "Before", "After", and "About" are supported at this time. all others will not display anything.<BR><br />
And for date span and date ranges, only the starting (first) date is displayed.}}<br />
<br />
----<br />
<br />
=== Formatting Places ===<br />
<br />
For all of the place variables ($B $D $M $V) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|e<br />
|Street<br />
|<br />
|l<br />
|Locality<br />
|-<br />
|c<br />
|City<br />
|<br />
|u<br />
|County<br />
|-<br />
|s<br />
|State<br />
|<br />
|p<br />
|Postal Code<br />
|-<br />
|n<br />
|Country<br />
|<br />
|t<br />
|Title<br />
|-<br />
|x<br />
|Longitude<br />
|<br />
|y<br />
|Latitude<br />
|}<br />
These codes can be uppercased to uppercase the result. <br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
----<br />
<br />
=== Rules for format strings. ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Anything will print inside a format string<br />
|-<br />
|1a<br />
|you will have to use [[#Control Variables|Control Variables]] to display things like ')' and format codes<br />
|-<br />
|2<br />
|Separators can be within format strings.<br />
|-<br />
|3<br />
|At least ONE format code has to display something for the ENTIRE format string to display<br />
|}<br />
<br />
----<br />
<br />
=== Examples ===<br />
<br />
{|<br />
|-<br />
|code<br />
|gives<br />
|-<br />
|<pre>$n(f l)<br />
b. $b {at $B<br />
{d. $d $D</pre><br />
|<pre>Edwin Michael Smith<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA</pre>The person is still alive (or has no information present) so the line was removed.<br />
|}<br />
<br />
<br />
<br />
== Control Variables ==<br />
<br />
Control variables allow you to print characters that are special to Substitution values within a display.<br />
<br />
For example the dollar character '$' is used to note the start of a variable. If you wish to print a dollar character you would use a control character like '&#92;$'<br />
<br />
Control Variables<br />
<br />
{|<br />
|-<br />
|&#92;$<br />
|Displays a single '$'<br />
|<br />
|&#92;&#92;<br />
|Displays a single '&#92;'<br />
|-<br />
|&#92;(<br />
|Displays a single '('<br />
|<br />
|&#92;)<br />
|Displays a single ')'<br />
|-<br />
|&#92;{<br />
|Displays a single '{'<br />
|<br />
|&#92;}<br />
|Displays a single '}'<br />
|-<br />
|&#92;<<br />
|Displays a single '<'<br />
|<br />
|&#92;><br />
|Displays a single '>'<br />
|}<br />
<br />
Basically anything that comes after a '&#92;' will be printed.<br />
<br />
----<br />
Note:<br />
When you are inside a format string, you may need to use this to display a character that would normally be a format code. <br />
<br />
{|<br />
|-<br />
|Example:<br />
|would give<br />
|-<br />
|<pre>$b(m hi mom)<br />
$b(m hi \mo\m)</pre><br />
|<pre>5 hi 5o5<br />
5 hi mom</pre><br />
|}<br />
<br />
as this person was born on the fifth month.<br />
<br />
== Grouping ==<br />
<br />
There are instances where you do not want certain text to be displayed. Take the example:<br />
<br />
{|<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died on $d at $D</pre><br />
|<pre>died on 1975-06-26 at </pre> <br />
|<pre>died on at Reno, Washoe Co., NV</pre><br />
|-<br />
| colspan="3"|Neither of these are very acceptable.<br />
|-<br />
| colspan="3"|But with groups (denoted by {}), you can optionally print information if a variable within contains information.<br />
|-<br />
| colspan="3"|For example:<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died{ on $d}{ at $D}</pre><br />
|<pre>died on 1975-06-26</pre><br />
|<pre>died at Reno, Washoe Co., NV</pre><br />
|}<br />
<br />
which is what we want.<br />
<br />
----<br />
=== Rules for groups ===<br />
<br />
A group will only display if there is at least one variable that displays something. So if a group only has text and/or variables where the information is not known, the entire group will not print.<br />
<br />
Groups can also be nested. If this happens (like below), the outer group will only display if there is at least one variable that displays something within the outer group or any of the sub groups.<br />
<br />
Groups can also be used to remove text. If you wish to not display the entire line, '-' at the start of a line will remove the entire line from the display if the above rule is true.<br />
<br />
If you do not wish to have the display code above (for death information) displayed (the person is alive, or you do not yet know the information), modify the code to look like<br />
<pre>{died{ on $d}{ at $D}</pre><br />
<br />
<blockquote>To have an entire line be blank instead of removing the line simply start the line with a space ' {' or make sure there is a space after the group (you will have to close the group first)</blockquote><br />
<br />
----<br />
<br />
=== Examples: ===<br />
<br />
This will hide '(' and ')' if the divorce information is not known (or still married).<br />
<br />
<pre>m. $m $M {- ($v(yyyy))</pre><br />
<br />
<br />
Only display some spouse information if married or remove the entire line if never married:<br />
<pre>{$s $m(yyyy) {- $v(\(yyyy\))}}</pre><br />
<br />
== Attributes ==<br />
<br />
Attributes do not have a format string. Instead the attribute name is placed inside []. Here is the syntax for an attribute:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name] where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'au'<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$a[Profession]<br />
$a[Social Security Number]<br />
$a[Total \$ bequeathed]</pre><br />
|<pre>Programmer<br />
7A3-29-F1C6<br />
3.00USD</pre><br />
|}<br />
<br />
<br />
----<br />
== Events ==<br />
<br />
Events have the same starting structure as attributes, $e or $t and the event name in [] but events have an extra format string after the name to display the description, date, place, id, and attributes associated with it. Each of these items can be displayed with a , a 'n', 'd', 'D', 'i', and 'a' respectively in the format string. Here is the syntax for an event:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name](format string) where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'et'<br />
<br />
=== Event format strings ===<br />
<br />
The Event format string is used to display information about the event. Here are the format codes to display parts of the event:<br />
<br />
{|<br />
|-<br />
|n<br />
|Description<br />
|<br />
|i<br />
|Event ID<br />
|-<br />
|d<br />
|Event Date&#42;<br />
|<br />
|D<br />
|Event Place&#42;<br />
|-<br />
|a<br />
|An attributes for the event&#42;&#42;<br />
|<br />
|<br />
|<br />
|}<br />
<br />
&#42;These variables can themselves have format strings. Date and a place can be formatted with format string as defined in [[#Format strings|Format strings]].<br />
<br />
&#42;&#42;Attribute needs to have the attribute name in [] and are formatted as above.<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$e[First Communion](d(yyyy-mm-d))<br />
$e[Bar Mitzvah](n&lt; at &gt; D)<br />
$e[Birth](d(yyyy mm/dd) D)</pre><br />
|<pre>2009-11-6<br />
Jerry's Bar Mitzah at Opas house<br />
2007 05/23 Grandmothers house</pre><br />
|}<br />
<br />
<br />
And:<br />
<br />
{|<br />
|-<br />
|<pre>$b(yyyy-Mmm-dd)<br />
$M</pre><br />
|is the same as<br />
|<pre>$e[Birth](d(yyyy-Mmm-dd))<br />
$t[Marriage](D)</pre><br />
|}<br />
<br />
<br />
----<br />
<br />
=== Notes for attributes and events: ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Attribute and event names are mandatory. '$a' or '$a[]' will not display anything.<br />
|-<br />
|2<br />
|Attributes and event names may have special characters within them. Most notably ']' and ')'. If this is the case, you will need to use [[#Control Variables|Control Variables]]<br />
|}<br />
<br />
== Separators ==<br />
<br />
Separators are special 'text only' groups inside '&lt;' and '&gt;' that conditionally display a separator (like ', ' or ' - ') between two groups, variables, format codes or text.<br />
<br />
Separators are displayed conditionally depending on these rules:<br />
<br />
# A variable that does '''not''' display anything will remove itself and a separator that is to the left of it from the display line only.<br />
# If there is not a separator to the left, the same variable will remove itself and a separator that is to the right of it from the displayed line. <br />
# If there are two separators together, the left one will be removed from the display line and the right is kept.<br />
# Separators at the start or end of the display line (or format strings) are removed<br />
<br />
=== Example: ===<br />
{|<br />
|-<br />
|<pre>$s(f l s)&lt;, &gt;$m(yyyy)&lt; @ &gt;$M&lt; - &gt;$v(&#92;(yyyy&#92;))</pre><br />
|}<br />
<br />
Here are some things that may happen:<br />
<br />
{|<br />
|-<br />
|If '''none''' of the variables are known<br />
|None of the separators will display<br />
|-<br />
|If only one variable '''is''' known<br />
|Only that variable will print. No separators will print.<br />
|-<br />
|If only the spouse's name '''is not''' known<br />
|The first separator will not display<br />
|-<br />
|If only the marriage date '''is not''' known<br />
|The first separator does not display. We will be left with:<br />
Jane Doe&lt; - &gt;{ … }And only the divorce date needs to be known to print the second separator.<br />
|-<br />
|If only the divorce date '''is not''' known<br />
|the second separator will not display<br />
|}<br />
<br />
<br />
Separators can be inside format strings:<br />
<br />
$n(&lt;0&gt;T&lt; &gt;L&lt;, &gt;f&lt; &gt;s)<br />
<br />
Unlike groups, separators can not cross over/out of format strings. So the separator &lt;0&gt; will NEVER display. No matter what is on the left hand side of the variable.<br />
<br />
----<br />
<br />
Here is a useful example:<br />
{|<br />
|-<br />
|<pre>{({b. $b}<, >{d. $d})}</pre><br />
|}<br />
<br />
This will:<br />
{|<br />
|-<br />
| Only print the outside () if either the birth or death date displays<br />
|-<br />
| Only displays the center separator if both dates are known.<br />
|-<br />
| So here are some thing that could display<br />
{|<br />
|-<br />
| <pre>(b. 1970-4-8)</pre><br />
| <pre>(d. 2012-3-9)</pre><br />
| <pre>(b. 1970-4-8, d. 2012-3-9)</pre><br />
| or the line does not print at all.<br />
|}<br />
|-<br />
| We will not see things like:<br />
{|<br />
|-<br />
| <pre>()</pre><br />
| <pre>(, )</pre><br />
| <pre>(b.)</pre><br />
| <pre>(b., )</pre><br />
| <pre>(d.)</pre><br />
|-<br />
| <pre>(, d.)</pre><br />
| <pre>(b. 1970-4-8, )</pre><br />
| <pre>(b. 1970-4-8, d.)</pre><br />
| <pre>(, d. 2012-3-9)</pre><br />
| <pre>(b., d. 2012-3-9)</pre><br />
|}<br />
|}<br />
Back to [[Gramps_4.1_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
{{-}}<br />
<br />
{{man index|Gramps 4.1 Wiki Manual - Reports - part 1|Gramps_4.1_Wiki_Manual_-_Reports_-_part_3|4.1}}<br />
<br />
{{languages}}<br />
<br />
[[Category:Documentation]]<br />
[[Category:Plugins]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Gramps_4.2_Wiki_Manual_-_Reports_-_part_2&diff=50151Gramps 4.2 Wiki Manual - Reports - part 22014-08-14T01:10:50Z<p>Ander882: /* Formatting Dates */</p>
<hr />
<div>{{grampsmanualcopyright}}<br />
<br />
{{man index|Gramps 4.1 Wiki Manual - Reports - part 1|Gramps_4.1_Wiki_Manual_-_Reports_-_part_3|4.1}}<br />
<br />
{{languages|Gramps_4.1_Wiki_Manual_-_Reports - part 2}}<br />
<br />
{{#vardefine:chapter|11.2}}<br />
{{#vardefine:figure|0}}<br />
<br />
Back to [[Gramps_4.1_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
This section describes the substitution values that can be used in the different reports available in Gramps.<br />
<br />
= Substitution Values =<br />
<br />
Many of the graphical reports allow you to customize the information that is displayed on the reports. Variable substitution is the method that is used to substitute a particular symbol (key) for specific information about the person in the database.<br />
<br />
{|<br />
|-<br />
|Example: <br />
|Will show as: (the person is alive)<br />
|-<br />
|<pre>$n<br />
b. $b{ at $B}<br />
d. $d< at >$D</pre><br />
|<pre>Smith, Edwin Michael<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA<br />
d.</pre><br />
|}<br />
<br />
----<br />
{|<br />
|-<br />
|1<br />
|A list of all available variables (The Substitution Keys) follows. If you wish to display names, date, or place information differently, you may use [[#Format Strings|Format Strings]] to accomplish this.<br />
|-<br />
|2<br />
|There are also [[#Control Variables|Control Variables]] to display special characters (like the dollar sign).<br />
|-<br />
|3<br />
|You can also use [[#Grouping|Grouping]] to optionally display information. Line 2 above, uses grouping to display ' at ' only when the birth place is known.<br />
|-<br />
|4<br />
|Along with [[#Events|Events]] you can print almost anything.<br />
|-<br />
|5<br />
|Finally, [[#Separators|Separators]], to make your life complete. Line 3 above, uses this to display ' at ' only when both the birth date and place is known.<br />
|-<br />
|}<br />
<br />
<br />
== The Substitution Keys ==<br />
<br />
{|<br />
|-<br />
| colspan="2"|'''Personal variables'''<br />
| colspan="2"|'''Marital variables'''<br />
|-<br />
|$n<br />
|Displays the person's name<br />
|$s<br />
|Displays the name of the person's spouse<br />
|-<br />
|$i<br />
|Displays the GRAMPS ID for the person.<br />
|$j<br />
|Displays the GRAMPS ID for the marriage.<br />
|-<br />
|$b<br />
|Displays the person's date of birth <br />
|$m<br />
|Displays the marriage date of the person and the spouse.<br />
|-<br />
|$B<br />
|Displays the person's place of birth <br />
|$M<br />
|Displays the place of the marriage of the person and the spouse.<br />
|-<br />
|$d<br />
|Displays the person's date of death <br />
|$v<br />
|Displays the divorce date of the person and the spouse.<br />
|-<br />
|$D<br />
|Displays the person's place of death <br />
|$V<br />
|Displays the place of the divorce of the person and the spouse.<br />
|-<br />
|$a<br />
|Displays an attribute about the person.<br />
see [[#Attributes|Attributes]] for more<br />
|$u<br />
|Displays an attribute about the marriage.<br />
see [[#Attributes|Attributes]] for more<br />
|-<br />
|$e<br />
|Displays event information about the person.<br />
See [[#Events|Events]] for more<br />
|$t<br />
|Displays an event information about the marriage.<br />
See [[#Events|Events]] for more<br />
|}<br />
<br />
All of the Marital variables (if not defined by the report) are defined by the person's preferred spouse in Gramps. If the person has never been married, then these variables will not display anything.<br />
<br />
These codes can be uppercased to uppercase the result. <br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
==== Other Substitution Keys ====<br />
<br />
$T Displays Todays date. Standard Date format code apply<br />
<br />
<br />
$G Displays information about Gramsp, the database, and the researcher.<br />
<br />
These are the formatting codes you can use on the $G variable only:<br />
{|<br />
|-<br />
|v<br />
|Gramps Version number<br />
|<br />
|<br />
|<br />
|-<br />
|t<br />
|Researchers Name<br />
|<br />
|d<br />
|Database Name<br />
|-<br />
|e<br />
|Researchers Street<br />
|<br />
|l<br />
|Researchers Locality<br />
|-<br />
|c<br />
|Researchers City<br />
|<br />
|s<br />
|Researchers State<br />
|-<br />
|p<br />
|Researchers Postal Code<br />
|<br />
|n<br />
|Researchers Country<br />
|-<br />
|o<br />
|Researchers Phone<br />
|<br />
|m<br />
|Researchers Email<br />
|}<br />
<br />
=== Default displayed formats ===<br />
<br />
{|<br />
|-<br />
|$n $s<br />
|Names will be displayed as set in 'Name format:' on the Display tab in Gramps preferences<br />
|-<br />
|$B $D $M $V<br />
|Places will display the Place title by default<br />
|-<br />
|$b $d $m $v $T<br />
|Dates will be displayed as set in 'Date format:' on the Display tab in Gramps preferences<br />
|-<br />
|$e $t<br />
|Events will display the description by default<br />
|}<br />
<br />
<br />
----<br />
=== Deprecated variables ===<br />
<br />
Some of the old variables were deprecated because [[#Format Strings|Format Strings]] have replaced them. So here is a list of those variables and how to achieve their results:<br />
<br />
{| {{prettytable}}<br />
|-<br />
!Old Variable<br />
!How to display it now<br />
!What is displayed<br />
|-<br />
|$f<br />
|$n<br />
|Name - as by Gramps name display under Preferences<br />
|-<br />
|$n<br />
|$n(g f)<br />
|Name - FirstName LastName<br />
|-<br />
|$N<br />
|$n(f, g)<br />
|Name - LastName, FirstName (note the explicit comma)<br />
|-<br />
|$nC<br />
|$n(g F)<br />
|Name - FirstName LastName in UPPER case<br />
|-<br />
|$NC<br />
|$n(F, g)<br />
|Name - LastName in UPPER case, FirstName<br />
|-<br />
|$by<br />
|$b(yyyy)<br />
|Date of birth, year only<br />
|-<br />
|$dy<br />
|$d(yyyy)<br />
|Date of death, year only<br />
|-<br />
|$my<br />
|$m(yyyy)<br />
|Date of preferred marriage, year only<br />
|-<br />
|$p<br />
|$s<br />
|Preferred spouse's name as by Gramps name display under Preferences<br />
|-<br />
|$s<br />
|$s(g f)<br />
|Preferred spouse's name - FirstName LastName<br />
|-<br />
|$S<br />
|$s(f, g)<br />
|Preferred spouse's name - LastName, FirstName<br />
|-<br />
|$sC<br />
|$s(g F)<br />
|Preferred spouse's name - FirstName LastName in UPPER case<br />
|-<br />
|$SC<br />
|$s(F, g)<br />
|Preferred spouse's name - LastName in UPPER case, FirstName<br />
|}<br />
<br />
== Format Strings ==<br />
<br />
Format strings are used to display names and dates differently than those assigned under Gramps Preferences. Here is the syntax for a format string:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''(format string)<br />
where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'nsijbmBMdvDVauet'<br />
<br />
A format string is any text, separators or format codes (defined below) to display information about the person.<br />
<br />
=== Formatting names ===<br />
<br />
The $n and $s variables will print the the preferred name within Gramps only. If you wish to print an alternate name, put the name within [] as followes:<br />
<pre>$n[Also Known As]<br />
$s[Married Name](L, f)</pre><br />
and then an addictional format strings.<br />
<br />
<br />
For names ($n $s) you may use the following formatting codes to display the name differently.<br />
<br />
{|<br />
|-<br />
|t<br />
|Title<br />
|<br />
|f<br />
|Given name<br />
|-<br />
|x<br />
|Common name. Call name if existing, otherwise first first name<br />
|<br />
|c<br />
|Call name<br />
|-<br />
|n<br />
|Nick name<br />
|<br />
|s<br />
|Suffix<br />
|-<br />
|l<br />
|Surname<br />
|<br />
|g<br />
|Family nickname<br />
|}<br />
<br />
These codes can be uppercased to uppercase the result.<br />
<br />
{|<br />
|-<br />
|Example code<br />
|Displays<br />
|-<br />
|<pre>$n(L, f) ($n(c)), $n(L, f){ ($n(c))}<br />
$s(f l s)</pre><br />
|<pre>SMITH, Edwin Michael (), SMITH, Edwin Michael<br />
Janice Ann Adams</pre><br />
|}<br />
<br />
<br />
<blockquote>Note:<br />
If you want to print a character 'c' within the format string (or any one of the other format codes), you will need to first add a '&#92;' in front of it. See [[#Control Variables|Control Variables]] for more.</blockquote><br />
<br />
<blockquote>Note:<br />
the curly brackets { } are used to hide information. Here it is used around ' ($n(c))' to not display ' ()' if the person does not have a call name. See [[#Grouping|Grouping]] for more.</blockquote><br />
<br />
----<br />
<br />
=== Formatting Dates ===<br />
<br />
For all of the date variables ($b $d $m $v) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
!colspan=2|For:<br />
regular dates<br />
Starting dates<br />
|<br />
!colspan=2|For:<br />
Ending dates (ranges)<br />
|-<br />
|yyyy<br />
|The year as a four digit number<br />
|<br />
|zzzz<br />
|The ending year as a four digit number<br />
|-<br />
|yyy<br />
|The year, with a minimum of three digits<br />
|<br />
|zzz<br />
|The ending year, with a minimum of three digits<br />
|-<br />
|yy<br />
|The year, from 00 to 99<br />
|<br />
|zz<br />
|The year, from 00 to 99<br />
|-<br />
|y<br />
|The year, from 0 to 99<br />
|<br />
|z<br />
|The year, from 0 to 99<br />
|-<br />
|mmmm<BR><br />
MMMM<br />
|The full name of the month<BR><br />
The full name IN CAPS<br />
|<br />
|nnnn<BR><br />
NNNN<br />
|The full name of the ending month<BR><br />
The full name IN CAPS<br />
|-<br />
|mmm<BR><br />
MMM<br />
|The abbreviated name of the month<BR><br />
The abbreviated name IN CAPS<br />
|<br />
|nnn<BR><br />
NNN<br />
|The abbreviated name of the ending month<BR><br />
The abbreviated name IN CAPS<br />
|-<br />
|mm<br />
|The month, from 00 to 12<br />
|<br />
|nn<br />
|The ending month, from 00 to 12<br />
|-<br />
|m<br />
|The month, from 0 to 12<br />
|<br />
|n<br />
|The ending month, from 0 to 12<br />
|-<br />
|dd<br />
|The day, from 00 to 31<br />
|<br />
|ee<br />
|The ending day, from 00 to 31<br />
|-<br />
|dd<br />
|The day, from 0 to 31<br />
|<br />
|e<br />
|The ending day, from 0 to 31<br />
|-<br />
|o<br />
|The date type (modifier)<br><br />
Only displays ("About", "Before", "After")<br />
|<br />
|t<br />
|The Text Comment<br />
|}<br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$b(mmm-dd yy)<br />
$m(yyyy/mmm/d)<br />
$b(mmm-dd yy)</pre><br />
|<pre>May-24 61<br />
1995/May/27<br />
Jun-04 85</pre><br />
|}<br />
<br />
{{man note| For date types (modifier) |Only "Before", "After", and "About" are supported at this time. all others will not display anything.<BR><br />
And for date span and date ranges, only the starting (first) date is displayed.}}<br />
<br />
----<br />
<br />
=== Formatting Places ===<br />
<br />
For all of the place variables ($B $D $M $V) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|e<br />
|Street<br />
|<br />
|l<br />
|Locality<br />
|-<br />
|c<br />
|City<br />
|<br />
|u<br />
|County<br />
|-<br />
|s<br />
|State<br />
|<br />
|p<br />
|Postal Code<br />
|-<br />
|n<br />
|Country<br />
|<br />
|t<br />
|Title<br />
|-<br />
|x<br />
|Longitude<br />
|<br />
|y<br />
|Latitude<br />
|}<br />
These codes can be uppercased to uppercase the result. <br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
----<br />
<br />
=== Rules for format strings. ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Anything will print inside a format string<br />
|-<br />
|1a<br />
|you will have to use [[#Control Variables|Control Variables]] to display things like ')' and format codes<br />
|-<br />
|2<br />
|Separators can be within format strings.<br />
|-<br />
|3<br />
|At least ONE format code has to display something for the ENTIRE format string to display<br />
|}<br />
<br />
----<br />
<br />
=== Examples ===<br />
<br />
{|<br />
|-<br />
|code<br />
|gives<br />
|-<br />
|<pre>$n(f l)<br />
b. $b {at $B<br />
{d. $d $D</pre><br />
|<pre>Edwin Michael Smith<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA</pre>The person is still alive (or has no information present) so the line was removed.<br />
|}<br />
<br />
<br />
<br />
== Control Variables ==<br />
<br />
Control variables allow you to print characters that are special to Substitution values within a display.<br />
<br />
For example the dollar character '$' is used to note the start of a variable. If you wish to print a dollar character you would use a control character like '&#92;$'<br />
<br />
Control Variables<br />
<br />
{|<br />
|-<br />
|&#92;$<br />
|Displays a single '$'<br />
|<br />
|&#92;&#92;<br />
|Displays a single '&#92;'<br />
|-<br />
|&#92;(<br />
|Displays a single '('<br />
|<br />
|&#92;)<br />
|Displays a single ')'<br />
|-<br />
|&#92;{<br />
|Displays a single '{'<br />
|<br />
|&#92;}<br />
|Displays a single '}'<br />
|-<br />
|&#92;<<br />
|Displays a single '<'<br />
|<br />
|&#92;><br />
|Displays a single '>'<br />
|}<br />
<br />
Basically anything that comes after a '&#92;' will be printed.<br />
<br />
----<br />
Note:<br />
When you are inside a format string, you may need to use this to display a character that would normally be a format code. <br />
<br />
{|<br />
|-<br />
|Example:<br />
|would give<br />
|-<br />
|<pre>$b(m hi mom)<br />
$b(m hi \mo\m)</pre><br />
|<pre>5 hi 5o5<br />
5 hi mom</pre><br />
|}<br />
<br />
as this person was born on the fifth month.<br />
<br />
== Grouping ==<br />
<br />
There are instances where you do not want certain text to be displayed. Take the example:<br />
<br />
{|<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died on $d at $D</pre><br />
|<pre>died on 1975-06-26 at </pre> <br />
|<pre>died on at Reno, Washoe Co., NV</pre><br />
|-<br />
| colspan="3"|Neither of these are very acceptable.<br />
|-<br />
| colspan="3"|But with groups (denoted by {}), you can optionally print information if a variable within contains information.<br />
|-<br />
| colspan="3"|For example:<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died{ on $d}{ at $D}</pre><br />
|<pre>died on 1975-06-26</pre><br />
|<pre>died at Reno, Washoe Co., NV</pre><br />
|}<br />
<br />
which is what we want.<br />
<br />
----<br />
=== Rules for groups ===<br />
<br />
A group will only display if there is at least one variable that displays something. So if a group only has text and/or variables where the information is not known, the entire group will not print.<br />
<br />
Groups can also be nested. If this happens (like below), the outer group will only display if there is at least one variable that displays something within the outer group or any of the sub groups.<br />
<br />
Groups can also be used to remove an entire line from a display. A '{' at the start of a line will remove the entire line from the display if the above rule is true.<br />
<br />
If you do not wish to have the display code above (for death information) displayed (the person is alive, or you do not yet know the information), modify the code to look like<br />
<pre>{died{ on $d}{ at $D}</pre><br />
<br />
<blockquote>To have an entire line be blank instead of removing the line simply start the line with a space ' {' or make sure there is a space after the group (you will have to close the group first)</blockquote><br />
<br />
----<br />
<br />
=== Examples: ===<br />
<br />
This will hide '(' and ')' if the divorce information is not known (or still married).<br />
<br />
<pre>m. $m $M {- ($v(yyyy))</pre><br />
<br />
<br />
Only display some spouse information if married or remove the entire line if never married:<br />
<pre>{$s $m(yyyy) {- $v(\(yyyy\))}}</pre><br />
<br />
== Attributes ==<br />
<br />
Attributes do not have a format string. Instead the attribute name is placed inside []. Here is the syntax for an attribute:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name] where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'au'<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$a[Profession]<br />
$a[Social Security Number]<br />
$a[Total \$ bequeathed]</pre><br />
|<pre>Programmer<br />
7A3-29-F1C6<br />
3.00USD</pre><br />
|}<br />
<br />
<br />
----<br />
== Events ==<br />
<br />
Events have the same starting structure as attributes, $e or $t and the event name in [] but events have an extra format string after the name to display the description, date, place, id, and attributes associated with it. Each of these items can be displayed with a , a 'n', 'd', 'D', 'i', and 'a' respectively in the format string. Here is the syntax for an event:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name](format string) where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'et'<br />
<br />
=== Event format strings ===<br />
<br />
The Event format string is used to display information about the event. Here are the format codes to display parts of the event:<br />
<br />
{|<br />
|-<br />
|n<br />
|Description<br />
|<br />
|i<br />
|Event ID<br />
|-<br />
|d<br />
|Event Date&#42;<br />
|<br />
|D<br />
|Event Place&#42;<br />
|-<br />
|a<br />
|An attributes for the event&#42;&#42;<br />
|<br />
|<br />
|<br />
|}<br />
<br />
&#42;These variables can themselves have format strings. Date and a place can be formatted with format string as defined in [[#Format strings|Format strings]].<br />
<br />
&#42;&#42;Attribute needs to have the attribute name in [] and are formatted as above.<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$e[First Communion](d(yyyy-mm-d))<br />
$e[Bar Mitzvah](n&lt; at &gt; D)<br />
$e[Birth](d(yyyy mm/dd) D)</pre><br />
|<pre>2009-11-6<br />
Jerry's Bar Mitzah at Opas house<br />
2007 05/23 Grandmothers house</pre><br />
|}<br />
<br />
<br />
And:<br />
<br />
{|<br />
|-<br />
|<pre>$b(yyyy-Mmm-dd)<br />
$M</pre><br />
|is the same as<br />
|<pre>$e[Birth](d(yyyy-Mmm-dd))<br />
$t[Marriage](D)</pre><br />
|}<br />
<br />
<br />
----<br />
<br />
=== Notes for attributes and events: ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Attribute and event names are mandatory. '$a' or '$a[]' will not display anything.<br />
|-<br />
|2<br />
|Attributes and event names may have special characters within them. Most notably ']' and ')'. If this is the case, you will need to use [[#Control Variables|Control Variables]]<br />
|}<br />
<br />
== Separators ==<br />
<br />
Separators are special 'text only' groups inside '&lt;' and '&gt;' that conditionally display a separator (like ', ' or ' - ') between two groups, variables, format codes or text.<br />
<br />
Separators are displayed conditionally depending on these rules:<br />
<br />
# A variable that does '''not''' display anything will remove itself and a separator that is to the left of it from the display line only.<br />
# If there is not a separator to the left, the same variable will remove itself and a separator that is to the right of it from the displayed line. <br />
# If there are two separators together, the left one will be removed from the display line and the right is kept.<br />
# Separators at the start or end of the display line (or format strings) are removed<br />
<br />
=== Example: ===<br />
{|<br />
|-<br />
|<pre>$s(f l s)&lt;, &gt;$m(yyyy)&lt; @ &gt;$M&lt; - &gt;$v(&#92;(yyyy&#92;))</pre><br />
|}<br />
<br />
Here are some things that may happen:<br />
<br />
{|<br />
|-<br />
|If '''none''' of the variables are known<br />
|None of the separators will display<br />
|-<br />
|If only one variable '''is''' known<br />
|Only that variable will print. No separators will print.<br />
|-<br />
|If only the spouse's name '''is not''' known<br />
|The first separator will not display<br />
|-<br />
|If only the marriage date '''is not''' known<br />
|The first separator does not display. We will be left with:<br />
Jane Doe&lt; - &gt;{ … }And only the divorce date needs to be known to print the second separator.<br />
|-<br />
|If only the divorce date '''is not''' known<br />
|the second separator will not display<br />
|}<br />
<br />
<br />
Separators can be inside format strings:<br />
<br />
$n(&lt;0&gt;T&lt; &gt;L&lt;, &gt;f&lt; &gt;s)<br />
<br />
Unlike groups, separators can not cross over/out of format strings. So the separator &lt;0&gt; will NEVER display. No matter what is on the left hand side of the variable.<br />
<br />
----<br />
<br />
Here is a useful example:<br />
{|<br />
|-<br />
|<pre>{({b. $b}<, >{d. $d})}</pre><br />
|}<br />
<br />
This will:<br />
{|<br />
|-<br />
| Only print the outside () if either the birth or death date displays<br />
|-<br />
| Only displays the center separator if both dates are known.<br />
|-<br />
| So here are some thing that could display<br />
{|<br />
|-<br />
| <pre>(b. 1970-4-8)</pre><br />
| <pre>(d. 2012-3-9)</pre><br />
| <pre>(b. 1970-4-8, d. 2012-3-9)</pre><br />
| or the line does not print at all.<br />
|}<br />
|-<br />
| We will not see things like:<br />
{|<br />
|-<br />
| <pre>()</pre><br />
| <pre>(, )</pre><br />
| <pre>(b.)</pre><br />
| <pre>(b., )</pre><br />
| <pre>(d.)</pre><br />
|-<br />
| <pre>(, d.)</pre><br />
| <pre>(b. 1970-4-8, )</pre><br />
| <pre>(b. 1970-4-8, d.)</pre><br />
| <pre>(, d. 2012-3-9)</pre><br />
| <pre>(b., d. 2012-3-9)</pre><br />
|}<br />
|}<br />
Back to [[Gramps_4.1_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
{{-}}<br />
<br />
{{man index|Gramps 4.1 Wiki Manual - Reports - part 1|Gramps_4.1_Wiki_Manual_-_Reports_-_part_3|4.1}}<br />
<br />
{{languages}}<br />
<br />
[[Category:Documentation]]<br />
[[Category:Plugins]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Gramps_4.2_Wiki_Manual_-_Reports_-_part_2&diff=50150Gramps 4.2 Wiki Manual - Reports - part 22014-08-12T15:17:26Z<p>Ander882: /* Formatting Dates */</p>
<hr />
<div>{{grampsmanualcopyright}}<br />
<br />
{{man index|Gramps 4.1 Wiki Manual - Reports - part 1|Gramps_4.1_Wiki_Manual_-_Reports_-_part_3|4.1}}<br />
<br />
{{languages|Gramps_4.1_Wiki_Manual_-_Reports - part 2}}<br />
<br />
{{#vardefine:chapter|11.2}}<br />
{{#vardefine:figure|0}}<br />
<br />
Back to [[Gramps_4.1_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
This section describes the substitution values that can be used in the different reports available in Gramps.<br />
<br />
= Substitution Values =<br />
<br />
Many of the graphical reports allow you to customize the information that is displayed on the reports. Variable substitution is the method that is used to substitute a particular symbol (key) for specific information about the person in the database.<br />
<br />
{|<br />
|-<br />
|Example: <br />
|Will show as: (the person is alive)<br />
|-<br />
|<pre>$n<br />
b. $b{ at $B}<br />
d. $d< at >$D</pre><br />
|<pre>Smith, Edwin Michael<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA<br />
d.</pre><br />
|}<br />
<br />
----<br />
{|<br />
|-<br />
|1<br />
|A list of all available variables (The Substitution Keys) follows. If you wish to display names, date, or place information differently, you may use [[#Format Strings|Format Strings]] to accomplish this.<br />
|-<br />
|2<br />
|There are also [[#Control Variables|Control Variables]] to display special characters (like the dollar sign).<br />
|-<br />
|3<br />
|You can also use [[#Grouping|Grouping]] to optionally display information. Line 2 above, uses grouping to display ' at ' only when the birth place is known.<br />
|-<br />
|4<br />
|Along with [[#Events|Events]] you can print almost anything.<br />
|-<br />
|5<br />
|Finally, [[#Separators|Separators]], to make your life complete. Line 3 above, uses this to display ' at ' only when both the birth date and place is known.<br />
|-<br />
|}<br />
<br />
<br />
== The Substitution Keys ==<br />
<br />
{|<br />
|-<br />
| colspan="2"|'''Personal variables'''<br />
| colspan="2"|'''Marital variables'''<br />
|-<br />
|$n<br />
|Displays the person's name<br />
|$s<br />
|Displays the name of the person's spouse<br />
|-<br />
|$i<br />
|Displays the GRAMPS ID for the person.<br />
|$j<br />
|Displays the GRAMPS ID for the marriage.<br />
|-<br />
|$b<br />
|Displays the person's date of birth <br />
|$m<br />
|Displays the marriage date of the person and the spouse.<br />
|-<br />
|$B<br />
|Displays the person's place of birth <br />
|$M<br />
|Displays the place of the marriage of the person and the spouse.<br />
|-<br />
|$d<br />
|Displays the person's date of death <br />
|$v<br />
|Displays the divorce date of the person and the spouse.<br />
|-<br />
|$D<br />
|Displays the person's place of death <br />
|$V<br />
|Displays the place of the divorce of the person and the spouse.<br />
|-<br />
|$a<br />
|Displays an attribute about the person.<br />
see [[#Attributes|Attributes]] for more<br />
|$u<br />
|Displays an attribute about the marriage.<br />
see [[#Attributes|Attributes]] for more<br />
|-<br />
|$e<br />
|Displays event information about the person.<br />
See [[#Events|Events]] for more<br />
|$t<br />
|Displays an event information about the marriage.<br />
See [[#Events|Events]] for more<br />
|}<br />
<br />
All of the Marital variables (if not defined by the report) are defined by the person's preferred spouse in Gramps. If the person has never been married, then these variables will not display anything.<br />
<br />
These codes can be uppercased to uppercase the result. <br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
==== Other Substitution Keys ====<br />
<br />
$T Displays Todays date. Standard Date format code apply<br />
<br />
<br />
$G Displays information about Gramsp, the database, and the researcher.<br />
<br />
These are the formatting codes you can use on the $G variable only:<br />
{|<br />
|-<br />
|v<br />
|Gramps Version number<br />
|<br />
|<br />
|<br />
|-<br />
|t<br />
|Researchers Name<br />
|<br />
|d<br />
|Database Name<br />
|-<br />
|e<br />
|Researchers Street<br />
|<br />
|l<br />
|Researchers Locality<br />
|-<br />
|c<br />
|Researchers City<br />
|<br />
|s<br />
|Researchers State<br />
|-<br />
|p<br />
|Researchers Postal Code<br />
|<br />
|n<br />
|Researchers Country<br />
|-<br />
|o<br />
|Researchers Phone<br />
|<br />
|m<br />
|Researchers Email<br />
|}<br />
<br />
=== Default displayed formats ===<br />
<br />
{|<br />
|-<br />
|$n $s<br />
|Names will be displayed as set in 'Name format:' on the Display tab in Gramps preferences<br />
|-<br />
|$B $D $M $V<br />
|Places will display the Place title by default<br />
|-<br />
|$b $d $m $v $T<br />
|Dates will be displayed as set in 'Date format:' on the Display tab in Gramps preferences<br />
|-<br />
|$e $t<br />
|Events will display the description by default<br />
|}<br />
<br />
<br />
----<br />
=== Deprecated variables ===<br />
<br />
Some of the old variables were deprecated because [[#Format Strings|Format Strings]] have replaced them. So here is a list of those variables and how to achieve their results:<br />
<br />
{| {{prettytable}}<br />
|-<br />
!Old Variable<br />
!How to display it now<br />
!What is displayed<br />
|-<br />
|$f<br />
|$n<br />
|Name - as by Gramps name display under Preferences<br />
|-<br />
|$n<br />
|$n(g f)<br />
|Name - FirstName LastName<br />
|-<br />
|$N<br />
|$n(f, g)<br />
|Name - LastName, FirstName (note the explicit comma)<br />
|-<br />
|$nC<br />
|$n(g F)<br />
|Name - FirstName LastName in UPPER case<br />
|-<br />
|$NC<br />
|$n(F, g)<br />
|Name - LastName in UPPER case, FirstName<br />
|-<br />
|$by<br />
|$b(yyyy)<br />
|Date of birth, year only<br />
|-<br />
|$dy<br />
|$d(yyyy)<br />
|Date of death, year only<br />
|-<br />
|$my<br />
|$m(yyyy)<br />
|Date of preferred marriage, year only<br />
|-<br />
|$p<br />
|$s<br />
|Preferred spouse's name as by Gramps name display under Preferences<br />
|-<br />
|$s<br />
|$s(g f)<br />
|Preferred spouse's name - FirstName LastName<br />
|-<br />
|$S<br />
|$s(f, g)<br />
|Preferred spouse's name - LastName, FirstName<br />
|-<br />
|$sC<br />
|$s(g F)<br />
|Preferred spouse's name - FirstName LastName in UPPER case<br />
|-<br />
|$SC<br />
|$s(F, g)<br />
|Preferred spouse's name - LastName in UPPER case, FirstName<br />
|}<br />
<br />
== Format Strings ==<br />
<br />
Format strings are used to display names and dates differently than those assigned under Gramps Preferences. Here is the syntax for a format string:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''(format string)<br />
where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'nsijbmBMdvDVauet'<br />
<br />
A format string is any text, separators or format codes (defined below) to display information about the person.<br />
<br />
=== Formatting names ===<br />
<br />
The $n and $s variables will print the the preferred name within Gramps only. If you wish to print an alternate name, put the name within [] as followes:<br />
<pre>$n[Also Known As]<br />
$s[Married Name](L, f)</pre><br />
and then an addictional format strings.<br />
<br />
<br />
For names ($n $s) you may use the following formatting codes to display the name differently.<br />
<br />
{|<br />
|-<br />
|t<br />
|Title<br />
|<br />
|f<br />
|Given name<br />
|-<br />
|x<br />
|Common name. Call name if existing, otherwise first first name<br />
|<br />
|c<br />
|Call name<br />
|-<br />
|n<br />
|Nick name<br />
|<br />
|s<br />
|Suffix<br />
|-<br />
|l<br />
|Surname<br />
|<br />
|g<br />
|Family nickname<br />
|}<br />
<br />
These codes can be uppercased to uppercase the result.<br />
<br />
{|<br />
|-<br />
|Example code<br />
|Displays<br />
|-<br />
|<pre>$n(L, f) ($n(c)), $n(L, f){ ($n(c))}<br />
$s(f l s)</pre><br />
|<pre>SMITH, Edwin Michael (), SMITH, Edwin Michael<br />
Janice Ann Adams</pre><br />
|}<br />
<br />
<br />
<blockquote>Note:<br />
If you want to print a character 'c' within the format string (or any one of the other format codes), you will need to first add a '&#92;' in front of it. See [[#Control Variables|Control Variables]] for more.</blockquote><br />
<br />
<blockquote>Note:<br />
the curly brackets { } are used to hide information. Here it is used around ' ($n(c))' to not display ' ()' if the person does not have a call name. See [[#Grouping|Grouping]] for more.</blockquote><br />
<br />
----<br />
<br />
=== Formatting Dates ===<br />
<br />
For all of the date variables ($b $d $m $v) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
!colspan=2|For:<br />
regular dates<br />
Starting dates<br />
|<br />
!colspan=2|For:<br />
Ending dates (ranges)<br />
|-<br />
|yyyy<br />
|The year as a four digit number<br />
|<br />
|zzzz<br />
|The ending year as a four digit number<br />
|-<br />
|yyy<br />
|The year, with a minimum of three digits<br />
|<br />
|zzz<br />
|The ending year, with a minimum of three digits<br />
|-<br />
|yy<br />
|The year, from 00 to 99<br />
|<br />
|zz<br />
|The year, from 00 to 99<br />
|-<br />
|y<br />
|The year, from 0 to 99<br />
|<br />
|z<br />
|The year, from 0 to 99<br />
|-<br />
|mmmm<BR><br />
MMMM<br />
|The full name of the month<BR><br />
The full name IN CAPS<br />
|<br />
|nnnn<BR><br />
NNNN<br />
|The full name of the ending month<BR><br />
The full name IN CAPS<br />
|-<br />
|mmm<BR><br />
MMM<br />
|The abbreviated name of the month<BR><br />
The abbreviated name IN CAPS<br />
|<br />
|nnn<BR><br />
NNN<br />
|The abbreviated name of the ending month<BR><br />
The abbreviated name IN CAPS<br />
|-<br />
|mm<br />
|The month, from 00 to 12<br />
|<br />
|nn<br />
|The ending month, from 00 to 12<br />
|-<br />
|m<br />
|The month, from 0 to 12<br />
|<br />
|n<br />
|The ending month, from 0 to 12<br />
|-<br />
|dd<br />
|The day, from 00 to 31<br />
|<br />
|ee<br />
|The ending day, from 00 to 31<br />
|-<br />
|dd<br />
|The day, from 0 to 31<br />
|<br />
|e<br />
|The ending day, from 0 to 31<br />
|-<br />
|o<br />
|The date type (modifier)<br />
|<br />
|<br />
|<br />
|}<br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$b(mmm-dd yy)<br />
$m(yyyy/mmm/d)<br />
$b(mmm-dd yy)</pre><br />
|<pre>May-24 61<br />
1995/May/27<br />
Jun-04 85</pre><br />
|}<br />
<br />
{{man note| For date types (modifier) |Only "Before", "After", and "About" are supported at this time. all others will not display anything.<BR><br />
And for date span and date ranges, only the starting (first) date is displayed.}}<br />
<br />
----<br />
<br />
=== Formatting Places ===<br />
<br />
For all of the place variables ($B $D $M $V) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|e<br />
|Street<br />
|<br />
|l<br />
|Locality<br />
|-<br />
|c<br />
|City<br />
|<br />
|u<br />
|County<br />
|-<br />
|s<br />
|State<br />
|<br />
|p<br />
|Postal Code<br />
|-<br />
|n<br />
|Country<br />
|<br />
|t<br />
|Title<br />
|-<br />
|x<br />
|Longitude<br />
|<br />
|y<br />
|Latitude<br />
|}<br />
These codes can be uppercased to uppercase the result. <br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
----<br />
<br />
=== Rules for format strings. ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Anything will print inside a format string<br />
|-<br />
|1a<br />
|you will have to use [[#Control Variables|Control Variables]] to display things like ')' and format codes<br />
|-<br />
|2<br />
|Separators can be within format strings.<br />
|-<br />
|3<br />
|At least ONE format code has to display something for the ENTIRE format string to display<br />
|}<br />
<br />
----<br />
<br />
=== Examples ===<br />
<br />
{|<br />
|-<br />
|code<br />
|gives<br />
|-<br />
|<pre>$n(f l)<br />
b. $b {at $B<br />
{d. $d $D</pre><br />
|<pre>Edwin Michael Smith<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA</pre>The person is still alive (or has no information present) so the line was removed.<br />
|}<br />
<br />
<br />
<br />
== Control Variables ==<br />
<br />
Control variables allow you to print characters that are special to Substitution values within a display.<br />
<br />
For example the dollar character '$' is used to note the start of a variable. If you wish to print a dollar character you would use a control character like '&#92;$'<br />
<br />
Control Variables<br />
<br />
{|<br />
|-<br />
|&#92;$<br />
|Displays a single '$'<br />
|<br />
|&#92;&#92;<br />
|Displays a single '&#92;'<br />
|-<br />
|&#92;(<br />
|Displays a single '('<br />
|<br />
|&#92;)<br />
|Displays a single ')'<br />
|-<br />
|&#92;{<br />
|Displays a single '{'<br />
|<br />
|&#92;}<br />
|Displays a single '}'<br />
|-<br />
|&#92;<<br />
|Displays a single '<'<br />
|<br />
|&#92;><br />
|Displays a single '>'<br />
|}<br />
<br />
Basically anything that comes after a '&#92;' will be printed.<br />
<br />
----<br />
Note:<br />
When you are inside a format string, you may need to use this to display a character that would normally be a format code. <br />
<br />
{|<br />
|-<br />
|Example:<br />
|would give<br />
|-<br />
|<pre>$b(m hi mom)<br />
$b(m hi \mo\m)</pre><br />
|<pre>5 hi 5o5<br />
5 hi mom</pre><br />
|}<br />
<br />
as this person was born on the fifth month.<br />
<br />
== Grouping ==<br />
<br />
There are instances where you do not want certain text to be displayed. Take the example:<br />
<br />
{|<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died on $d at $D</pre><br />
|<pre>died on 1975-06-26 at </pre> <br />
|<pre>died on at Reno, Washoe Co., NV</pre><br />
|-<br />
| colspan="3"|Neither of these are very acceptable.<br />
|-<br />
| colspan="3"|But with groups (denoted by {}), you can optionally print information if a variable within contains information.<br />
|-<br />
| colspan="3"|For example:<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died{ on $d}{ at $D}</pre><br />
|<pre>died on 1975-06-26</pre><br />
|<pre>died at Reno, Washoe Co., NV</pre><br />
|}<br />
<br />
which is what we want.<br />
<br />
----<br />
=== Rules for groups ===<br />
<br />
A group will only display if there is at least one variable that displays something. So if a group only has text and/or variables where the information is not known, the entire group will not print.<br />
<br />
Groups can also be nested. If this happens (like below), the outer group will only display if there is at least one variable that displays something within the outer group or any of the sub groups.<br />
<br />
Groups can also be used to remove an entire line from a display. A '{' at the start of a line will remove the entire line from the display if the above rule is true.<br />
<br />
If you do not wish to have the display code above (for death information) displayed (the person is alive, or you do not yet know the information), modify the code to look like<br />
<pre>{died{ on $d}{ at $D}</pre><br />
<br />
<blockquote>To have an entire line be blank instead of removing the line simply start the line with a space ' {' or make sure there is a space after the group (you will have to close the group first)</blockquote><br />
<br />
----<br />
<br />
=== Examples: ===<br />
<br />
This will hide '(' and ')' if the divorce information is not known (or still married).<br />
<br />
<pre>m. $m $M {- ($v(yyyy))</pre><br />
<br />
<br />
Only display some spouse information if married or remove the entire line if never married:<br />
<pre>{$s $m(yyyy) {- $v(\(yyyy\))}}</pre><br />
<br />
== Attributes ==<br />
<br />
Attributes do not have a format string. Instead the attribute name is placed inside []. Here is the syntax for an attribute:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name] where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'au'<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$a[Profession]<br />
$a[Social Security Number]<br />
$a[Total \$ bequeathed]</pre><br />
|<pre>Programmer<br />
7A3-29-F1C6<br />
3.00USD</pre><br />
|}<br />
<br />
<br />
----<br />
== Events ==<br />
<br />
Events have the same starting structure as attributes, $e or $t and the event name in [] but events have an extra format string after the name to display the description, date, place, id, and attributes associated with it. Each of these items can be displayed with a , a 'n', 'd', 'D', 'i', and 'a' respectively in the format string. Here is the syntax for an event:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name](format string) where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'et'<br />
<br />
=== Event format strings ===<br />
<br />
The Event format string is used to display information about the event. Here are the format codes to display parts of the event:<br />
<br />
{|<br />
|-<br />
|n<br />
|Description<br />
|<br />
|i<br />
|Event ID<br />
|-<br />
|d<br />
|Event Date&#42;<br />
|<br />
|D<br />
|Event Place&#42;<br />
|-<br />
|a<br />
|An attributes for the event&#42;&#42;<br />
|<br />
|<br />
|<br />
|}<br />
<br />
&#42;These variables can themselves have format strings. Date and a place can be formatted with format string as defined in [[#Format strings|Format strings]].<br />
<br />
&#42;&#42;Attribute needs to have the attribute name in [] and are formatted as above.<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$e[First Communion](d(yyyy-mm-d))<br />
$e[Bar Mitzvah](n&lt; at &gt; D)<br />
$e[Birth](d(yyyy mm/dd) D)</pre><br />
|<pre>2009-11-6<br />
Jerry's Bar Mitzah at Opas house<br />
2007 05/23 Grandmothers house</pre><br />
|}<br />
<br />
<br />
And:<br />
<br />
{|<br />
|-<br />
|<pre>$b(yyyy-Mmm-dd)<br />
$M</pre><br />
|is the same as<br />
|<pre>$e[Birth](d(yyyy-Mmm-dd))<br />
$t[Marriage](D)</pre><br />
|}<br />
<br />
<br />
----<br />
<br />
=== Notes for attributes and events: ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Attribute and event names are mandatory. '$a' or '$a[]' will not display anything.<br />
|-<br />
|2<br />
|Attributes and event names may have special characters within them. Most notably ']' and ')'. If this is the case, you will need to use [[#Control Variables|Control Variables]]<br />
|}<br />
<br />
== Separators ==<br />
<br />
Separators are special 'text only' groups inside '&lt;' and '&gt;' that conditionally display a separator (like ', ' or ' - ') between two groups, variables, format codes or text.<br />
<br />
Separators are displayed conditionally depending on these rules:<br />
<br />
# A variable that does '''not''' display anything will remove itself and a separator that is to the left of it from the display line only.<br />
# If there is not a separator to the left, the same variable will remove itself and a separator that is to the right of it from the displayed line. <br />
# If there are two separators together, the left one will be removed from the display line and the right is kept.<br />
# Separators at the start or end of the display line (or format strings) are removed<br />
<br />
=== Example: ===<br />
{|<br />
|-<br />
|<pre>$s(f l s)&lt;, &gt;$m(yyyy)&lt; @ &gt;$M&lt; - &gt;$v(&#92;(yyyy&#92;))</pre><br />
|}<br />
<br />
Here are some things that may happen:<br />
<br />
{|<br />
|-<br />
|If '''none''' of the variables are known<br />
|None of the separators will display<br />
|-<br />
|If only one variable '''is''' known<br />
|Only that variable will print. No separators will print.<br />
|-<br />
|If only the spouse's name '''is not''' known<br />
|The first separator will not display<br />
|-<br />
|If only the marriage date '''is not''' known<br />
|The first separator does not display. We will be left with:<br />
Jane Doe&lt; - &gt;{ … }And only the divorce date needs to be known to print the second separator.<br />
|-<br />
|If only the divorce date '''is not''' known<br />
|the second separator will not display<br />
|}<br />
<br />
<br />
Separators can be inside format strings:<br />
<br />
$n(&lt;0&gt;T&lt; &gt;L&lt;, &gt;f&lt; &gt;s)<br />
<br />
Unlike groups, separators can not cross over/out of format strings. So the separator &lt;0&gt; will NEVER display. No matter what is on the left hand side of the variable.<br />
<br />
----<br />
<br />
Here is a useful example:<br />
{|<br />
|-<br />
|<pre>{({b. $b}<, >{d. $d})}</pre><br />
|}<br />
<br />
This will:<br />
{|<br />
|-<br />
| Only print the outside () if either the birth or death date displays<br />
|-<br />
| Only displays the center separator if both dates are known.<br />
|-<br />
| So here are some thing that could display<br />
{|<br />
|-<br />
| <pre>(b. 1970-4-8)</pre><br />
| <pre>(d. 2012-3-9)</pre><br />
| <pre>(b. 1970-4-8, d. 2012-3-9)</pre><br />
| or the line does not print at all.<br />
|}<br />
|-<br />
| We will not see things like:<br />
{|<br />
|-<br />
| <pre>()</pre><br />
| <pre>(, )</pre><br />
| <pre>(b.)</pre><br />
| <pre>(b., )</pre><br />
| <pre>(d.)</pre><br />
|-<br />
| <pre>(, d.)</pre><br />
| <pre>(b. 1970-4-8, )</pre><br />
| <pre>(b. 1970-4-8, d.)</pre><br />
| <pre>(, d. 2012-3-9)</pre><br />
| <pre>(b., d. 2012-3-9)</pre><br />
|}<br />
|}<br />
Back to [[Gramps_4.1_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
{{-}}<br />
<br />
{{man index|Gramps 4.1 Wiki Manual - Reports - part 1|Gramps_4.1_Wiki_Manual_-_Reports_-_part_3|4.1}}<br />
<br />
{{languages}}<br />
<br />
[[Category:Documentation]]<br />
[[Category:Plugins]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Gramps_4.2_Wiki_Manual_-_Reports_-_part_2&diff=50149Gramps 4.2 Wiki Manual - Reports - part 22014-08-12T06:45:10Z<p>Ander882: /* Substitution Values */</p>
<hr />
<div>{{grampsmanualcopyright}}<br />
<br />
{{man index|Gramps 4.1 Wiki Manual - Reports - part 1|Gramps_4.1_Wiki_Manual_-_Reports_-_part_3|4.1}}<br />
<br />
{{languages|Gramps_4.1_Wiki_Manual_-_Reports - part 2}}<br />
<br />
{{#vardefine:chapter|11.2}}<br />
{{#vardefine:figure|0}}<br />
<br />
Back to [[Gramps_4.1_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
This section describes the substitution values that can be used in the different reports available in Gramps.<br />
<br />
= Substitution Values =<br />
<br />
Many of the graphical reports allow you to customize the information that is displayed on the reports. Variable substitution is the method that is used to substitute a particular symbol (key) for specific information about the person in the database.<br />
<br />
{|<br />
|-<br />
|Example: <br />
|Will show as: (the person is alive)<br />
|-<br />
|<pre>$n<br />
b. $b{ at $B}<br />
d. $d< at >$D</pre><br />
|<pre>Smith, Edwin Michael<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA<br />
d.</pre><br />
|}<br />
<br />
----<br />
{|<br />
|-<br />
|1<br />
|A list of all available variables (The Substitution Keys) follows. If you wish to display names, date, or place information differently, you may use [[#Format Strings|Format Strings]] to accomplish this.<br />
|-<br />
|2<br />
|There are also [[#Control Variables|Control Variables]] to display special characters (like the dollar sign).<br />
|-<br />
|3<br />
|You can also use [[#Grouping|Grouping]] to optionally display information. Line 2 above, uses grouping to display ' at ' only when the birth place is known.<br />
|-<br />
|4<br />
|Along with [[#Events|Events]] you can print almost anything.<br />
|-<br />
|5<br />
|Finally, [[#Separators|Separators]], to make your life complete. Line 3 above, uses this to display ' at ' only when both the birth date and place is known.<br />
|-<br />
|}<br />
<br />
<br />
== The Substitution Keys ==<br />
<br />
{|<br />
|-<br />
| colspan="2"|'''Personal variables'''<br />
| colspan="2"|'''Marital variables'''<br />
|-<br />
|$n<br />
|Displays the person's name<br />
|$s<br />
|Displays the name of the person's spouse<br />
|-<br />
|$i<br />
|Displays the GRAMPS ID for the person.<br />
|$j<br />
|Displays the GRAMPS ID for the marriage.<br />
|-<br />
|$b<br />
|Displays the person's date of birth <br />
|$m<br />
|Displays the marriage date of the person and the spouse.<br />
|-<br />
|$B<br />
|Displays the person's place of birth <br />
|$M<br />
|Displays the place of the marriage of the person and the spouse.<br />
|-<br />
|$d<br />
|Displays the person's date of death <br />
|$v<br />
|Displays the divorce date of the person and the spouse.<br />
|-<br />
|$D<br />
|Displays the person's place of death <br />
|$V<br />
|Displays the place of the divorce of the person and the spouse.<br />
|-<br />
|$a<br />
|Displays an attribute about the person.<br />
see [[#Attributes|Attributes]] for more<br />
|$u<br />
|Displays an attribute about the marriage.<br />
see [[#Attributes|Attributes]] for more<br />
|-<br />
|$e<br />
|Displays event information about the person.<br />
See [[#Events|Events]] for more<br />
|$t<br />
|Displays an event information about the marriage.<br />
See [[#Events|Events]] for more<br />
|}<br />
<br />
All of the Marital variables (if not defined by the report) are defined by the person's preferred spouse in Gramps. If the person has never been married, then these variables will not display anything.<br />
<br />
These codes can be uppercased to uppercase the result. <br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
==== Other Substitution Keys ====<br />
<br />
$T Displays Todays date. Standard Date format code apply<br />
<br />
<br />
$G Displays information about Gramsp, the database, and the researcher.<br />
<br />
These are the formatting codes you can use on the $G variable only:<br />
{|<br />
|-<br />
|v<br />
|Gramps Version number<br />
|<br />
|<br />
|<br />
|-<br />
|t<br />
|Researchers Name<br />
|<br />
|d<br />
|Database Name<br />
|-<br />
|e<br />
|Researchers Street<br />
|<br />
|l<br />
|Researchers Locality<br />
|-<br />
|c<br />
|Researchers City<br />
|<br />
|s<br />
|Researchers State<br />
|-<br />
|p<br />
|Researchers Postal Code<br />
|<br />
|n<br />
|Researchers Country<br />
|-<br />
|o<br />
|Researchers Phone<br />
|<br />
|m<br />
|Researchers Email<br />
|}<br />
<br />
=== Default displayed formats ===<br />
<br />
{|<br />
|-<br />
|$n $s<br />
|Names will be displayed as set in 'Name format:' on the Display tab in Gramps preferences<br />
|-<br />
|$B $D $M $V<br />
|Places will display the Place title by default<br />
|-<br />
|$b $d $m $v $T<br />
|Dates will be displayed as set in 'Date format:' on the Display tab in Gramps preferences<br />
|-<br />
|$e $t<br />
|Events will display the description by default<br />
|}<br />
<br />
<br />
----<br />
=== Deprecated variables ===<br />
<br />
Some of the old variables were deprecated because [[#Format Strings|Format Strings]] have replaced them. So here is a list of those variables and how to achieve their results:<br />
<br />
{| {{prettytable}}<br />
|-<br />
!Old Variable<br />
!How to display it now<br />
!What is displayed<br />
|-<br />
|$f<br />
|$n<br />
|Name - as by Gramps name display under Preferences<br />
|-<br />
|$n<br />
|$n(g f)<br />
|Name - FirstName LastName<br />
|-<br />
|$N<br />
|$n(f, g)<br />
|Name - LastName, FirstName (note the explicit comma)<br />
|-<br />
|$nC<br />
|$n(g F)<br />
|Name - FirstName LastName in UPPER case<br />
|-<br />
|$NC<br />
|$n(F, g)<br />
|Name - LastName in UPPER case, FirstName<br />
|-<br />
|$by<br />
|$b(yyyy)<br />
|Date of birth, year only<br />
|-<br />
|$dy<br />
|$d(yyyy)<br />
|Date of death, year only<br />
|-<br />
|$my<br />
|$m(yyyy)<br />
|Date of preferred marriage, year only<br />
|-<br />
|$p<br />
|$s<br />
|Preferred spouse's name as by Gramps name display under Preferences<br />
|-<br />
|$s<br />
|$s(g f)<br />
|Preferred spouse's name - FirstName LastName<br />
|-<br />
|$S<br />
|$s(f, g)<br />
|Preferred spouse's name - LastName, FirstName<br />
|-<br />
|$sC<br />
|$s(g F)<br />
|Preferred spouse's name - FirstName LastName in UPPER case<br />
|-<br />
|$SC<br />
|$s(F, g)<br />
|Preferred spouse's name - LastName in UPPER case, FirstName<br />
|}<br />
<br />
== Format Strings ==<br />
<br />
Format strings are used to display names and dates differently than those assigned under Gramps Preferences. Here is the syntax for a format string:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''(format string)<br />
where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'nsijbmBMdvDVauet'<br />
<br />
A format string is any text, separators or format codes (defined below) to display information about the person.<br />
<br />
=== Formatting names ===<br />
<br />
The $n and $s variables will print the the preferred name within Gramps only. If you wish to print an alternate name, put the name within [] as followes:<br />
<pre>$n[Also Known As]<br />
$s[Married Name](L, f)</pre><br />
and then an addictional format strings.<br />
<br />
<br />
For names ($n $s) you may use the following formatting codes to display the name differently.<br />
<br />
{|<br />
|-<br />
|t<br />
|Title<br />
|<br />
|f<br />
|Given name<br />
|-<br />
|x<br />
|Common name. Call name if existing, otherwise first first name<br />
|<br />
|c<br />
|Call name<br />
|-<br />
|n<br />
|Nick name<br />
|<br />
|s<br />
|Suffix<br />
|-<br />
|l<br />
|Surname<br />
|<br />
|g<br />
|Family nickname<br />
|}<br />
<br />
These codes can be uppercased to uppercase the result.<br />
<br />
{|<br />
|-<br />
|Example code<br />
|Displays<br />
|-<br />
|<pre>$n(L, f) ($n(c)), $n(L, f){ ($n(c))}<br />
$s(f l s)</pre><br />
|<pre>SMITH, Edwin Michael (), SMITH, Edwin Michael<br />
Janice Ann Adams</pre><br />
|}<br />
<br />
<br />
<blockquote>Note:<br />
If you want to print a character 'c' within the format string (or any one of the other format codes), you will need to first add a '&#92;' in front of it. See [[#Control Variables|Control Variables]] for more.</blockquote><br />
<br />
<blockquote>Note:<br />
the curly brackets { } are used to hide information. Here it is used around ' ($n(c))' to not display ' ()' if the person does not have a call name. See [[#Grouping|Grouping]] for more.</blockquote><br />
<br />
----<br />
<br />
=== Formatting Dates ===<br />
<br />
For all of the date variables ($b $d $m $v) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|yyyy<br />
|The year as a four digit number<br />
|<br />
|yyy<br />
|The year, with a minimum of three digits<br />
|-<br />
|yy<br />
|The year, from 00 to 99<br />
|<br />
|y<br />
|The year, from 0 to 99<br />
|-<br />
|mmmm<BR><br />
MMMM<br />
|The full name of the month<BR><br />
The full name IN CAPS<br />
|<br />
|mmm<BR><br />
MMM<br />
|The abbreviated name of the month<BR><br />
The abbreviated name IN CAPS<br />
|-<br />
|mm<br />
|The month, from 00 to 12<br />
|<br />
|m<br />
|The month, from 0 to 12<br />
|-<br />
|dd<br />
|The day, from 00 to 31<br />
|<br />
|d<br />
|The day, from 0 to 31<br />
|-<br />
|o<br />
|The date type (modifier)<br />
|<br />
|<br />
|<br />
|}<br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$b(mmm-dd yy)<br />
$m(yyyy/mmm/d)<br />
$b(mmm-dd yy)</pre><br />
|<pre>May-24 61<br />
1995/May/27<br />
Jun-04 85</pre><br />
|}<br />
<br />
{{man note| For date types (modifier) |Only "Before", "After", and "About" are supported at this time. all others will not display anything.<BR><br />
And for date span and date ranges, only the starting (first) date is displayed.}}<br />
<br />
----<br />
<br />
=== Formatting Places ===<br />
<br />
For all of the place variables ($B $D $M $V) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|e<br />
|Street<br />
|<br />
|l<br />
|Locality<br />
|-<br />
|c<br />
|City<br />
|<br />
|u<br />
|County<br />
|-<br />
|s<br />
|State<br />
|<br />
|p<br />
|Postal Code<br />
|-<br />
|n<br />
|Country<br />
|<br />
|t<br />
|Title<br />
|-<br />
|x<br />
|Longitude<br />
|<br />
|y<br />
|Latitude<br />
|}<br />
These codes can be uppercased to uppercase the result. <br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
----<br />
<br />
=== Rules for format strings. ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Anything will print inside a format string<br />
|-<br />
|1a<br />
|you will have to use [[#Control Variables|Control Variables]] to display things like ')' and format codes<br />
|-<br />
|2<br />
|Separators can be within format strings.<br />
|-<br />
|3<br />
|At least ONE format code has to display something for the ENTIRE format string to display<br />
|}<br />
<br />
----<br />
<br />
=== Examples ===<br />
<br />
{|<br />
|-<br />
|code<br />
|gives<br />
|-<br />
|<pre>$n(f l)<br />
b. $b {at $B<br />
{d. $d $D</pre><br />
|<pre>Edwin Michael Smith<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA</pre>The person is still alive (or has no information present) so the line was removed.<br />
|}<br />
<br />
<br />
<br />
== Control Variables ==<br />
<br />
Control variables allow you to print characters that are special to Substitution values within a display.<br />
<br />
For example the dollar character '$' is used to note the start of a variable. If you wish to print a dollar character you would use a control character like '&#92;$'<br />
<br />
Control Variables<br />
<br />
{|<br />
|-<br />
|&#92;$<br />
|Displays a single '$'<br />
|<br />
|&#92;&#92;<br />
|Displays a single '&#92;'<br />
|-<br />
|&#92;(<br />
|Displays a single '('<br />
|<br />
|&#92;)<br />
|Displays a single ')'<br />
|-<br />
|&#92;{<br />
|Displays a single '{'<br />
|<br />
|&#92;}<br />
|Displays a single '}'<br />
|-<br />
|&#92;<<br />
|Displays a single '<'<br />
|<br />
|&#92;><br />
|Displays a single '>'<br />
|}<br />
<br />
Basically anything that comes after a '&#92;' will be printed.<br />
<br />
----<br />
Note:<br />
When you are inside a format string, you may need to use this to display a character that would normally be a format code. <br />
<br />
{|<br />
|-<br />
|Example:<br />
|would give<br />
|-<br />
|<pre>$b(m hi mom)<br />
$b(m hi \mo\m)</pre><br />
|<pre>5 hi 5o5<br />
5 hi mom</pre><br />
|}<br />
<br />
as this person was born on the fifth month.<br />
<br />
== Grouping ==<br />
<br />
There are instances where you do not want certain text to be displayed. Take the example:<br />
<br />
{|<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died on $d at $D</pre><br />
|<pre>died on 1975-06-26 at </pre> <br />
|<pre>died on at Reno, Washoe Co., NV</pre><br />
|-<br />
| colspan="3"|Neither of these are very acceptable.<br />
|-<br />
| colspan="3"|But with groups (denoted by {}), you can optionally print information if a variable within contains information.<br />
|-<br />
| colspan="3"|For example:<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died{ on $d}{ at $D}</pre><br />
|<pre>died on 1975-06-26</pre><br />
|<pre>died at Reno, Washoe Co., NV</pre><br />
|}<br />
<br />
which is what we want.<br />
<br />
----<br />
=== Rules for groups ===<br />
<br />
A group will only display if there is at least one variable that displays something. So if a group only has text and/or variables where the information is not known, the entire group will not print.<br />
<br />
Groups can also be nested. If this happens (like below), the outer group will only display if there is at least one variable that displays something within the outer group or any of the sub groups.<br />
<br />
Groups can also be used to remove an entire line from a display. A '{' at the start of a line will remove the entire line from the display if the above rule is true.<br />
<br />
If you do not wish to have the display code above (for death information) displayed (the person is alive, or you do not yet know the information), modify the code to look like<br />
<pre>{died{ on $d}{ at $D}</pre><br />
<br />
<blockquote>To have an entire line be blank instead of removing the line simply start the line with a space ' {' or make sure there is a space after the group (you will have to close the group first)</blockquote><br />
<br />
----<br />
<br />
=== Examples: ===<br />
<br />
This will hide '(' and ')' if the divorce information is not known (or still married).<br />
<br />
<pre>m. $m $M {- ($v(yyyy))</pre><br />
<br />
<br />
Only display some spouse information if married or remove the entire line if never married:<br />
<pre>{$s $m(yyyy) {- $v(\(yyyy\))}}</pre><br />
<br />
== Attributes ==<br />
<br />
Attributes do not have a format string. Instead the attribute name is placed inside []. Here is the syntax for an attribute:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name] where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'au'<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$a[Profession]<br />
$a[Social Security Number]<br />
$a[Total \$ bequeathed]</pre><br />
|<pre>Programmer<br />
7A3-29-F1C6<br />
3.00USD</pre><br />
|}<br />
<br />
<br />
----<br />
== Events ==<br />
<br />
Events have the same starting structure as attributes, $e or $t and the event name in [] but events have an extra format string after the name to display the description, date, place, id, and attributes associated with it. Each of these items can be displayed with a , a 'n', 'd', 'D', 'i', and 'a' respectively in the format string. Here is the syntax for an event:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name](format string) where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'et'<br />
<br />
=== Event format strings ===<br />
<br />
The Event format string is used to display information about the event. Here are the format codes to display parts of the event:<br />
<br />
{|<br />
|-<br />
|n<br />
|Description<br />
|<br />
|i<br />
|Event ID<br />
|-<br />
|d<br />
|Event Date&#42;<br />
|<br />
|D<br />
|Event Place&#42;<br />
|-<br />
|a<br />
|An attributes for the event&#42;&#42;<br />
|<br />
|<br />
|<br />
|}<br />
<br />
&#42;These variables can themselves have format strings. Date and a place can be formatted with format string as defined in [[#Format strings|Format strings]].<br />
<br />
&#42;&#42;Attribute needs to have the attribute name in [] and are formatted as above.<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$e[First Communion](d(yyyy-mm-d))<br />
$e[Bar Mitzvah](n&lt; at &gt; D)<br />
$e[Birth](d(yyyy mm/dd) D)</pre><br />
|<pre>2009-11-6<br />
Jerry's Bar Mitzah at Opas house<br />
2007 05/23 Grandmothers house</pre><br />
|}<br />
<br />
<br />
And:<br />
<br />
{|<br />
|-<br />
|<pre>$b(yyyy-Mmm-dd)<br />
$M</pre><br />
|is the same as<br />
|<pre>$e[Birth](d(yyyy-Mmm-dd))<br />
$t[Marriage](D)</pre><br />
|}<br />
<br />
<br />
----<br />
<br />
=== Notes for attributes and events: ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Attribute and event names are mandatory. '$a' or '$a[]' will not display anything.<br />
|-<br />
|2<br />
|Attributes and event names may have special characters within them. Most notably ']' and ')'. If this is the case, you will need to use [[#Control Variables|Control Variables]]<br />
|}<br />
<br />
== Separators ==<br />
<br />
Separators are special 'text only' groups inside '&lt;' and '&gt;' that conditionally display a separator (like ', ' or ' - ') between two groups, variables, format codes or text.<br />
<br />
Separators are displayed conditionally depending on these rules:<br />
<br />
# A variable that does '''not''' display anything will remove itself and a separator that is to the left of it from the display line only.<br />
# If there is not a separator to the left, the same variable will remove itself and a separator that is to the right of it from the displayed line. <br />
# If there are two separators together, the left one will be removed from the display line and the right is kept.<br />
# Separators at the start or end of the display line (or format strings) are removed<br />
<br />
=== Example: ===<br />
{|<br />
|-<br />
|<pre>$s(f l s)&lt;, &gt;$m(yyyy)&lt; @ &gt;$M&lt; - &gt;$v(&#92;(yyyy&#92;))</pre><br />
|}<br />
<br />
Here are some things that may happen:<br />
<br />
{|<br />
|-<br />
|If '''none''' of the variables are known<br />
|None of the separators will display<br />
|-<br />
|If only one variable '''is''' known<br />
|Only that variable will print. No separators will print.<br />
|-<br />
|If only the spouse's name '''is not''' known<br />
|The first separator will not display<br />
|-<br />
|If only the marriage date '''is not''' known<br />
|The first separator does not display. We will be left with:<br />
Jane Doe&lt; - &gt;{ … }And only the divorce date needs to be known to print the second separator.<br />
|-<br />
|If only the divorce date '''is not''' known<br />
|the second separator will not display<br />
|}<br />
<br />
<br />
Separators can be inside format strings:<br />
<br />
$n(&lt;0&gt;T&lt; &gt;L&lt;, &gt;f&lt; &gt;s)<br />
<br />
Unlike groups, separators can not cross over/out of format strings. So the separator &lt;0&gt; will NEVER display. No matter what is on the left hand side of the variable.<br />
<br />
----<br />
<br />
Here is a useful example:<br />
{|<br />
|-<br />
|<pre>{({b. $b}<, >{d. $d})}</pre><br />
|}<br />
<br />
This will:<br />
{|<br />
|-<br />
| Only print the outside () if either the birth or death date displays<br />
|-<br />
| Only displays the center separator if both dates are known.<br />
|-<br />
| So here are some thing that could display<br />
{|<br />
|-<br />
| <pre>(b. 1970-4-8)</pre><br />
| <pre>(d. 2012-3-9)</pre><br />
| <pre>(b. 1970-4-8, d. 2012-3-9)</pre><br />
| or the line does not print at all.<br />
|}<br />
|-<br />
| We will not see things like:<br />
{|<br />
|-<br />
| <pre>()</pre><br />
| <pre>(, )</pre><br />
| <pre>(b.)</pre><br />
| <pre>(b., )</pre><br />
| <pre>(d.)</pre><br />
|-<br />
| <pre>(, d.)</pre><br />
| <pre>(b. 1970-4-8, )</pre><br />
| <pre>(b. 1970-4-8, d.)</pre><br />
| <pre>(, d. 2012-3-9)</pre><br />
| <pre>(b., d. 2012-3-9)</pre><br />
|}<br />
|}<br />
Back to [[Gramps_4.1_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
{{-}}<br />
<br />
{{man index|Gramps 4.1 Wiki Manual - Reports - part 1|Gramps_4.1_Wiki_Manual_-_Reports_-_part_3|4.1}}<br />
<br />
{{languages}}<br />
<br />
[[Category:Documentation]]<br />
[[Category:Plugins]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Gramps_4.2_Wiki_Manual_-_Reports_-_part_2&diff=50148Gramps 4.2 Wiki Manual - Reports - part 22014-08-12T06:42:43Z<p>Ander882: /* The Substitution Keys */</p>
<hr />
<div>{{grampsmanualcopyright}}<br />
<br />
{{man index|Gramps 4.1 Wiki Manual - Reports - part 1|Gramps_4.1_Wiki_Manual_-_Reports_-_part_3|4.1}}<br />
<br />
{{languages|Gramps_4.1_Wiki_Manual_-_Reports - part 2}}<br />
<br />
{{#vardefine:chapter|11.2}}<br />
{{#vardefine:figure|0}}<br />
<br />
Back to [[Gramps_4.1_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
This section describes the substitution values that can be used in the different reports available in Gramps.<br />
<br />
= Substitution Values =<br />
<br />
Many of the graphical reports allow you to customize the information that is displayed on the reports. Variable substitution is the method that is used to substitute a particular symbol (key) for specific information about the person in the database.<br />
<br />
{|<br />
|-<br />
|Example: <br />
|Will show as: (the person is alive)<br />
|-<br />
|<pre>$n<br />
b. $b{ at $B}<br />
d. $d< at >$D</pre><br />
|<pre>Smith, Edwin Michael<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA<br />
d.</pre><br />
|}<br />
<br />
----<br />
{|<br />
|-<br />
|1<br />
|A list of all available variables (The Substitution Keys) follows. If you wish to display names, date, or place information differently, you may use [[#Format Strings|Format Strings]] to accomplish this.<br />
|-<br />
|2<br />
|There are also [[#Control Variables|Control Variables]] to display special characters (like the dollar sign).<br />
|-<br />
|3<br />
|You can also use [[#Grouping|Grouping]] to optionally display information. Line 2 above, uses grouping to display ' at ' only when the birth place is known.<br />
|-<br />
|4<br />
|Along with [[#Events|Events]] you can print almost anything.<br />
|-<br />
|5<br />
|Finally, [[#Separators|Separators]], to make your life complete. Line 3 above, uses this to display ' at ' only when both the birth date and place is known.<br />
|-<br />
|}<br />
<br />
<br />
== The Substitution Keys ==<br />
<br />
{|<br />
|-<br />
| colspan="2"|'''Personal variables'''<br />
| colspan="2"|'''Marital variables'''<br />
|-<br />
|$n<br />
|Displays the person's name<br />
|$s<br />
|Displays the name of the person's spouse<br />
|-<br />
|$i<br />
|Displays the GRAMPS ID for the person.<br />
|$j<br />
|Displays the GRAMPS ID for the marriage.<br />
|-<br />
|$b<br />
|Displays the person's date of birth <br />
|$m<br />
|Displays the marriage date of the person and the spouse.<br />
|-<br />
|$B<br />
|Displays the person's place of birth <br />
|$M<br />
|Displays the place of the marriage of the person and the spouse.<br />
|-<br />
|$d<br />
|Displays the person's date of death <br />
|$v<br />
|Displays the divorce date of the person and the spouse.<br />
|-<br />
|$D<br />
|Displays the person's place of death <br />
|$V<br />
|Displays the place of the divorce of the person and the spouse.<br />
|-<br />
|$a<br />
|Displays an attribute about the person.<br />
see [[#Attributes|Attributes]] for more<br />
|$u<br />
|Displays an attribute about the marriage.<br />
see [[#Attributes|Attributes]] for more<br />
|-<br />
|$e<br />
|Displays event information about the person.<br />
See [[#Events|Events]] for more<br />
|$t<br />
|Displays an event information about the marriage.<br />
See [[#Events|Events]] for more<br />
|}<br />
<br />
All of the Marital variables (if not defined by the report) are defined by the person's preferred spouse in Gramps. If the person has never been married, then these variables will not display anything.<br />
<br />
These codes can be uppercased to uppercase the result. <br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
<br />
==== Other Substitution Keys ====<br />
<br />
$T Displays Todays date. Standard Date format code apply<br />
<br />
<br />
$G Displays information about Gramsp, the database, and the researcher.<br />
<br />
These are the formatting codes you can use on the $G variable only:<br />
{|<br />
|-<br />
|v<br />
|Gramps Version number<br />
|<br />
|<br />
|<br />
|-<br />
|t<br />
|Researchers Name<br />
|<br />
|d<br />
|Database Name<br />
|-<br />
|e<br />
|Researchers Street<br />
|<br />
|l<br />
|Researchers Locality<br />
|-<br />
|c<br />
|Researchers City<br />
|<br />
|s<br />
|Researchers State<br />
|-<br />
|p<br />
|Researchers Postal Code<br />
|<br />
|n<br />
|Researchers Country<br />
|-<br />
|o<br />
|Researchers Phone<br />
|<br />
|m<br />
|Researchers Email<br />
|}<br />
<br />
=== Default displayed formats ===<br />
<br />
{|<br />
|-<br />
|$n $s<br />
|Names will be displayed as set in 'Name format:' on the Display tab in Gramps preferences<br />
|-<br />
|$B $D $M $V<br />
|Places will display the Place title by default<br />
|-<br />
|$b $d $m $v $T<br />
|Dates will be displayed as set in 'Date format:' on the Display tab in Gramps preferences<br />
|-<br />
|$e $t<br />
|Events will display the description by default<br />
|}<br />
<br />
<br />
----<br />
=== Deprecated variables ===<br />
<br />
Some of the old variables were deprecated because [[#Format Strings|Format Strings]] have replaced them. So here is a list of those variables and how to achieve their results:<br />
<br />
{| {{prettytable}}<br />
|-<br />
!Old Variable<br />
!How to display it now<br />
!What is displayed<br />
|-<br />
|$f<br />
|$n<br />
|Name - as by Gramps name display under Preferences<br />
|-<br />
|$n<br />
|$n(g f)<br />
|Name - FirstName LastName<br />
|-<br />
|$N<br />
|$n(f, g)<br />
|Name - LastName, FirstName (note the explicit comma)<br />
|-<br />
|$nC<br />
|$n(g F)<br />
|Name - FirstName LastName in UPPER case<br />
|-<br />
|$NC<br />
|$n(F, g)<br />
|Name - LastName in UPPER case, FirstName<br />
|-<br />
|$by<br />
|$b(yyyy)<br />
|Date of birth, year only<br />
|-<br />
|$dy<br />
|$d(yyyy)<br />
|Date of death, year only<br />
|-<br />
|$my<br />
|$m(yyyy)<br />
|Date of preferred marriage, year only<br />
|-<br />
|$p<br />
|$s<br />
|Preferred spouse's name as by Gramps name display under Preferences<br />
|-<br />
|$s<br />
|$s(g f)<br />
|Preferred spouse's name - FirstName LastName<br />
|-<br />
|$S<br />
|$s(f, g)<br />
|Preferred spouse's name - LastName, FirstName<br />
|-<br />
|$sC<br />
|$s(g F)<br />
|Preferred spouse's name - FirstName LastName in UPPER case<br />
|-<br />
|$SC<br />
|$s(F, g)<br />
|Preferred spouse's name - LastName in UPPER case, FirstName<br />
|}<br />
<br />
== Format Strings ==<br />
<br />
Format strings are used to display names and dates differently than those assigned under Gramps Preferences. Here is the syntax for a format string:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''(format string)<br />
where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'nsijbmBMdvDVauet'<br />
<br />
A format string is any text, separators or format codes (defined below) to display information about the person.<br />
<br />
=== Formatting names ===<br />
<br />
The $n and $s variables will print the the preferred name within Gramps only. If you wish to print an alternate name, put the name within [] as followes:<br />
<pre>$n[Also Known As]<br />
$s[Married Name](L, f)</pre><br />
and then an addictional format strings.<br />
<br />
<br />
For names ($n $s) you may use the following formatting codes to display the name differently.<br />
<br />
{|<br />
|-<br />
|t<br />
|Title<br />
|<br />
|f<br />
|Given name<br />
|-<br />
|x<br />
|Common name. Call name if existing, otherwise first first name<br />
|<br />
|c<br />
|Call name<br />
|-<br />
|n<br />
|Nick name<br />
|<br />
|s<br />
|Suffix<br />
|-<br />
|l<br />
|Surname<br />
|<br />
|g<br />
|Family nickname<br />
|}<br />
<br />
These codes can be uppercased to uppercase the result.<br />
<br />
{|<br />
|-<br />
|Example code<br />
|Displays<br />
|-<br />
|<pre>$n(L, f) ($n(c)), $n(L, f){ ($n(c))}<br />
$s(f l s)</pre><br />
|<pre>SMITH, Edwin Michael (), SMITH, Edwin Michael<br />
Janice Ann Adams</pre><br />
|}<br />
<br />
<br />
<blockquote>Note:<br />
If you want to print a character 'c' within the format string (or any one of the other format codes), you will need to first add a '&#92;' in front of it. See [[#Control Variables|Control Variables]] for more.</blockquote><br />
<br />
<blockquote>Note:<br />
the curly brackets { } are used to hide information. Here it is used around ' ($n(c))' to not display ' ()' if the person does not have a call name. See [[#Grouping|Grouping]] for more.</blockquote><br />
<br />
----<br />
<br />
=== Formatting Dates ===<br />
<br />
For all of the date variables ($b $d $m $v) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|yyyy<br />
|The year as a four digit number<br />
|<br />
|yyy<br />
|The year, with a minimum of three digits<br />
|-<br />
|yy<br />
|The year, from 00 to 99<br />
|<br />
|y<br />
|The year, from 0 to 99<br />
|-<br />
|mmmm<BR><br />
MMMM<br />
|The full name of the month<BR><br />
The full name IN CAPS<br />
|<br />
|mmm<BR><br />
MMM<br />
|The abbreviated name of the month<BR><br />
The abbreviated name IN CAPS<br />
|-<br />
|mm<br />
|The month, from 00 to 12<br />
|<br />
|m<br />
|The month, from 0 to 12<br />
|-<br />
|dd<br />
|The day, from 00 to 31<br />
|<br />
|d<br />
|The day, from 0 to 31<br />
|-<br />
|o<br />
|The date type (modifier)<br />
|<br />
|<br />
|<br />
|}<br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$b(mmm-dd yy)<br />
$m(yyyy/mmm/d)<br />
$b(mmm-dd yy)</pre><br />
|<pre>May-24 61<br />
1995/May/27<br />
Jun-04 85</pre><br />
|}<br />
<br />
{{man note| For date types (modifier) |Only "Before", "After", and "About" are supported at this time. all others will not display anything.<BR><br />
And for date span and date ranges, only the starting (first) date is displayed.}}<br />
<br />
----<br />
<br />
=== Formatting Places ===<br />
<br />
For all of the place variables ($B $D $M $V) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|e<br />
|Street<br />
|<br />
|l<br />
|Locality<br />
|-<br />
|c<br />
|City<br />
|<br />
|u<br />
|County<br />
|-<br />
|s<br />
|State<br />
|<br />
|p<br />
|Postal Code<br />
|-<br />
|n<br />
|Country<br />
|<br />
|t<br />
|Title<br />
|-<br />
|x<br />
|Longitude<br />
|<br />
|y<br />
|Latitude<br />
|}<br />
These codes can be uppercased to uppercase the result. <br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
----<br />
<br />
=== Rules for format strings. ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Anything will print inside a format string<br />
|-<br />
|1a<br />
|you will have to use [[#Control Variables|Control Variables]] to display things like ')' and format codes<br />
|-<br />
|2<br />
|Separators can be within format strings.<br />
|-<br />
|3<br />
|At least ONE format code has to display something for the ENTIRE format string to display<br />
|}<br />
<br />
----<br />
<br />
=== Examples ===<br />
<br />
{|<br />
|-<br />
|code<br />
|gives<br />
|-<br />
|<pre>$n(f l)<br />
b. $b {at $B<br />
{d. $d $D</pre><br />
|<pre>Edwin Michael Smith<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA</pre>The person is still alive (or has no information present) so the line was removed.<br />
|}<br />
<br />
<br />
<br />
== Control Variables ==<br />
<br />
Control variables allow you to print characters that are special to Substitution values within a display.<br />
<br />
For example the dollar character '$' is used to note the start of a variable. If you wish to print a dollar character you would use a control character like '&#92;$'<br />
<br />
Control Variables<br />
<br />
{|<br />
|-<br />
|&#92;$<br />
|Displays a single '$'<br />
|<br />
|&#92;&#92;<br />
|Displays a single '&#92;'<br />
|-<br />
|&#92;(<br />
|Displays a single '('<br />
|<br />
|&#92;)<br />
|Displays a single ')'<br />
|-<br />
|&#92;{<br />
|Displays a single '{'<br />
|<br />
|&#92;}<br />
|Displays a single '}'<br />
|-<br />
|&#92;<<br />
|Displays a single '<'<br />
|<br />
|&#92;><br />
|Displays a single '>'<br />
|}<br />
<br />
Basically anything that comes after a '&#92;' will be printed.<br />
<br />
----<br />
Note:<br />
When you are inside a format string, you may need to use this to display a character that would normally be a format code. <br />
<br />
{|<br />
|-<br />
|Example:<br />
|would give<br />
|-<br />
|<pre>$b(m hi mom)<br />
$b(m hi \mo\m)</pre><br />
|<pre>5 hi 5o5<br />
5 hi mom</pre><br />
|}<br />
<br />
as this person was born on the fifth month.<br />
<br />
== Grouping ==<br />
<br />
There are instances where you do not want certain text to be displayed. Take the example:<br />
<br />
{|<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died on $d at $D</pre><br />
|<pre>died on 1975-06-26 at </pre> <br />
|<pre>died on at Reno, Washoe Co., NV</pre><br />
|-<br />
| colspan="3"|Neither of these are very acceptable.<br />
|-<br />
| colspan="3"|But with groups (denoted by {}), you can optionally print information if a variable within contains information.<br />
|-<br />
| colspan="3"|For example:<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died{ on $d}{ at $D}</pre><br />
|<pre>died on 1975-06-26</pre><br />
|<pre>died at Reno, Washoe Co., NV</pre><br />
|}<br />
<br />
which is what we want.<br />
<br />
----<br />
=== Rules for groups ===<br />
<br />
A group will only display if there is at least one variable that displays something. So if a group only has text and/or variables where the information is not known, the entire group will not print.<br />
<br />
Groups can also be nested. If this happens (like below), the outer group will only display if there is at least one variable that displays something within the outer group or any of the sub groups.<br />
<br />
Groups can also be used to remove an entire line from a display. A '{' at the start of a line will remove the entire line from the display if the above rule is true.<br />
<br />
If you do not wish to have the display code above (for death information) displayed (the person is alive, or you do not yet know the information), modify the code to look like<br />
<pre>{died{ on $d}{ at $D}</pre><br />
<br />
<blockquote>To have an entire line be blank instead of removing the line simply start the line with a space ' {' or make sure there is a space after the group (you will have to close the group first)</blockquote><br />
<br />
----<br />
<br />
=== Examples: ===<br />
<br />
This will hide '(' and ')' if the divorce information is not known (or still married).<br />
<br />
<pre>m. $m $M {- ($v(yyyy))</pre><br />
<br />
<br />
Only display some spouse information if married or remove the entire line if never married:<br />
<pre>{$s $m(yyyy) {- $v(\(yyyy\))}}</pre><br />
<br />
== Attributes ==<br />
<br />
Attributes do not have a format string. Instead the attribute name is placed inside []. Here is the syntax for an attribute:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name] where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'au'<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$a[Profession]<br />
$a[Social Security Number]<br />
$a[Total \$ bequeathed]</pre><br />
|<pre>Programmer<br />
7A3-29-F1C6<br />
3.00USD</pre><br />
|}<br />
<br />
<br />
----<br />
== Events ==<br />
<br />
Events have the same starting structure as attributes, $e or $t and the event name in [] but events have an extra format string after the name to display the description, date, place, id, and attributes associated with it. Each of these items can be displayed with a , a 'n', 'd', 'D', 'i', and 'a' respectively in the format string. Here is the syntax for an event:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name](format string) where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'et'<br />
<br />
=== Event format strings ===<br />
<br />
The Event format string is used to display information about the event. Here are the format codes to display parts of the event:<br />
<br />
{|<br />
|-<br />
|n<br />
|Description<br />
|<br />
|i<br />
|Event ID<br />
|-<br />
|d<br />
|Event Date&#42;<br />
|<br />
|D<br />
|Event Place&#42;<br />
|-<br />
|a<br />
|An attributes for the event&#42;&#42;<br />
|<br />
|<br />
|<br />
|}<br />
<br />
&#42;These variables can themselves have format strings. Date and a place can be formatted with format string as defined in [[#Format strings|Format strings]].<br />
<br />
&#42;&#42;Attribute needs to have the attribute name in [] and are formatted as above.<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$e[First Communion](d(yyyy-mm-d))<br />
$e[Bar Mitzvah](n&lt; at &gt; D)<br />
$e[Birth](d(yyyy mm/dd) D)</pre><br />
|<pre>2009-11-6<br />
Jerry's Bar Mitzah at Opas house<br />
2007 05/23 Grandmothers house</pre><br />
|}<br />
<br />
<br />
And:<br />
<br />
{|<br />
|-<br />
|<pre>$b(yyyy-Mmm-dd)<br />
$M</pre><br />
|is the same as<br />
|<pre>$e[Birth](d(yyyy-Mmm-dd))<br />
$t[Marriage](D)</pre><br />
|}<br />
<br />
<br />
----<br />
<br />
=== Notes for attributes and events: ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Attribute and event names are mandatory. '$a' or '$a[]' will not display anything.<br />
|-<br />
|2<br />
|Attributes and event names may have special characters within them. Most notably ']' and ')'. If this is the case, you will need to use [[#Control Variables|Control Variables]]<br />
|}<br />
<br />
== Separators ==<br />
<br />
Separators are special 'text only' groups inside '&lt;' and '&gt;' that conditionally display a separator (like ', ' or ' - ') between two groups, variables, format codes or text.<br />
<br />
Separators are displayed conditionally depending on these rules:<br />
<br />
# A variable that does '''not''' display anything will remove itself and a separator that is to the left of it from the display line only.<br />
# If there is not a separator to the left, the same variable will remove itself and a separator that is to the right of it from the displayed line. <br />
# If there are two separators together, the left one will be removed from the display line and the right is kept.<br />
# Separators at the start or end of the display line (or format strings) are removed<br />
<br />
=== Example: ===<br />
{|<br />
|-<br />
|<pre>$s(f l s)&lt;, &gt;$m(yyyy)&lt; @ &gt;$M&lt; - &gt;$v(&#92;(yyyy&#92;))</pre><br />
|}<br />
<br />
Here are some things that may happen:<br />
<br />
{|<br />
|-<br />
|If '''none''' of the variables are known<br />
|None of the separators will display<br />
|-<br />
|If only one variable '''is''' known<br />
|Only that variable will print. No separators will print.<br />
|-<br />
|If only the spouse's name '''is not''' known<br />
|The first separator will not display<br />
|-<br />
|If only the marriage date '''is not''' known<br />
|The first separator does not display. We will be left with:<br />
Jane Doe&lt; - &gt;{ … }And only the divorce date needs to be known to print the second separator.<br />
|-<br />
|If only the divorce date '''is not''' known<br />
|the second separator will not display<br />
|}<br />
<br />
<br />
Separators can be inside format strings:<br />
<br />
$n(&lt;0&gt;T&lt; &gt;L&lt;, &gt;f&lt; &gt;s)<br />
<br />
Unlike groups, separators can not cross over/out of format strings. So the separator &lt;0&gt; will NEVER display. No matter what is on the left hand side of the variable.<br />
<br />
----<br />
<br />
Here is a useful example:<br />
{|<br />
|-<br />
|<pre>{({b. $b}<, >{d. $d})}</pre><br />
|}<br />
<br />
This will:<br />
{|<br />
|-<br />
| Only print the outside () if either the birth or death date displays<br />
|-<br />
| Only displays the center separator if both dates are known.<br />
|-<br />
| So here are some thing that could display<br />
{|<br />
|-<br />
| <pre>(b. 1970-4-8)</pre><br />
| <pre>(d. 2012-3-9)</pre><br />
| <pre>(b. 1970-4-8, d. 2012-3-9)</pre><br />
| or the line does not print at all.<br />
|}<br />
|-<br />
| We will not see things like:<br />
{|<br />
|-<br />
| <pre>()</pre><br />
| <pre>(, )</pre><br />
| <pre>(b.)</pre><br />
| <pre>(b., )</pre><br />
| <pre>(d.)</pre><br />
|-<br />
| <pre>(, d.)</pre><br />
| <pre>(b. 1970-4-8, )</pre><br />
| <pre>(b. 1970-4-8, d.)</pre><br />
| <pre>(, d. 2012-3-9)</pre><br />
| <pre>(b., d. 2012-3-9)</pre><br />
|}<br />
|}<br />
Back to [[Gramps_4.1_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
{{-}}<br />
<br />
{{man index|Gramps 4.1 Wiki Manual - Reports - part 1|Gramps_4.1_Wiki_Manual_-_Reports_-_part_3|4.1}}<br />
<br />
{{languages}}<br />
<br />
[[Category:Documentation]]<br />
[[Category:Plugins]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Gramps_4.2_Wiki_Manual_-_Reports_-_part_2&diff=50147Gramps 4.2 Wiki Manual - Reports - part 22014-08-12T06:40:32Z<p>Ander882: /* The Substitution Keys */</p>
<hr />
<div>{{grampsmanualcopyright}}<br />
<br />
{{man index|Gramps 4.1 Wiki Manual - Reports - part 1|Gramps_4.1_Wiki_Manual_-_Reports_-_part_3|4.1}}<br />
<br />
{{languages|Gramps_4.1_Wiki_Manual_-_Reports - part 2}}<br />
<br />
{{#vardefine:chapter|11.2}}<br />
{{#vardefine:figure|0}}<br />
<br />
Back to [[Gramps_4.1_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
This section describes the substitution values that can be used in the different reports available in Gramps.<br />
<br />
= Substitution Values =<br />
<br />
Many of the graphical reports allow you to customize the information that is displayed on the reports. Variable substitution is the method that is used to substitute a particular symbol (key) for specific information about the person in the database.<br />
<br />
{|<br />
|-<br />
|Example: <br />
|Will show as: (the person is alive)<br />
|-<br />
|<pre>$n<br />
b. $b{ at $B}<br />
d. $d< at >$D</pre><br />
|<pre>Smith, Edwin Michael<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA<br />
d.</pre><br />
|}<br />
<br />
----<br />
{|<br />
|-<br />
|1<br />
|A list of all available variables (The Substitution Keys) follows. If you wish to display names, date, or place information differently, you may use [[#Format Strings|Format Strings]] to accomplish this.<br />
|-<br />
|2<br />
|There are also [[#Control Variables|Control Variables]] to display special characters (like the dollar sign).<br />
|-<br />
|3<br />
|You can also use [[#Grouping|Grouping]] to optionally display information. Line 2 above, uses grouping to display ' at ' only when the birth place is known.<br />
|-<br />
|4<br />
|Along with [[#Events|Events]] you can print almost anything.<br />
|-<br />
|5<br />
|Finally, [[#Separators|Separators]], to make your life complete. Line 3 above, uses this to display ' at ' only when both the birth date and place is known.<br />
|-<br />
|}<br />
<br />
<br />
== The Substitution Keys ==<br />
<br />
{|<br />
|-<br />
| colspan="2"|'''Personal variables'''<br />
| colspan="2"|'''Marital variables'''<br />
|-<br />
|$n<br />
|Displays the person's name<br />
|$s<br />
|Displays the name of the person's spouse<br />
|-<br />
|$i<br />
|Displays the GRAMPS ID for the person.<br />
|$j<br />
|Displays the GRAMPS ID for the marriage.<br />
|-<br />
|$b<br />
|Displays the person's date of birth <br />
|$m<br />
|Displays the marriage date of the person and the spouse.<br />
|-<br />
|$B<br />
|Displays the person's place of birth <br />
|$M<br />
|Displays the place of the marriage of the person and the spouse.<br />
|-<br />
|$d<br />
|Displays the person's date of death <br />
|$v<br />
|Displays the divorce date of the person and the spouse.<br />
|-<br />
|$D<br />
|Displays the person's place of death <br />
|$V<br />
|Displays the place of the divorce of the person and the spouse.<br />
|-<br />
|$a<br />
|Displays an attribute about the person.<br />
see [[#Attributes|Attributes]] for more<br />
|$u<br />
|Displays an attribute about the marriage.<br />
see [[#Attributes|Attributes]] for more<br />
|-<br />
|$e<br />
|Displays event information about the person.<br />
See [[#Events|Events]] for more<br />
|$t<br />
|Displays an event information about the marriage.<br />
See [[#Events|Events]] for more<br />
|}<br />
<br />
All of the Marital variables (if not defined by the report) are defined by the person's preferred spouse in Gramps. If the person has never been married, then these variables will not display anything.<br />
<br />
<br />
==== Other Substitution Keys ====<br />
<br />
$T Displays Todays date. Standard Date format code apply<br />
<br />
<br />
$G Displays information about Gramsp, the database, and the researcher.<br />
<br />
These are the formatting codes you can use on the $G variable only:<br />
{|<br />
|-<br />
|v<br />
|Gramps Version number<br />
|<br />
|<br />
|<br />
|-<br />
|t<br />
|Researchers Name<br />
|<br />
|d<br />
|Database Name<br />
|-<br />
|e<br />
|Researchers Street<br />
|<br />
|l<br />
|Researchers Locality<br />
|-<br />
|c<br />
|Researchers City<br />
|<br />
|s<br />
|Researchers State<br />
|-<br />
|p<br />
|Researchers Postal Code<br />
|<br />
|n<br />
|Researchers Country<br />
|-<br />
|o<br />
|Researchers Phone<br />
|<br />
|m<br />
|Researchers Email<br />
|}<br />
<br />
=== Default displayed formats ===<br />
<br />
{|<br />
|-<br />
|$n $s<br />
|Names will be displayed as set in 'Name format:' on the Display tab in Gramps preferences<br />
|-<br />
|$B $D $M $V<br />
|Places will display the Place title by default<br />
|-<br />
|$b $d $m $v $T<br />
|Dates will be displayed as set in 'Date format:' on the Display tab in Gramps preferences<br />
|-<br />
|$e $t<br />
|Events will display the description by default<br />
|}<br />
<br />
<br />
----<br />
=== Deprecated variables ===<br />
<br />
Some of the old variables were deprecated because [[#Format Strings|Format Strings]] have replaced them. So here is a list of those variables and how to achieve their results:<br />
<br />
{| {{prettytable}}<br />
|-<br />
!Old Variable<br />
!How to display it now<br />
!What is displayed<br />
|-<br />
|$f<br />
|$n<br />
|Name - as by Gramps name display under Preferences<br />
|-<br />
|$n<br />
|$n(g f)<br />
|Name - FirstName LastName<br />
|-<br />
|$N<br />
|$n(f, g)<br />
|Name - LastName, FirstName (note the explicit comma)<br />
|-<br />
|$nC<br />
|$n(g F)<br />
|Name - FirstName LastName in UPPER case<br />
|-<br />
|$NC<br />
|$n(F, g)<br />
|Name - LastName in UPPER case, FirstName<br />
|-<br />
|$by<br />
|$b(yyyy)<br />
|Date of birth, year only<br />
|-<br />
|$dy<br />
|$d(yyyy)<br />
|Date of death, year only<br />
|-<br />
|$my<br />
|$m(yyyy)<br />
|Date of preferred marriage, year only<br />
|-<br />
|$p<br />
|$s<br />
|Preferred spouse's name as by Gramps name display under Preferences<br />
|-<br />
|$s<br />
|$s(g f)<br />
|Preferred spouse's name - FirstName LastName<br />
|-<br />
|$S<br />
|$s(f, g)<br />
|Preferred spouse's name - LastName, FirstName<br />
|-<br />
|$sC<br />
|$s(g F)<br />
|Preferred spouse's name - FirstName LastName in UPPER case<br />
|-<br />
|$SC<br />
|$s(F, g)<br />
|Preferred spouse's name - LastName in UPPER case, FirstName<br />
|}<br />
<br />
These codes can be uppercased to uppercase the result. <br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
== Format Strings ==<br />
<br />
Format strings are used to display names and dates differently than those assigned under Gramps Preferences. Here is the syntax for a format string:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''(format string)<br />
where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'nsijbmBMdvDVauet'<br />
<br />
A format string is any text, separators or format codes (defined below) to display information about the person.<br />
<br />
=== Formatting names ===<br />
<br />
The $n and $s variables will print the the preferred name within Gramps only. If you wish to print an alternate name, put the name within [] as followes:<br />
<pre>$n[Also Known As]<br />
$s[Married Name](L, f)</pre><br />
and then an addictional format strings.<br />
<br />
<br />
For names ($n $s) you may use the following formatting codes to display the name differently.<br />
<br />
{|<br />
|-<br />
|t<br />
|Title<br />
|<br />
|f<br />
|Given name<br />
|-<br />
|x<br />
|Common name. Call name if existing, otherwise first first name<br />
|<br />
|c<br />
|Call name<br />
|-<br />
|n<br />
|Nick name<br />
|<br />
|s<br />
|Suffix<br />
|-<br />
|l<br />
|Surname<br />
|<br />
|g<br />
|Family nickname<br />
|}<br />
<br />
These codes can be uppercased to uppercase the result.<br />
<br />
{|<br />
|-<br />
|Example code<br />
|Displays<br />
|-<br />
|<pre>$n(L, f) ($n(c)), $n(L, f){ ($n(c))}<br />
$s(f l s)</pre><br />
|<pre>SMITH, Edwin Michael (), SMITH, Edwin Michael<br />
Janice Ann Adams</pre><br />
|}<br />
<br />
<br />
<blockquote>Note:<br />
If you want to print a character 'c' within the format string (or any one of the other format codes), you will need to first add a '&#92;' in front of it. See [[#Control Variables|Control Variables]] for more.</blockquote><br />
<br />
<blockquote>Note:<br />
the curly brackets { } are used to hide information. Here it is used around ' ($n(c))' to not display ' ()' if the person does not have a call name. See [[#Grouping|Grouping]] for more.</blockquote><br />
<br />
----<br />
<br />
=== Formatting Dates ===<br />
<br />
For all of the date variables ($b $d $m $v) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|yyyy<br />
|The year as a four digit number<br />
|<br />
|yyy<br />
|The year, with a minimum of three digits<br />
|-<br />
|yy<br />
|The year, from 00 to 99<br />
|<br />
|y<br />
|The year, from 0 to 99<br />
|-<br />
|mmmm<BR><br />
MMMM<br />
|The full name of the month<BR><br />
The full name IN CAPS<br />
|<br />
|mmm<BR><br />
MMM<br />
|The abbreviated name of the month<BR><br />
The abbreviated name IN CAPS<br />
|-<br />
|mm<br />
|The month, from 00 to 12<br />
|<br />
|m<br />
|The month, from 0 to 12<br />
|-<br />
|dd<br />
|The day, from 00 to 31<br />
|<br />
|d<br />
|The day, from 0 to 31<br />
|-<br />
|o<br />
|The date type (modifier)<br />
|<br />
|<br />
|<br />
|}<br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$b(mmm-dd yy)<br />
$m(yyyy/mmm/d)<br />
$b(mmm-dd yy)</pre><br />
|<pre>May-24 61<br />
1995/May/27<br />
Jun-04 85</pre><br />
|}<br />
<br />
{{man note| For date types (modifier) |Only "Before", "After", and "About" are supported at this time. all others will not display anything.<BR><br />
And for date span and date ranges, only the starting (first) date is displayed.}}<br />
<br />
----<br />
<br />
=== Formatting Places ===<br />
<br />
For all of the place variables ($B $D $M $V) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|e<br />
|Street<br />
|<br />
|l<br />
|Locality<br />
|-<br />
|c<br />
|City<br />
|<br />
|u<br />
|County<br />
|-<br />
|s<br />
|State<br />
|<br />
|p<br />
|Postal Code<br />
|-<br />
|n<br />
|Country<br />
|<br />
|t<br />
|Title<br />
|-<br />
|x<br />
|Longitude<br />
|<br />
|y<br />
|Latitude<br />
|}<br />
These codes can be uppercased to uppercase the result. <br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
----<br />
<br />
=== Rules for format strings. ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Anything will print inside a format string<br />
|-<br />
|1a<br />
|you will have to use [[#Control Variables|Control Variables]] to display things like ')' and format codes<br />
|-<br />
|2<br />
|Separators can be within format strings.<br />
|-<br />
|3<br />
|At least ONE format code has to display something for the ENTIRE format string to display<br />
|}<br />
<br />
----<br />
<br />
=== Examples ===<br />
<br />
{|<br />
|-<br />
|code<br />
|gives<br />
|-<br />
|<pre>$n(f l)<br />
b. $b {at $B<br />
{d. $d $D</pre><br />
|<pre>Edwin Michael Smith<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA</pre>The person is still alive (or has no information present) so the line was removed.<br />
|}<br />
<br />
<br />
<br />
== Control Variables ==<br />
<br />
Control variables allow you to print characters that are special to Substitution values within a display.<br />
<br />
For example the dollar character '$' is used to note the start of a variable. If you wish to print a dollar character you would use a control character like '&#92;$'<br />
<br />
Control Variables<br />
<br />
{|<br />
|-<br />
|&#92;$<br />
|Displays a single '$'<br />
|<br />
|&#92;&#92;<br />
|Displays a single '&#92;'<br />
|-<br />
|&#92;(<br />
|Displays a single '('<br />
|<br />
|&#92;)<br />
|Displays a single ')'<br />
|-<br />
|&#92;{<br />
|Displays a single '{'<br />
|<br />
|&#92;}<br />
|Displays a single '}'<br />
|-<br />
|&#92;<<br />
|Displays a single '<'<br />
|<br />
|&#92;><br />
|Displays a single '>'<br />
|}<br />
<br />
Basically anything that comes after a '&#92;' will be printed.<br />
<br />
----<br />
Note:<br />
When you are inside a format string, you may need to use this to display a character that would normally be a format code. <br />
<br />
{|<br />
|-<br />
|Example:<br />
|would give<br />
|-<br />
|<pre>$b(m hi mom)<br />
$b(m hi \mo\m)</pre><br />
|<pre>5 hi 5o5<br />
5 hi mom</pre><br />
|}<br />
<br />
as this person was born on the fifth month.<br />
<br />
== Grouping ==<br />
<br />
There are instances where you do not want certain text to be displayed. Take the example:<br />
<br />
{|<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died on $d at $D</pre><br />
|<pre>died on 1975-06-26 at </pre> <br />
|<pre>died on at Reno, Washoe Co., NV</pre><br />
|-<br />
| colspan="3"|Neither of these are very acceptable.<br />
|-<br />
| colspan="3"|But with groups (denoted by {}), you can optionally print information if a variable within contains information.<br />
|-<br />
| colspan="3"|For example:<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died{ on $d}{ at $D}</pre><br />
|<pre>died on 1975-06-26</pre><br />
|<pre>died at Reno, Washoe Co., NV</pre><br />
|}<br />
<br />
which is what we want.<br />
<br />
----<br />
=== Rules for groups ===<br />
<br />
A group will only display if there is at least one variable that displays something. So if a group only has text and/or variables where the information is not known, the entire group will not print.<br />
<br />
Groups can also be nested. If this happens (like below), the outer group will only display if there is at least one variable that displays something within the outer group or any of the sub groups.<br />
<br />
Groups can also be used to remove an entire line from a display. A '{' at the start of a line will remove the entire line from the display if the above rule is true.<br />
<br />
If you do not wish to have the display code above (for death information) displayed (the person is alive, or you do not yet know the information), modify the code to look like<br />
<pre>{died{ on $d}{ at $D}</pre><br />
<br />
<blockquote>To have an entire line be blank instead of removing the line simply start the line with a space ' {' or make sure there is a space after the group (you will have to close the group first)</blockquote><br />
<br />
----<br />
<br />
=== Examples: ===<br />
<br />
This will hide '(' and ')' if the divorce information is not known (or still married).<br />
<br />
<pre>m. $m $M {- ($v(yyyy))</pre><br />
<br />
<br />
Only display some spouse information if married or remove the entire line if never married:<br />
<pre>{$s $m(yyyy) {- $v(\(yyyy\))}}</pre><br />
<br />
== Attributes ==<br />
<br />
Attributes do not have a format string. Instead the attribute name is placed inside []. Here is the syntax for an attribute:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name] where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'au'<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$a[Profession]<br />
$a[Social Security Number]<br />
$a[Total \$ bequeathed]</pre><br />
|<pre>Programmer<br />
7A3-29-F1C6<br />
3.00USD</pre><br />
|}<br />
<br />
<br />
----<br />
== Events ==<br />
<br />
Events have the same starting structure as attributes, $e or $t and the event name in [] but events have an extra format string after the name to display the description, date, place, id, and attributes associated with it. Each of these items can be displayed with a , a 'n', 'd', 'D', 'i', and 'a' respectively in the format string. Here is the syntax for an event:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name](format string) where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'et'<br />
<br />
=== Event format strings ===<br />
<br />
The Event format string is used to display information about the event. Here are the format codes to display parts of the event:<br />
<br />
{|<br />
|-<br />
|n<br />
|Description<br />
|<br />
|i<br />
|Event ID<br />
|-<br />
|d<br />
|Event Date&#42;<br />
|<br />
|D<br />
|Event Place&#42;<br />
|-<br />
|a<br />
|An attributes for the event&#42;&#42;<br />
|<br />
|<br />
|<br />
|}<br />
<br />
&#42;These variables can themselves have format strings. Date and a place can be formatted with format string as defined in [[#Format strings|Format strings]].<br />
<br />
&#42;&#42;Attribute needs to have the attribute name in [] and are formatted as above.<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$e[First Communion](d(yyyy-mm-d))<br />
$e[Bar Mitzvah](n&lt; at &gt; D)<br />
$e[Birth](d(yyyy mm/dd) D)</pre><br />
|<pre>2009-11-6<br />
Jerry's Bar Mitzah at Opas house<br />
2007 05/23 Grandmothers house</pre><br />
|}<br />
<br />
<br />
And:<br />
<br />
{|<br />
|-<br />
|<pre>$b(yyyy-Mmm-dd)<br />
$M</pre><br />
|is the same as<br />
|<pre>$e[Birth](d(yyyy-Mmm-dd))<br />
$t[Marriage](D)</pre><br />
|}<br />
<br />
<br />
----<br />
<br />
=== Notes for attributes and events: ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Attribute and event names are mandatory. '$a' or '$a[]' will not display anything.<br />
|-<br />
|2<br />
|Attributes and event names may have special characters within them. Most notably ']' and ')'. If this is the case, you will need to use [[#Control Variables|Control Variables]]<br />
|}<br />
<br />
== Separators ==<br />
<br />
Separators are special 'text only' groups inside '&lt;' and '&gt;' that conditionally display a separator (like ', ' or ' - ') between two groups, variables, format codes or text.<br />
<br />
Separators are displayed conditionally depending on these rules:<br />
<br />
# A variable that does '''not''' display anything will remove itself and a separator that is to the left of it from the display line only.<br />
# If there is not a separator to the left, the same variable will remove itself and a separator that is to the right of it from the displayed line. <br />
# If there are two separators together, the left one will be removed from the display line and the right is kept.<br />
# Separators at the start or end of the display line (or format strings) are removed<br />
<br />
=== Example: ===<br />
{|<br />
|-<br />
|<pre>$s(f l s)&lt;, &gt;$m(yyyy)&lt; @ &gt;$M&lt; - &gt;$v(&#92;(yyyy&#92;))</pre><br />
|}<br />
<br />
Here are some things that may happen:<br />
<br />
{|<br />
|-<br />
|If '''none''' of the variables are known<br />
|None of the separators will display<br />
|-<br />
|If only one variable '''is''' known<br />
|Only that variable will print. No separators will print.<br />
|-<br />
|If only the spouse's name '''is not''' known<br />
|The first separator will not display<br />
|-<br />
|If only the marriage date '''is not''' known<br />
|The first separator does not display. We will be left with:<br />
Jane Doe&lt; - &gt;{ … }And only the divorce date needs to be known to print the second separator.<br />
|-<br />
|If only the divorce date '''is not''' known<br />
|the second separator will not display<br />
|}<br />
<br />
<br />
Separators can be inside format strings:<br />
<br />
$n(&lt;0&gt;T&lt; &gt;L&lt;, &gt;f&lt; &gt;s)<br />
<br />
Unlike groups, separators can not cross over/out of format strings. So the separator &lt;0&gt; will NEVER display. No matter what is on the left hand side of the variable.<br />
<br />
----<br />
<br />
Here is a useful example:<br />
{|<br />
|-<br />
|<pre>{({b. $b}<, >{d. $d})}</pre><br />
|}<br />
<br />
This will:<br />
{|<br />
|-<br />
| Only print the outside () if either the birth or death date displays<br />
|-<br />
| Only displays the center separator if both dates are known.<br />
|-<br />
| So here are some thing that could display<br />
{|<br />
|-<br />
| <pre>(b. 1970-4-8)</pre><br />
| <pre>(d. 2012-3-9)</pre><br />
| <pre>(b. 1970-4-8, d. 2012-3-9)</pre><br />
| or the line does not print at all.<br />
|}<br />
|-<br />
| We will not see things like:<br />
{|<br />
|-<br />
| <pre>()</pre><br />
| <pre>(, )</pre><br />
| <pre>(b.)</pre><br />
| <pre>(b., )</pre><br />
| <pre>(d.)</pre><br />
|-<br />
| <pre>(, d.)</pre><br />
| <pre>(b. 1970-4-8, )</pre><br />
| <pre>(b. 1970-4-8, d.)</pre><br />
| <pre>(, d. 2012-3-9)</pre><br />
| <pre>(b., d. 2012-3-9)</pre><br />
|}<br />
|}<br />
Back to [[Gramps_4.1_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
{{-}}<br />
<br />
{{man index|Gramps 4.1 Wiki Manual - Reports - part 1|Gramps_4.1_Wiki_Manual_-_Reports_-_part_3|4.1}}<br />
<br />
{{languages}}<br />
<br />
[[Category:Documentation]]<br />
[[Category:Plugins]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Gramps_4.2_Wiki_Manual_-_Reports_-_part_2&diff=50146Gramps 4.2 Wiki Manual - Reports - part 22014-08-12T06:39:17Z<p>Ander882: /* Other Substitution Keys */</p>
<hr />
<div>{{grampsmanualcopyright}}<br />
<br />
{{man index|Gramps 4.1 Wiki Manual - Reports - part 1|Gramps_4.1_Wiki_Manual_-_Reports_-_part_3|4.1}}<br />
<br />
{{languages|Gramps_4.1_Wiki_Manual_-_Reports - part 2}}<br />
<br />
{{#vardefine:chapter|11.2}}<br />
{{#vardefine:figure|0}}<br />
<br />
Back to [[Gramps_4.1_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
This section describes the substitution values that can be used in the different reports available in Gramps.<br />
<br />
= Substitution Values =<br />
<br />
Many of the graphical reports allow you to customize the information that is displayed on the reports. Variable substitution is the method that is used to substitute a particular symbol (key) for specific information about the person in the database.<br />
<br />
{|<br />
|-<br />
|Example: <br />
|Will show as: (the person is alive)<br />
|-<br />
|<pre>$n<br />
b. $b{ at $B}<br />
d. $d< at >$D</pre><br />
|<pre>Smith, Edwin Michael<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA<br />
d.</pre><br />
|}<br />
<br />
----<br />
{|<br />
|-<br />
|1<br />
|A list of all available variables (The Substitution Keys) follows. If you wish to display names, date, or place information differently, you may use [[#Format Strings|Format Strings]] to accomplish this.<br />
|-<br />
|2<br />
|There are also [[#Control Variables|Control Variables]] to display special characters (like the dollar sign).<br />
|-<br />
|3<br />
|You can also use [[#Grouping|Grouping]] to optionally display information. Line 2 above, uses grouping to display ' at ' only when the birth place is known.<br />
|-<br />
|4<br />
|Along with [[#Events|Events]] you can print almost anything.<br />
|-<br />
|5<br />
|Finally, [[#Separators|Separators]], to make your life complete. Line 3 above, uses this to display ' at ' only when both the birth date and place is known.<br />
|-<br />
|}<br />
<br />
<br />
== The Substitution Keys ==<br />
<br />
{|<br />
|-<br />
| colspan="2"|'''Personal variables'''<br />
| colspan="2"|'''Marital variables'''<br />
|-<br />
|$n<br />
|Displays the person's name<br />
|$s<br />
|Displays the name of the person's spouse<br />
|-<br />
|$i<br />
|Displays the GRAMPS ID for the person.<br />
|$j<br />
|Displays the GRAMPS ID for the marriage.<br />
|-<br />
|$b<br />
|Displays the person's date of birth <br />
|$m<br />
|Displays the marriage date of the person and the spouse.<br />
|-<br />
|$B<br />
|Displays the person's place of birth <br />
|$M<br />
|Displays the place of the marriage of the person and the spouse.<br />
|-<br />
|$d<br />
|Displays the person's date of death <br />
|$v<br />
|Displays the divorce date of the person and the spouse.<br />
|-<br />
|$D<br />
|Displays the person's place of death <br />
|$V<br />
|Displays the place of the divorce of the person and the spouse.<br />
|-<br />
|$a<br />
|Displays an attribute about the person.<br />
see [[#Attributes|Attributes]] for more<br />
|$u<br />
|Displays an attribute about the marriage.<br />
see [[#Attributes|Attributes]] for more<br />
|-<br />
|$e<br />
|Displays event information about the person.<br />
See [[#Events|Events]] for more<br />
|$t<br />
|Displays an event information about the marriage.<br />
See [[#Events|Events]] for more<br />
|}<br />
<br />
All of the Marital variables are defined by the person's preferred spouse in Gramps. If the person has never been married, then these variables will not display anything.<br />
<br />
<br />
==== Other Substitution Keys ====<br />
<br />
$T Displays Todays date. Standard Date format code apply<br />
<br />
<br />
$G Displays information about Gramsp, the database, and the researcher.<br />
<br />
These are the formatting codes you can use on the $G variable only:<br />
{|<br />
|-<br />
|v<br />
|Gramps Version number<br />
|<br />
|<br />
|<br />
|-<br />
|t<br />
|Researchers Name<br />
|<br />
|d<br />
|Database Name<br />
|-<br />
|e<br />
|Researchers Street<br />
|<br />
|l<br />
|Researchers Locality<br />
|-<br />
|c<br />
|Researchers City<br />
|<br />
|s<br />
|Researchers State<br />
|-<br />
|p<br />
|Researchers Postal Code<br />
|<br />
|n<br />
|Researchers Country<br />
|-<br />
|o<br />
|Researchers Phone<br />
|<br />
|m<br />
|Researchers Email<br />
|}<br />
<br />
=== Default displayed formats ===<br />
<br />
{|<br />
|-<br />
|$n $s<br />
|Names will be displayed as set in 'Name format:' on the Display tab in Gramps preferences<br />
|-<br />
|$B $D $M $V<br />
|Places will display the Place title by default<br />
|-<br />
|$b $d $m $v $T<br />
|Dates will be displayed as set in 'Date format:' on the Display tab in Gramps preferences<br />
|-<br />
|$e $t<br />
|Events will display the description by default<br />
|}<br />
<br />
<br />
----<br />
=== Deprecated variables ===<br />
<br />
Some of the old variables were deprecated because [[#Format Strings|Format Strings]] have replaced them. So here is a list of those variables and how to achieve their results:<br />
<br />
{| {{prettytable}}<br />
|-<br />
!Old Variable<br />
!How to display it now<br />
!What is displayed<br />
|-<br />
|$f<br />
|$n<br />
|Name - as by Gramps name display under Preferences<br />
|-<br />
|$n<br />
|$n(g f)<br />
|Name - FirstName LastName<br />
|-<br />
|$N<br />
|$n(f, g)<br />
|Name - LastName, FirstName (note the explicit comma)<br />
|-<br />
|$nC<br />
|$n(g F)<br />
|Name - FirstName LastName in UPPER case<br />
|-<br />
|$NC<br />
|$n(F, g)<br />
|Name - LastName in UPPER case, FirstName<br />
|-<br />
|$by<br />
|$b(yyyy)<br />
|Date of birth, year only<br />
|-<br />
|$dy<br />
|$d(yyyy)<br />
|Date of death, year only<br />
|-<br />
|$my<br />
|$m(yyyy)<br />
|Date of preferred marriage, year only<br />
|-<br />
|$p<br />
|$s<br />
|Preferred spouse's name as by Gramps name display under Preferences<br />
|-<br />
|$s<br />
|$s(g f)<br />
|Preferred spouse's name - FirstName LastName<br />
|-<br />
|$S<br />
|$s(f, g)<br />
|Preferred spouse's name - LastName, FirstName<br />
|-<br />
|$sC<br />
|$s(g F)<br />
|Preferred spouse's name - FirstName LastName in UPPER case<br />
|-<br />
|$SC<br />
|$s(F, g)<br />
|Preferred spouse's name - LastName in UPPER case, FirstName<br />
|}<br />
<br />
== Format Strings ==<br />
<br />
Format strings are used to display names and dates differently than those assigned under Gramps Preferences. Here is the syntax for a format string:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''(format string)<br />
where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'nsijbmBMdvDVauet'<br />
<br />
A format string is any text, separators or format codes (defined below) to display information about the person.<br />
<br />
=== Formatting names ===<br />
<br />
The $n and $s variables will print the the preferred name within Gramps only. If you wish to print an alternate name, put the name within [] as followes:<br />
<pre>$n[Also Known As]<br />
$s[Married Name](L, f)</pre><br />
and then an addictional format strings.<br />
<br />
<br />
For names ($n $s) you may use the following formatting codes to display the name differently.<br />
<br />
{|<br />
|-<br />
|t<br />
|Title<br />
|<br />
|f<br />
|Given name<br />
|-<br />
|x<br />
|Common name. Call name if existing, otherwise first first name<br />
|<br />
|c<br />
|Call name<br />
|-<br />
|n<br />
|Nick name<br />
|<br />
|s<br />
|Suffix<br />
|-<br />
|l<br />
|Surname<br />
|<br />
|g<br />
|Family nickname<br />
|}<br />
<br />
These codes can be uppercased to uppercase the result.<br />
<br />
{|<br />
|-<br />
|Example code<br />
|Displays<br />
|-<br />
|<pre>$n(L, f) ($n(c)), $n(L, f){ ($n(c))}<br />
$s(f l s)</pre><br />
|<pre>SMITH, Edwin Michael (), SMITH, Edwin Michael<br />
Janice Ann Adams</pre><br />
|}<br />
<br />
<br />
<blockquote>Note:<br />
If you want to print a character 'c' within the format string (or any one of the other format codes), you will need to first add a '&#92;' in front of it. See [[#Control Variables|Control Variables]] for more.</blockquote><br />
<br />
<blockquote>Note:<br />
the curly brackets { } are used to hide information. Here it is used around ' ($n(c))' to not display ' ()' if the person does not have a call name. See [[#Grouping|Grouping]] for more.</blockquote><br />
<br />
----<br />
<br />
=== Formatting Dates ===<br />
<br />
For all of the date variables ($b $d $m $v) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|yyyy<br />
|The year as a four digit number<br />
|<br />
|yyy<br />
|The year, with a minimum of three digits<br />
|-<br />
|yy<br />
|The year, from 00 to 99<br />
|<br />
|y<br />
|The year, from 0 to 99<br />
|-<br />
|mmmm<BR><br />
MMMM<br />
|The full name of the month<BR><br />
The full name IN CAPS<br />
|<br />
|mmm<BR><br />
MMM<br />
|The abbreviated name of the month<BR><br />
The abbreviated name IN CAPS<br />
|-<br />
|mm<br />
|The month, from 00 to 12<br />
|<br />
|m<br />
|The month, from 0 to 12<br />
|-<br />
|dd<br />
|The day, from 00 to 31<br />
|<br />
|d<br />
|The day, from 0 to 31<br />
|-<br />
|o<br />
|The date type (modifier)<br />
|<br />
|<br />
|<br />
|}<br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$b(mmm-dd yy)<br />
$m(yyyy/mmm/d)<br />
$b(mmm-dd yy)</pre><br />
|<pre>May-24 61<br />
1995/May/27<br />
Jun-04 85</pre><br />
|}<br />
<br />
{{man note| For date types (modifier) |Only "Before", "After", and "About" are supported at this time. all others will not display anything.<BR><br />
And for date span and date ranges, only the starting (first) date is displayed.}}<br />
<br />
----<br />
<br />
=== Formatting Places ===<br />
<br />
For all of the place variables ($B $D $M $V) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|e<br />
|Street<br />
|<br />
|l<br />
|Locality<br />
|-<br />
|c<br />
|City<br />
|<br />
|u<br />
|County<br />
|-<br />
|s<br />
|State<br />
|<br />
|p<br />
|Postal Code<br />
|-<br />
|n<br />
|Country<br />
|<br />
|t<br />
|Title<br />
|-<br />
|x<br />
|Longitude<br />
|<br />
|y<br />
|Latitude<br />
|}<br />
These codes can be uppercased to uppercase the result. <br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
----<br />
<br />
=== Rules for format strings. ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Anything will print inside a format string<br />
|-<br />
|1a<br />
|you will have to use [[#Control Variables|Control Variables]] to display things like ')' and format codes<br />
|-<br />
|2<br />
|Separators can be within format strings.<br />
|-<br />
|3<br />
|At least ONE format code has to display something for the ENTIRE format string to display<br />
|}<br />
<br />
----<br />
<br />
=== Examples ===<br />
<br />
{|<br />
|-<br />
|code<br />
|gives<br />
|-<br />
|<pre>$n(f l)<br />
b. $b {at $B<br />
{d. $d $D</pre><br />
|<pre>Edwin Michael Smith<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA</pre>The person is still alive (or has no information present) so the line was removed.<br />
|}<br />
<br />
<br />
<br />
== Control Variables ==<br />
<br />
Control variables allow you to print characters that are special to Substitution values within a display.<br />
<br />
For example the dollar character '$' is used to note the start of a variable. If you wish to print a dollar character you would use a control character like '&#92;$'<br />
<br />
Control Variables<br />
<br />
{|<br />
|-<br />
|&#92;$<br />
|Displays a single '$'<br />
|<br />
|&#92;&#92;<br />
|Displays a single '&#92;'<br />
|-<br />
|&#92;(<br />
|Displays a single '('<br />
|<br />
|&#92;)<br />
|Displays a single ')'<br />
|-<br />
|&#92;{<br />
|Displays a single '{'<br />
|<br />
|&#92;}<br />
|Displays a single '}'<br />
|-<br />
|&#92;<<br />
|Displays a single '<'<br />
|<br />
|&#92;><br />
|Displays a single '>'<br />
|}<br />
<br />
Basically anything that comes after a '&#92;' will be printed.<br />
<br />
----<br />
Note:<br />
When you are inside a format string, you may need to use this to display a character that would normally be a format code. <br />
<br />
{|<br />
|-<br />
|Example:<br />
|would give<br />
|-<br />
|<pre>$b(m hi mom)<br />
$b(m hi \mo\m)</pre><br />
|<pre>5 hi 5o5<br />
5 hi mom</pre><br />
|}<br />
<br />
as this person was born on the fifth month.<br />
<br />
== Grouping ==<br />
<br />
There are instances where you do not want certain text to be displayed. Take the example:<br />
<br />
{|<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died on $d at $D</pre><br />
|<pre>died on 1975-06-26 at </pre> <br />
|<pre>died on at Reno, Washoe Co., NV</pre><br />
|-<br />
| colspan="3"|Neither of these are very acceptable.<br />
|-<br />
| colspan="3"|But with groups (denoted by {}), you can optionally print information if a variable within contains information.<br />
|-<br />
| colspan="3"|For example:<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died{ on $d}{ at $D}</pre><br />
|<pre>died on 1975-06-26</pre><br />
|<pre>died at Reno, Washoe Co., NV</pre><br />
|}<br />
<br />
which is what we want.<br />
<br />
----<br />
=== Rules for groups ===<br />
<br />
A group will only display if there is at least one variable that displays something. So if a group only has text and/or variables where the information is not known, the entire group will not print.<br />
<br />
Groups can also be nested. If this happens (like below), the outer group will only display if there is at least one variable that displays something within the outer group or any of the sub groups.<br />
<br />
Groups can also be used to remove an entire line from a display. A '{' at the start of a line will remove the entire line from the display if the above rule is true.<br />
<br />
If you do not wish to have the display code above (for death information) displayed (the person is alive, or you do not yet know the information), modify the code to look like<br />
<pre>{died{ on $d}{ at $D}</pre><br />
<br />
<blockquote>To have an entire line be blank instead of removing the line simply start the line with a space ' {' or make sure there is a space after the group (you will have to close the group first)</blockquote><br />
<br />
----<br />
<br />
=== Examples: ===<br />
<br />
This will hide '(' and ')' if the divorce information is not known (or still married).<br />
<br />
<pre>m. $m $M {- ($v(yyyy))</pre><br />
<br />
<br />
Only display some spouse information if married or remove the entire line if never married:<br />
<pre>{$s $m(yyyy) {- $v(\(yyyy\))}}</pre><br />
<br />
== Attributes ==<br />
<br />
Attributes do not have a format string. Instead the attribute name is placed inside []. Here is the syntax for an attribute:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name] where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'au'<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$a[Profession]<br />
$a[Social Security Number]<br />
$a[Total \$ bequeathed]</pre><br />
|<pre>Programmer<br />
7A3-29-F1C6<br />
3.00USD</pre><br />
|}<br />
<br />
<br />
----<br />
== Events ==<br />
<br />
Events have the same starting structure as attributes, $e or $t and the event name in [] but events have an extra format string after the name to display the description, date, place, id, and attributes associated with it. Each of these items can be displayed with a , a 'n', 'd', 'D', 'i', and 'a' respectively in the format string. Here is the syntax for an event:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name](format string) where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'et'<br />
<br />
=== Event format strings ===<br />
<br />
The Event format string is used to display information about the event. Here are the format codes to display parts of the event:<br />
<br />
{|<br />
|-<br />
|n<br />
|Description<br />
|<br />
|i<br />
|Event ID<br />
|-<br />
|d<br />
|Event Date&#42;<br />
|<br />
|D<br />
|Event Place&#42;<br />
|-<br />
|a<br />
|An attributes for the event&#42;&#42;<br />
|<br />
|<br />
|<br />
|}<br />
<br />
&#42;These variables can themselves have format strings. Date and a place can be formatted with format string as defined in [[#Format strings|Format strings]].<br />
<br />
&#42;&#42;Attribute needs to have the attribute name in [] and are formatted as above.<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$e[First Communion](d(yyyy-mm-d))<br />
$e[Bar Mitzvah](n&lt; at &gt; D)<br />
$e[Birth](d(yyyy mm/dd) D)</pre><br />
|<pre>2009-11-6<br />
Jerry's Bar Mitzah at Opas house<br />
2007 05/23 Grandmothers house</pre><br />
|}<br />
<br />
<br />
And:<br />
<br />
{|<br />
|-<br />
|<pre>$b(yyyy-Mmm-dd)<br />
$M</pre><br />
|is the same as<br />
|<pre>$e[Birth](d(yyyy-Mmm-dd))<br />
$t[Marriage](D)</pre><br />
|}<br />
<br />
<br />
----<br />
<br />
=== Notes for attributes and events: ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Attribute and event names are mandatory. '$a' or '$a[]' will not display anything.<br />
|-<br />
|2<br />
|Attributes and event names may have special characters within them. Most notably ']' and ')'. If this is the case, you will need to use [[#Control Variables|Control Variables]]<br />
|}<br />
<br />
== Separators ==<br />
<br />
Separators are special 'text only' groups inside '&lt;' and '&gt;' that conditionally display a separator (like ', ' or ' - ') between two groups, variables, format codes or text.<br />
<br />
Separators are displayed conditionally depending on these rules:<br />
<br />
# A variable that does '''not''' display anything will remove itself and a separator that is to the left of it from the display line only.<br />
# If there is not a separator to the left, the same variable will remove itself and a separator that is to the right of it from the displayed line. <br />
# If there are two separators together, the left one will be removed from the display line and the right is kept.<br />
# Separators at the start or end of the display line (or format strings) are removed<br />
<br />
=== Example: ===<br />
{|<br />
|-<br />
|<pre>$s(f l s)&lt;, &gt;$m(yyyy)&lt; @ &gt;$M&lt; - &gt;$v(&#92;(yyyy&#92;))</pre><br />
|}<br />
<br />
Here are some things that may happen:<br />
<br />
{|<br />
|-<br />
|If '''none''' of the variables are known<br />
|None of the separators will display<br />
|-<br />
|If only one variable '''is''' known<br />
|Only that variable will print. No separators will print.<br />
|-<br />
|If only the spouse's name '''is not''' known<br />
|The first separator will not display<br />
|-<br />
|If only the marriage date '''is not''' known<br />
|The first separator does not display. We will be left with:<br />
Jane Doe&lt; - &gt;{ … }And only the divorce date needs to be known to print the second separator.<br />
|-<br />
|If only the divorce date '''is not''' known<br />
|the second separator will not display<br />
|}<br />
<br />
<br />
Separators can be inside format strings:<br />
<br />
$n(&lt;0&gt;T&lt; &gt;L&lt;, &gt;f&lt; &gt;s)<br />
<br />
Unlike groups, separators can not cross over/out of format strings. So the separator &lt;0&gt; will NEVER display. No matter what is on the left hand side of the variable.<br />
<br />
----<br />
<br />
Here is a useful example:<br />
{|<br />
|-<br />
|<pre>{({b. $b}<, >{d. $d})}</pre><br />
|}<br />
<br />
This will:<br />
{|<br />
|-<br />
| Only print the outside () if either the birth or death date displays<br />
|-<br />
| Only displays the center separator if both dates are known.<br />
|-<br />
| So here are some thing that could display<br />
{|<br />
|-<br />
| <pre>(b. 1970-4-8)</pre><br />
| <pre>(d. 2012-3-9)</pre><br />
| <pre>(b. 1970-4-8, d. 2012-3-9)</pre><br />
| or the line does not print at all.<br />
|}<br />
|-<br />
| We will not see things like:<br />
{|<br />
|-<br />
| <pre>()</pre><br />
| <pre>(, )</pre><br />
| <pre>(b.)</pre><br />
| <pre>(b., )</pre><br />
| <pre>(d.)</pre><br />
|-<br />
| <pre>(, d.)</pre><br />
| <pre>(b. 1970-4-8, )</pre><br />
| <pre>(b. 1970-4-8, d.)</pre><br />
| <pre>(, d. 2012-3-9)</pre><br />
| <pre>(b., d. 2012-3-9)</pre><br />
|}<br />
|}<br />
Back to [[Gramps_4.1_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
{{-}}<br />
<br />
{{man index|Gramps 4.1 Wiki Manual - Reports - part 1|Gramps_4.1_Wiki_Manual_-_Reports_-_part_3|4.1}}<br />
<br />
{{languages}}<br />
<br />
[[Category:Documentation]]<br />
[[Category:Plugins]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Gramps_4.2_Wiki_Manual_-_Reports_-_part_2&diff=50145Gramps 4.2 Wiki Manual - Reports - part 22014-08-10T18:17:08Z<p>Ander882: /* Formatting names */</p>
<hr />
<div>{{grampsmanualcopyright}}<br />
<br />
{{man index|Gramps 4.1 Wiki Manual - Reports - part 1|Gramps_4.1_Wiki_Manual_-_Reports_-_part_3|4.1}}<br />
<br />
{{languages|Gramps_4.1_Wiki_Manual_-_Reports - part 2}}<br />
<br />
{{#vardefine:chapter|11.2}}<br />
{{#vardefine:figure|0}}<br />
<br />
Back to [[Gramps_4.1_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
This section describes the substitution values that can be used in the different reports available in Gramps.<br />
<br />
= Substitution Values =<br />
<br />
Many of the graphical reports allow you to customize the information that is displayed on the reports. Variable substitution is the method that is used to substitute a particular symbol (key) for specific information about the person in the database.<br />
<br />
{|<br />
|-<br />
|Example: <br />
|Will show as: (the person is alive)<br />
|-<br />
|<pre>$n<br />
b. $b{ at $B}<br />
d. $d< at >$D</pre><br />
|<pre>Smith, Edwin Michael<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA<br />
d.</pre><br />
|}<br />
<br />
----<br />
{|<br />
|-<br />
|1<br />
|A list of all available variables (The Substitution Keys) follows. If you wish to display names, date, or place information differently, you may use [[#Format Strings|Format Strings]] to accomplish this.<br />
|-<br />
|2<br />
|There are also [[#Control Variables|Control Variables]] to display special characters (like the dollar sign).<br />
|-<br />
|3<br />
|You can also use [[#Grouping|Grouping]] to optionally display information. Line 2 above, uses grouping to display ' at ' only when the birth place is known.<br />
|-<br />
|4<br />
|Along with [[#Events|Events]] you can print almost anything.<br />
|-<br />
|5<br />
|Finally, [[#Separators|Separators]], to make your life complete. Line 3 above, uses this to display ' at ' only when both the birth date and place is known.<br />
|-<br />
|}<br />
<br />
<br />
== The Substitution Keys ==<br />
<br />
{|<br />
|-<br />
| colspan="2"|'''Personal variables'''<br />
| colspan="2"|'''Marital variables'''<br />
|-<br />
|$n<br />
|Displays the person's name<br />
|$s<br />
|Displays the name of the person's spouse<br />
|-<br />
|$i<br />
|Displays the GRAMPS ID for the person.<br />
|$j<br />
|Displays the GRAMPS ID for the marriage.<br />
|-<br />
|$b<br />
|Displays the person's date of birth <br />
|$m<br />
|Displays the marriage date of the person and the spouse.<br />
|-<br />
|$B<br />
|Displays the person's place of birth <br />
|$M<br />
|Displays the place of the marriage of the person and the spouse.<br />
|-<br />
|$d<br />
|Displays the person's date of death <br />
|$v<br />
|Displays the divorce date of the person and the spouse.<br />
|-<br />
|$D<br />
|Displays the person's place of death <br />
|$V<br />
|Displays the place of the divorce of the person and the spouse.<br />
|-<br />
|$a<br />
|Displays an attribute about the person.<br />
see [[#Attributes|Attributes]] for more<br />
|$u<br />
|Displays an attribute about the marriage.<br />
see [[#Attributes|Attributes]] for more<br />
|-<br />
|$e<br />
|Displays event information about the person.<br />
See [[#Events|Events]] for more<br />
|$t<br />
|Displays an event information about the marriage.<br />
See [[#Events|Events]] for more<br />
|}<br />
<br />
All of the Marital variables are defined by the person's preferred spouse in Gramps. If the person has never been married, then these variables will not display anything.<br />
<br />
<br />
==== Other Substitution Keys ====<br />
<br />
$T Displays Todays date.<br />
<br />
<br />
=== Default displayed formats ===<br />
<br />
{|<br />
|-<br />
|$n $s<br />
|Names will be displayed as set in 'Name format:' on the Display tab in Gramps preferences<br />
|-<br />
|$B $D $M $V<br />
|Places will display the Place title by default<br />
|-<br />
|$b $d $m $v $T<br />
|Dates will be displayed as set in 'Date format:' on the Display tab in Gramps preferences<br />
|-<br />
|$e $t<br />
|Events will display the description by default<br />
|}<br />
<br />
<br />
----<br />
=== Deprecated variables ===<br />
<br />
Some of the old variables were deprecated because [[#Format Strings|Format Strings]] have replaced them. So here is a list of those variables and how to achieve their results:<br />
<br />
{| {{prettytable}}<br />
|-<br />
!Old Variable<br />
!How to display it now<br />
!What is displayed<br />
|-<br />
|$f<br />
|$n<br />
|Name - as by Gramps name display under Preferences<br />
|-<br />
|$n<br />
|$n(g f)<br />
|Name - FirstName LastName<br />
|-<br />
|$N<br />
|$n(f, g)<br />
|Name - LastName, FirstName (note the explicit comma)<br />
|-<br />
|$nC<br />
|$n(g F)<br />
|Name - FirstName LastName in UPPER case<br />
|-<br />
|$NC<br />
|$n(F, g)<br />
|Name - LastName in UPPER case, FirstName<br />
|-<br />
|$by<br />
|$b(yyyy)<br />
|Date of birth, year only<br />
|-<br />
|$dy<br />
|$d(yyyy)<br />
|Date of death, year only<br />
|-<br />
|$my<br />
|$m(yyyy)<br />
|Date of preferred marriage, year only<br />
|-<br />
|$p<br />
|$s<br />
|Preferred spouse's name as by Gramps name display under Preferences<br />
|-<br />
|$s<br />
|$s(g f)<br />
|Preferred spouse's name - FirstName LastName<br />
|-<br />
|$S<br />
|$s(f, g)<br />
|Preferred spouse's name - LastName, FirstName<br />
|-<br />
|$sC<br />
|$s(g F)<br />
|Preferred spouse's name - FirstName LastName in UPPER case<br />
|-<br />
|$SC<br />
|$s(F, g)<br />
|Preferred spouse's name - LastName in UPPER case, FirstName<br />
|}<br />
<br />
== Format Strings ==<br />
<br />
Format strings are used to display names and dates differently than those assigned under Gramps Preferences. Here is the syntax for a format string:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''(format string)<br />
where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'nsijbmBMdvDVauet'<br />
<br />
A format string is any text, separators or format codes (defined below) to display information about the person.<br />
<br />
=== Formatting names ===<br />
<br />
The $n and $s variables will print the the preferred name within Gramps only. If you wish to print an alternate name, put the name within [] as followes:<br />
<pre>$n[Also Known As]<br />
$s[Married Name](L, f)</pre><br />
and then an addictional format strings.<br />
<br />
<br />
For names ($n $s) you may use the following formatting codes to display the name differently.<br />
<br />
{|<br />
|-<br />
|t<br />
|Title<br />
|<br />
|f<br />
|Given name<br />
|-<br />
|x<br />
|Common name. Call name if existing, otherwise first first name<br />
|<br />
|c<br />
|Call name<br />
|-<br />
|n<br />
|Nick name<br />
|<br />
|s<br />
|Suffix<br />
|-<br />
|l<br />
|Surname<br />
|<br />
|g<br />
|Family nickname<br />
|}<br />
<br />
These codes can be uppercased to uppercase the result.<br />
<br />
{|<br />
|-<br />
|Example code<br />
|Displays<br />
|-<br />
|<pre>$n(L, f) ($n(c)), $n(L, f){ ($n(c))}<br />
$s(f l s)</pre><br />
|<pre>SMITH, Edwin Michael (), SMITH, Edwin Michael<br />
Janice Ann Adams</pre><br />
|}<br />
<br />
<br />
<blockquote>Note:<br />
If you want to print a character 'c' within the format string (or any one of the other format codes), you will need to first add a '&#92;' in front of it. See [[#Control Variables|Control Variables]] for more.</blockquote><br />
<br />
<blockquote>Note:<br />
the curly brackets { } are used to hide information. Here it is used around ' ($n(c))' to not display ' ()' if the person does not have a call name. See [[#Grouping|Grouping]] for more.</blockquote><br />
<br />
----<br />
<br />
=== Formatting Dates ===<br />
<br />
For all of the date variables ($b $d $m $v) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|yyyy<br />
|The year as a four digit number<br />
|<br />
|yyy<br />
|The year, with a minimum of three digits<br />
|-<br />
|yy<br />
|The year, from 00 to 99<br />
|<br />
|y<br />
|The year, from 0 to 99<br />
|-<br />
|mmmm<BR><br />
MMMM<br />
|The full name of the month<BR><br />
The full name IN CAPS<br />
|<br />
|mmm<BR><br />
MMM<br />
|The abbreviated name of the month<BR><br />
The abbreviated name IN CAPS<br />
|-<br />
|mm<br />
|The month, from 00 to 12<br />
|<br />
|m<br />
|The month, from 0 to 12<br />
|-<br />
|dd<br />
|The day, from 00 to 31<br />
|<br />
|d<br />
|The day, from 0 to 31<br />
|-<br />
|o<br />
|The date type (modifier)<br />
|<br />
|<br />
|<br />
|}<br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$b(mmm-dd yy)<br />
$m(yyyy/mmm/d)<br />
$b(mmm-dd yy)</pre><br />
|<pre>May-24 61<br />
1995/May/27<br />
Jun-04 85</pre><br />
|}<br />
<br />
{{man note| For date types (modifier) |Only "Before", "After", and "About" are supported at this time. all others will not display anything.<BR><br />
And for date span and date ranges, only the starting (first) date is displayed.}}<br />
<br />
----<br />
<br />
=== Formatting Places ===<br />
<br />
For all of the place variables ($B $D $M $V) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|e<br />
|Street<br />
|<br />
|l<br />
|Locality<br />
|-<br />
|c<br />
|City<br />
|<br />
|u<br />
|County<br />
|-<br />
|s<br />
|State<br />
|<br />
|p<br />
|Postal Code<br />
|-<br />
|n<br />
|Country<br />
|<br />
|t<br />
|Title<br />
|-<br />
|x<br />
|Longitude<br />
|<br />
|y<br />
|Latitude<br />
|}<br />
These codes can be uppercased to uppercase the result. <br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
----<br />
<br />
=== Rules for format strings. ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Anything will print inside a format string<br />
|-<br />
|1a<br />
|you will have to use [[#Control Variables|Control Variables]] to display things like ')' and format codes<br />
|-<br />
|2<br />
|Separators can be within format strings.<br />
|-<br />
|3<br />
|At least ONE format code has to display something for the ENTIRE format string to display<br />
|}<br />
<br />
----<br />
<br />
=== Examples ===<br />
<br />
{|<br />
|-<br />
|code<br />
|gives<br />
|-<br />
|<pre>$n(f l)<br />
b. $b {at $B<br />
{d. $d $D</pre><br />
|<pre>Edwin Michael Smith<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA</pre>The person is still alive (or has no information present) so the line was removed.<br />
|}<br />
<br />
<br />
<br />
== Control Variables ==<br />
<br />
Control variables allow you to print characters that are special to Substitution values within a display.<br />
<br />
For example the dollar character '$' is used to note the start of a variable. If you wish to print a dollar character you would use a control character like '&#92;$'<br />
<br />
Control Variables<br />
<br />
{|<br />
|-<br />
|&#92;$<br />
|Displays a single '$'<br />
|<br />
|&#92;&#92;<br />
|Displays a single '&#92;'<br />
|-<br />
|&#92;(<br />
|Displays a single '('<br />
|<br />
|&#92;)<br />
|Displays a single ')'<br />
|-<br />
|&#92;{<br />
|Displays a single '{'<br />
|<br />
|&#92;}<br />
|Displays a single '}'<br />
|-<br />
|&#92;<<br />
|Displays a single '<'<br />
|<br />
|&#92;><br />
|Displays a single '>'<br />
|}<br />
<br />
Basically anything that comes after a '&#92;' will be printed.<br />
<br />
----<br />
Note:<br />
When you are inside a format string, you may need to use this to display a character that would normally be a format code. <br />
<br />
{|<br />
|-<br />
|Example:<br />
|would give<br />
|-<br />
|<pre>$b(m hi mom)<br />
$b(m hi \mo\m)</pre><br />
|<pre>5 hi 5o5<br />
5 hi mom</pre><br />
|}<br />
<br />
as this person was born on the fifth month.<br />
<br />
== Grouping ==<br />
<br />
There are instances where you do not want certain text to be displayed. Take the example:<br />
<br />
{|<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died on $d at $D</pre><br />
|<pre>died on 1975-06-26 at </pre> <br />
|<pre>died on at Reno, Washoe Co., NV</pre><br />
|-<br />
| colspan="3"|Neither of these are very acceptable.<br />
|-<br />
| colspan="3"|But with groups (denoted by {}), you can optionally print information if a variable within contains information.<br />
|-<br />
| colspan="3"|For example:<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died{ on $d}{ at $D}</pre><br />
|<pre>died on 1975-06-26</pre><br />
|<pre>died at Reno, Washoe Co., NV</pre><br />
|}<br />
<br />
which is what we want.<br />
<br />
----<br />
=== Rules for groups ===<br />
<br />
A group will only display if there is at least one variable that displays something. So if a group only has text and/or variables where the information is not known, the entire group will not print.<br />
<br />
Groups can also be nested. If this happens (like below), the outer group will only display if there is at least one variable that displays something within the outer group or any of the sub groups.<br />
<br />
Groups can also be used to remove an entire line from a display. A '{' at the start of a line will remove the entire line from the display if the above rule is true.<br />
<br />
If you do not wish to have the display code above (for death information) displayed (the person is alive, or you do not yet know the information), modify the code to look like<br />
<pre>{died{ on $d}{ at $D}</pre><br />
<br />
<blockquote>To have an entire line be blank instead of removing the line simply start the line with a space ' {' or make sure there is a space after the group (you will have to close the group first)</blockquote><br />
<br />
----<br />
<br />
=== Examples: ===<br />
<br />
This will hide '(' and ')' if the divorce information is not known (or still married).<br />
<br />
<pre>m. $m $M {- ($v(yyyy))</pre><br />
<br />
<br />
Only display some spouse information if married or remove the entire line if never married:<br />
<pre>{$s $m(yyyy) {- $v(\(yyyy\))}}</pre><br />
<br />
== Attributes ==<br />
<br />
Attributes do not have a format string. Instead the attribute name is placed inside []. Here is the syntax for an attribute:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name] where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'au'<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$a[Profession]<br />
$a[Social Security Number]<br />
$a[Total \$ bequeathed]</pre><br />
|<pre>Programmer<br />
7A3-29-F1C6<br />
3.00USD</pre><br />
|}<br />
<br />
<br />
----<br />
== Events ==<br />
<br />
Events have the same starting structure as attributes, $e or $t and the event name in [] but events have an extra format string after the name to display the description, date, place, id, and attributes associated with it. Each of these items can be displayed with a , a 'n', 'd', 'D', 'i', and 'a' respectively in the format string. Here is the syntax for an event:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name](format string) where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'et'<br />
<br />
=== Event format strings ===<br />
<br />
The Event format string is used to display information about the event. Here are the format codes to display parts of the event:<br />
<br />
{|<br />
|-<br />
|n<br />
|Description<br />
|<br />
|i<br />
|Event ID<br />
|-<br />
|d<br />
|Event Date&#42;<br />
|<br />
|D<br />
|Event Place&#42;<br />
|-<br />
|a<br />
|An attributes for the event&#42;&#42;<br />
|<br />
|<br />
|<br />
|}<br />
<br />
&#42;These variables can themselves have format strings. Date and a place can be formatted with format string as defined in [[#Format strings|Format strings]].<br />
<br />
&#42;&#42;Attribute needs to have the attribute name in [] and are formatted as above.<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$e[First Communion](d(yyyy-mm-d))<br />
$e[Bar Mitzvah](n&lt; at &gt; D)<br />
$e[Birth](d(yyyy mm/dd) D)</pre><br />
|<pre>2009-11-6<br />
Jerry's Bar Mitzah at Opas house<br />
2007 05/23 Grandmothers house</pre><br />
|}<br />
<br />
<br />
And:<br />
<br />
{|<br />
|-<br />
|<pre>$b(yyyy-Mmm-dd)<br />
$M</pre><br />
|is the same as<br />
|<pre>$e[Birth](d(yyyy-Mmm-dd))<br />
$t[Marriage](D)</pre><br />
|}<br />
<br />
<br />
----<br />
<br />
=== Notes for attributes and events: ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Attribute and event names are mandatory. '$a' or '$a[]' will not display anything.<br />
|-<br />
|2<br />
|Attributes and event names may have special characters within them. Most notably ']' and ')'. If this is the case, you will need to use [[#Control Variables|Control Variables]]<br />
|}<br />
<br />
== Separators ==<br />
<br />
Separators are special 'text only' groups inside '&lt;' and '&gt;' that conditionally display a separator (like ', ' or ' - ') between two groups, variables, format codes or text.<br />
<br />
Separators are displayed conditionally depending on these rules:<br />
<br />
# A variable that does '''not''' display anything will remove itself and a separator that is to the left of it from the display line only.<br />
# If there is not a separator to the left, the same variable will remove itself and a separator that is to the right of it from the displayed line. <br />
# If there are two separators together, the left one will be removed from the display line and the right is kept.<br />
# Separators at the start or end of the display line (or format strings) are removed<br />
<br />
=== Example: ===<br />
{|<br />
|-<br />
|<pre>$s(f l s)&lt;, &gt;$m(yyyy)&lt; @ &gt;$M&lt; - &gt;$v(&#92;(yyyy&#92;))</pre><br />
|}<br />
<br />
Here are some things that may happen:<br />
<br />
{|<br />
|-<br />
|If '''none''' of the variables are known<br />
|None of the separators will display<br />
|-<br />
|If only one variable '''is''' known<br />
|Only that variable will print. No separators will print.<br />
|-<br />
|If only the spouse's name '''is not''' known<br />
|The first separator will not display<br />
|-<br />
|If only the marriage date '''is not''' known<br />
|The first separator does not display. We will be left with:<br />
Jane Doe&lt; - &gt;{ … }And only the divorce date needs to be known to print the second separator.<br />
|-<br />
|If only the divorce date '''is not''' known<br />
|the second separator will not display<br />
|}<br />
<br />
<br />
Separators can be inside format strings:<br />
<br />
$n(&lt;0&gt;T&lt; &gt;L&lt;, &gt;f&lt; &gt;s)<br />
<br />
Unlike groups, separators can not cross over/out of format strings. So the separator &lt;0&gt; will NEVER display. No matter what is on the left hand side of the variable.<br />
<br />
----<br />
<br />
Here is a useful example:<br />
{|<br />
|-<br />
|<pre>{({b. $b}<, >{d. $d})}</pre><br />
|}<br />
<br />
This will:<br />
{|<br />
|-<br />
| Only print the outside () if either the birth or death date displays<br />
|-<br />
| Only displays the center separator if both dates are known.<br />
|-<br />
| So here are some thing that could display<br />
{|<br />
|-<br />
| <pre>(b. 1970-4-8)</pre><br />
| <pre>(d. 2012-3-9)</pre><br />
| <pre>(b. 1970-4-8, d. 2012-3-9)</pre><br />
| or the line does not print at all.<br />
|}<br />
|-<br />
| We will not see things like:<br />
{|<br />
|-<br />
| <pre>()</pre><br />
| <pre>(, )</pre><br />
| <pre>(b.)</pre><br />
| <pre>(b., )</pre><br />
| <pre>(d.)</pre><br />
|-<br />
| <pre>(, d.)</pre><br />
| <pre>(b. 1970-4-8, )</pre><br />
| <pre>(b. 1970-4-8, d.)</pre><br />
| <pre>(, d. 2012-3-9)</pre><br />
| <pre>(b., d. 2012-3-9)</pre><br />
|}<br />
|}<br />
Back to [[Gramps_4.1_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
{{-}}<br />
<br />
{{man index|Gramps 4.1 Wiki Manual - Reports - part 1|Gramps_4.1_Wiki_Manual_-_Reports_-_part_3|4.1}}<br />
<br />
{{languages}}<br />
<br />
[[Category:Documentation]]<br />
[[Category:Plugins]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Gramps_4.2_Wiki_Manual_-_Reports_-_part_2&diff=50144Gramps 4.2 Wiki Manual - Reports - part 22014-08-10T18:15:12Z<p>Ander882: /* Formatting names */</p>
<hr />
<div>{{grampsmanualcopyright}}<br />
<br />
{{man index|Gramps 4.1 Wiki Manual - Reports - part 1|Gramps_4.1_Wiki_Manual_-_Reports_-_part_3|4.1}}<br />
<br />
{{languages|Gramps_4.1_Wiki_Manual_-_Reports - part 2}}<br />
<br />
{{#vardefine:chapter|11.2}}<br />
{{#vardefine:figure|0}}<br />
<br />
Back to [[Gramps_4.1_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
This section describes the substitution values that can be used in the different reports available in Gramps.<br />
<br />
= Substitution Values =<br />
<br />
Many of the graphical reports allow you to customize the information that is displayed on the reports. Variable substitution is the method that is used to substitute a particular symbol (key) for specific information about the person in the database.<br />
<br />
{|<br />
|-<br />
|Example: <br />
|Will show as: (the person is alive)<br />
|-<br />
|<pre>$n<br />
b. $b{ at $B}<br />
d. $d< at >$D</pre><br />
|<pre>Smith, Edwin Michael<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA<br />
d.</pre><br />
|}<br />
<br />
----<br />
{|<br />
|-<br />
|1<br />
|A list of all available variables (The Substitution Keys) follows. If you wish to display names, date, or place information differently, you may use [[#Format Strings|Format Strings]] to accomplish this.<br />
|-<br />
|2<br />
|There are also [[#Control Variables|Control Variables]] to display special characters (like the dollar sign).<br />
|-<br />
|3<br />
|You can also use [[#Grouping|Grouping]] to optionally display information. Line 2 above, uses grouping to display ' at ' only when the birth place is known.<br />
|-<br />
|4<br />
|Along with [[#Events|Events]] you can print almost anything.<br />
|-<br />
|5<br />
|Finally, [[#Separators|Separators]], to make your life complete. Line 3 above, uses this to display ' at ' only when both the birth date and place is known.<br />
|-<br />
|}<br />
<br />
<br />
== The Substitution Keys ==<br />
<br />
{|<br />
|-<br />
| colspan="2"|'''Personal variables'''<br />
| colspan="2"|'''Marital variables'''<br />
|-<br />
|$n<br />
|Displays the person's name<br />
|$s<br />
|Displays the name of the person's spouse<br />
|-<br />
|$i<br />
|Displays the GRAMPS ID for the person.<br />
|$j<br />
|Displays the GRAMPS ID for the marriage.<br />
|-<br />
|$b<br />
|Displays the person's date of birth <br />
|$m<br />
|Displays the marriage date of the person and the spouse.<br />
|-<br />
|$B<br />
|Displays the person's place of birth <br />
|$M<br />
|Displays the place of the marriage of the person and the spouse.<br />
|-<br />
|$d<br />
|Displays the person's date of death <br />
|$v<br />
|Displays the divorce date of the person and the spouse.<br />
|-<br />
|$D<br />
|Displays the person's place of death <br />
|$V<br />
|Displays the place of the divorce of the person and the spouse.<br />
|-<br />
|$a<br />
|Displays an attribute about the person.<br />
see [[#Attributes|Attributes]] for more<br />
|$u<br />
|Displays an attribute about the marriage.<br />
see [[#Attributes|Attributes]] for more<br />
|-<br />
|$e<br />
|Displays event information about the person.<br />
See [[#Events|Events]] for more<br />
|$t<br />
|Displays an event information about the marriage.<br />
See [[#Events|Events]] for more<br />
|}<br />
<br />
All of the Marital variables are defined by the person's preferred spouse in Gramps. If the person has never been married, then these variables will not display anything.<br />
<br />
<br />
==== Other Substitution Keys ====<br />
<br />
$T Displays Todays date.<br />
<br />
<br />
=== Default displayed formats ===<br />
<br />
{|<br />
|-<br />
|$n $s<br />
|Names will be displayed as set in 'Name format:' on the Display tab in Gramps preferences<br />
|-<br />
|$B $D $M $V<br />
|Places will display the Place title by default<br />
|-<br />
|$b $d $m $v $T<br />
|Dates will be displayed as set in 'Date format:' on the Display tab in Gramps preferences<br />
|-<br />
|$e $t<br />
|Events will display the description by default<br />
|}<br />
<br />
<br />
----<br />
=== Deprecated variables ===<br />
<br />
Some of the old variables were deprecated because [[#Format Strings|Format Strings]] have replaced them. So here is a list of those variables and how to achieve their results:<br />
<br />
{| {{prettytable}}<br />
|-<br />
!Old Variable<br />
!How to display it now<br />
!What is displayed<br />
|-<br />
|$f<br />
|$n<br />
|Name - as by Gramps name display under Preferences<br />
|-<br />
|$n<br />
|$n(g f)<br />
|Name - FirstName LastName<br />
|-<br />
|$N<br />
|$n(f, g)<br />
|Name - LastName, FirstName (note the explicit comma)<br />
|-<br />
|$nC<br />
|$n(g F)<br />
|Name - FirstName LastName in UPPER case<br />
|-<br />
|$NC<br />
|$n(F, g)<br />
|Name - LastName in UPPER case, FirstName<br />
|-<br />
|$by<br />
|$b(yyyy)<br />
|Date of birth, year only<br />
|-<br />
|$dy<br />
|$d(yyyy)<br />
|Date of death, year only<br />
|-<br />
|$my<br />
|$m(yyyy)<br />
|Date of preferred marriage, year only<br />
|-<br />
|$p<br />
|$s<br />
|Preferred spouse's name as by Gramps name display under Preferences<br />
|-<br />
|$s<br />
|$s(g f)<br />
|Preferred spouse's name - FirstName LastName<br />
|-<br />
|$S<br />
|$s(f, g)<br />
|Preferred spouse's name - LastName, FirstName<br />
|-<br />
|$sC<br />
|$s(g F)<br />
|Preferred spouse's name - FirstName LastName in UPPER case<br />
|-<br />
|$SC<br />
|$s(F, g)<br />
|Preferred spouse's name - LastName in UPPER case, FirstName<br />
|}<br />
<br />
== Format Strings ==<br />
<br />
Format strings are used to display names and dates differently than those assigned under Gramps Preferences. Here is the syntax for a format string:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''(format string)<br />
where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'nsijbmBMdvDVauet'<br />
<br />
A format string is any text, separators or format codes (defined below) to display information about the person.<br />
<br />
=== Formatting names ===<br />
<br />
The $n and $s variables will print the the preferred name within Gramps only. If you wish to print an alternate name, put the name within [] as followes:<br />
$n[Also Known As]<br />
$s[Married Name](L, f)<br />
and then an addictional format strings.<br />
<br />
<br />
For names ($n $s) you may use the following formatting codes to display the name differently.<br />
<br />
{|<br />
|-<br />
|t<br />
|Title<br />
|<br />
|f<br />
|Given name<br />
|-<br />
|x<br />
|Common name. Call name if existing, otherwise first first name<br />
|<br />
|c<br />
|Call name<br />
|-<br />
|n<br />
|Nick name<br />
|<br />
|s<br />
|Suffix<br />
|-<br />
|l<br />
|Surname<br />
|<br />
|g<br />
|Family nickname<br />
|}<br />
<br />
These codes can be uppercased to uppercase the result.<br />
<br />
{|<br />
|-<br />
|Example code<br />
|Displays<br />
|-<br />
|<pre>$n(L, f) ($n(c)), $n(L, f){ ($n(c))}<br />
$s(f l s)</pre><br />
|<pre>SMITH, Edwin Michael (), SMITH, Edwin Michael<br />
Janice Ann Adams</pre><br />
|}<br />
<br />
<br />
<blockquote>Note:<br />
If you want to print a character 'c' within the format string (or any one of the other format codes), you will need to first add a '&#92;' in front of it. See [[#Control Variables|Control Variables]] for more.</blockquote><br />
<br />
<blockquote>Note:<br />
the curly brackets { } are used to hide information. Here it is used around ' ($n(c))' to not display ' ()' if the person does not have a call name. See [[#Grouping|Grouping]] for more.</blockquote><br />
<br />
----<br />
<br />
=== Formatting Dates ===<br />
<br />
For all of the date variables ($b $d $m $v) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|yyyy<br />
|The year as a four digit number<br />
|<br />
|yyy<br />
|The year, with a minimum of three digits<br />
|-<br />
|yy<br />
|The year, from 00 to 99<br />
|<br />
|y<br />
|The year, from 0 to 99<br />
|-<br />
|mmmm<BR><br />
MMMM<br />
|The full name of the month<BR><br />
The full name IN CAPS<br />
|<br />
|mmm<BR><br />
MMM<br />
|The abbreviated name of the month<BR><br />
The abbreviated name IN CAPS<br />
|-<br />
|mm<br />
|The month, from 00 to 12<br />
|<br />
|m<br />
|The month, from 0 to 12<br />
|-<br />
|dd<br />
|The day, from 00 to 31<br />
|<br />
|d<br />
|The day, from 0 to 31<br />
|-<br />
|o<br />
|The date type (modifier)<br />
|<br />
|<br />
|<br />
|}<br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$b(mmm-dd yy)<br />
$m(yyyy/mmm/d)<br />
$b(mmm-dd yy)</pre><br />
|<pre>May-24 61<br />
1995/May/27<br />
Jun-04 85</pre><br />
|}<br />
<br />
{{man note| For date types (modifier) |Only "Before", "After", and "About" are supported at this time. all others will not display anything.<BR><br />
And for date span and date ranges, only the starting (first) date is displayed.}}<br />
<br />
----<br />
<br />
=== Formatting Places ===<br />
<br />
For all of the place variables ($B $D $M $V) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|e<br />
|Street<br />
|<br />
|l<br />
|Locality<br />
|-<br />
|c<br />
|City<br />
|<br />
|u<br />
|County<br />
|-<br />
|s<br />
|State<br />
|<br />
|p<br />
|Postal Code<br />
|-<br />
|n<br />
|Country<br />
|<br />
|t<br />
|Title<br />
|-<br />
|x<br />
|Longitude<br />
|<br />
|y<br />
|Latitude<br />
|}<br />
These codes can be uppercased to uppercase the result. <br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
----<br />
<br />
=== Rules for format strings. ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Anything will print inside a format string<br />
|-<br />
|1a<br />
|you will have to use [[#Control Variables|Control Variables]] to display things like ')' and format codes<br />
|-<br />
|2<br />
|Separators can be within format strings.<br />
|-<br />
|3<br />
|At least ONE format code has to display something for the ENTIRE format string to display<br />
|}<br />
<br />
----<br />
<br />
=== Examples ===<br />
<br />
{|<br />
|-<br />
|code<br />
|gives<br />
|-<br />
|<pre>$n(f l)<br />
b. $b {at $B<br />
{d. $d $D</pre><br />
|<pre>Edwin Michael Smith<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA</pre>The person is still alive (or has no information present) so the line was removed.<br />
|}<br />
<br />
<br />
<br />
== Control Variables ==<br />
<br />
Control variables allow you to print characters that are special to Substitution values within a display.<br />
<br />
For example the dollar character '$' is used to note the start of a variable. If you wish to print a dollar character you would use a control character like '&#92;$'<br />
<br />
Control Variables<br />
<br />
{|<br />
|-<br />
|&#92;$<br />
|Displays a single '$'<br />
|<br />
|&#92;&#92;<br />
|Displays a single '&#92;'<br />
|-<br />
|&#92;(<br />
|Displays a single '('<br />
|<br />
|&#92;)<br />
|Displays a single ')'<br />
|-<br />
|&#92;{<br />
|Displays a single '{'<br />
|<br />
|&#92;}<br />
|Displays a single '}'<br />
|-<br />
|&#92;<<br />
|Displays a single '<'<br />
|<br />
|&#92;><br />
|Displays a single '>'<br />
|}<br />
<br />
Basically anything that comes after a '&#92;' will be printed.<br />
<br />
----<br />
Note:<br />
When you are inside a format string, you may need to use this to display a character that would normally be a format code. <br />
<br />
{|<br />
|-<br />
|Example:<br />
|would give<br />
|-<br />
|<pre>$b(m hi mom)<br />
$b(m hi \mo\m)</pre><br />
|<pre>5 hi 5o5<br />
5 hi mom</pre><br />
|}<br />
<br />
as this person was born on the fifth month.<br />
<br />
== Grouping ==<br />
<br />
There are instances where you do not want certain text to be displayed. Take the example:<br />
<br />
{|<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died on $d at $D</pre><br />
|<pre>died on 1975-06-26 at </pre> <br />
|<pre>died on at Reno, Washoe Co., NV</pre><br />
|-<br />
| colspan="3"|Neither of these are very acceptable.<br />
|-<br />
| colspan="3"|But with groups (denoted by {}), you can optionally print information if a variable within contains information.<br />
|-<br />
| colspan="3"|For example:<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died{ on $d}{ at $D}</pre><br />
|<pre>died on 1975-06-26</pre><br />
|<pre>died at Reno, Washoe Co., NV</pre><br />
|}<br />
<br />
which is what we want.<br />
<br />
----<br />
=== Rules for groups ===<br />
<br />
A group will only display if there is at least one variable that displays something. So if a group only has text and/or variables where the information is not known, the entire group will not print.<br />
<br />
Groups can also be nested. If this happens (like below), the outer group will only display if there is at least one variable that displays something within the outer group or any of the sub groups.<br />
<br />
Groups can also be used to remove an entire line from a display. A '{' at the start of a line will remove the entire line from the display if the above rule is true.<br />
<br />
If you do not wish to have the display code above (for death information) displayed (the person is alive, or you do not yet know the information), modify the code to look like<br />
<pre>{died{ on $d}{ at $D}</pre><br />
<br />
<blockquote>To have an entire line be blank instead of removing the line simply start the line with a space ' {' or make sure there is a space after the group (you will have to close the group first)</blockquote><br />
<br />
----<br />
<br />
=== Examples: ===<br />
<br />
This will hide '(' and ')' if the divorce information is not known (or still married).<br />
<br />
<pre>m. $m $M {- ($v(yyyy))</pre><br />
<br />
<br />
Only display some spouse information if married or remove the entire line if never married:<br />
<pre>{$s $m(yyyy) {- $v(\(yyyy\))}}</pre><br />
<br />
== Attributes ==<br />
<br />
Attributes do not have a format string. Instead the attribute name is placed inside []. Here is the syntax for an attribute:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name] where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'au'<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$a[Profession]<br />
$a[Social Security Number]<br />
$a[Total \$ bequeathed]</pre><br />
|<pre>Programmer<br />
7A3-29-F1C6<br />
3.00USD</pre><br />
|}<br />
<br />
<br />
----<br />
== Events ==<br />
<br />
Events have the same starting structure as attributes, $e or $t and the event name in [] but events have an extra format string after the name to display the description, date, place, id, and attributes associated with it. Each of these items can be displayed with a , a 'n', 'd', 'D', 'i', and 'a' respectively in the format string. Here is the syntax for an event:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name](format string) where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'et'<br />
<br />
=== Event format strings ===<br />
<br />
The Event format string is used to display information about the event. Here are the format codes to display parts of the event:<br />
<br />
{|<br />
|-<br />
|n<br />
|Description<br />
|<br />
|i<br />
|Event ID<br />
|-<br />
|d<br />
|Event Date&#42;<br />
|<br />
|D<br />
|Event Place&#42;<br />
|-<br />
|a<br />
|An attributes for the event&#42;&#42;<br />
|<br />
|<br />
|<br />
|}<br />
<br />
&#42;These variables can themselves have format strings. Date and a place can be formatted with format string as defined in [[#Format strings|Format strings]].<br />
<br />
&#42;&#42;Attribute needs to have the attribute name in [] and are formatted as above.<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$e[First Communion](d(yyyy-mm-d))<br />
$e[Bar Mitzvah](n&lt; at &gt; D)<br />
$e[Birth](d(yyyy mm/dd) D)</pre><br />
|<pre>2009-11-6<br />
Jerry's Bar Mitzah at Opas house<br />
2007 05/23 Grandmothers house</pre><br />
|}<br />
<br />
<br />
And:<br />
<br />
{|<br />
|-<br />
|<pre>$b(yyyy-Mmm-dd)<br />
$M</pre><br />
|is the same as<br />
|<pre>$e[Birth](d(yyyy-Mmm-dd))<br />
$t[Marriage](D)</pre><br />
|}<br />
<br />
<br />
----<br />
<br />
=== Notes for attributes and events: ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Attribute and event names are mandatory. '$a' or '$a[]' will not display anything.<br />
|-<br />
|2<br />
|Attributes and event names may have special characters within them. Most notably ']' and ')'. If this is the case, you will need to use [[#Control Variables|Control Variables]]<br />
|}<br />
<br />
== Separators ==<br />
<br />
Separators are special 'text only' groups inside '&lt;' and '&gt;' that conditionally display a separator (like ', ' or ' - ') between two groups, variables, format codes or text.<br />
<br />
Separators are displayed conditionally depending on these rules:<br />
<br />
# A variable that does '''not''' display anything will remove itself and a separator that is to the left of it from the display line only.<br />
# If there is not a separator to the left, the same variable will remove itself and a separator that is to the right of it from the displayed line. <br />
# If there are two separators together, the left one will be removed from the display line and the right is kept.<br />
# Separators at the start or end of the display line (or format strings) are removed<br />
<br />
=== Example: ===<br />
{|<br />
|-<br />
|<pre>$s(f l s)&lt;, &gt;$m(yyyy)&lt; @ &gt;$M&lt; - &gt;$v(&#92;(yyyy&#92;))</pre><br />
|}<br />
<br />
Here are some things that may happen:<br />
<br />
{|<br />
|-<br />
|If '''none''' of the variables are known<br />
|None of the separators will display<br />
|-<br />
|If only one variable '''is''' known<br />
|Only that variable will print. No separators will print.<br />
|-<br />
|If only the spouse's name '''is not''' known<br />
|The first separator will not display<br />
|-<br />
|If only the marriage date '''is not''' known<br />
|The first separator does not display. We will be left with:<br />
Jane Doe&lt; - &gt;{ … }And only the divorce date needs to be known to print the second separator.<br />
|-<br />
|If only the divorce date '''is not''' known<br />
|the second separator will not display<br />
|}<br />
<br />
<br />
Separators can be inside format strings:<br />
<br />
$n(&lt;0&gt;T&lt; &gt;L&lt;, &gt;f&lt; &gt;s)<br />
<br />
Unlike groups, separators can not cross over/out of format strings. So the separator &lt;0&gt; will NEVER display. No matter what is on the left hand side of the variable.<br />
<br />
----<br />
<br />
Here is a useful example:<br />
{|<br />
|-<br />
|<pre>{({b. $b}<, >{d. $d})}</pre><br />
|}<br />
<br />
This will:<br />
{|<br />
|-<br />
| Only print the outside () if either the birth or death date displays<br />
|-<br />
| Only displays the center separator if both dates are known.<br />
|-<br />
| So here are some thing that could display<br />
{|<br />
|-<br />
| <pre>(b. 1970-4-8)</pre><br />
| <pre>(d. 2012-3-9)</pre><br />
| <pre>(b. 1970-4-8, d. 2012-3-9)</pre><br />
| or the line does not print at all.<br />
|}<br />
|-<br />
| We will not see things like:<br />
{|<br />
|-<br />
| <pre>()</pre><br />
| <pre>(, )</pre><br />
| <pre>(b.)</pre><br />
| <pre>(b., )</pre><br />
| <pre>(d.)</pre><br />
|-<br />
| <pre>(, d.)</pre><br />
| <pre>(b. 1970-4-8, )</pre><br />
| <pre>(b. 1970-4-8, d.)</pre><br />
| <pre>(, d. 2012-3-9)</pre><br />
| <pre>(b., d. 2012-3-9)</pre><br />
|}<br />
|}<br />
Back to [[Gramps_4.1_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
{{-}}<br />
<br />
{{man index|Gramps 4.1 Wiki Manual - Reports - part 1|Gramps_4.1_Wiki_Manual_-_Reports_-_part_3|4.1}}<br />
<br />
{{languages}}<br />
<br />
[[Category:Documentation]]<br />
[[Category:Plugins]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Gramps_4.2_Wiki_Manual_-_Reports_-_part_2&diff=50143Gramps 4.2 Wiki Manual - Reports - part 22014-08-10T18:08:42Z<p>Ander882: new 4.2 version</p>
<hr />
<div>{{grampsmanualcopyright}}<br />
<br />
{{man index|Gramps 4.1 Wiki Manual - Reports - part 1|Gramps_4.1_Wiki_Manual_-_Reports_-_part_3|4.1}}<br />
<br />
{{languages|Gramps_4.1_Wiki_Manual_-_Reports - part 2}}<br />
<br />
{{#vardefine:chapter|11.2}}<br />
{{#vardefine:figure|0}}<br />
<br />
Back to [[Gramps_4.1_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
This section describes the substitution values that can be used in the different reports available in Gramps.<br />
<br />
= Substitution Values =<br />
<br />
Many of the graphical reports allow you to customize the information that is displayed on the reports. Variable substitution is the method that is used to substitute a particular symbol (key) for specific information about the person in the database.<br />
<br />
{|<br />
|-<br />
|Example: <br />
|Will show as: (the person is alive)<br />
|-<br />
|<pre>$n<br />
b. $b{ at $B}<br />
d. $d< at >$D</pre><br />
|<pre>Smith, Edwin Michael<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA<br />
d.</pre><br />
|}<br />
<br />
----<br />
{|<br />
|-<br />
|1<br />
|A list of all available variables (The Substitution Keys) follows. If you wish to display names, date, or place information differently, you may use [[#Format Strings|Format Strings]] to accomplish this.<br />
|-<br />
|2<br />
|There are also [[#Control Variables|Control Variables]] to display special characters (like the dollar sign).<br />
|-<br />
|3<br />
|You can also use [[#Grouping|Grouping]] to optionally display information. Line 2 above, uses grouping to display ' at ' only when the birth place is known.<br />
|-<br />
|4<br />
|Along with [[#Events|Events]] you can print almost anything.<br />
|-<br />
|5<br />
|Finally, [[#Separators|Separators]], to make your life complete. Line 3 above, uses this to display ' at ' only when both the birth date and place is known.<br />
|-<br />
|}<br />
<br />
<br />
== The Substitution Keys ==<br />
<br />
{|<br />
|-<br />
| colspan="2"|'''Personal variables'''<br />
| colspan="2"|'''Marital variables'''<br />
|-<br />
|$n<br />
|Displays the person's name<br />
|$s<br />
|Displays the name of the person's spouse<br />
|-<br />
|$i<br />
|Displays the GRAMPS ID for the person.<br />
|$j<br />
|Displays the GRAMPS ID for the marriage.<br />
|-<br />
|$b<br />
|Displays the person's date of birth <br />
|$m<br />
|Displays the marriage date of the person and the spouse.<br />
|-<br />
|$B<br />
|Displays the person's place of birth <br />
|$M<br />
|Displays the place of the marriage of the person and the spouse.<br />
|-<br />
|$d<br />
|Displays the person's date of death <br />
|$v<br />
|Displays the divorce date of the person and the spouse.<br />
|-<br />
|$D<br />
|Displays the person's place of death <br />
|$V<br />
|Displays the place of the divorce of the person and the spouse.<br />
|-<br />
|$a<br />
|Displays an attribute about the person.<br />
see [[#Attributes|Attributes]] for more<br />
|$u<br />
|Displays an attribute about the marriage.<br />
see [[#Attributes|Attributes]] for more<br />
|-<br />
|$e<br />
|Displays event information about the person.<br />
See [[#Events|Events]] for more<br />
|$t<br />
|Displays an event information about the marriage.<br />
See [[#Events|Events]] for more<br />
|}<br />
<br />
All of the Marital variables are defined by the person's preferred spouse in Gramps. If the person has never been married, then these variables will not display anything.<br />
<br />
<br />
==== Other Substitution Keys ====<br />
<br />
$T Displays Todays date.<br />
<br />
<br />
=== Default displayed formats ===<br />
<br />
{|<br />
|-<br />
|$n $s<br />
|Names will be displayed as set in 'Name format:' on the Display tab in Gramps preferences<br />
|-<br />
|$B $D $M $V<br />
|Places will display the Place title by default<br />
|-<br />
|$b $d $m $v $T<br />
|Dates will be displayed as set in 'Date format:' on the Display tab in Gramps preferences<br />
|-<br />
|$e $t<br />
|Events will display the description by default<br />
|}<br />
<br />
<br />
----<br />
=== Deprecated variables ===<br />
<br />
Some of the old variables were deprecated because [[#Format Strings|Format Strings]] have replaced them. So here is a list of those variables and how to achieve their results:<br />
<br />
{| {{prettytable}}<br />
|-<br />
!Old Variable<br />
!How to display it now<br />
!What is displayed<br />
|-<br />
|$f<br />
|$n<br />
|Name - as by Gramps name display under Preferences<br />
|-<br />
|$n<br />
|$n(g f)<br />
|Name - FirstName LastName<br />
|-<br />
|$N<br />
|$n(f, g)<br />
|Name - LastName, FirstName (note the explicit comma)<br />
|-<br />
|$nC<br />
|$n(g F)<br />
|Name - FirstName LastName in UPPER case<br />
|-<br />
|$NC<br />
|$n(F, g)<br />
|Name - LastName in UPPER case, FirstName<br />
|-<br />
|$by<br />
|$b(yyyy)<br />
|Date of birth, year only<br />
|-<br />
|$dy<br />
|$d(yyyy)<br />
|Date of death, year only<br />
|-<br />
|$my<br />
|$m(yyyy)<br />
|Date of preferred marriage, year only<br />
|-<br />
|$p<br />
|$s<br />
|Preferred spouse's name as by Gramps name display under Preferences<br />
|-<br />
|$s<br />
|$s(g f)<br />
|Preferred spouse's name - FirstName LastName<br />
|-<br />
|$S<br />
|$s(f, g)<br />
|Preferred spouse's name - LastName, FirstName<br />
|-<br />
|$sC<br />
|$s(g F)<br />
|Preferred spouse's name - FirstName LastName in UPPER case<br />
|-<br />
|$SC<br />
|$s(F, g)<br />
|Preferred spouse's name - LastName in UPPER case, FirstName<br />
|}<br />
<br />
== Format Strings ==<br />
<br />
Format strings are used to display names and dates differently than those assigned under Gramps Preferences. Here is the syntax for a format string:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''(format string)<br />
where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'nsijbmBMdvDVauet'<br />
<br />
A format string is any text, separators or format codes (defined below) to display information about the person.<br />
<br />
=== Formatting names ===<br />
<br />
For names ($n $s) you may use the following formatting codes to display the name differently.<br />
<br />
{|<br />
|-<br />
|t<br />
|Title<br />
|<br />
|f<br />
|Given name<br />
|-<br />
|x<br />
|Common name. Call name if existing, otherwise first first name<br />
|<br />
|c<br />
|Call name<br />
|-<br />
|n<br />
|Nick name<br />
|<br />
|s<br />
|Suffix<br />
|-<br />
|l<br />
|Surname<br />
|<br />
|g<br />
|Family nickname<br />
|}<br />
<br />
These codes can be uppercased to uppercase the result.<br />
<br />
{|<br />
|-<br />
|Example code<br />
|Displays<br />
|-<br />
|<pre>$n(L, f) ($n(c)), $n(L, f){ ($n(c))}<br />
$s(f l s)</pre><br />
|<pre>SMITH, Edwin Michael (), SMITH, Edwin Michael<br />
Janice Ann Adams</pre><br />
|}<br />
<br />
<br />
<blockquote>Note:<br />
If you want to print a character 'c' within the format string (or any one of the other format codes), you will need to first add a '&#92;' in front of it. See [[#Control Variables|Control Variables]] for more.</blockquote><br />
<br />
<blockquote>Note:<br />
the curly brackets { } are used to hide information. Here it is used around ' ($n(c))' to not display ' ()' if the person does not have a call name. See [[#Grouping|Grouping]] for more.</blockquote><br />
<br />
----<br />
<br />
=== Formatting Dates ===<br />
<br />
For all of the date variables ($b $d $m $v) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|yyyy<br />
|The year as a four digit number<br />
|<br />
|yyy<br />
|The year, with a minimum of three digits<br />
|-<br />
|yy<br />
|The year, from 00 to 99<br />
|<br />
|y<br />
|The year, from 0 to 99<br />
|-<br />
|mmmm<BR><br />
MMMM<br />
|The full name of the month<BR><br />
The full name IN CAPS<br />
|<br />
|mmm<BR><br />
MMM<br />
|The abbreviated name of the month<BR><br />
The abbreviated name IN CAPS<br />
|-<br />
|mm<br />
|The month, from 00 to 12<br />
|<br />
|m<br />
|The month, from 0 to 12<br />
|-<br />
|dd<br />
|The day, from 00 to 31<br />
|<br />
|d<br />
|The day, from 0 to 31<br />
|-<br />
|o<br />
|The date type (modifier)<br />
|<br />
|<br />
|<br />
|}<br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$b(mmm-dd yy)<br />
$m(yyyy/mmm/d)<br />
$b(mmm-dd yy)</pre><br />
|<pre>May-24 61<br />
1995/May/27<br />
Jun-04 85</pre><br />
|}<br />
<br />
{{man note| For date types (modifier) |Only "Before", "After", and "About" are supported at this time. all others will not display anything.<BR><br />
And for date span and date ranges, only the starting (first) date is displayed.}}<br />
<br />
----<br />
<br />
=== Formatting Places ===<br />
<br />
For all of the place variables ($B $D $M $V) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|e<br />
|Street<br />
|<br />
|l<br />
|Locality<br />
|-<br />
|c<br />
|City<br />
|<br />
|u<br />
|County<br />
|-<br />
|s<br />
|State<br />
|<br />
|p<br />
|Postal Code<br />
|-<br />
|n<br />
|Country<br />
|<br />
|t<br />
|Title<br />
|-<br />
|x<br />
|Longitude<br />
|<br />
|y<br />
|Latitude<br />
|}<br />
These codes can be uppercased to uppercase the result. <br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
----<br />
<br />
=== Rules for format strings. ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Anything will print inside a format string<br />
|-<br />
|1a<br />
|you will have to use [[#Control Variables|Control Variables]] to display things like ')' and format codes<br />
|-<br />
|2<br />
|Separators can be within format strings.<br />
|-<br />
|3<br />
|At least ONE format code has to display something for the ENTIRE format string to display<br />
|}<br />
<br />
----<br />
<br />
=== Examples ===<br />
<br />
{|<br />
|-<br />
|code<br />
|gives<br />
|-<br />
|<pre>$n(f l)<br />
b. $b {at $B<br />
{d. $d $D</pre><br />
|<pre>Edwin Michael Smith<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA</pre>The person is still alive (or has no information present) so the line was removed.<br />
|}<br />
<br />
<br />
<br />
== Control Variables ==<br />
<br />
Control variables allow you to print characters that are special to Substitution values within a display.<br />
<br />
For example the dollar character '$' is used to note the start of a variable. If you wish to print a dollar character you would use a control character like '&#92;$'<br />
<br />
Control Variables<br />
<br />
{|<br />
|-<br />
|&#92;$<br />
|Displays a single '$'<br />
|<br />
|&#92;&#92;<br />
|Displays a single '&#92;'<br />
|-<br />
|&#92;(<br />
|Displays a single '('<br />
|<br />
|&#92;)<br />
|Displays a single ')'<br />
|-<br />
|&#92;{<br />
|Displays a single '{'<br />
|<br />
|&#92;}<br />
|Displays a single '}'<br />
|-<br />
|&#92;<<br />
|Displays a single '<'<br />
|<br />
|&#92;><br />
|Displays a single '>'<br />
|}<br />
<br />
Basically anything that comes after a '&#92;' will be printed.<br />
<br />
----<br />
Note:<br />
When you are inside a format string, you may need to use this to display a character that would normally be a format code. <br />
<br />
{|<br />
|-<br />
|Example:<br />
|would give<br />
|-<br />
|<pre>$b(m hi mom)<br />
$b(m hi \mo\m)</pre><br />
|<pre>5 hi 5o5<br />
5 hi mom</pre><br />
|}<br />
<br />
as this person was born on the fifth month.<br />
<br />
== Grouping ==<br />
<br />
There are instances where you do not want certain text to be displayed. Take the example:<br />
<br />
{|<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died on $d at $D</pre><br />
|<pre>died on 1975-06-26 at </pre> <br />
|<pre>died on at Reno, Washoe Co., NV</pre><br />
|-<br />
| colspan="3"|Neither of these are very acceptable.<br />
|-<br />
| colspan="3"|But with groups (denoted by {}), you can optionally print information if a variable within contains information.<br />
|-<br />
| colspan="3"|For example:<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died{ on $d}{ at $D}</pre><br />
|<pre>died on 1975-06-26</pre><br />
|<pre>died at Reno, Washoe Co., NV</pre><br />
|}<br />
<br />
which is what we want.<br />
<br />
----<br />
=== Rules for groups ===<br />
<br />
A group will only display if there is at least one variable that displays something. So if a group only has text and/or variables where the information is not known, the entire group will not print.<br />
<br />
Groups can also be nested. If this happens (like below), the outer group will only display if there is at least one variable that displays something within the outer group or any of the sub groups.<br />
<br />
Groups can also be used to remove an entire line from a display. A '{' at the start of a line will remove the entire line from the display if the above rule is true.<br />
<br />
If you do not wish to have the display code above (for death information) displayed (the person is alive, or you do not yet know the information), modify the code to look like<br />
<pre>{died{ on $d}{ at $D}</pre><br />
<br />
<blockquote>To have an entire line be blank instead of removing the line simply start the line with a space ' {' or make sure there is a space after the group (you will have to close the group first)</blockquote><br />
<br />
----<br />
<br />
=== Examples: ===<br />
<br />
This will hide '(' and ')' if the divorce information is not known (or still married).<br />
<br />
<pre>m. $m $M {- ($v(yyyy))</pre><br />
<br />
<br />
Only display some spouse information if married or remove the entire line if never married:<br />
<pre>{$s $m(yyyy) {- $v(\(yyyy\))}}</pre><br />
<br />
== Attributes ==<br />
<br />
Attributes do not have a format string. Instead the attribute name is placed inside []. Here is the syntax for an attribute:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name] where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'au'<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$a[Profession]<br />
$a[Social Security Number]<br />
$a[Total \$ bequeathed]</pre><br />
|<pre>Programmer<br />
7A3-29-F1C6<br />
3.00USD</pre><br />
|}<br />
<br />
<br />
----<br />
== Events ==<br />
<br />
Events have the same starting structure as attributes, $e or $t and the event name in [] but events have an extra format string after the name to display the description, date, place, id, and attributes associated with it. Each of these items can be displayed with a , a 'n', 'd', 'D', 'i', and 'a' respectively in the format string. Here is the syntax for an event:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name](format string) where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'et'<br />
<br />
=== Event format strings ===<br />
<br />
The Event format string is used to display information about the event. Here are the format codes to display parts of the event:<br />
<br />
{|<br />
|-<br />
|n<br />
|Description<br />
|<br />
|i<br />
|Event ID<br />
|-<br />
|d<br />
|Event Date&#42;<br />
|<br />
|D<br />
|Event Place&#42;<br />
|-<br />
|a<br />
|An attributes for the event&#42;&#42;<br />
|<br />
|<br />
|<br />
|}<br />
<br />
&#42;These variables can themselves have format strings. Date and a place can be formatted with format string as defined in [[#Format strings|Format strings]].<br />
<br />
&#42;&#42;Attribute needs to have the attribute name in [] and are formatted as above.<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$e[First Communion](d(yyyy-mm-d))<br />
$e[Bar Mitzvah](n&lt; at &gt; D)<br />
$e[Birth](d(yyyy mm/dd) D)</pre><br />
|<pre>2009-11-6<br />
Jerry's Bar Mitzah at Opas house<br />
2007 05/23 Grandmothers house</pre><br />
|}<br />
<br />
<br />
And:<br />
<br />
{|<br />
|-<br />
|<pre>$b(yyyy-Mmm-dd)<br />
$M</pre><br />
|is the same as<br />
|<pre>$e[Birth](d(yyyy-Mmm-dd))<br />
$t[Marriage](D)</pre><br />
|}<br />
<br />
<br />
----<br />
<br />
=== Notes for attributes and events: ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Attribute and event names are mandatory. '$a' or '$a[]' will not display anything.<br />
|-<br />
|2<br />
|Attributes and event names may have special characters within them. Most notably ']' and ')'. If this is the case, you will need to use [[#Control Variables|Control Variables]]<br />
|}<br />
<br />
== Separators ==<br />
<br />
Separators are special 'text only' groups inside '&lt;' and '&gt;' that conditionally display a separator (like ', ' or ' - ') between two groups, variables, format codes or text.<br />
<br />
Separators are displayed conditionally depending on these rules:<br />
<br />
# A variable that does '''not''' display anything will remove itself and a separator that is to the left of it from the display line only.<br />
# If there is not a separator to the left, the same variable will remove itself and a separator that is to the right of it from the displayed line. <br />
# If there are two separators together, the left one will be removed from the display line and the right is kept.<br />
# Separators at the start or end of the display line (or format strings) are removed<br />
<br />
=== Example: ===<br />
{|<br />
|-<br />
|<pre>$s(f l s)&lt;, &gt;$m(yyyy)&lt; @ &gt;$M&lt; - &gt;$v(&#92;(yyyy&#92;))</pre><br />
|}<br />
<br />
Here are some things that may happen:<br />
<br />
{|<br />
|-<br />
|If '''none''' of the variables are known<br />
|None of the separators will display<br />
|-<br />
|If only one variable '''is''' known<br />
|Only that variable will print. No separators will print.<br />
|-<br />
|If only the spouse's name '''is not''' known<br />
|The first separator will not display<br />
|-<br />
|If only the marriage date '''is not''' known<br />
|The first separator does not display. We will be left with:<br />
Jane Doe&lt; - &gt;{ … }And only the divorce date needs to be known to print the second separator.<br />
|-<br />
|If only the divorce date '''is not''' known<br />
|the second separator will not display<br />
|}<br />
<br />
<br />
Separators can be inside format strings:<br />
<br />
$n(&lt;0&gt;T&lt; &gt;L&lt;, &gt;f&lt; &gt;s)<br />
<br />
Unlike groups, separators can not cross over/out of format strings. So the separator &lt;0&gt; will NEVER display. No matter what is on the left hand side of the variable.<br />
<br />
----<br />
<br />
Here is a useful example:<br />
{|<br />
|-<br />
|<pre>{({b. $b}<, >{d. $d})}</pre><br />
|}<br />
<br />
This will:<br />
{|<br />
|-<br />
| Only print the outside () if either the birth or death date displays<br />
|-<br />
| Only displays the center separator if both dates are known.<br />
|-<br />
| So here are some thing that could display<br />
{|<br />
|-<br />
| <pre>(b. 1970-4-8)</pre><br />
| <pre>(d. 2012-3-9)</pre><br />
| <pre>(b. 1970-4-8, d. 2012-3-9)</pre><br />
| or the line does not print at all.<br />
|}<br />
|-<br />
| We will not see things like:<br />
{|<br />
|-<br />
| <pre>()</pre><br />
| <pre>(, )</pre><br />
| <pre>(b.)</pre><br />
| <pre>(b., )</pre><br />
| <pre>(d.)</pre><br />
|-<br />
| <pre>(, d.)</pre><br />
| <pre>(b. 1970-4-8, )</pre><br />
| <pre>(b. 1970-4-8, d.)</pre><br />
| <pre>(, d. 2012-3-9)</pre><br />
| <pre>(b., d. 2012-3-9)</pre><br />
|}<br />
|}<br />
Back to [[Gramps_4.1_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
{{-}}<br />
<br />
{{man index|Gramps 4.1 Wiki Manual - Reports - part 1|Gramps_4.1_Wiki_Manual_-_Reports_-_part_3|4.1}}<br />
<br />
{{languages}}<br />
<br />
[[Category:Documentation]]<br />
[[Category:Plugins]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Gramps_4.0_Wiki_Manual_-_Reports_-_part_2&diff=46214Gramps 4.0 Wiki Manual - Reports - part 22013-07-07T22:32:17Z<p>Ander882: /* The Substitution Keys */</p>
<hr />
<div>{{grampsmanualcopyright}}<br />
<br />
{{man index|Gramps 4.0 Wiki Manual - Reports - part 1|Gramps_4.0_Wiki_Manual_-_Reports_-_part_3|4.0}}<br />
<br />
{{languages|Gramps_4.0_Wiki_Manual_-_Reports - part 2}}<br />
<br />
{{#vardefine:chapter|11.2}}<br />
{{#vardefine:figure|0}}<br />
<br />
Back to [[Gramps_4.0_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
This section describes the substitution values that can be used in the different reports available in Gramps.<br />
<br />
= Substitution Values =<br />
<br />
Many of the graphical reports allow you to customize the information that is displayed on the reports. Variable substitution is the method that is used to substitute a particular symbol (key) for specific information about the person in the database.<br />
<br />
{|<br />
|-<br />
|Example: <br />
|Will show as: (the person is alive)<br />
|-<br />
|<pre>$n<br />
b. $b{ at $B}<br />
d. $d< at >$D</pre><br />
|<pre>Smith, Edwin Michael<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA<br />
d.</pre><br />
|}<br />
<br />
----<br />
{|<br />
|-<br />
|1<br />
|A list of all available variables (The Substitution Keys) follows. If you wish to display names, date, or place information differently, you may use [[#Format Strings|Format Strings]] to accomplish this.<br />
|-<br />
|2<br />
|There are also [[#Control Variables|Control Variables]] to display special characters (like the dollar sign).<br />
|-<br />
|3<br />
|You can also use [[#Grouping|Grouping]] to optionally display information. Line 2 above, uses grouping to display ' at ' only when the birth place is known.<br />
|-<br />
|4<br />
|Along with [[#Events|Events]] you can print almost anything.<br />
|-<br />
|5<br />
|Finally, [[#Separators|Separators]], to make your life complete. Line 3 above, uses this to display ' at ' only when both the birth date and place is known.<br />
|-<br />
|}<br />
<br />
<br />
== The Substitution Keys ==<br />
<br />
{|<br />
|-<br />
| colspan="2"|'''Personal variables'''<br />
| colspan="2"|'''Marital variables'''<br />
|-<br />
|$n<br />
|Displays the person's name<br />
|$s<br />
|Displays the name of the person's spouse<br />
|-<br />
|$i<br />
|Displays the GRAMPS ID for the person.<br />
|$j<br />
|Displays the GRAMPS ID for the marriage.<br />
|-<br />
|$b<br />
|Displays the person's date of birth <br />
|$m<br />
|Displays the marriage date of the person and the spouse.<br />
|-<br />
|$B<br />
|Displays the person's place of birth <br />
|$M<br />
|Displays the place of the marriage of the person and the spouse.<br />
|-<br />
|$d<br />
|Displays the person's date of death <br />
|$v<br />
|Displays the divorce date of the person and the spouse.<br />
|-<br />
|$D<br />
|Displays the person's place of death <br />
|$V<br />
|Displays the place of the divorce of the person and the spouse.<br />
|-<br />
|$a<br />
|Displays an attribute about the person.<br />
see [[#Attributes|Attributes]] for more<br />
|$u<br />
|Displays an attribute about the marriage.<br />
see [[#Attributes|Attributes]] for more<br />
|-<br />
|$e<br />
|Displays event information about the person.<br />
See [[#Events|Events]] for more<br />
|$t<br />
|Displays an event information about the marriage.<br />
See [[#Events|Events]] for more<br />
|}<br />
<br />
All of the Marital variables are defined by the person's preferred spouse in Gramps. If the person has never been married, then these variables will not display anything.<br />
<br />
<br />
==== Other Substitution Keys ====<br />
<br />
$T Displays Todays date.<br />
<br />
<br />
=== Default displayed formats ===<br />
<br />
{|<br />
|-<br />
|$n $s<br />
|Names will be displayed as set in 'Name format:' on the Display tab in Gramps preferences<br />
|-<br />
|$B $D $M $V<br />
|Places will display the Place title by default<br />
|-<br />
|$b $d $m $v $T<br />
|Dates will be displayed as set in 'Date format:' on the Display tab in Gramps preferences<br />
|-<br />
|$e $t<br />
|Events will display the description by default<br />
|}<br />
<br />
<br />
----<br />
=== Deprecated variables ===<br />
<br />
Some of the old variables were deprecated because [[#Format Strings|Format Strings]] have replaced them. So here is a list of those variables and how to achieve their results:<br />
<br />
{| {{prettytable}}<br />
|-<br />
!Old Variable<br />
!How to display it now<br />
!What is displayed<br />
|-<br />
|$f<br />
|$n<br />
|Name - as by Gramps name display under Preferences<br />
|-<br />
|$n<br />
|$n(g f)<br />
|Name - FirstName LastName<br />
|-<br />
|$N<br />
|$n(f, g)<br />
|Name - LastName, FirstName (note the explicit comma)<br />
|-<br />
|$nC<br />
|$n(g F)<br />
|Name - FirstName LastName in UPPER case<br />
|-<br />
|$NC<br />
|$n(F, g)<br />
|Name - LastName in UPPER case, FirstName<br />
|-<br />
|$by<br />
|$b(yyyy)<br />
|Date of birth, year only<br />
|-<br />
|$dy<br />
|$d(yyyy)<br />
|Date of death, year only<br />
|-<br />
|$my<br />
|$m(yyyy)<br />
|Date of preferred marriage, year only<br />
|-<br />
|$p<br />
|$s<br />
|Preferred spouse's name as by Gramps name display under Preferences<br />
|-<br />
|$s<br />
|$s(g f)<br />
|Preferred spouse's name - FirstName LastName<br />
|-<br />
|$S<br />
|$s(f, g)<br />
|Preferred spouse's name - LastName, FirstName<br />
|-<br />
|$sC<br />
|$s(g F)<br />
|Preferred spouse's name - FirstName LastName in UPPER case<br />
|-<br />
|$SC<br />
|$s(F, g)<br />
|Preferred spouse's name - LastName in UPPER case, FirstName<br />
|}<br />
<br />
== Format Strings ==<br />
<br />
Format strings are used to display names and dates differently than those assigned under Gramps Preferences. Here is the syntax for a format string:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''(format string)<br />
where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'nsijbmBMdvDVauet'<br />
<br />
A format string is any text, separators or format codes (defined below) to display information about the person.<br />
<br />
=== Formatting names ===<br />
<br />
For names ($n $s) you may use the following formatting codes to display the name differently.<br />
<br />
{|<br />
|-<br />
|t<br />
|Title<br />
|<br />
|f<br />
|Given name<br />
|-<br />
|x<br />
|Common name. Call name if existing, otherwise first first name<br />
|<br />
|c<br />
|Call name<br />
|-<br />
|n<br />
|Nick name<br />
|<br />
|s<br />
|Suffix<br />
|-<br />
|l<br />
|Surname<br />
|<br />
|g<br />
|Family nickname<br />
|}<br />
<br />
These codes can be uppercased to uppercase the result.<br />
<br />
{|<br />
|-<br />
|Example code<br />
|Displays<br />
|-<br />
|<pre>$n(L, f) ($n(c)), $n(L, f){ ($n(c))}<br />
$s(f l s)</pre><br />
|<pre>SMITH, Edwin Michael (), SMITH, Edwin Michael<br />
Janice Ann Adams</pre><br />
|}<br />
<br />
<br />
<blockquote>Note:<br />
If you want to print a character 'c' within the format string (or any one of the other format codes), you will need to first add a '&#92;' in front of it. See [[#Control Variables|Control Variables]] for more.</blockquote><br />
<br />
<blockquote>Note:<br />
the curly brackets { } are used to hide information. Here it is used around ' ($n(c))' to not display ' ()' if the person does not have a call name. See [[#Grouping|Grouping]] for more.</blockquote><br />
<br />
----<br />
<br />
=== Formatting Dates ===<br />
<br />
For all of the date variables ($b $d $m $v) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|yyyy<br />
|The year as a four digit number<br />
|<br />
|yyy<br />
|The year, with a minimum of three digits<br />
|-<br />
|yy<br />
|The year, from 00 to 99<br />
|<br />
|y<br />
|The year, from 0 to 99<br />
|-<br />
|mmmm<BR><br />
MMMM<br />
|The full name of the month<BR><br />
The full name IN CAPS<br />
|<br />
|mmm<BR><br />
MMM<br />
|The abbreviated name of the month<BR><br />
The abbreviated name IN CAPS<br />
|-<br />
|mm<br />
|The month, from 00 to 12<br />
|<br />
|m<br />
|The month, from 0 to 12<br />
|-<br />
|dd<br />
|The day, from 00 to 31<br />
|<br />
|d<br />
|The day, from 0 to 31<br />
|-<br />
|o<br />
|The date type (modifier)<br />
|<br />
|<br />
|<br />
|}<br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$b(mmm-dd yy)<br />
$m(yyyy/mmm/d)<br />
$b(mmm-dd yy)</pre><br />
|<pre>May-24 61<br />
1995/May/27<br />
Jun-04 85</pre><br />
|}<br />
<br />
{{man note| For date types (modifier) |Only "Before", "After", and "About" are supported at this time. all others will not display anything.<BR><br />
And for date span and date ranges, only the starting (first) date is displayed.}}<br />
<br />
----<br />
<br />
=== Formatting Places ===<br />
<br />
For all of the place variables ($B $D $M $V) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|e<br />
|Street<br />
|<br />
|l<br />
|Locality<br />
|-<br />
|c<br />
|City<br />
|<br />
|u<br />
|County<br />
|-<br />
|s<br />
|State<br />
|<br />
|p<br />
|Postal Code<br />
|-<br />
|n<br />
|Country<br />
|<br />
|t<br />
|Title<br />
|-<br />
|x<br />
|Longitude<br />
|<br />
|y<br />
|Latitude<br />
|}<br />
These codes can be uppercased to uppercase the result. <br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
----<br />
<br />
=== Rules for format strings. ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Anything will print inside a format string<br />
|-<br />
|1a<br />
|you will have to use [[#Control Variables|Control Variables]] to display things like ')' and format codes<br />
|-<br />
|2<br />
|Separators can be within format strings.<br />
|-<br />
|3<br />
|At least ONE format code has to display something for the ENTIRE format string to display<br />
|}<br />
<br />
----<br />
<br />
=== Examples ===<br />
<br />
{|<br />
|-<br />
|code<br />
|gives<br />
|-<br />
|<pre>$n(f l)<br />
b. $b {at $B<br />
{d. $d $D</pre><br />
|<pre>Edwin Michael Smith<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA</pre>The person is still alive (or has no information present) so the line was removed.<br />
|}<br />
<br />
<br />
<br />
== Control Variables ==<br />
<br />
Control variables allow you to print characters that are special to Substitution values within a display.<br />
<br />
For example the dollar character '$' is used to note the start of a variable. If you wish to print a dollar character you would use a control character like '&#92;$'<br />
<br />
Control Variables<br />
<br />
{|<br />
|-<br />
|&#92;$<br />
|Displays a single '$'<br />
|<br />
|&#92;&#92;<br />
|Displays a single '&#92;'<br />
|-<br />
|&#92;(<br />
|Displays a single '('<br />
|<br />
|&#92;)<br />
|Displays a single ')'<br />
|-<br />
|&#92;{<br />
|Displays a single '{'<br />
|<br />
|&#92;}<br />
|Displays a single '}'<br />
|-<br />
|&#92;<<br />
|Displays a single '<'<br />
|<br />
|&#92;><br />
|Displays a single '>'<br />
|}<br />
<br />
Basically anything that comes after a '&#92;' will be printed.<br />
<br />
----<br />
Note:<br />
When you are inside a format string, you may need to use this to display a character that would normally be a format code. <br />
<br />
{|<br />
|-<br />
|Example:<br />
|would give<br />
|-<br />
|<pre>$b(m hi mom)<br />
$b(m hi \mo\m)</pre><br />
|<pre>5 hi 5o5<br />
5 hi mom</pre><br />
|}<br />
<br />
as this person was born on the fifth month.<br />
<br />
== Grouping ==<br />
<br />
There are instances where you do not want certain text to be displayed. Take the example:<br />
<br />
{|<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died on $d at $D</pre><br />
|<pre>died on 1975-06-26 at </pre> <br />
|<pre>died on at Reno, Washoe Co., NV</pre><br />
|-<br />
| colspan="3"|Neither of these are very acceptable.<br />
|-<br />
| colspan="3"|But with groups (denoted by {}), you can optionally print information if a variable within contains information.<br />
|-<br />
| colspan="3"|For example:<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died{ on $d}{ at $D}</pre><br />
|<pre>died on 1975-06-26</pre><br />
|<pre>died at Reno, Washoe Co., NV</pre><br />
|}<br />
<br />
which is what we want.<br />
<br />
----<br />
=== Rules for groups ===<br />
<br />
A group will only display if there is at least one variable that displays something. So if a group only has text and/or variables where the information is not known, the entire group will not print.<br />
<br />
Groups can also be nested. If this happens (like below), the outer group will only display if there is at least one variable that displays something within the outer group or any of the sub groups.<br />
<br />
Groups can also be used to remove an entire line from a display. A '{' at the start of a line will remove the entire line from the display if the above rule is true.<br />
<br />
If you do not wish to have the display code above (for death information) displayed (the person is alive, or you do not yet know the information), modify the code to look like<br />
<pre>{died{ on $d}{ at $D}</pre><br />
<br />
<blockquote>To have an entire line be blank instead of removing the line simply start the line with a space ' {' or make sure there is a space after the group (you will have to close the group first)</blockquote><br />
<br />
----<br />
<br />
=== Examples: ===<br />
<br />
This will hide '(' and ')' if the divorce information is not known (or still married).<br />
<br />
<pre>m. $m $M {- ($v(yyyy))</pre><br />
<br />
<br />
Only display some spouse information if married or remove the entire line if never married:<br />
<pre>{$s $m(yyyy) {- $v(\(yyyy\))}}</pre><br />
<br />
== Attributes ==<br />
<br />
Attributes do not have a format string. Instead the attribute name is placed inside []. Here is the syntax for an attribute:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name] where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'au'<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$a[Profession]<br />
$a[Social Security Number]<br />
$a[Total \$ bequeathed]</pre><br />
|<pre>Programmer<br />
7A3-29-F1C6<br />
3.00USD</pre><br />
|}<br />
<br />
<br />
----<br />
== Events ==<br />
<br />
Events have the same starting structure as attributes, $e or $t and the event name in [] but events have an extra format string after the name to display the description, date, place, id, and attributes associated with it. Each of these items can be displayed with a , a 'n', 'd', 'D', 'i', and 'a' respectively in the format string. Here is the syntax for an event:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name](format string) where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'et'<br />
<br />
=== Event format strings ===<br />
<br />
The Event format string is used to display information about the event. Here are the format codes to display parts of the event:<br />
<br />
{|<br />
|-<br />
|n<br />
|Description<br />
|<br />
|i<br />
|Event ID<br />
|-<br />
|d<br />
|Event Date&#42;<br />
|<br />
|D<br />
|Event Place&#42;<br />
|-<br />
|a<br />
|An attributes for the event&#42;&#42;<br />
|<br />
|<br />
|<br />
|}<br />
<br />
&#42;These variables can themselves have format strings. Date and a place can be formatted with format string as defined in [[#Format strings|Format strings]].<br />
<br />
&#42;&#42;Attribute needs to have the attribute name in [] and are formatted as above.<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$e[First Communion](d(yyyy-mm-d))<br />
$e[Bar Mitzvah](n&lt; at &gt; D)<br />
$e[Birth](d(yyyy mm/dd) D)</pre><br />
|<pre>2009-11-6<br />
Jerry's Bar Mitzah at Opas house<br />
2007 05/23 Grandmothers house</pre><br />
|}<br />
<br />
<br />
And:<br />
<br />
{|<br />
|-<br />
|<pre>$b(yyyy-Mmm-dd)<br />
$M</pre><br />
|is the same as<br />
|<pre>$e[Birth](d(yyyy-Mmm-dd))<br />
$t[Marriage](D)</pre><br />
|}<br />
<br />
<br />
----<br />
<br />
=== Notes for attributes and events: ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Attribute and event names are mandatory. '$a' or '$a[]' will not display anything.<br />
|-<br />
|2<br />
|Attributes and event names may have special characters within them. Most notably ']' and ')'. If this is the case, you will need to use [[#Control Variables|Control Variables]]<br />
|}<br />
<br />
== Separators ==<br />
<br />
Separators are special 'text only' groups inside '&lt;' and '&gt;' that conditionally display a separator (like ', ' or ' - ') between two groups, variables, format codes or text.<br />
<br />
Separators are displayed conditionally depending on these rules:<br />
<br />
# A variable that does '''not''' display anything will remove itself and a separator that is to the left of it from the display line only.<br />
# If there is not a separator to the left, the same variable will remove itself and a separator that is to the right of it from the displayed line. <br />
# If there are two separators together, the left one will be removed from the display line and the right is kept.<br />
# Separators at the start or end of the display line (or format strings) are removed<br />
<br />
=== Example: ===<br />
{|<br />
|-<br />
|<pre>$s(f l s)&lt;, &gt;$m(yyyy)&lt; @ &gt;$M&lt; - &gt;$v(&#92;(yyyy&#92;))</pre><br />
|}<br />
<br />
Here are some things that may happen:<br />
<br />
{|<br />
|-<br />
|If '''none''' of the variables are known<br />
|None of the separators will display<br />
|-<br />
|If only one variable '''is''' known<br />
|Only that variable will print. No separators will print.<br />
|-<br />
|If only the spouse's name '''is not''' known<br />
|The first separator will not display<br />
|-<br />
|If only the marriage date '''is not''' known<br />
|The first separator does not display. We will be left with:<br />
Jane Doe&lt; - &gt;{ … }And only the divorce date needs to be known to print the second separator.<br />
|-<br />
|If only the divorce date '''is not''' known<br />
|the second separator will not display<br />
|}<br />
<br />
<br />
Separators can be inside format strings:<br />
<br />
$n(&lt;0&gt;T&lt; &gt;L&lt;, &gt;f&lt; &gt;s)<br />
<br />
Unlike groups, separators can not cross over/out of format strings. So the separator &lt;0&gt; will NEVER display. No matter what is on the left hand side of the variable.<br />
<br />
----<br />
<br />
Here is a useful example:<br />
{|<br />
|-<br />
|<pre>{({b. $b}<, >{d. $d})}</pre><br />
|}<br />
<br />
This will:<br />
{|<br />
|-<br />
| Only print the outside () if either the birth or death date displays<br />
|-<br />
| Only displays the center separator if both dates are known.<br />
|-<br />
| So here are some thing that could display<br />
{|<br />
|-<br />
| <pre>(b. 1970-4-8)</pre><br />
| <pre>(d. 2012-3-9)</pre><br />
| <pre>(b. 1970-4-8, d. 2012-3-9)</pre><br />
| or the line does not print at all.<br />
|}<br />
|-<br />
| We will not see things like:<br />
{|<br />
|-<br />
| <pre>()</pre><br />
| <pre>(, )</pre><br />
| <pre>(b.)</pre><br />
| <pre>(b., )</pre><br />
| <pre>(d.)</pre><br />
|-<br />
| <pre>(, d.)</pre><br />
| <pre>(b. 1970-4-8, )</pre><br />
| <pre>(b. 1970-4-8, d.)</pre><br />
| <pre>(, d. 2012-3-9)</pre><br />
| <pre>(b., d. 2012-3-9)</pre><br />
|}<br />
|}<br />
Back to [[Gramps_4.0_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
{{-}}<br />
<br />
{{man index|Gramps 4.0 Wiki Manual - Reports - part 1|Gramps_4.0_Wiki_Manual_-_Reports_-_part_3|4.0}}<br />
<br />
{{languages}}<br />
<br />
[[Category:Documentation]]<br />
[[Category:Plugins]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Gramps_4.1_Wiki_Manual_-_Reports_-_part_2&diff=48994Gramps 4.1 Wiki Manual - Reports - part 22013-07-07T22:32:17Z<p>Ander882: /* The Substitution Keys */</p>
<hr />
<div>{{grampsmanualcopyright}}<br />
<br />
{{man index|Gramps 4.1 Wiki Manual - Reports - part 1|Gramps_4.1_Wiki_Manual_-_Reports_-_part_3|4.1}}<br />
<br />
{{languages|Gramps_4.1_Wiki_Manual_-_Reports - part 2}}<br />
<br />
{{#vardefine:chapter|11.2}}<br />
{{#vardefine:figure|0}}<br />
<br />
Back to [[Gramps_4.1_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
This section describes the substitution values that can be used in the different reports available in Gramps.<br />
<br />
= Substitution Values =<br />
<br />
Many of the graphical reports allow you to customize the information that is displayed on the reports. Variable substitution is the method that is used to substitute a particular symbol (key) for specific information about the person in the database.<br />
<br />
{|<br />
|-<br />
|Example: <br />
|Will show as: (the person is alive)<br />
|-<br />
|<pre>$n<br />
b. $b{ at $B}<br />
d. $d< at >$D</pre><br />
|<pre>Smith, Edwin Michael<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA<br />
d.</pre><br />
|}<br />
<br />
----<br />
{|<br />
|-<br />
|1<br />
|A list of all available variables (The Substitution Keys) follows. If you wish to display names, date, or place information differently, you may use [[#Format Strings|Format Strings]] to accomplish this.<br />
|-<br />
|2<br />
|There are also [[#Control Variables|Control Variables]] to display special characters (like the dollar sign).<br />
|-<br />
|3<br />
|You can also use [[#Grouping|Grouping]] to optionally display information. Line 2 above, uses grouping to display ' at ' only when the birth place is known.<br />
|-<br />
|4<br />
|Along with [[#Events|Events]] you can print almost anything.<br />
|-<br />
|5<br />
|Finally, [[#Separators|Separators]], to make your life complete. Line 3 above, uses this to display ' at ' only when both the birth date and place is known.<br />
|-<br />
|}<br />
<br />
<br />
== The Substitution Keys ==<br />
<br />
{|<br />
|-<br />
| colspan="2"|'''Personal variables'''<br />
| colspan="2"|'''Marital variables'''<br />
|-<br />
|$n<br />
|Displays the person's name<br />
|$s<br />
|Displays the name of the person's spouse<br />
|-<br />
|$i<br />
|Displays the GRAMPS ID for the person.<br />
|$j<br />
|Displays the GRAMPS ID for the marriage.<br />
|-<br />
|$b<br />
|Displays the person's date of birth <br />
|$m<br />
|Displays the marriage date of the person and the spouse.<br />
|-<br />
|$B<br />
|Displays the person's place of birth <br />
|$M<br />
|Displays the place of the marriage of the person and the spouse.<br />
|-<br />
|$d<br />
|Displays the person's date of death <br />
|$v<br />
|Displays the divorce date of the person and the spouse.<br />
|-<br />
|$D<br />
|Displays the person's place of death <br />
|$V<br />
|Displays the place of the divorce of the person and the spouse.<br />
|-<br />
|$a<br />
|Displays an attribute about the person.<br />
see [[#Attributes|Attributes]] for more<br />
|$u<br />
|Displays an attribute about the marriage.<br />
see [[#Attributes|Attributes]] for more<br />
|-<br />
|$e<br />
|Displays event information about the person.<br />
See [[#Events|Events]] for more<br />
|$t<br />
|Displays an event information about the marriage.<br />
See [[#Events|Events]] for more<br />
|}<br />
<br />
All of the Marital variables are defined by the person's preferred spouse in Gramps. If the person has never been married, then these variables will not display anything.<br />
<br />
<br />
==== Other Substitution Keys ====<br />
<br />
$T Displays Todays date.<br />
<br />
<br />
=== Default displayed formats ===<br />
<br />
{|<br />
|-<br />
|$n $s<br />
|Names will be displayed as set in 'Name format:' on the Display tab in Gramps preferences<br />
|-<br />
|$B $D $M $V<br />
|Places will display the Place title by default<br />
|-<br />
|$b $d $m $v $T<br />
|Dates will be displayed as set in 'Date format:' on the Display tab in Gramps preferences<br />
|-<br />
|$e $t<br />
|Events will display the description by default<br />
|}<br />
<br />
<br />
----<br />
=== Deprecated variables ===<br />
<br />
Some of the old variables were deprecated because [[#Format Strings|Format Strings]] have replaced them. So here is a list of those variables and how to achieve their results:<br />
<br />
{| {{prettytable}}<br />
|-<br />
!Old Variable<br />
!How to display it now<br />
!What is displayed<br />
|-<br />
|$f<br />
|$n<br />
|Name - as by Gramps name display under Preferences<br />
|-<br />
|$n<br />
|$n(g f)<br />
|Name - FirstName LastName<br />
|-<br />
|$N<br />
|$n(f, g)<br />
|Name - LastName, FirstName (note the explicit comma)<br />
|-<br />
|$nC<br />
|$n(g F)<br />
|Name - FirstName LastName in UPPER case<br />
|-<br />
|$NC<br />
|$n(F, g)<br />
|Name - LastName in UPPER case, FirstName<br />
|-<br />
|$by<br />
|$b(yyyy)<br />
|Date of birth, year only<br />
|-<br />
|$dy<br />
|$d(yyyy)<br />
|Date of death, year only<br />
|-<br />
|$my<br />
|$m(yyyy)<br />
|Date of preferred marriage, year only<br />
|-<br />
|$p<br />
|$s<br />
|Preferred spouse's name as by Gramps name display under Preferences<br />
|-<br />
|$s<br />
|$s(g f)<br />
|Preferred spouse's name - FirstName LastName<br />
|-<br />
|$S<br />
|$s(f, g)<br />
|Preferred spouse's name - LastName, FirstName<br />
|-<br />
|$sC<br />
|$s(g F)<br />
|Preferred spouse's name - FirstName LastName in UPPER case<br />
|-<br />
|$SC<br />
|$s(F, g)<br />
|Preferred spouse's name - LastName in UPPER case, FirstName<br />
|}<br />
<br />
== Format Strings ==<br />
<br />
Format strings are used to display names and dates differently than those assigned under Gramps Preferences. Here is the syntax for a format string:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''(format string)<br />
where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'nsijbmBMdvDVauet'<br />
<br />
A format string is any text, separators or format codes (defined below) to display information about the person.<br />
<br />
=== Formatting names ===<br />
<br />
For names ($n $s) you may use the following formatting codes to display the name differently.<br />
<br />
{|<br />
|-<br />
|t<br />
|Title<br />
|<br />
|f<br />
|Given name<br />
|-<br />
|x<br />
|Common name. Call name if existing, otherwise first first name<br />
|<br />
|c<br />
|Call name<br />
|-<br />
|n<br />
|Nick name<br />
|<br />
|s<br />
|Suffix<br />
|-<br />
|l<br />
|Surname<br />
|<br />
|g<br />
|Family nickname<br />
|}<br />
<br />
These codes can be uppercased to uppercase the result.<br />
<br />
{|<br />
|-<br />
|Example code<br />
|Displays<br />
|-<br />
|<pre>$n(L, f) ($n(c)), $n(L, f){ ($n(c))}<br />
$s(f l s)</pre><br />
|<pre>SMITH, Edwin Michael (), SMITH, Edwin Michael<br />
Janice Ann Adams</pre><br />
|}<br />
<br />
<br />
<blockquote>Note:<br />
If you want to print a character 'c' within the format string (or any one of the other format codes), you will need to first add a '&#92;' in front of it. See [[#Control Variables|Control Variables]] for more.</blockquote><br />
<br />
<blockquote>Note:<br />
the curly brackets { } are used to hide information. Here it is used around ' ($n(c))' to not display ' ()' if the person does not have a call name. See [[#Grouping|Grouping]] for more.</blockquote><br />
<br />
----<br />
<br />
=== Formatting Dates ===<br />
<br />
For all of the date variables ($b $d $m $v) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|yyyy<br />
|The year as a four digit number<br />
|<br />
|yyy<br />
|The year, with a minimum of three digits<br />
|-<br />
|yy<br />
|The year, from 00 to 99<br />
|<br />
|y<br />
|The year, from 0 to 99<br />
|-<br />
|mmmm<BR><br />
MMMM<br />
|The full name of the month<BR><br />
The full name IN CAPS<br />
|<br />
|mmm<BR><br />
MMM<br />
|The abbreviated name of the month<BR><br />
The abbreviated name IN CAPS<br />
|-<br />
|mm<br />
|The month, from 00 to 12<br />
|<br />
|m<br />
|The month, from 0 to 12<br />
|-<br />
|dd<br />
|The day, from 00 to 31<br />
|<br />
|d<br />
|The day, from 0 to 31<br />
|-<br />
|o<br />
|The date type (modifier)<br />
|<br />
|<br />
|<br />
|}<br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$b(mmm-dd yy)<br />
$m(yyyy/mmm/d)<br />
$b(mmm-dd yy)</pre><br />
|<pre>May-24 61<br />
1995/May/27<br />
Jun-04 85</pre><br />
|}<br />
<br />
{{man note| For date types (modifier) |Only "Before", "After", and "About" are supported at this time. all others will not display anything.<BR><br />
And for date span and date ranges, only the starting (first) date is displayed.}}<br />
<br />
----<br />
<br />
=== Formatting Places ===<br />
<br />
For all of the place variables ($B $D $M $V) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|e<br />
|Street<br />
|<br />
|l<br />
|Locality<br />
|-<br />
|c<br />
|City<br />
|<br />
|u<br />
|County<br />
|-<br />
|s<br />
|State<br />
|<br />
|p<br />
|Postal Code<br />
|-<br />
|n<br />
|Country<br />
|<br />
|t<br />
|Title<br />
|-<br />
|x<br />
|Longitude<br />
|<br />
|y<br />
|Latitude<br />
|}<br />
These codes can be uppercased to uppercase the result. <br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
----<br />
<br />
=== Rules for format strings. ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Anything will print inside a format string<br />
|-<br />
|1a<br />
|you will have to use [[#Control Variables|Control Variables]] to display things like ')' and format codes<br />
|-<br />
|2<br />
|Separators can be within format strings.<br />
|-<br />
|3<br />
|At least ONE format code has to display something for the ENTIRE format string to display<br />
|}<br />
<br />
----<br />
<br />
=== Examples ===<br />
<br />
{|<br />
|-<br />
|code<br />
|gives<br />
|-<br />
|<pre>$n(f l)<br />
b. $b {at $B<br />
{d. $d $D</pre><br />
|<pre>Edwin Michael Smith<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA</pre>The person is still alive (or has no information present) so the line was removed.<br />
|}<br />
<br />
<br />
<br />
== Control Variables ==<br />
<br />
Control variables allow you to print characters that are special to Substitution values within a display.<br />
<br />
For example the dollar character '$' is used to note the start of a variable. If you wish to print a dollar character you would use a control character like '&#92;$'<br />
<br />
Control Variables<br />
<br />
{|<br />
|-<br />
|&#92;$<br />
|Displays a single '$'<br />
|<br />
|&#92;&#92;<br />
|Displays a single '&#92;'<br />
|-<br />
|&#92;(<br />
|Displays a single '('<br />
|<br />
|&#92;)<br />
|Displays a single ')'<br />
|-<br />
|&#92;{<br />
|Displays a single '{'<br />
|<br />
|&#92;}<br />
|Displays a single '}'<br />
|-<br />
|&#92;<<br />
|Displays a single '<'<br />
|<br />
|&#92;><br />
|Displays a single '>'<br />
|}<br />
<br />
Basically anything that comes after a '&#92;' will be printed.<br />
<br />
----<br />
Note:<br />
When you are inside a format string, you may need to use this to display a character that would normally be a format code. <br />
<br />
{|<br />
|-<br />
|Example:<br />
|would give<br />
|-<br />
|<pre>$b(m hi mom)<br />
$b(m hi \mo\m)</pre><br />
|<pre>5 hi 5o5<br />
5 hi mom</pre><br />
|}<br />
<br />
as this person was born on the fifth month.<br />
<br />
== Grouping ==<br />
<br />
There are instances where you do not want certain text to be displayed. Take the example:<br />
<br />
{|<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died on $d at $D</pre><br />
|<pre>died on 1975-06-26 at </pre> <br />
|<pre>died on at Reno, Washoe Co., NV</pre><br />
|-<br />
| colspan="3"|Neither of these are very acceptable.<br />
|-<br />
| colspan="3"|But with groups (denoted by {}), you can optionally print information if a variable within contains information.<br />
|-<br />
| colspan="3"|For example:<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died{ on $d}{ at $D}</pre><br />
|<pre>died on 1975-06-26</pre><br />
|<pre>died at Reno, Washoe Co., NV</pre><br />
|}<br />
<br />
which is what we want.<br />
<br />
----<br />
=== Rules for groups ===<br />
<br />
A group will only display if there is at least one variable that displays something. So if a group only has text and/or variables where the information is not known, the entire group will not print.<br />
<br />
Groups can also be nested. If this happens (like below), the outer group will only display if there is at least one variable that displays something within the outer group or any of the sub groups.<br />
<br />
Groups can also be used to remove an entire line from a display. A '{' at the start of a line will remove the entire line from the display if the above rule is true.<br />
<br />
If you do not wish to have the display code above (for death information) displayed (the person is alive, or you do not yet know the information), modify the code to look like<br />
<pre>{died{ on $d}{ at $D}</pre><br />
<br />
<blockquote>To have an entire line be blank instead of removing the line simply start the line with a space ' {' or make sure there is a space after the group (you will have to close the group first)</blockquote><br />
<br />
----<br />
<br />
=== Examples: ===<br />
<br />
This will hide '(' and ')' if the divorce information is not known (or still married).<br />
<br />
<pre>m. $m $M {- ($v(yyyy))</pre><br />
<br />
<br />
Only display some spouse information if married or remove the entire line if never married:<br />
<pre>{$s $m(yyyy) {- $v(\(yyyy\))}}</pre><br />
<br />
== Attributes ==<br />
<br />
Attributes do not have a format string. Instead the attribute name is placed inside []. Here is the syntax for an attribute:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name] where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'au'<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$a[Profession]<br />
$a[Social Security Number]<br />
$a[Total \$ bequeathed]</pre><br />
|<pre>Programmer<br />
7A3-29-F1C6<br />
3.00USD</pre><br />
|}<br />
<br />
<br />
----<br />
== Events ==<br />
<br />
Events have the same starting structure as attributes, $e or $t and the event name in [] but events have an extra format string after the name to display the description, date, place, id, and attributes associated with it. Each of these items can be displayed with a , a 'n', 'd', 'D', 'i', and 'a' respectively in the format string. Here is the syntax for an event:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name](format string) where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'et'<br />
<br />
=== Event format strings ===<br />
<br />
The Event format string is used to display information about the event. Here are the format codes to display parts of the event:<br />
<br />
{|<br />
|-<br />
|n<br />
|Description<br />
|<br />
|i<br />
|Event ID<br />
|-<br />
|d<br />
|Event Date&#42;<br />
|<br />
|D<br />
|Event Place&#42;<br />
|-<br />
|a<br />
|An attributes for the event&#42;&#42;<br />
|<br />
|<br />
|<br />
|}<br />
<br />
&#42;These variables can themselves have format strings. Date and a place can be formatted with format string as defined in [[#Format strings|Format strings]].<br />
<br />
&#42;&#42;Attribute needs to have the attribute name in [] and are formatted as above.<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$e[First Communion](d(yyyy-mm-d))<br />
$e[Bar Mitzvah](n&lt; at &gt; D)<br />
$e[Birth](d(yyyy mm/dd) D)</pre><br />
|<pre>2009-11-6<br />
Jerry's Bar Mitzah at Opas house<br />
2007 05/23 Grandmothers house</pre><br />
|}<br />
<br />
<br />
And:<br />
<br />
{|<br />
|-<br />
|<pre>$b(yyyy-Mmm-dd)<br />
$M</pre><br />
|is the same as<br />
|<pre>$e[Birth](d(yyyy-Mmm-dd))<br />
$t[Marriage](D)</pre><br />
|}<br />
<br />
<br />
----<br />
<br />
=== Notes for attributes and events: ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Attribute and event names are mandatory. '$a' or '$a[]' will not display anything.<br />
|-<br />
|2<br />
|Attributes and event names may have special characters within them. Most notably ']' and ')'. If this is the case, you will need to use [[#Control Variables|Control Variables]]<br />
|}<br />
<br />
== Separators ==<br />
<br />
Separators are special 'text only' groups inside '&lt;' and '&gt;' that conditionally display a separator (like ', ' or ' - ') between two groups, variables, format codes or text.<br />
<br />
Separators are displayed conditionally depending on these rules:<br />
<br />
# A variable that does '''not''' display anything will remove itself and a separator that is to the left of it from the display line only.<br />
# If there is not a separator to the left, the same variable will remove itself and a separator that is to the right of it from the displayed line. <br />
# If there are two separators together, the left one will be removed from the display line and the right is kept.<br />
# Separators at the start or end of the display line (or format strings) are removed<br />
<br />
=== Example: ===<br />
{|<br />
|-<br />
|<pre>$s(f l s)&lt;, &gt;$m(yyyy)&lt; @ &gt;$M&lt; - &gt;$v(&#92;(yyyy&#92;))</pre><br />
|}<br />
<br />
Here are some things that may happen:<br />
<br />
{|<br />
|-<br />
|If '''none''' of the variables are known<br />
|None of the separators will display<br />
|-<br />
|If only one variable '''is''' known<br />
|Only that variable will print. No separators will print.<br />
|-<br />
|If only the spouse's name '''is not''' known<br />
|The first separator will not display<br />
|-<br />
|If only the marriage date '''is not''' known<br />
|The first separator does not display. We will be left with:<br />
Jane Doe&lt; - &gt;{ … }And only the divorce date needs to be known to print the second separator.<br />
|-<br />
|If only the divorce date '''is not''' known<br />
|the second separator will not display<br />
|}<br />
<br />
<br />
Separators can be inside format strings:<br />
<br />
$n(&lt;0&gt;T&lt; &gt;L&lt;, &gt;f&lt; &gt;s)<br />
<br />
Unlike groups, separators can not cross over/out of format strings. So the separator &lt;0&gt; will NEVER display. No matter what is on the left hand side of the variable.<br />
<br />
----<br />
<br />
Here is a useful example:<br />
{|<br />
|-<br />
|<pre>{({b. $b}<, >{d. $d})}</pre><br />
|}<br />
<br />
This will:<br />
{|<br />
|-<br />
| Only print the outside () if either the birth or death date displays<br />
|-<br />
| Only displays the center separator if both dates are known.<br />
|-<br />
| So here are some thing that could display<br />
{|<br />
|-<br />
| <pre>(b. 1970-4-8)</pre><br />
| <pre>(d. 2012-3-9)</pre><br />
| <pre>(b. 1970-4-8, d. 2012-3-9)</pre><br />
| or the line does not print at all.<br />
|}<br />
|-<br />
| We will not see things like:<br />
{|<br />
|-<br />
| <pre>()</pre><br />
| <pre>(, )</pre><br />
| <pre>(b.)</pre><br />
| <pre>(b., )</pre><br />
| <pre>(d.)</pre><br />
|-<br />
| <pre>(, d.)</pre><br />
| <pre>(b. 1970-4-8, )</pre><br />
| <pre>(b. 1970-4-8, d.)</pre><br />
| <pre>(, d. 2012-3-9)</pre><br />
| <pre>(b., d. 2012-3-9)</pre><br />
|}<br />
|}<br />
Back to [[Gramps_4.1_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
{{-}}<br />
<br />
{{man index|Gramps 4.1 Wiki Manual - Reports - part 1|Gramps_4.1_Wiki_Manual_-_Reports_-_part_3|4.1}}<br />
<br />
{{languages}}<br />
<br />
[[Category:Documentation]]<br />
[[Category:Plugins]]</div>Ander882https://gramps-project.org/wiki/index.php?title=User:Ander882&diff=37813User:Ander8822012-06-28T17:50:55Z<p>Ander882: /* Old to remove = */</p>
<hr />
<div>==3.5 / 4.0 pages==<br />
<br />
[[35Substitution values|Substitution values]]<br />
<br />
'Size' tab documentation needs to be updated to include scaling factors<br />
<br />
== Old stuff - need to remove ==<br />
<br />
[[Ancestor3.3|Ancestor Report]]<br />
[[Image:AncestorSample.png|Sample Ancestor Report]]<br />
<br />
[[Descendant3.3|Descendant Reports]]<br />
[[Image:DescendSample.png|Sample Descendant Report]]<br />
<br />
[[Page_size3.3|Page size options]]<br />
<br />
<br />
[[Category:User|Ander882]]</div>Ander882https://gramps-project.org/wiki/index.php?title=User:Ander882&diff=37812User:Ander8822012-06-28T17:50:30Z<p>Ander882: /* 3.5 / 4.0 pages */</p>
<hr />
<div>==3.5 / 4.0 pages==<br />
<br />
[[35Substitution values|Substitution values]]<br />
<br />
'Size' tab documentation needs to be updated to include scaling factors<br />
<br />
== Old to remove ===<br />
<br />
[[Ancestor3.3|Ancestor Report]]<br />
[[Image:AncestorSample.png|Sample Ancestor Report]]<br />
<br />
[[Descendant3.3|Descendant Reports]]<br />
[[Image:DescendSample.png|Sample Descendant Report]]<br />
<br />
[[Page_size3.3|Page size options]]<br />
<br />
<br />
[[Category:User|Ander882]]</div>Ander882https://gramps-project.org/wiki/index.php?title=User:Ander882&diff=37799User:Ander8822012-06-28T16:21:18Z<p>Ander882: /* 3.5 / 4.0 pages */</p>
<hr />
<div>==3.5 / 4.0 pages==<br />
<br />
<br />
[[35Substitution values|Substitution values]]<br />
<br />
== Old to remove ===<br />
<br />
[[Ancestor3.3|Ancestor Report]]<br />
[[Image:AncestorSample.png|Sample Ancestor Report]]<br />
<br />
[[Descendant3.3|Descendant Reports]]<br />
[[Image:DescendSample.png|Sample Descendant Report]]<br />
<br />
[[Page_size3.3|Page size options]]<br />
<br />
<br />
[[Category:User|Ander882]]</div>Ander882https://gramps-project.org/wiki/index.php?title=User:Ander882&diff=37798User:Ander8822012-06-28T16:21:03Z<p>Ander882: /* 3.5 / 4.0 pages */</p>
<hr />
<div>==3.5 / 4.0 pages==<br />
<br />
<br />
[[Substitution values35|Substitution values]]<br />
<br />
== Old to remove ===<br />
<br />
[[Ancestor3.3|Ancestor Report]]<br />
[[Image:AncestorSample.png|Sample Ancestor Report]]<br />
<br />
[[Descendant3.3|Descendant Reports]]<br />
[[Image:DescendSample.png|Sample Descendant Report]]<br />
<br />
[[Page_size3.3|Page size options]]<br />
<br />
<br />
[[Category:User|Ander882]]</div>Ander882https://gramps-project.org/wiki/index.php?title=User:Ander882&diff=37797User:Ander8822012-06-28T16:20:43Z<p>Ander882: /* 3.5 / 4.0 pages */</p>
<hr />
<div>==3.5 / 4.0 pages==<br />
<br />
<br />
[[Display_formatting35|Substitution values]]<br />
<br />
== Old to remove ===<br />
<br />
[[Ancestor3.3|Ancestor Report]]<br />
[[Image:AncestorSample.png|Sample Ancestor Report]]<br />
<br />
[[Descendant3.3|Descendant Reports]]<br />
[[Image:DescendSample.png|Sample Descendant Report]]<br />
<br />
[[Page_size3.3|Page size options]]<br />
<br />
<br />
[[Category:User|Ander882]]</div>Ander882https://gramps-project.org/wiki/index.php?title=User:Ander882&diff=37796User:Ander8822012-06-28T16:20:19Z<p>Ander882: /* 3.5 / 4.0 pages */</p>
<hr />
<div>==3.5 / 4.0 pages==<br />
<br />
<br />
[[Display_formatting3.5|Substitution values]]<br />
<br />
== Old to remove ===<br />
<br />
[[Ancestor3.3|Ancestor Report]]<br />
[[Image:AncestorSample.png|Sample Ancestor Report]]<br />
<br />
[[Descendant3.3|Descendant Reports]]<br />
[[Image:DescendSample.png|Sample Descendant Report]]<br />
<br />
[[Page_size3.3|Page size options]]<br />
<br />
<br />
[[Category:User|Ander882]]</div>Ander882https://gramps-project.org/wiki/index.php?title=User:Ander882&diff=37795User:Ander8822012-06-28T16:19:08Z<p>Ander882: </p>
<hr />
<div>==3.5 / 4.0 pages==<br />
<br />
<br />
[[Display_formatting3.5|Substitution values]]<br />
<br />
<br />
<br />
== Old to remove ===<br />
<br />
[[Ancestor3.3|Ancestor Report]]<br />
[[Image:AncestorSample.png|Sample Ancestor Report]]<br />
<br />
[[Descendant3.3|Descendant Reports]]<br />
[[Image:DescendSample.png|Sample Descendant Report]]<br />
<br />
[[Page_size3.3|Page size options]]<br />
<br />
<br />
[[Category:User|Ander882]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Gramps_3.4_Wiki_Manual_-_Reports_-_part_2&diff=36937Gramps 3.4 Wiki Manual - Reports - part 22012-04-30T18:30:08Z<p>Ander882: /* Rules for groups */</p>
<hr />
<div>{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{grampsmanualcopyright}}<br />
<br />
{{languages|Gramps_3.4_Wiki_Manual_-_Reports - part 2}}<br />
<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
This section describes the substitution values that can be used in the different reports available in Gramps.<br />
<br />
= Substitution Values =<br />
<br />
Many of the graphical reports allow you to customize the information that is displayed on the reports. Variable substitution is the method that is used to substitute a particular symbol (key) for specific information about the person in the database.<br />
<br />
{|<br />
|-<br />
|Example: <br />
|Will show as: (the person is alive)<br />
|-<br />
|<pre>$n<br />
b. $b{ at $B}<br />
d. $d< at >$D</pre><br />
|<pre>Smith, Edwin Michael<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA<br />
d.</pre><br />
|}<br />
<br />
----<br />
{|<br />
|-<br />
|1<br />
|A list of all available variables (The Substitution Keys) follows. If you wish to display names, date, or place information differently, you may use [[#Format Strings|Format Strings]] to accomplish this.<br />
|-<br />
|2<br />
|There are also [[#Control Variables|Control Variables]] to display special characters (like the dollar sign).<br />
|-<br />
|3<br />
|You can also use [[#Grouping|Grouping]] to optionally display information. Line 2 above, uses grouping to display ' at ' only when the birth place is known.<br />
|-<br />
|4<br />
|Along with [[#Events|Events]] you can print almost anything.<br />
|-<br />
|5<br />
|Finally, [[#Separators|Separators]], to make your life complete. Line 3 above, uses this to display ' at ' only when both the birth date and place is known.<br />
|-<br />
|}<br />
<br />
<br />
== The Substitution Keys ==<br />
<br />
{|<br />
|-<br />
| colspan="2"|'''Personal variables'''<br />
| colspan="2"|'''Marital variables'''<br />
|-<br />
|$n<br />
|Displays the person's name<br />
|$s<br />
|Displays the name of the person's spouse<br />
|-<br />
|$i<br />
|Displays the GRAMPS ID for the person.<br />
|$j<br />
|Displays the GRAMPS ID for the marriage.<br />
|-<br />
|$b<br />
|Displays the person's date of birth <br />
|$m<br />
|Displays the marriage date of the person and the spouse.<br />
|-<br />
|$B<br />
|Displays the person's place of birth <br />
|$M<br />
|Displays the place of the marriage of the person and the spouse.<br />
|-<br />
|$d<br />
|Displays the person's date of death <br />
|$v<br />
|Displays the divorce date of the person and the spouse.<br />
|-<br />
|$D<br />
|Displays the person's place of death <br />
|$V<br />
|Displays the place of the divorce of the person and the spouse.<br />
|-<br />
|$a<br />
|Displays an attribute about the person.<br />
see [[#Attributes|Attributes]] for more<br />
|$u<br />
|Displays an attribute about the marriage.<br />
see [[#Attributes|Attributes]] for more<br />
|-<br />
|$e<br />
|Displays event information about the person.<br />
See [[#Events|Events]] for more<br />
|$t<br />
|Displays an event information about the marriage.<br />
See [[#Events|Events]] for more<br />
|}<br />
<br />
All of the Marital variables are defined by the person's preferred spouse in Gramps. If the person has never been married, then these variables will not display anything.<br />
<br />
----<br />
=== Default displayed formats ===<br />
<br />
{|<br />
|-<br />
|$n $s<br />
|Names will be displayed as set in 'Name format:' on the Display tab in Gramps preferences<br />
|-<br />
|$B $D $M $V<br />
|Places will display the Place title by default<br />
|-<br />
|$b $d $m $v<br />
|Dates will be displayed as set in 'Date format:' on the Display tab in Gramps preferences<br />
|-<br />
|$e $t<br />
|Events will display the description by default<br />
|}<br />
<br />
<br />
=== Deprecated variables ===<br />
<br />
Some of the old variables were deprecated because [[#Format Strings|Format Strings]] have replaced them. So here is a list of those variables and how to achieve their results:<br />
<br />
{| {{prettytable}}<br />
|-<br />
!Old Variable<br />
!How to display it now<br />
!What is displayed<br />
|-<br />
|$f<br />
|$n<br />
|Name - as by Gramps name display under Preferences<br />
|-<br />
|$n<br />
|$n(g f)<br />
|Name - FirstName LastName<br />
|-<br />
|$N<br />
|$n(f, g)<br />
|Name - LastName, FirstName (note the explicit comma)<br />
|-<br />
|$nC<br />
|$n(g F)<br />
|Name - FirstName LastName in UPPER case<br />
|-<br />
|$NC<br />
|$n(F, g)<br />
|Name - LastName in UPPER case, FirstName<br />
|-<br />
|$by<br />
|$b(yyyy)<br />
|Date of birth, year only<br />
|-<br />
|$dy<br />
|$d(yyyy)<br />
|Date of death, year only<br />
|-<br />
|$my<br />
|$m(yyyy)<br />
|Date of preferred marriage, year only<br />
|-<br />
|$p<br />
|$s<br />
|Preferred spouse's name as by Gramps name display under Preferences<br />
|-<br />
|$s<br />
|$s(g f)<br />
|Preferred spouse's name - FirstName LastName<br />
|-<br />
|$S<br />
|$s(f, g)<br />
|Preferred spouse's name - LastName, FirstName<br />
|-<br />
|$sC<br />
|$s(g F)<br />
|Preferred spouse's name - FirstName LastName in UPPER case<br />
|-<br />
|$SC<br />
|$s(F, g)<br />
|Preferred spouse's name - LastName in UPPER case, FirstName<br />
|}<br />
<br />
== Format Strings ==<br />
<br />
Format strings are used to display names and dates differently than those assigned under Gramps Preferences. Here is the syntax for a format string:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''(format string)<br />
where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'nsijbmBMdvDVauet'<br />
<br />
A format string is any text, separators or format codes (defined below) to display information about the person.<br />
<br />
=== Formatting names ===<br />
<br />
For names ($n $s) you may use the following formatting codes to display the name differently.<br />
<br />
{|<br />
|-<br />
|t<br />
|Title<br />
|<br />
|f<br />
|Given name<br />
|-<br />
|x<br />
|Common name. Call name if existing, otherwise first first name<br />
|<br />
|c<br />
|Call name<br />
|-<br />
|n<br />
|Nick name<br />
|<br />
|s<br />
|Suffix<br />
|-<br />
|l<br />
|Surname<br />
|<br />
|g<br />
|Family nickname<br />
|}<br />
<br />
These codes can be uppercased to uppercase the result.<br />
<br />
{|<br />
|-<br />
|Example code<br />
|Displays<br />
|-<br />
|<pre>$n(L, f) ($n(c)), $n(L, f){ ($n(c))}<br />
$s(f l s)</pre><br />
|<pre>SMITH, Edwin Michael (), SMITH, Edwin Michael<br />
Janice Ann Adams</pre><br />
|}<br />
<br />
<br />
<blockquote>Note:<br />
If you want to print a character 'c' within the format string (or any one of the other format codes), you will need to first add a '&#92;' in front of it. See [[#Control Variables|Control Variables]] for more.</blockquote><br />
<br />
<blockquote>Note:<br />
the curly brackets { } are used to hide information. Here it is used around ' ($n(c))' to not display ' ()' if the person does not have a call name. See [[#Grouping|Grouping]] for more.</blockquote><br />
<br />
----<br />
<br />
=== Formatting Dates ===<br />
<br />
For all of the date variables ($b $d $m $v) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|yyyy<br />
|The year as a four digit number<br />
|<br />
|yyy<br />
|The year, with a minimum of three digits<br />
|-<br />
|yy<br />
|The year, from 00 to 99<br />
|<br />
|y<br />
|The year, from 0 to 99<br />
|-<br />
|mmmm<BR><br />
MMMM<br />
|The full name of the month<BR><br />
The full name IN CAPS<br />
|<br />
|mmm<BR><br />
MMM<br />
|The abbreviated name of the month<BR><br />
The abbreviated name IN CAPS<br />
|-<br />
|mm<br />
|The month, from 00 to 12<br />
|<br />
|m<br />
|The month, from 0 to 12<br />
|-<br />
|dd<br />
|The day, from 00 to 31<br />
|<br />
|d<br />
|The day, from 0 to 31<br />
|-<br />
|o<br />
|The date type (modifier)<br />
|<br />
|<br />
|<br />
|}<br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$b(mmm-dd yy)<br />
$m(yyyy/mmm/d)<br />
$b(mmm-dd yy)</pre><br />
|<pre>May-24 61<br />
1995/May/27<br />
Jun-04 85</pre><br />
|}<br />
<br />
{{man note| For date types (modifier) |Only "Before", "After", and "About" are supported at this time. all others will not display anything.<BR><br />
And for date span and date ranges, only the starting (first) date is displayed.}}<br />
<br />
----<br />
<br />
=== Formatting Places ===<br />
<br />
For all of the place variables ($B $D $M $V) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|e<br />
|Street<br />
|<br />
|l<br />
|Locality<br />
|-<br />
|c<br />
|City<br />
|<br />
|u<br />
|County<br />
|-<br />
|s<br />
|State<br />
|<br />
|p<br />
|Postal Code<br />
|-<br />
|n<br />
|Country<br />
|<br />
|t<br />
|Title<br />
|-<br />
|x<br />
|Longitude<br />
|<br />
|y<br />
|Latitude<br />
|}<br />
These codes can be uppercased to uppercase the result. <br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
----<br />
<br />
=== Rules for format strings. ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Anything will print inside a format string<br />
|-<br />
|1a<br />
|you will have to use [[#Control Variables|Control Variables]] to display things like ')' and format codes<br />
|-<br />
|2<br />
|Separators can be within format strings.<br />
|-<br />
|3<br />
|At least ONE format code has to display something for the ENTIRE format string to display<br />
|}<br />
<br />
----<br />
<br />
=== Examples ===<br />
<br />
{|<br />
|-<br />
|code<br />
|gives<br />
|-<br />
|<pre>$n(f l)<br />
b. $b {at $B<br />
{d. $d $D</pre><br />
|<pre>Edwin Michael Smith<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA</pre>The person is still alive (or has no information present) so the line was removed.<br />
|}<br />
<br />
<br />
<br />
== Control Variables ==<br />
<br />
Control variables allow you to print characters that are special to Substitution values within a display.<br />
<br />
For example the dollar character '$' is used to note the start of a variable. If you wish to print a dollar character you would use a control character like '&#92;$'<br />
<br />
Control Variables<br />
<br />
{|<br />
|-<br />
|&#92;$<br />
|Displays a single '$'<br />
|<br />
|&#92;&#92;<br />
|Displays a single '&#92;'<br />
|-<br />
|&#92;(<br />
|Displays a single '('<br />
|<br />
|&#92;)<br />
|Displays a single ')'<br />
|-<br />
|&#92;{<br />
|Displays a single '{'<br />
|<br />
|&#92;}<br />
|Displays a single '}'<br />
|-<br />
|&#92;<<br />
|Displays a single '<'<br />
|<br />
|&#92;><br />
|Displays a single '>'<br />
|}<br />
<br />
Basically anything that comes after a '&#92;' will be printed.<br />
<br />
----<br />
Note:<br />
When you are inside a format string, you may need to use this to display a character that would normally be a format code. <br />
<br />
{|<br />
|-<br />
|Example:<br />
|would give<br />
|-<br />
|<pre>$b(m hi mom)<br />
$b(m hi \mo\m)</pre><br />
|<pre>5 hi 5o5<br />
5 hi mom</pre><br />
|}<br />
<br />
as this person was born on the fifth month.<br />
<br />
== Grouping ==<br />
<br />
There are instances where you do not want certain text to be displayed. Take the example:<br />
<br />
{|<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died on $d at $D</pre><br />
|<pre>died on 1975-06-26 at </pre> <br />
|<pre>died on at Reno, Washoe Co., NV</pre><br />
|-<br />
| colspan="3"|Neither of these are very acceptable.<br />
|-<br />
| colspan="3"|But with groups (denoted by {}), you can optionally print information if a variable within contains information.<br />
|-<br />
| colspan="3"|For example:<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died{ on $d}{ at $D}</pre><br />
|<pre>died on 1975-06-26</pre><br />
|<pre>died at Reno, Washoe Co., NV</pre><br />
|}<br />
<br />
which is what we want.<br />
<br />
----<br />
=== Rules for groups ===<br />
<br />
A group will only display if there is at least one variable that displays something. So if a group only has text and/or variables where the information is not known, the entire group will not print.<br />
<br />
Groups can also be nested. If this happens (like below), the outer group will only display if there is at least one variable that displays something within the outer group or any of the sub groups.<br />
<br />
Groups can also be used to remove an entire line from a display. A '{' at the start of a line will remove the entire line from the display if the above rule is true.<br />
<br />
If you do not wish to have the display code above (for death information) displayed (the person is alive, or you do not yet know the information), modify the code to look like<br />
<pre>{died{ on $d}{ at $D}</pre><br />
<br />
<blockquote>To have an entire line be blank instead of removing the line simply start the line with a space ' {' or make sure there is a space after the group (you will have to close the group first)</blockquote><br />
<br />
----<br />
<br />
=== Examples: ===<br />
<br />
This will hide '(' and ')' if the divorce information is not known (or still married).<br />
<br />
<pre>m. $m $M {- ($v(yyyy))</pre><br />
<br />
<br />
Only display some spouse information if married or remove the entire line if never married:<br />
<pre>{$s $m(yyyy) {- $v(\(yyyy\))}}</pre><br />
<br />
== Attributes ==<br />
<br />
Attributes do not have a format string. Instead the attribute name is placed inside []. Here is the syntax for an attribute:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name] where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'au'<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$a[Profession]<br />
$a[Social Security Number]<br />
$a[Total \$ bequeathed]</pre><br />
|<pre>Programmer<br />
7A3-29-F1C6<br />
3.00USD</pre><br />
|}<br />
<br />
<br />
----<br />
== Events ==<br />
<br />
Events have the same starting structure as attributes, $e or $t and the event name in [] but events have an extra format string after the name to display the description, date, place, id, and attributes associated with it. Each of these items can be displayed with a , a 'n', 'd', 'D', 'i', and 'a' respectively in the format string. Here is the syntax for an event:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name](format string) where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'et'<br />
<br />
=== Event format strings ===<br />
<br />
The Event format string is used to display information about the event. Here are the format codes to display parts of the event:<br />
<br />
{|<br />
|-<br />
|n<br />
|Description<br />
|<br />
|i<br />
|Event ID<br />
|-<br />
|d<br />
|Event Date&#42;<br />
|<br />
|D<br />
|Event Place&#42;<br />
|-<br />
|a<br />
|An attributes for the event&#42;&#42;<br />
|<br />
|<br />
|<br />
|}<br />
<br />
&#42;These variables can themselves have format strings. Date and a place can be formatted with format string as defined in [[#Format strings|Format strings]].<br />
<br />
&#42;&#42;Attribute needs to have the attribute name in [] and are formatted as above.<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$e[First Communion](d(yyyy-mm-d))<br />
$e[Bar Mitzvah](n&lt; at &gt; D)<br />
$e[Birth](d(yyyy mm/dd) D)</pre><br />
|<pre>2009-11-6<br />
Jerry's Bar Mitzah at Opas house<br />
2007 05/23 Grandmothers house</pre><br />
|}<br />
<br />
<br />
And:<br />
<br />
{|<br />
|-<br />
|<pre>$b(yyyy-Mmm-dd)<br />
$M</pre><br />
|is the same as<br />
|<pre>$e[Birth](d(yyyy-Mmm-dd))<br />
$t[Marriage](D)</pre><br />
|}<br />
<br />
<br />
----<br />
<br />
=== Notes for attributes and events: ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Attribute and event names are mandatory. '$a' or '$a[]' will not display anything.<br />
|-<br />
|2<br />
|Attributes and event names may have special characters within them. Most notably ']' and ')'. If this is the case, you will need to use [[#Control Variables|Control Variables]]<br />
|}<br />
<br />
== Separators ==<br />
<br />
Separators are special 'text only' groups inside '&lt;' and '&gt;' that conditionally display a separator (like ', ' or ' - ') between two groups, variables, format codes or text.<br />
<br />
Separators are displayed conditionally depending on these rules:<br />
<br />
# A variable that does '''not''' display anything will remove itself and a separator that is to the left of it from the display line only.<br />
# If there is not a separator to the left, the same variable will remove itself and a separator that is to the right of it from the displayed line. <br />
# If there are two separators together, the left one will be removed from the display line and the right is kept.<br />
# Separators at the start or end of the display line (or format strings) are removed<br />
<br />
=== Example: ===<br />
{|<br />
|-<br />
|<pre>$s(f l s)&lt;, &gt;$m(yyyy)&lt; @ &gt;$M&lt; - &gt;$v(&#92;(yyyy&#92;))</pre><br />
|}<br />
<br />
Here are some things that may happen:<br />
<br />
{|<br />
|-<br />
|If '''none''' of the variables are known<br />
|None of the separators will display<br />
|-<br />
|If only one variable '''is''' known<br />
|Only that variable will print. No separators will print.<br />
|-<br />
|If only the spouse's name '''is not''' known<br />
|The first separator will not display<br />
|-<br />
|If only the marriage date '''is not''' known<br />
|The first separator does not display. We will be left with:<br />
Jane Doe&lt; - &gt;{ … }And only the divorce date needs to be known to print the second separator.<br />
|-<br />
|If only the divorce date '''is not''' known<br />
|the second separator will not display<br />
|}<br />
<br />
<br />
Separators can be inside format strings:<br />
<br />
$n(&lt;0&gt;T&lt; &gt;L&lt;, &gt;f&lt; &gt;s)<br />
<br />
Unlike groups, separators can not cross over/out of format strings. So the separator &lt;0&gt; will NEVER display. No matter what is on the left hand side of the variable.<br />
<br />
----<br />
<br />
Here is a useful example:<br />
{|<br />
|-<br />
|<pre>{({b. $b}<, >{d. $d})}</pre><br />
|}<br />
<br />
This will:<br />
{|<br />
|-<br />
| Only print the outside () if either the birth or death date displays<br />
|-<br />
| Only displays the center separator if both dates are known.<br />
|-<br />
| So here are some thing that could display<br />
{|<br />
|-<br />
| <pre>(b. 1970-4-8)</pre><br />
| <pre>(d. 2012-3-9)</pre><br />
| <pre>(b. 1970-4-8, d. 2012-3-9)</pre><br />
| or the line does not print at all.<br />
|}<br />
|-<br />
| We will not see things like:<br />
{|<br />
|-<br />
| <pre>()</pre><br />
| <pre>(, )</pre><br />
| <pre>(b.)</pre><br />
| <pre>(b., )</pre><br />
| <pre>(d.)</pre><br />
|-<br />
| <pre>(, d.)</pre><br />
| <pre>(b. 1970-4-8, )</pre><br />
| <pre>(b. 1970-4-8, d.)</pre><br />
| <pre>(, d. 2012-3-9)</pre><br />
| <pre>(b., d. 2012-3-9)</pre><br />
|}<br />
|}<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
{{-}}<br />
<br />
{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{languages}}<br />
<br />
[[Category:Documentation]]<br />
[[Category:Plugins]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Gramps_3.4_Wiki_Manual_-_Reports_-_part_2&diff=36936Gramps 3.4 Wiki Manual - Reports - part 22012-04-30T18:29:23Z<p>Ander882: /* Grouping */</p>
<hr />
<div>{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{grampsmanualcopyright}}<br />
<br />
{{languages|Gramps_3.4_Wiki_Manual_-_Reports - part 2}}<br />
<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
This section describes the substitution values that can be used in the different reports available in Gramps.<br />
<br />
= Substitution Values =<br />
<br />
Many of the graphical reports allow you to customize the information that is displayed on the reports. Variable substitution is the method that is used to substitute a particular symbol (key) for specific information about the person in the database.<br />
<br />
{|<br />
|-<br />
|Example: <br />
|Will show as: (the person is alive)<br />
|-<br />
|<pre>$n<br />
b. $b{ at $B}<br />
d. $d< at >$D</pre><br />
|<pre>Smith, Edwin Michael<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA<br />
d.</pre><br />
|}<br />
<br />
----<br />
{|<br />
|-<br />
|1<br />
|A list of all available variables (The Substitution Keys) follows. If you wish to display names, date, or place information differently, you may use [[#Format Strings|Format Strings]] to accomplish this.<br />
|-<br />
|2<br />
|There are also [[#Control Variables|Control Variables]] to display special characters (like the dollar sign).<br />
|-<br />
|3<br />
|You can also use [[#Grouping|Grouping]] to optionally display information. Line 2 above, uses grouping to display ' at ' only when the birth place is known.<br />
|-<br />
|4<br />
|Along with [[#Events|Events]] you can print almost anything.<br />
|-<br />
|5<br />
|Finally, [[#Separators|Separators]], to make your life complete. Line 3 above, uses this to display ' at ' only when both the birth date and place is known.<br />
|-<br />
|}<br />
<br />
<br />
== The Substitution Keys ==<br />
<br />
{|<br />
|-<br />
| colspan="2"|'''Personal variables'''<br />
| colspan="2"|'''Marital variables'''<br />
|-<br />
|$n<br />
|Displays the person's name<br />
|$s<br />
|Displays the name of the person's spouse<br />
|-<br />
|$i<br />
|Displays the GRAMPS ID for the person.<br />
|$j<br />
|Displays the GRAMPS ID for the marriage.<br />
|-<br />
|$b<br />
|Displays the person's date of birth <br />
|$m<br />
|Displays the marriage date of the person and the spouse.<br />
|-<br />
|$B<br />
|Displays the person's place of birth <br />
|$M<br />
|Displays the place of the marriage of the person and the spouse.<br />
|-<br />
|$d<br />
|Displays the person's date of death <br />
|$v<br />
|Displays the divorce date of the person and the spouse.<br />
|-<br />
|$D<br />
|Displays the person's place of death <br />
|$V<br />
|Displays the place of the divorce of the person and the spouse.<br />
|-<br />
|$a<br />
|Displays an attribute about the person.<br />
see [[#Attributes|Attributes]] for more<br />
|$u<br />
|Displays an attribute about the marriage.<br />
see [[#Attributes|Attributes]] for more<br />
|-<br />
|$e<br />
|Displays event information about the person.<br />
See [[#Events|Events]] for more<br />
|$t<br />
|Displays an event information about the marriage.<br />
See [[#Events|Events]] for more<br />
|}<br />
<br />
All of the Marital variables are defined by the person's preferred spouse in Gramps. If the person has never been married, then these variables will not display anything.<br />
<br />
----<br />
=== Default displayed formats ===<br />
<br />
{|<br />
|-<br />
|$n $s<br />
|Names will be displayed as set in 'Name format:' on the Display tab in Gramps preferences<br />
|-<br />
|$B $D $M $V<br />
|Places will display the Place title by default<br />
|-<br />
|$b $d $m $v<br />
|Dates will be displayed as set in 'Date format:' on the Display tab in Gramps preferences<br />
|-<br />
|$e $t<br />
|Events will display the description by default<br />
|}<br />
<br />
<br />
=== Deprecated variables ===<br />
<br />
Some of the old variables were deprecated because [[#Format Strings|Format Strings]] have replaced them. So here is a list of those variables and how to achieve their results:<br />
<br />
{| {{prettytable}}<br />
|-<br />
!Old Variable<br />
!How to display it now<br />
!What is displayed<br />
|-<br />
|$f<br />
|$n<br />
|Name - as by Gramps name display under Preferences<br />
|-<br />
|$n<br />
|$n(g f)<br />
|Name - FirstName LastName<br />
|-<br />
|$N<br />
|$n(f, g)<br />
|Name - LastName, FirstName (note the explicit comma)<br />
|-<br />
|$nC<br />
|$n(g F)<br />
|Name - FirstName LastName in UPPER case<br />
|-<br />
|$NC<br />
|$n(F, g)<br />
|Name - LastName in UPPER case, FirstName<br />
|-<br />
|$by<br />
|$b(yyyy)<br />
|Date of birth, year only<br />
|-<br />
|$dy<br />
|$d(yyyy)<br />
|Date of death, year only<br />
|-<br />
|$my<br />
|$m(yyyy)<br />
|Date of preferred marriage, year only<br />
|-<br />
|$p<br />
|$s<br />
|Preferred spouse's name as by Gramps name display under Preferences<br />
|-<br />
|$s<br />
|$s(g f)<br />
|Preferred spouse's name - FirstName LastName<br />
|-<br />
|$S<br />
|$s(f, g)<br />
|Preferred spouse's name - LastName, FirstName<br />
|-<br />
|$sC<br />
|$s(g F)<br />
|Preferred spouse's name - FirstName LastName in UPPER case<br />
|-<br />
|$SC<br />
|$s(F, g)<br />
|Preferred spouse's name - LastName in UPPER case, FirstName<br />
|}<br />
<br />
== Format Strings ==<br />
<br />
Format strings are used to display names and dates differently than those assigned under Gramps Preferences. Here is the syntax for a format string:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''(format string)<br />
where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'nsijbmBMdvDVauet'<br />
<br />
A format string is any text, separators or format codes (defined below) to display information about the person.<br />
<br />
=== Formatting names ===<br />
<br />
For names ($n $s) you may use the following formatting codes to display the name differently.<br />
<br />
{|<br />
|-<br />
|t<br />
|Title<br />
|<br />
|f<br />
|Given name<br />
|-<br />
|x<br />
|Common name. Call name if existing, otherwise first first name<br />
|<br />
|c<br />
|Call name<br />
|-<br />
|n<br />
|Nick name<br />
|<br />
|s<br />
|Suffix<br />
|-<br />
|l<br />
|Surname<br />
|<br />
|g<br />
|Family nickname<br />
|}<br />
<br />
These codes can be uppercased to uppercase the result.<br />
<br />
{|<br />
|-<br />
|Example code<br />
|Displays<br />
|-<br />
|<pre>$n(L, f) ($n(c)), $n(L, f){ ($n(c))}<br />
$s(f l s)</pre><br />
|<pre>SMITH, Edwin Michael (), SMITH, Edwin Michael<br />
Janice Ann Adams</pre><br />
|}<br />
<br />
<br />
<blockquote>Note:<br />
If you want to print a character 'c' within the format string (or any one of the other format codes), you will need to first add a '&#92;' in front of it. See [[#Control Variables|Control Variables]] for more.</blockquote><br />
<br />
<blockquote>Note:<br />
the curly brackets { } are used to hide information. Here it is used around ' ($n(c))' to not display ' ()' if the person does not have a call name. See [[#Grouping|Grouping]] for more.</blockquote><br />
<br />
----<br />
<br />
=== Formatting Dates ===<br />
<br />
For all of the date variables ($b $d $m $v) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|yyyy<br />
|The year as a four digit number<br />
|<br />
|yyy<br />
|The year, with a minimum of three digits<br />
|-<br />
|yy<br />
|The year, from 00 to 99<br />
|<br />
|y<br />
|The year, from 0 to 99<br />
|-<br />
|mmmm<BR><br />
MMMM<br />
|The full name of the month<BR><br />
The full name IN CAPS<br />
|<br />
|mmm<BR><br />
MMM<br />
|The abbreviated name of the month<BR><br />
The abbreviated name IN CAPS<br />
|-<br />
|mm<br />
|The month, from 00 to 12<br />
|<br />
|m<br />
|The month, from 0 to 12<br />
|-<br />
|dd<br />
|The day, from 00 to 31<br />
|<br />
|d<br />
|The day, from 0 to 31<br />
|-<br />
|o<br />
|The date type (modifier)<br />
|<br />
|<br />
|<br />
|}<br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$b(mmm-dd yy)<br />
$m(yyyy/mmm/d)<br />
$b(mmm-dd yy)</pre><br />
|<pre>May-24 61<br />
1995/May/27<br />
Jun-04 85</pre><br />
|}<br />
<br />
{{man note| For date types (modifier) |Only "Before", "After", and "About" are supported at this time. all others will not display anything.<BR><br />
And for date span and date ranges, only the starting (first) date is displayed.}}<br />
<br />
----<br />
<br />
=== Formatting Places ===<br />
<br />
For all of the place variables ($B $D $M $V) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|e<br />
|Street<br />
|<br />
|l<br />
|Locality<br />
|-<br />
|c<br />
|City<br />
|<br />
|u<br />
|County<br />
|-<br />
|s<br />
|State<br />
|<br />
|p<br />
|Postal Code<br />
|-<br />
|n<br />
|Country<br />
|<br />
|t<br />
|Title<br />
|-<br />
|x<br />
|Longitude<br />
|<br />
|y<br />
|Latitude<br />
|}<br />
These codes can be uppercased to uppercase the result. <br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
----<br />
<br />
=== Rules for format strings. ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Anything will print inside a format string<br />
|-<br />
|1a<br />
|you will have to use [[#Control Variables|Control Variables]] to display things like ')' and format codes<br />
|-<br />
|2<br />
|Separators can be within format strings.<br />
|-<br />
|3<br />
|At least ONE format code has to display something for the ENTIRE format string to display<br />
|}<br />
<br />
----<br />
<br />
=== Examples ===<br />
<br />
{|<br />
|-<br />
|code<br />
|gives<br />
|-<br />
|<pre>$n(f l)<br />
b. $b {at $B<br />
{d. $d $D</pre><br />
|<pre>Edwin Michael Smith<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA</pre>The person is still alive (or has no information present) so the line was removed.<br />
|}<br />
<br />
<br />
<br />
== Control Variables ==<br />
<br />
Control variables allow you to print characters that are special to Substitution values within a display.<br />
<br />
For example the dollar character '$' is used to note the start of a variable. If you wish to print a dollar character you would use a control character like '&#92;$'<br />
<br />
Control Variables<br />
<br />
{|<br />
|-<br />
|&#92;$<br />
|Displays a single '$'<br />
|<br />
|&#92;&#92;<br />
|Displays a single '&#92;'<br />
|-<br />
|&#92;(<br />
|Displays a single '('<br />
|<br />
|&#92;)<br />
|Displays a single ')'<br />
|-<br />
|&#92;{<br />
|Displays a single '{'<br />
|<br />
|&#92;}<br />
|Displays a single '}'<br />
|-<br />
|&#92;<<br />
|Displays a single '<'<br />
|<br />
|&#92;><br />
|Displays a single '>'<br />
|}<br />
<br />
Basically anything that comes after a '&#92;' will be printed.<br />
<br />
----<br />
Note:<br />
When you are inside a format string, you may need to use this to display a character that would normally be a format code. <br />
<br />
{|<br />
|-<br />
|Example:<br />
|would give<br />
|-<br />
|<pre>$b(m hi mom)<br />
$b(m hi \mo\m)</pre><br />
|<pre>5 hi 5o5<br />
5 hi mom</pre><br />
|}<br />
<br />
as this person was born on the fifth month.<br />
<br />
== Grouping ==<br />
<br />
There are instances where you do not want certain text to be displayed. Take the example:<br />
<br />
{|<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died on $d at $D</pre><br />
|<pre>died on 1975-06-26 at </pre> <br />
|<pre>died on at Reno, Washoe Co., NV</pre><br />
|-<br />
| colspan="3"|Neither of these are very acceptable.<br />
|-<br />
| colspan="3"|But with groups (denoted by {}), you can optionally print information if a variable within contains information.<br />
|-<br />
| colspan="3"|For example:<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died{ on $d}{ at $D}</pre><br />
|<pre>died on 1975-06-26</pre><br />
|<pre>died at Reno, Washoe Co., NV</pre><br />
|}<br />
<br />
which is what we want.<br />
<br />
----<br />
=== Rules for groups ===<br />
<br />
A group will only display if there is at least one variable that displays something. So if a group only has text and/or variables where the information is not known, the entire group will not print.<br />
<br />
Groups can also be nested. If this happens (like below), the outer group will only display if there is at least one variable that displays something within the outer group or any of the sub groups.<br />
<br />
Groups can also be used to remove an entire line from a display. A '{' at the start of a line will remove the entire line from the display if the above rule is true.<br />
<br />
If you do not wish to have the display code above (for death information) displayed (the person is alive, or you do not yet know the information), modify the code to look like<br />
<pre>{died {on $d }{at $D}</pre><br />
<br />
<blockquote>To have an entire line be blank instead of removing the line simply start the line with a space ' {' or make sure there is a space after the group (you will have to close the group first)</blockquote><br />
<br />
----<br />
<br />
=== Examples: ===<br />
<br />
This will hide '(' and ')' if the divorce information is not known (or still married).<br />
<br />
<pre>m. $m $M {- ($v(yyyy))</pre><br />
<br />
<br />
Only display some spouse information if married or remove the entire line if never married:<br />
<pre>{$s $m(yyyy) {- $v(\(yyyy\))}}</pre><br />
<br />
== Attributes ==<br />
<br />
Attributes do not have a format string. Instead the attribute name is placed inside []. Here is the syntax for an attribute:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name] where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'au'<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$a[Profession]<br />
$a[Social Security Number]<br />
$a[Total \$ bequeathed]</pre><br />
|<pre>Programmer<br />
7A3-29-F1C6<br />
3.00USD</pre><br />
|}<br />
<br />
<br />
----<br />
== Events ==<br />
<br />
Events have the same starting structure as attributes, $e or $t and the event name in [] but events have an extra format string after the name to display the description, date, place, id, and attributes associated with it. Each of these items can be displayed with a , a 'n', 'd', 'D', 'i', and 'a' respectively in the format string. Here is the syntax for an event:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name](format string) where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'et'<br />
<br />
=== Event format strings ===<br />
<br />
The Event format string is used to display information about the event. Here are the format codes to display parts of the event:<br />
<br />
{|<br />
|-<br />
|n<br />
|Description<br />
|<br />
|i<br />
|Event ID<br />
|-<br />
|d<br />
|Event Date&#42;<br />
|<br />
|D<br />
|Event Place&#42;<br />
|-<br />
|a<br />
|An attributes for the event&#42;&#42;<br />
|<br />
|<br />
|<br />
|}<br />
<br />
&#42;These variables can themselves have format strings. Date and a place can be formatted with format string as defined in [[#Format strings|Format strings]].<br />
<br />
&#42;&#42;Attribute needs to have the attribute name in [] and are formatted as above.<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$e[First Communion](d(yyyy-mm-d))<br />
$e[Bar Mitzvah](n&lt; at &gt; D)<br />
$e[Birth](d(yyyy mm/dd) D)</pre><br />
|<pre>2009-11-6<br />
Jerry's Bar Mitzah at Opas house<br />
2007 05/23 Grandmothers house</pre><br />
|}<br />
<br />
<br />
And:<br />
<br />
{|<br />
|-<br />
|<pre>$b(yyyy-Mmm-dd)<br />
$M</pre><br />
|is the same as<br />
|<pre>$e[Birth](d(yyyy-Mmm-dd))<br />
$t[Marriage](D)</pre><br />
|}<br />
<br />
<br />
----<br />
<br />
=== Notes for attributes and events: ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Attribute and event names are mandatory. '$a' or '$a[]' will not display anything.<br />
|-<br />
|2<br />
|Attributes and event names may have special characters within them. Most notably ']' and ')'. If this is the case, you will need to use [[#Control Variables|Control Variables]]<br />
|}<br />
<br />
== Separators ==<br />
<br />
Separators are special 'text only' groups inside '&lt;' and '&gt;' that conditionally display a separator (like ', ' or ' - ') between two groups, variables, format codes or text.<br />
<br />
Separators are displayed conditionally depending on these rules:<br />
<br />
# A variable that does '''not''' display anything will remove itself and a separator that is to the left of it from the display line only.<br />
# If there is not a separator to the left, the same variable will remove itself and a separator that is to the right of it from the displayed line. <br />
# If there are two separators together, the left one will be removed from the display line and the right is kept.<br />
# Separators at the start or end of the display line (or format strings) are removed<br />
<br />
=== Example: ===<br />
{|<br />
|-<br />
|<pre>$s(f l s)&lt;, &gt;$m(yyyy)&lt; @ &gt;$M&lt; - &gt;$v(&#92;(yyyy&#92;))</pre><br />
|}<br />
<br />
Here are some things that may happen:<br />
<br />
{|<br />
|-<br />
|If '''none''' of the variables are known<br />
|None of the separators will display<br />
|-<br />
|If only one variable '''is''' known<br />
|Only that variable will print. No separators will print.<br />
|-<br />
|If only the spouse's name '''is not''' known<br />
|The first separator will not display<br />
|-<br />
|If only the marriage date '''is not''' known<br />
|The first separator does not display. We will be left with:<br />
Jane Doe&lt; - &gt;{ … }And only the divorce date needs to be known to print the second separator.<br />
|-<br />
|If only the divorce date '''is not''' known<br />
|the second separator will not display<br />
|}<br />
<br />
<br />
Separators can be inside format strings:<br />
<br />
$n(&lt;0&gt;T&lt; &gt;L&lt;, &gt;f&lt; &gt;s)<br />
<br />
Unlike groups, separators can not cross over/out of format strings. So the separator &lt;0&gt; will NEVER display. No matter what is on the left hand side of the variable.<br />
<br />
----<br />
<br />
Here is a useful example:<br />
{|<br />
|-<br />
|<pre>{({b. $b}<, >{d. $d})}</pre><br />
|}<br />
<br />
This will:<br />
{|<br />
|-<br />
| Only print the outside () if either the birth or death date displays<br />
|-<br />
| Only displays the center separator if both dates are known.<br />
|-<br />
| So here are some thing that could display<br />
{|<br />
|-<br />
| <pre>(b. 1970-4-8)</pre><br />
| <pre>(d. 2012-3-9)</pre><br />
| <pre>(b. 1970-4-8, d. 2012-3-9)</pre><br />
| or the line does not print at all.<br />
|}<br />
|-<br />
| We will not see things like:<br />
{|<br />
|-<br />
| <pre>()</pre><br />
| <pre>(, )</pre><br />
| <pre>(b.)</pre><br />
| <pre>(b., )</pre><br />
| <pre>(d.)</pre><br />
|-<br />
| <pre>(, d.)</pre><br />
| <pre>(b. 1970-4-8, )</pre><br />
| <pre>(b. 1970-4-8, d.)</pre><br />
| <pre>(, d. 2012-3-9)</pre><br />
| <pre>(b., d. 2012-3-9)</pre><br />
|}<br />
|}<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
{{-}}<br />
<br />
{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{languages}}<br />
<br />
[[Category:Documentation]]<br />
[[Category:Plugins]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Gramps_3.4_Wiki_Manual_-_Reports_-_part_2&diff=36935Gramps 3.4 Wiki Manual - Reports - part 22012-04-30T18:28:50Z<p>Ander882: /* Substitution Values */</p>
<hr />
<div>{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{grampsmanualcopyright}}<br />
<br />
{{languages|Gramps_3.4_Wiki_Manual_-_Reports - part 2}}<br />
<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
This section describes the substitution values that can be used in the different reports available in Gramps.<br />
<br />
= Substitution Values =<br />
<br />
Many of the graphical reports allow you to customize the information that is displayed on the reports. Variable substitution is the method that is used to substitute a particular symbol (key) for specific information about the person in the database.<br />
<br />
{|<br />
|-<br />
|Example: <br />
|Will show as: (the person is alive)<br />
|-<br />
|<pre>$n<br />
b. $b{ at $B}<br />
d. $d< at >$D</pre><br />
|<pre>Smith, Edwin Michael<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA<br />
d.</pre><br />
|}<br />
<br />
----<br />
{|<br />
|-<br />
|1<br />
|A list of all available variables (The Substitution Keys) follows. If you wish to display names, date, or place information differently, you may use [[#Format Strings|Format Strings]] to accomplish this.<br />
|-<br />
|2<br />
|There are also [[#Control Variables|Control Variables]] to display special characters (like the dollar sign).<br />
|-<br />
|3<br />
|You can also use [[#Grouping|Grouping]] to optionally display information. Line 2 above, uses grouping to display ' at ' only when the birth place is known.<br />
|-<br />
|4<br />
|Along with [[#Events|Events]] you can print almost anything.<br />
|-<br />
|5<br />
|Finally, [[#Separators|Separators]], to make your life complete. Line 3 above, uses this to display ' at ' only when both the birth date and place is known.<br />
|-<br />
|}<br />
<br />
<br />
== The Substitution Keys ==<br />
<br />
{|<br />
|-<br />
| colspan="2"|'''Personal variables'''<br />
| colspan="2"|'''Marital variables'''<br />
|-<br />
|$n<br />
|Displays the person's name<br />
|$s<br />
|Displays the name of the person's spouse<br />
|-<br />
|$i<br />
|Displays the GRAMPS ID for the person.<br />
|$j<br />
|Displays the GRAMPS ID for the marriage.<br />
|-<br />
|$b<br />
|Displays the person's date of birth <br />
|$m<br />
|Displays the marriage date of the person and the spouse.<br />
|-<br />
|$B<br />
|Displays the person's place of birth <br />
|$M<br />
|Displays the place of the marriage of the person and the spouse.<br />
|-<br />
|$d<br />
|Displays the person's date of death <br />
|$v<br />
|Displays the divorce date of the person and the spouse.<br />
|-<br />
|$D<br />
|Displays the person's place of death <br />
|$V<br />
|Displays the place of the divorce of the person and the spouse.<br />
|-<br />
|$a<br />
|Displays an attribute about the person.<br />
see [[#Attributes|Attributes]] for more<br />
|$u<br />
|Displays an attribute about the marriage.<br />
see [[#Attributes|Attributes]] for more<br />
|-<br />
|$e<br />
|Displays event information about the person.<br />
See [[#Events|Events]] for more<br />
|$t<br />
|Displays an event information about the marriage.<br />
See [[#Events|Events]] for more<br />
|}<br />
<br />
All of the Marital variables are defined by the person's preferred spouse in Gramps. If the person has never been married, then these variables will not display anything.<br />
<br />
----<br />
=== Default displayed formats ===<br />
<br />
{|<br />
|-<br />
|$n $s<br />
|Names will be displayed as set in 'Name format:' on the Display tab in Gramps preferences<br />
|-<br />
|$B $D $M $V<br />
|Places will display the Place title by default<br />
|-<br />
|$b $d $m $v<br />
|Dates will be displayed as set in 'Date format:' on the Display tab in Gramps preferences<br />
|-<br />
|$e $t<br />
|Events will display the description by default<br />
|}<br />
<br />
<br />
=== Deprecated variables ===<br />
<br />
Some of the old variables were deprecated because [[#Format Strings|Format Strings]] have replaced them. So here is a list of those variables and how to achieve their results:<br />
<br />
{| {{prettytable}}<br />
|-<br />
!Old Variable<br />
!How to display it now<br />
!What is displayed<br />
|-<br />
|$f<br />
|$n<br />
|Name - as by Gramps name display under Preferences<br />
|-<br />
|$n<br />
|$n(g f)<br />
|Name - FirstName LastName<br />
|-<br />
|$N<br />
|$n(f, g)<br />
|Name - LastName, FirstName (note the explicit comma)<br />
|-<br />
|$nC<br />
|$n(g F)<br />
|Name - FirstName LastName in UPPER case<br />
|-<br />
|$NC<br />
|$n(F, g)<br />
|Name - LastName in UPPER case, FirstName<br />
|-<br />
|$by<br />
|$b(yyyy)<br />
|Date of birth, year only<br />
|-<br />
|$dy<br />
|$d(yyyy)<br />
|Date of death, year only<br />
|-<br />
|$my<br />
|$m(yyyy)<br />
|Date of preferred marriage, year only<br />
|-<br />
|$p<br />
|$s<br />
|Preferred spouse's name as by Gramps name display under Preferences<br />
|-<br />
|$s<br />
|$s(g f)<br />
|Preferred spouse's name - FirstName LastName<br />
|-<br />
|$S<br />
|$s(f, g)<br />
|Preferred spouse's name - LastName, FirstName<br />
|-<br />
|$sC<br />
|$s(g F)<br />
|Preferred spouse's name - FirstName LastName in UPPER case<br />
|-<br />
|$SC<br />
|$s(F, g)<br />
|Preferred spouse's name - LastName in UPPER case, FirstName<br />
|}<br />
<br />
== Format Strings ==<br />
<br />
Format strings are used to display names and dates differently than those assigned under Gramps Preferences. Here is the syntax for a format string:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''(format string)<br />
where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'nsijbmBMdvDVauet'<br />
<br />
A format string is any text, separators or format codes (defined below) to display information about the person.<br />
<br />
=== Formatting names ===<br />
<br />
For names ($n $s) you may use the following formatting codes to display the name differently.<br />
<br />
{|<br />
|-<br />
|t<br />
|Title<br />
|<br />
|f<br />
|Given name<br />
|-<br />
|x<br />
|Common name. Call name if existing, otherwise first first name<br />
|<br />
|c<br />
|Call name<br />
|-<br />
|n<br />
|Nick name<br />
|<br />
|s<br />
|Suffix<br />
|-<br />
|l<br />
|Surname<br />
|<br />
|g<br />
|Family nickname<br />
|}<br />
<br />
These codes can be uppercased to uppercase the result.<br />
<br />
{|<br />
|-<br />
|Example code<br />
|Displays<br />
|-<br />
|<pre>$n(L, f) ($n(c)), $n(L, f){ ($n(c))}<br />
$s(f l s)</pre><br />
|<pre>SMITH, Edwin Michael (), SMITH, Edwin Michael<br />
Janice Ann Adams</pre><br />
|}<br />
<br />
<br />
<blockquote>Note:<br />
If you want to print a character 'c' within the format string (or any one of the other format codes), you will need to first add a '&#92;' in front of it. See [[#Control Variables|Control Variables]] for more.</blockquote><br />
<br />
<blockquote>Note:<br />
the curly brackets { } are used to hide information. Here it is used around ' ($n(c))' to not display ' ()' if the person does not have a call name. See [[#Grouping|Grouping]] for more.</blockquote><br />
<br />
----<br />
<br />
=== Formatting Dates ===<br />
<br />
For all of the date variables ($b $d $m $v) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|yyyy<br />
|The year as a four digit number<br />
|<br />
|yyy<br />
|The year, with a minimum of three digits<br />
|-<br />
|yy<br />
|The year, from 00 to 99<br />
|<br />
|y<br />
|The year, from 0 to 99<br />
|-<br />
|mmmm<BR><br />
MMMM<br />
|The full name of the month<BR><br />
The full name IN CAPS<br />
|<br />
|mmm<BR><br />
MMM<br />
|The abbreviated name of the month<BR><br />
The abbreviated name IN CAPS<br />
|-<br />
|mm<br />
|The month, from 00 to 12<br />
|<br />
|m<br />
|The month, from 0 to 12<br />
|-<br />
|dd<br />
|The day, from 00 to 31<br />
|<br />
|d<br />
|The day, from 0 to 31<br />
|-<br />
|o<br />
|The date type (modifier)<br />
|<br />
|<br />
|<br />
|}<br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$b(mmm-dd yy)<br />
$m(yyyy/mmm/d)<br />
$b(mmm-dd yy)</pre><br />
|<pre>May-24 61<br />
1995/May/27<br />
Jun-04 85</pre><br />
|}<br />
<br />
{{man note| For date types (modifier) |Only "Before", "After", and "About" are supported at this time. all others will not display anything.<BR><br />
And for date span and date ranges, only the starting (first) date is displayed.}}<br />
<br />
----<br />
<br />
=== Formatting Places ===<br />
<br />
For all of the place variables ($B $D $M $V) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|e<br />
|Street<br />
|<br />
|l<br />
|Locality<br />
|-<br />
|c<br />
|City<br />
|<br />
|u<br />
|County<br />
|-<br />
|s<br />
|State<br />
|<br />
|p<br />
|Postal Code<br />
|-<br />
|n<br />
|Country<br />
|<br />
|t<br />
|Title<br />
|-<br />
|x<br />
|Longitude<br />
|<br />
|y<br />
|Latitude<br />
|}<br />
These codes can be uppercased to uppercase the result. <br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
----<br />
<br />
=== Rules for format strings. ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Anything will print inside a format string<br />
|-<br />
|1a<br />
|you will have to use [[#Control Variables|Control Variables]] to display things like ')' and format codes<br />
|-<br />
|2<br />
|Separators can be within format strings.<br />
|-<br />
|3<br />
|At least ONE format code has to display something for the ENTIRE format string to display<br />
|}<br />
<br />
----<br />
<br />
=== Examples ===<br />
<br />
{|<br />
|-<br />
|code<br />
|gives<br />
|-<br />
|<pre>$n(f l)<br />
b. $b {at $B<br />
{d. $d $D</pre><br />
|<pre>Edwin Michael Smith<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA</pre>The person is still alive (or has no information present) so the line was removed.<br />
|}<br />
<br />
<br />
<br />
== Control Variables ==<br />
<br />
Control variables allow you to print characters that are special to Substitution values within a display.<br />
<br />
For example the dollar character '$' is used to note the start of a variable. If you wish to print a dollar character you would use a control character like '&#92;$'<br />
<br />
Control Variables<br />
<br />
{|<br />
|-<br />
|&#92;$<br />
|Displays a single '$'<br />
|<br />
|&#92;&#92;<br />
|Displays a single '&#92;'<br />
|-<br />
|&#92;(<br />
|Displays a single '('<br />
|<br />
|&#92;)<br />
|Displays a single ')'<br />
|-<br />
|&#92;{<br />
|Displays a single '{'<br />
|<br />
|&#92;}<br />
|Displays a single '}'<br />
|-<br />
|&#92;<<br />
|Displays a single '<'<br />
|<br />
|&#92;><br />
|Displays a single '>'<br />
|}<br />
<br />
Basically anything that comes after a '&#92;' will be printed.<br />
<br />
----<br />
Note:<br />
When you are inside a format string, you may need to use this to display a character that would normally be a format code. <br />
<br />
{|<br />
|-<br />
|Example:<br />
|would give<br />
|-<br />
|<pre>$b(m hi mom)<br />
$b(m hi \mo\m)</pre><br />
|<pre>5 hi 5o5<br />
5 hi mom</pre><br />
|}<br />
<br />
as this person was born on the fifth month.<br />
<br />
== Grouping ==<br />
<br />
There are instances where you do not want certain text to be displayed. Take the example:<br />
<br />
{|<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died on $d at $D</pre><br />
|<pre>died on 1975-06-26 at </pre> <br />
|<pre>died on at Reno, Washoe Co., NV</pre><br />
|-<br />
| colspan="3"|Neither of these are very acceptable.<br />
|-<br />
| colspan="3"|But with groups (denoted by {}), you can optionally print information if a variable within contains information.<br />
|-<br />
| colspan="3"|For example:<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died {on $d }{at $D}</pre><br />
|<pre>died on 1975-06-26</pre><br />
|<pre>died at Reno, Washoe Co., NV</pre><br />
|}<br />
<br />
which is what we want.<br />
<br />
----<br />
=== Rules for groups ===<br />
<br />
A group will only display if there is at least one variable that displays something. So if a group only has text and/or variables where the information is not known, the entire group will not print.<br />
<br />
Groups can also be nested. If this happens (like below), the outer group will only display if there is at least one variable that displays something within the outer group or any of the sub groups.<br />
<br />
Groups can also be used to remove an entire line from a display. A '{' at the start of a line will remove the entire line from the display if the above rule is true.<br />
<br />
If you do not wish to have the display code above (for death information) displayed (the person is alive, or you do not yet know the information), modify the code to look like<br />
<pre>{died {on $d }{at $D}</pre><br />
<br />
<blockquote>To have an entire line be blank instead of removing the line simply start the line with a space ' {' or make sure there is a space after the group (you will have to close the group first)</blockquote><br />
<br />
----<br />
<br />
=== Examples: ===<br />
<br />
This will hide '(' and ')' if the divorce information is not known (or still married).<br />
<br />
<pre>m. $m $M {- ($v(yyyy))</pre><br />
<br />
<br />
Only display some spouse information if married or remove the entire line if never married:<br />
<pre>{$s $m(yyyy) {- $v(\(yyyy\))}}</pre><br />
<br />
== Attributes ==<br />
<br />
Attributes do not have a format string. Instead the attribute name is placed inside []. Here is the syntax for an attribute:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name] where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'au'<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$a[Profession]<br />
$a[Social Security Number]<br />
$a[Total \$ bequeathed]</pre><br />
|<pre>Programmer<br />
7A3-29-F1C6<br />
3.00USD</pre><br />
|}<br />
<br />
<br />
----<br />
== Events ==<br />
<br />
Events have the same starting structure as attributes, $e or $t and the event name in [] but events have an extra format string after the name to display the description, date, place, id, and attributes associated with it. Each of these items can be displayed with a , a 'n', 'd', 'D', 'i', and 'a' respectively in the format string. Here is the syntax for an event:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name](format string) where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'et'<br />
<br />
=== Event format strings ===<br />
<br />
The Event format string is used to display information about the event. Here are the format codes to display parts of the event:<br />
<br />
{|<br />
|-<br />
|n<br />
|Description<br />
|<br />
|i<br />
|Event ID<br />
|-<br />
|d<br />
|Event Date&#42;<br />
|<br />
|D<br />
|Event Place&#42;<br />
|-<br />
|a<br />
|An attributes for the event&#42;&#42;<br />
|<br />
|<br />
|<br />
|}<br />
<br />
&#42;These variables can themselves have format strings. Date and a place can be formatted with format string as defined in [[#Format strings|Format strings]].<br />
<br />
&#42;&#42;Attribute needs to have the attribute name in [] and are formatted as above.<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$e[First Communion](d(yyyy-mm-d))<br />
$e[Bar Mitzvah](n&lt; at &gt; D)<br />
$e[Birth](d(yyyy mm/dd) D)</pre><br />
|<pre>2009-11-6<br />
Jerry's Bar Mitzah at Opas house<br />
2007 05/23 Grandmothers house</pre><br />
|}<br />
<br />
<br />
And:<br />
<br />
{|<br />
|-<br />
|<pre>$b(yyyy-Mmm-dd)<br />
$M</pre><br />
|is the same as<br />
|<pre>$e[Birth](d(yyyy-Mmm-dd))<br />
$t[Marriage](D)</pre><br />
|}<br />
<br />
<br />
----<br />
<br />
=== Notes for attributes and events: ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Attribute and event names are mandatory. '$a' or '$a[]' will not display anything.<br />
|-<br />
|2<br />
|Attributes and event names may have special characters within them. Most notably ']' and ')'. If this is the case, you will need to use [[#Control Variables|Control Variables]]<br />
|}<br />
<br />
== Separators ==<br />
<br />
Separators are special 'text only' groups inside '&lt;' and '&gt;' that conditionally display a separator (like ', ' or ' - ') between two groups, variables, format codes or text.<br />
<br />
Separators are displayed conditionally depending on these rules:<br />
<br />
# A variable that does '''not''' display anything will remove itself and a separator that is to the left of it from the display line only.<br />
# If there is not a separator to the left, the same variable will remove itself and a separator that is to the right of it from the displayed line. <br />
# If there are two separators together, the left one will be removed from the display line and the right is kept.<br />
# Separators at the start or end of the display line (or format strings) are removed<br />
<br />
=== Example: ===<br />
{|<br />
|-<br />
|<pre>$s(f l s)&lt;, &gt;$m(yyyy)&lt; @ &gt;$M&lt; - &gt;$v(&#92;(yyyy&#92;))</pre><br />
|}<br />
<br />
Here are some things that may happen:<br />
<br />
{|<br />
|-<br />
|If '''none''' of the variables are known<br />
|None of the separators will display<br />
|-<br />
|If only one variable '''is''' known<br />
|Only that variable will print. No separators will print.<br />
|-<br />
|If only the spouse's name '''is not''' known<br />
|The first separator will not display<br />
|-<br />
|If only the marriage date '''is not''' known<br />
|The first separator does not display. We will be left with:<br />
Jane Doe&lt; - &gt;{ … }And only the divorce date needs to be known to print the second separator.<br />
|-<br />
|If only the divorce date '''is not''' known<br />
|the second separator will not display<br />
|}<br />
<br />
<br />
Separators can be inside format strings:<br />
<br />
$n(&lt;0&gt;T&lt; &gt;L&lt;, &gt;f&lt; &gt;s)<br />
<br />
Unlike groups, separators can not cross over/out of format strings. So the separator &lt;0&gt; will NEVER display. No matter what is on the left hand side of the variable.<br />
<br />
----<br />
<br />
Here is a useful example:<br />
{|<br />
|-<br />
|<pre>{({b. $b}<, >{d. $d})}</pre><br />
|}<br />
<br />
This will:<br />
{|<br />
|-<br />
| Only print the outside () if either the birth or death date displays<br />
|-<br />
| Only displays the center separator if both dates are known.<br />
|-<br />
| So here are some thing that could display<br />
{|<br />
|-<br />
| <pre>(b. 1970-4-8)</pre><br />
| <pre>(d. 2012-3-9)</pre><br />
| <pre>(b. 1970-4-8, d. 2012-3-9)</pre><br />
| or the line does not print at all.<br />
|}<br />
|-<br />
| We will not see things like:<br />
{|<br />
|-<br />
| <pre>()</pre><br />
| <pre>(, )</pre><br />
| <pre>(b.)</pre><br />
| <pre>(b., )</pre><br />
| <pre>(d.)</pre><br />
|-<br />
| <pre>(, d.)</pre><br />
| <pre>(b. 1970-4-8, )</pre><br />
| <pre>(b. 1970-4-8, d.)</pre><br />
| <pre>(, d. 2012-3-9)</pre><br />
| <pre>(b., d. 2012-3-9)</pre><br />
|}<br />
|}<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
{{-}}<br />
<br />
{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{languages}}<br />
<br />
[[Category:Documentation]]<br />
[[Category:Plugins]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Gramps_3.4_Wiki_Manual_-_Reports_-_part_2&diff=36934Gramps 3.4 Wiki Manual - Reports - part 22012-04-30T15:54:05Z<p>Ander882: /* Example: */</p>
<hr />
<div>{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{grampsmanualcopyright}}<br />
<br />
{{languages|Gramps_3.4_Wiki_Manual_-_Reports - part 2}}<br />
<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
This section describes the substitution values that can be used in the different reports available in Gramps.<br />
<br />
= Substitution Values =<br />
<br />
Many of the graphical reports allow you to customize the information that is displayed on the reports. Variable substitution is the method that is used to substitute a particular symbol (key) for specific information about the person in the database.<br />
<br />
{|<br />
|-<br />
|Example: <br />
|Will show as: (the person is alive)<br />
|-<br />
|<pre>$n<br />
b. $b( at $B}<br />
d. $d< at >$D</pre><br />
|<pre>Smith, Edwin Michael<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA<br />
d.</pre><br />
|}<br />
<br />
----<br />
{|<br />
|-<br />
|1<br />
|A list of all available variables (The Substitution Keys) follows. If you wish to display names, date, or place information differently, you may use [[#Format Strings|Format Strings]] to accomplish this.<br />
|-<br />
|2<br />
|There are also [[#Control Variables|Control Variables]] to display special characters (like the dollar sign).<br />
|-<br />
|3<br />
|You can also use [[#Grouping|Grouping]] to optionally display information. Line 2 above, uses grouping to display ' at ' only when the birth place is known.<br />
|-<br />
|4<br />
|Along with [[#Events|Events]] you can print almost anything.<br />
|-<br />
|5<br />
|Finally, [[#Separators|Separators]], to make your life complete. Line 3 above, uses this to display ' at ' only when both the birth date and place is known.<br />
|-<br />
|}<br />
<br />
<br />
== The Substitution Keys ==<br />
<br />
{|<br />
|-<br />
| colspan="2"|'''Personal variables'''<br />
| colspan="2"|'''Marital variables'''<br />
|-<br />
|$n<br />
|Displays the person's name<br />
|$s<br />
|Displays the name of the person's spouse<br />
|-<br />
|$i<br />
|Displays the GRAMPS ID for the person.<br />
|$j<br />
|Displays the GRAMPS ID for the marriage.<br />
|-<br />
|$b<br />
|Displays the person's date of birth <br />
|$m<br />
|Displays the marriage date of the person and the spouse.<br />
|-<br />
|$B<br />
|Displays the person's place of birth <br />
|$M<br />
|Displays the place of the marriage of the person and the spouse.<br />
|-<br />
|$d<br />
|Displays the person's date of death <br />
|$v<br />
|Displays the divorce date of the person and the spouse.<br />
|-<br />
|$D<br />
|Displays the person's place of death <br />
|$V<br />
|Displays the place of the divorce of the person and the spouse.<br />
|-<br />
|$a<br />
|Displays an attribute about the person.<br />
see [[#Attributes|Attributes]] for more<br />
|$u<br />
|Displays an attribute about the marriage.<br />
see [[#Attributes|Attributes]] for more<br />
|-<br />
|$e<br />
|Displays event information about the person.<br />
See [[#Events|Events]] for more<br />
|$t<br />
|Displays an event information about the marriage.<br />
See [[#Events|Events]] for more<br />
|}<br />
<br />
All of the Marital variables are defined by the person's preferred spouse in Gramps. If the person has never been married, then these variables will not display anything.<br />
<br />
----<br />
=== Default displayed formats ===<br />
<br />
{|<br />
|-<br />
|$n $s<br />
|Names will be displayed as set in 'Name format:' on the Display tab in Gramps preferences<br />
|-<br />
|$B $D $M $V<br />
|Places will display the Place title by default<br />
|-<br />
|$b $d $m $v<br />
|Dates will be displayed as set in 'Date format:' on the Display tab in Gramps preferences<br />
|-<br />
|$e $t<br />
|Events will display the description by default<br />
|}<br />
<br />
<br />
=== Deprecated variables ===<br />
<br />
Some of the old variables were deprecated because [[#Format Strings|Format Strings]] have replaced them. So here is a list of those variables and how to achieve their results:<br />
<br />
{| {{prettytable}}<br />
|-<br />
!Old Variable<br />
!How to display it now<br />
!What is displayed<br />
|-<br />
|$f<br />
|$n<br />
|Name - as by Gramps name display under Preferences<br />
|-<br />
|$n<br />
|$n(g f)<br />
|Name - FirstName LastName<br />
|-<br />
|$N<br />
|$n(f, g)<br />
|Name - LastName, FirstName (note the explicit comma)<br />
|-<br />
|$nC<br />
|$n(g F)<br />
|Name - FirstName LastName in UPPER case<br />
|-<br />
|$NC<br />
|$n(F, g)<br />
|Name - LastName in UPPER case, FirstName<br />
|-<br />
|$by<br />
|$b(yyyy)<br />
|Date of birth, year only<br />
|-<br />
|$dy<br />
|$d(yyyy)<br />
|Date of death, year only<br />
|-<br />
|$my<br />
|$m(yyyy)<br />
|Date of preferred marriage, year only<br />
|-<br />
|$p<br />
|$s<br />
|Preferred spouse's name as by Gramps name display under Preferences<br />
|-<br />
|$s<br />
|$s(g f)<br />
|Preferred spouse's name - FirstName LastName<br />
|-<br />
|$S<br />
|$s(f, g)<br />
|Preferred spouse's name - LastName, FirstName<br />
|-<br />
|$sC<br />
|$s(g F)<br />
|Preferred spouse's name - FirstName LastName in UPPER case<br />
|-<br />
|$SC<br />
|$s(F, g)<br />
|Preferred spouse's name - LastName in UPPER case, FirstName<br />
|}<br />
<br />
== Format Strings ==<br />
<br />
Format strings are used to display names and dates differently than those assigned under Gramps Preferences. Here is the syntax for a format string:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''(format string)<br />
where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'nsijbmBMdvDVauet'<br />
<br />
A format string is any text, separators or format codes (defined below) to display information about the person.<br />
<br />
=== Formatting names ===<br />
<br />
For names ($n $s) you may use the following formatting codes to display the name differently.<br />
<br />
{|<br />
|-<br />
|t<br />
|Title<br />
|<br />
|f<br />
|Given name<br />
|-<br />
|x<br />
|Common name. Call name if existing, otherwise first first name<br />
|<br />
|c<br />
|Call name<br />
|-<br />
|n<br />
|Nick name<br />
|<br />
|s<br />
|Suffix<br />
|-<br />
|l<br />
|Surname<br />
|<br />
|g<br />
|Family nickname<br />
|}<br />
<br />
These codes can be uppercased to uppercase the result.<br />
<br />
{|<br />
|-<br />
|Example code<br />
|Displays<br />
|-<br />
|<pre>$n(L, f) ($n(c)), $n(L, f){ ($n(c))}<br />
$s(f l s)</pre><br />
|<pre>SMITH, Edwin Michael (), SMITH, Edwin Michael<br />
Janice Ann Adams</pre><br />
|}<br />
<br />
<br />
<blockquote>Note:<br />
If you want to print a character 'c' within the format string (or any one of the other format codes), you will need to first add a '&#92;' in front of it. See [[#Control Variables|Control Variables]] for more.</blockquote><br />
<br />
<blockquote>Note:<br />
the curly brackets { } are used to hide information. Here it is used around ' ($n(c))' to not display ' ()' if the person does not have a call name. See [[#Grouping|Grouping]] for more.</blockquote><br />
<br />
----<br />
<br />
=== Formatting Dates ===<br />
<br />
For all of the date variables ($b $d $m $v) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|yyyy<br />
|The year as a four digit number<br />
|<br />
|yyy<br />
|The year, with a minimum of three digits<br />
|-<br />
|yy<br />
|The year, from 00 to 99<br />
|<br />
|y<br />
|The year, from 0 to 99<br />
|-<br />
|mmmm<BR><br />
MMMM<br />
|The full name of the month<BR><br />
The full name IN CAPS<br />
|<br />
|mmm<BR><br />
MMM<br />
|The abbreviated name of the month<BR><br />
The abbreviated name IN CAPS<br />
|-<br />
|mm<br />
|The month, from 00 to 12<br />
|<br />
|m<br />
|The month, from 0 to 12<br />
|-<br />
|dd<br />
|The day, from 00 to 31<br />
|<br />
|d<br />
|The day, from 0 to 31<br />
|-<br />
|o<br />
|The date type (modifier)<br />
|<br />
|<br />
|<br />
|}<br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$b(mmm-dd yy)<br />
$m(yyyy/mmm/d)<br />
$b(mmm-dd yy)</pre><br />
|<pre>May-24 61<br />
1995/May/27<br />
Jun-04 85</pre><br />
|}<br />
<br />
{{man note| For date types (modifier) |Only "Before", "After", and "About" are supported at this time. all others will not display anything.<BR><br />
And for date span and date ranges, only the starting (first) date is displayed.}}<br />
<br />
----<br />
<br />
=== Formatting Places ===<br />
<br />
For all of the place variables ($B $D $M $V) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|e<br />
|Street<br />
|<br />
|l<br />
|Locality<br />
|-<br />
|c<br />
|City<br />
|<br />
|u<br />
|County<br />
|-<br />
|s<br />
|State<br />
|<br />
|p<br />
|Postal Code<br />
|-<br />
|n<br />
|Country<br />
|<br />
|t<br />
|Title<br />
|-<br />
|x<br />
|Longitude<br />
|<br />
|y<br />
|Latitude<br />
|}<br />
These codes can be uppercased to uppercase the result. <br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
----<br />
<br />
=== Rules for format strings. ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Anything will print inside a format string<br />
|-<br />
|1a<br />
|you will have to use [[#Control Variables|Control Variables]] to display things like ')' and format codes<br />
|-<br />
|2<br />
|Separators can be within format strings.<br />
|-<br />
|3<br />
|At least ONE format code has to display something for the ENTIRE format string to display<br />
|}<br />
<br />
----<br />
<br />
=== Examples ===<br />
<br />
{|<br />
|-<br />
|code<br />
|gives<br />
|-<br />
|<pre>$n(f l)<br />
b. $b {at $B<br />
{d. $d $D</pre><br />
|<pre>Edwin Michael Smith<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA</pre>The person is still alive (or has no information present) so the line was removed.<br />
|}<br />
<br />
<br />
<br />
== Control Variables ==<br />
<br />
Control variables allow you to print characters that are special to Substitution values within a display.<br />
<br />
For example the dollar character '$' is used to note the start of a variable. If you wish to print a dollar character you would use a control character like '&#92;$'<br />
<br />
Control Variables<br />
<br />
{|<br />
|-<br />
|&#92;$<br />
|Displays a single '$'<br />
|<br />
|&#92;&#92;<br />
|Displays a single '&#92;'<br />
|-<br />
|&#92;(<br />
|Displays a single '('<br />
|<br />
|&#92;)<br />
|Displays a single ')'<br />
|-<br />
|&#92;{<br />
|Displays a single '{'<br />
|<br />
|&#92;}<br />
|Displays a single '}'<br />
|-<br />
|&#92;<<br />
|Displays a single '<'<br />
|<br />
|&#92;><br />
|Displays a single '>'<br />
|}<br />
<br />
Basically anything that comes after a '&#92;' will be printed.<br />
<br />
----<br />
Note:<br />
When you are inside a format string, you may need to use this to display a character that would normally be a format code. <br />
<br />
{|<br />
|-<br />
|Example:<br />
|would give<br />
|-<br />
|<pre>$b(m hi mom)<br />
$b(m hi \mo\m)</pre><br />
|<pre>5 hi 5o5<br />
5 hi mom</pre><br />
|}<br />
<br />
as this person was born on the fifth month.<br />
<br />
== Grouping ==<br />
<br />
There are instances where you do not want certain text to be displayed. Take the example:<br />
<br />
{|<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died on $d at $D</pre><br />
|<pre>died on 1975-06-26 at </pre> <br />
|<pre>died on at Reno, Washoe Co., NV</pre><br />
|-<br />
| colspan="3"|Neither of these are very acceptable.<br />
|-<br />
| colspan="3"|But with groups (denoted by {}), you can optionally print information if a variable within contains information.<br />
|-<br />
| colspan="3"|For example:<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died {on $d }{at $D}</pre><br />
|<pre>died on 1975-06-26</pre><br />
|<pre>died at Reno, Washoe Co., NV</pre><br />
|}<br />
<br />
which is what we want.<br />
<br />
----<br />
=== Rules for groups ===<br />
<br />
A group will only display if there is at least one variable that displays something. So if a group only has text and/or variables where the information is not known, the entire group will not print.<br />
<br />
Groups can also be nested. If this happens (like below), the outer group will only display if there is at least one variable that displays something within the outer group or any of the sub groups.<br />
<br />
Groups can also be used to remove an entire line from a display. A '{' at the start of a line will remove the entire line from the display if the above rule is true.<br />
<br />
If you do not wish to have the display code above (for death information) displayed (the person is alive, or you do not yet know the information), modify the code to look like<br />
<pre>{died {on $d }{at $D}</pre><br />
<br />
<blockquote>To have an entire line be blank instead of removing the line simply start the line with a space ' {' or make sure there is a space after the group (you will have to close the group first)</blockquote><br />
<br />
----<br />
<br />
=== Examples: ===<br />
<br />
This will hide '(' and ')' if the divorce information is not known (or still married).<br />
<br />
<pre>m. $m $M {- ($v(yyyy))</pre><br />
<br />
<br />
Only display some spouse information if married or remove the entire line if never married:<br />
<pre>{$s $m(yyyy) {- $v(\(yyyy\))}}</pre><br />
<br />
== Attributes ==<br />
<br />
Attributes do not have a format string. Instead the attribute name is placed inside []. Here is the syntax for an attribute:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name] where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'au'<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$a[Profession]<br />
$a[Social Security Number]<br />
$a[Total \$ bequeathed]</pre><br />
|<pre>Programmer<br />
7A3-29-F1C6<br />
3.00USD</pre><br />
|}<br />
<br />
<br />
----<br />
== Events ==<br />
<br />
Events have the same starting structure as attributes, $e or $t and the event name in [] but events have an extra format string after the name to display the description, date, place, id, and attributes associated with it. Each of these items can be displayed with a , a 'n', 'd', 'D', 'i', and 'a' respectively in the format string. Here is the syntax for an event:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name](format string) where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'et'<br />
<br />
=== Event format strings ===<br />
<br />
The Event format string is used to display information about the event. Here are the format codes to display parts of the event:<br />
<br />
{|<br />
|-<br />
|n<br />
|Description<br />
|<br />
|i<br />
|Event ID<br />
|-<br />
|d<br />
|Event Date&#42;<br />
|<br />
|D<br />
|Event Place&#42;<br />
|-<br />
|a<br />
|An attributes for the event&#42;&#42;<br />
|<br />
|<br />
|<br />
|}<br />
<br />
&#42;These variables can themselves have format strings. Date and a place can be formatted with format string as defined in [[#Format strings|Format strings]].<br />
<br />
&#42;&#42;Attribute needs to have the attribute name in [] and are formatted as above.<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$e[First Communion](d(yyyy-mm-d))<br />
$e[Bar Mitzvah](n&lt; at &gt; D)<br />
$e[Birth](d(yyyy mm/dd) D)</pre><br />
|<pre>2009-11-6<br />
Jerry's Bar Mitzah at Opas house<br />
2007 05/23 Grandmothers house</pre><br />
|}<br />
<br />
<br />
And:<br />
<br />
{|<br />
|-<br />
|<pre>$b(yyyy-Mmm-dd)<br />
$M</pre><br />
|is the same as<br />
|<pre>$e[Birth](d(yyyy-Mmm-dd))<br />
$t[Marriage](D)</pre><br />
|}<br />
<br />
<br />
----<br />
<br />
=== Notes for attributes and events: ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Attribute and event names are mandatory. '$a' or '$a[]' will not display anything.<br />
|-<br />
|2<br />
|Attributes and event names may have special characters within them. Most notably ']' and ')'. If this is the case, you will need to use [[#Control Variables|Control Variables]]<br />
|}<br />
<br />
== Separators ==<br />
<br />
Separators are special 'text only' groups inside '&lt;' and '&gt;' that conditionally display a separator (like ', ' or ' - ') between two groups, variables, format codes or text.<br />
<br />
Separators are displayed conditionally depending on these rules:<br />
<br />
# A variable that does '''not''' display anything will remove itself and a separator that is to the left of it from the display line only.<br />
# If there is not a separator to the left, the same variable will remove itself and a separator that is to the right of it from the displayed line. <br />
# If there are two separators together, the left one will be removed from the display line and the right is kept.<br />
# Separators at the start or end of the display line (or format strings) are removed<br />
<br />
=== Example: ===<br />
{|<br />
|-<br />
|<pre>$s(f l s)&lt;, &gt;$m(yyyy)&lt; @ &gt;$M&lt; - &gt;$v(&#92;(yyyy&#92;))</pre><br />
|}<br />
<br />
Here are some things that may happen:<br />
<br />
{|<br />
|-<br />
|If '''none''' of the variables are known<br />
|None of the separators will display<br />
|-<br />
|If only one variable '''is''' known<br />
|Only that variable will print. No separators will print.<br />
|-<br />
|If only the spouse's name '''is not''' known<br />
|The first separator will not display<br />
|-<br />
|If only the marriage date '''is not''' known<br />
|The first separator does not display. We will be left with:<br />
Jane Doe&lt; - &gt;{ … }And only the divorce date needs to be known to print the second separator.<br />
|-<br />
|If only the divorce date '''is not''' known<br />
|the second separator will not display<br />
|}<br />
<br />
<br />
Separators can be inside format strings:<br />
<br />
$n(&lt;0&gt;T&lt; &gt;L&lt;, &gt;f&lt; &gt;s)<br />
<br />
Unlike groups, separators can not cross over/out of format strings. So the separator &lt;0&gt; will NEVER display. No matter what is on the left hand side of the variable.<br />
<br />
----<br />
<br />
Here is a useful example:<br />
{|<br />
|-<br />
|<pre>{({b. $b}<, >{d. $d})}</pre><br />
|}<br />
<br />
This will:<br />
{|<br />
|-<br />
| Only print the outside () if either the birth or death date displays<br />
|-<br />
| Only displays the center separator if both dates are known.<br />
|-<br />
| So here are some thing that could display<br />
{|<br />
|-<br />
| <pre>(b. 1970-4-8)</pre><br />
| <pre>(d. 2012-3-9)</pre><br />
| <pre>(b. 1970-4-8, d. 2012-3-9)</pre><br />
| or the line does not print at all.<br />
|}<br />
|-<br />
| We will not see things like:<br />
{|<br />
|-<br />
| <pre>()</pre><br />
| <pre>(, )</pre><br />
| <pre>(b.)</pre><br />
| <pre>(b., )</pre><br />
| <pre>(d.)</pre><br />
|-<br />
| <pre>(, d.)</pre><br />
| <pre>(b. 1970-4-8, )</pre><br />
| <pre>(b. 1970-4-8, d.)</pre><br />
| <pre>(, d. 2012-3-9)</pre><br />
| <pre>(b., d. 2012-3-9)</pre><br />
|}<br />
|}<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
{{-}}<br />
<br />
{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{languages}}<br />
<br />
[[Category:Documentation]]<br />
[[Category:Plugins]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Gramps_3.4_Wiki_Manual_-_Reports_-_part_2&diff=36933Gramps 3.4 Wiki Manual - Reports - part 22012-04-30T15:52:12Z<p>Ander882: /* Example: */</p>
<hr />
<div>{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{grampsmanualcopyright}}<br />
<br />
{{languages|Gramps_3.4_Wiki_Manual_-_Reports - part 2}}<br />
<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
This section describes the substitution values that can be used in the different reports available in Gramps.<br />
<br />
= Substitution Values =<br />
<br />
Many of the graphical reports allow you to customize the information that is displayed on the reports. Variable substitution is the method that is used to substitute a particular symbol (key) for specific information about the person in the database.<br />
<br />
{|<br />
|-<br />
|Example: <br />
|Will show as: (the person is alive)<br />
|-<br />
|<pre>$n<br />
b. $b( at $B}<br />
d. $d< at >$D</pre><br />
|<pre>Smith, Edwin Michael<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA<br />
d.</pre><br />
|}<br />
<br />
----<br />
{|<br />
|-<br />
|1<br />
|A list of all available variables (The Substitution Keys) follows. If you wish to display names, date, or place information differently, you may use [[#Format Strings|Format Strings]] to accomplish this.<br />
|-<br />
|2<br />
|There are also [[#Control Variables|Control Variables]] to display special characters (like the dollar sign).<br />
|-<br />
|3<br />
|You can also use [[#Grouping|Grouping]] to optionally display information. Line 2 above, uses grouping to display ' at ' only when the birth place is known.<br />
|-<br />
|4<br />
|Along with [[#Events|Events]] you can print almost anything.<br />
|-<br />
|5<br />
|Finally, [[#Separators|Separators]], to make your life complete. Line 3 above, uses this to display ' at ' only when both the birth date and place is known.<br />
|-<br />
|}<br />
<br />
<br />
== The Substitution Keys ==<br />
<br />
{|<br />
|-<br />
| colspan="2"|'''Personal variables'''<br />
| colspan="2"|'''Marital variables'''<br />
|-<br />
|$n<br />
|Displays the person's name<br />
|$s<br />
|Displays the name of the person's spouse<br />
|-<br />
|$i<br />
|Displays the GRAMPS ID for the person.<br />
|$j<br />
|Displays the GRAMPS ID for the marriage.<br />
|-<br />
|$b<br />
|Displays the person's date of birth <br />
|$m<br />
|Displays the marriage date of the person and the spouse.<br />
|-<br />
|$B<br />
|Displays the person's place of birth <br />
|$M<br />
|Displays the place of the marriage of the person and the spouse.<br />
|-<br />
|$d<br />
|Displays the person's date of death <br />
|$v<br />
|Displays the divorce date of the person and the spouse.<br />
|-<br />
|$D<br />
|Displays the person's place of death <br />
|$V<br />
|Displays the place of the divorce of the person and the spouse.<br />
|-<br />
|$a<br />
|Displays an attribute about the person.<br />
see [[#Attributes|Attributes]] for more<br />
|$u<br />
|Displays an attribute about the marriage.<br />
see [[#Attributes|Attributes]] for more<br />
|-<br />
|$e<br />
|Displays event information about the person.<br />
See [[#Events|Events]] for more<br />
|$t<br />
|Displays an event information about the marriage.<br />
See [[#Events|Events]] for more<br />
|}<br />
<br />
All of the Marital variables are defined by the person's preferred spouse in Gramps. If the person has never been married, then these variables will not display anything.<br />
<br />
----<br />
=== Default displayed formats ===<br />
<br />
{|<br />
|-<br />
|$n $s<br />
|Names will be displayed as set in 'Name format:' on the Display tab in Gramps preferences<br />
|-<br />
|$B $D $M $V<br />
|Places will display the Place title by default<br />
|-<br />
|$b $d $m $v<br />
|Dates will be displayed as set in 'Date format:' on the Display tab in Gramps preferences<br />
|-<br />
|$e $t<br />
|Events will display the description by default<br />
|}<br />
<br />
<br />
=== Deprecated variables ===<br />
<br />
Some of the old variables were deprecated because [[#Format Strings|Format Strings]] have replaced them. So here is a list of those variables and how to achieve their results:<br />
<br />
{| {{prettytable}}<br />
|-<br />
!Old Variable<br />
!How to display it now<br />
!What is displayed<br />
|-<br />
|$f<br />
|$n<br />
|Name - as by Gramps name display under Preferences<br />
|-<br />
|$n<br />
|$n(g f)<br />
|Name - FirstName LastName<br />
|-<br />
|$N<br />
|$n(f, g)<br />
|Name - LastName, FirstName (note the explicit comma)<br />
|-<br />
|$nC<br />
|$n(g F)<br />
|Name - FirstName LastName in UPPER case<br />
|-<br />
|$NC<br />
|$n(F, g)<br />
|Name - LastName in UPPER case, FirstName<br />
|-<br />
|$by<br />
|$b(yyyy)<br />
|Date of birth, year only<br />
|-<br />
|$dy<br />
|$d(yyyy)<br />
|Date of death, year only<br />
|-<br />
|$my<br />
|$m(yyyy)<br />
|Date of preferred marriage, year only<br />
|-<br />
|$p<br />
|$s<br />
|Preferred spouse's name as by Gramps name display under Preferences<br />
|-<br />
|$s<br />
|$s(g f)<br />
|Preferred spouse's name - FirstName LastName<br />
|-<br />
|$S<br />
|$s(f, g)<br />
|Preferred spouse's name - LastName, FirstName<br />
|-<br />
|$sC<br />
|$s(g F)<br />
|Preferred spouse's name - FirstName LastName in UPPER case<br />
|-<br />
|$SC<br />
|$s(F, g)<br />
|Preferred spouse's name - LastName in UPPER case, FirstName<br />
|}<br />
<br />
== Format Strings ==<br />
<br />
Format strings are used to display names and dates differently than those assigned under Gramps Preferences. Here is the syntax for a format string:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''(format string)<br />
where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'nsijbmBMdvDVauet'<br />
<br />
A format string is any text, separators or format codes (defined below) to display information about the person.<br />
<br />
=== Formatting names ===<br />
<br />
For names ($n $s) you may use the following formatting codes to display the name differently.<br />
<br />
{|<br />
|-<br />
|t<br />
|Title<br />
|<br />
|f<br />
|Given name<br />
|-<br />
|x<br />
|Common name. Call name if existing, otherwise first first name<br />
|<br />
|c<br />
|Call name<br />
|-<br />
|n<br />
|Nick name<br />
|<br />
|s<br />
|Suffix<br />
|-<br />
|l<br />
|Surname<br />
|<br />
|g<br />
|Family nickname<br />
|}<br />
<br />
These codes can be uppercased to uppercase the result.<br />
<br />
{|<br />
|-<br />
|Example code<br />
|Displays<br />
|-<br />
|<pre>$n(L, f) ($n(c)), $n(L, f){ ($n(c))}<br />
$s(f l s)</pre><br />
|<pre>SMITH, Edwin Michael (), SMITH, Edwin Michael<br />
Janice Ann Adams</pre><br />
|}<br />
<br />
<br />
<blockquote>Note:<br />
If you want to print a character 'c' within the format string (or any one of the other format codes), you will need to first add a '&#92;' in front of it. See [[#Control Variables|Control Variables]] for more.</blockquote><br />
<br />
<blockquote>Note:<br />
the curly brackets { } are used to hide information. Here it is used around ' ($n(c))' to not display ' ()' if the person does not have a call name. See [[#Grouping|Grouping]] for more.</blockquote><br />
<br />
----<br />
<br />
=== Formatting Dates ===<br />
<br />
For all of the date variables ($b $d $m $v) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|yyyy<br />
|The year as a four digit number<br />
|<br />
|yyy<br />
|The year, with a minimum of three digits<br />
|-<br />
|yy<br />
|The year, from 00 to 99<br />
|<br />
|y<br />
|The year, from 0 to 99<br />
|-<br />
|mmmm<BR><br />
MMMM<br />
|The full name of the month<BR><br />
The full name IN CAPS<br />
|<br />
|mmm<BR><br />
MMM<br />
|The abbreviated name of the month<BR><br />
The abbreviated name IN CAPS<br />
|-<br />
|mm<br />
|The month, from 00 to 12<br />
|<br />
|m<br />
|The month, from 0 to 12<br />
|-<br />
|dd<br />
|The day, from 00 to 31<br />
|<br />
|d<br />
|The day, from 0 to 31<br />
|-<br />
|o<br />
|The date type (modifier)<br />
|<br />
|<br />
|<br />
|}<br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$b(mmm-dd yy)<br />
$m(yyyy/mmm/d)<br />
$b(mmm-dd yy)</pre><br />
|<pre>May-24 61<br />
1995/May/27<br />
Jun-04 85</pre><br />
|}<br />
<br />
{{man note| For date types (modifier) |Only "Before", "After", and "About" are supported at this time. all others will not display anything.<BR><br />
And for date span and date ranges, only the starting (first) date is displayed.}}<br />
<br />
----<br />
<br />
=== Formatting Places ===<br />
<br />
For all of the place variables ($B $D $M $V) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|e<br />
|Street<br />
|<br />
|l<br />
|Locality<br />
|-<br />
|c<br />
|City<br />
|<br />
|u<br />
|County<br />
|-<br />
|s<br />
|State<br />
|<br />
|p<br />
|Postal Code<br />
|-<br />
|n<br />
|Country<br />
|<br />
|t<br />
|Title<br />
|-<br />
|x<br />
|Longitude<br />
|<br />
|y<br />
|Latitude<br />
|}<br />
These codes can be uppercased to uppercase the result. <br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
----<br />
<br />
=== Rules for format strings. ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Anything will print inside a format string<br />
|-<br />
|1a<br />
|you will have to use [[#Control Variables|Control Variables]] to display things like ')' and format codes<br />
|-<br />
|2<br />
|Separators can be within format strings.<br />
|-<br />
|3<br />
|At least ONE format code has to display something for the ENTIRE format string to display<br />
|}<br />
<br />
----<br />
<br />
=== Examples ===<br />
<br />
{|<br />
|-<br />
|code<br />
|gives<br />
|-<br />
|<pre>$n(f l)<br />
b. $b {at $B<br />
{d. $d $D</pre><br />
|<pre>Edwin Michael Smith<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA</pre>The person is still alive (or has no information present) so the line was removed.<br />
|}<br />
<br />
<br />
<br />
== Control Variables ==<br />
<br />
Control variables allow you to print characters that are special to Substitution values within a display.<br />
<br />
For example the dollar character '$' is used to note the start of a variable. If you wish to print a dollar character you would use a control character like '&#92;$'<br />
<br />
Control Variables<br />
<br />
{|<br />
|-<br />
|&#92;$<br />
|Displays a single '$'<br />
|<br />
|&#92;&#92;<br />
|Displays a single '&#92;'<br />
|-<br />
|&#92;(<br />
|Displays a single '('<br />
|<br />
|&#92;)<br />
|Displays a single ')'<br />
|-<br />
|&#92;{<br />
|Displays a single '{'<br />
|<br />
|&#92;}<br />
|Displays a single '}'<br />
|-<br />
|&#92;<<br />
|Displays a single '<'<br />
|<br />
|&#92;><br />
|Displays a single '>'<br />
|}<br />
<br />
Basically anything that comes after a '&#92;' will be printed.<br />
<br />
----<br />
Note:<br />
When you are inside a format string, you may need to use this to display a character that would normally be a format code. <br />
<br />
{|<br />
|-<br />
|Example:<br />
|would give<br />
|-<br />
|<pre>$b(m hi mom)<br />
$b(m hi \mo\m)</pre><br />
|<pre>5 hi 5o5<br />
5 hi mom</pre><br />
|}<br />
<br />
as this person was born on the fifth month.<br />
<br />
== Grouping ==<br />
<br />
There are instances where you do not want certain text to be displayed. Take the example:<br />
<br />
{|<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died on $d at $D</pre><br />
|<pre>died on 1975-06-26 at </pre> <br />
|<pre>died on at Reno, Washoe Co., NV</pre><br />
|-<br />
| colspan="3"|Neither of these are very acceptable.<br />
|-<br />
| colspan="3"|But with groups (denoted by {}), you can optionally print information if a variable within contains information.<br />
|-<br />
| colspan="3"|For example:<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died {on $d }{at $D}</pre><br />
|<pre>died on 1975-06-26</pre><br />
|<pre>died at Reno, Washoe Co., NV</pre><br />
|}<br />
<br />
which is what we want.<br />
<br />
----<br />
=== Rules for groups ===<br />
<br />
A group will only display if there is at least one variable that displays something. So if a group only has text and/or variables where the information is not known, the entire group will not print.<br />
<br />
Groups can also be nested. If this happens (like below), the outer group will only display if there is at least one variable that displays something within the outer group or any of the sub groups.<br />
<br />
Groups can also be used to remove an entire line from a display. A '{' at the start of a line will remove the entire line from the display if the above rule is true.<br />
<br />
If you do not wish to have the display code above (for death information) displayed (the person is alive, or you do not yet know the information), modify the code to look like<br />
<pre>{died {on $d }{at $D}</pre><br />
<br />
<blockquote>To have an entire line be blank instead of removing the line simply start the line with a space ' {' or make sure there is a space after the group (you will have to close the group first)</blockquote><br />
<br />
----<br />
<br />
=== Examples: ===<br />
<br />
This will hide '(' and ')' if the divorce information is not known (or still married).<br />
<br />
<pre>m. $m $M {- ($v(yyyy))</pre><br />
<br />
<br />
Only display some spouse information if married or remove the entire line if never married:<br />
<pre>{$s $m(yyyy) {- $v(\(yyyy\))}}</pre><br />
<br />
== Attributes ==<br />
<br />
Attributes do not have a format string. Instead the attribute name is placed inside []. Here is the syntax for an attribute:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name] where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'au'<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$a[Profession]<br />
$a[Social Security Number]<br />
$a[Total \$ bequeathed]</pre><br />
|<pre>Programmer<br />
7A3-29-F1C6<br />
3.00USD</pre><br />
|}<br />
<br />
<br />
----<br />
== Events ==<br />
<br />
Events have the same starting structure as attributes, $e or $t and the event name in [] but events have an extra format string after the name to display the description, date, place, id, and attributes associated with it. Each of these items can be displayed with a , a 'n', 'd', 'D', 'i', and 'a' respectively in the format string. Here is the syntax for an event:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name](format string) where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'et'<br />
<br />
=== Event format strings ===<br />
<br />
The Event format string is used to display information about the event. Here are the format codes to display parts of the event:<br />
<br />
{|<br />
|-<br />
|n<br />
|Description<br />
|<br />
|i<br />
|Event ID<br />
|-<br />
|d<br />
|Event Date&#42;<br />
|<br />
|D<br />
|Event Place&#42;<br />
|-<br />
|a<br />
|An attributes for the event&#42;&#42;<br />
|<br />
|<br />
|<br />
|}<br />
<br />
&#42;These variables can themselves have format strings. Date and a place can be formatted with format string as defined in [[#Format strings|Format strings]].<br />
<br />
&#42;&#42;Attribute needs to have the attribute name in [] and are formatted as above.<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$e[First Communion](d(yyyy-mm-d))<br />
$e[Bar Mitzvah](n&lt; at &gt; D)<br />
$e[Birth](d(yyyy mm/dd) D)</pre><br />
|<pre>2009-11-6<br />
Jerry's Bar Mitzah at Opas house<br />
2007 05/23 Grandmothers house</pre><br />
|}<br />
<br />
<br />
And:<br />
<br />
{|<br />
|-<br />
|<pre>$b(yyyy-Mmm-dd)<br />
$M</pre><br />
|is the same as<br />
|<pre>$e[Birth](d(yyyy-Mmm-dd))<br />
$t[Marriage](D)</pre><br />
|}<br />
<br />
<br />
----<br />
<br />
=== Notes for attributes and events: ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Attribute and event names are mandatory. '$a' or '$a[]' will not display anything.<br />
|-<br />
|2<br />
|Attributes and event names may have special characters within them. Most notably ']' and ')'. If this is the case, you will need to use [[#Control Variables|Control Variables]]<br />
|}<br />
<br />
== Separators ==<br />
<br />
Separators are special 'text only' groups inside '&lt;' and '&gt;' that conditionally display a separator (like ', ' or ' - ') between two groups, variables, format codes or text.<br />
<br />
Separators are displayed conditionally depending on these rules:<br />
<br />
# A variable that does '''not''' display anything will remove itself and a separator that is to the left of it from the display line only.<br />
# If there is not a separator to the left, the same variable will remove itself and a separator that is to the right of it from the displayed line. <br />
# If there are two separators together, the left one will be removed from the display line and the right is kept.<br />
# Separators at the start or end of the display line (or format strings) are removed<br />
<br />
=== Example: ===<br />
{|<br />
|-<br />
|<pre>$s(f l)&lt;, &gt;$m(yyyy)&lt; @ &gt;$M&lt; - &gt;$v(&#92;(yyyy&#92;))</pre><br />
|}<br />
<br />
Here are some things that may happen:<br />
<br />
{|<br />
|-<br />
|If '''none''' of the variables are known<br />
|None of the separators will display<br />
|-<br />
|If only one variable '''is''' known<br />
|Only that variable will print. No separators will print.<br />
|-<br />
|If only the spouse's name '''is not''' known<br />
|The first separator will not display<br />
|-<br />
|If only the marriage date '''is not''' known<br />
|The first separator does not display. We will be left with:<br />
Jane Doe&lt; - &gt;{ … }And only the divorce date needs to be known to print the second separator.<br />
|-<br />
|If only the divorce date '''is not''' known<br />
|the second separator will not display<br />
|}<br />
<br />
<br />
Separators can be inside format strings:<br />
<br />
$n(&lt;0&gt;T&lt; &gt;L&lt;, &gt;f&lt; &gt;s)<br />
<br />
Unlike groups, separators can not cross over/out of format strings. So the separator &lt;0&gt; will NEVER display. No matter what is on the left hand side of the variable.<br />
<br />
----<br />
<br />
Here is a useful example:<br />
{|<br />
|-<br />
|<pre>{({b. $b}<, >{d. $d})}</pre><br />
|}<br />
<br />
This will:<br />
{|<br />
|-<br />
| Only print the outside () if either the birth or death date displays<br />
|-<br />
| Only displays the center separator if both dates are known.<br />
|-<br />
| So here are some thing that could display<br />
{|<br />
|-<br />
| <pre>(b. 1970-4-8)</pre><br />
| <pre>(d. 2012-3-9)</pre><br />
| <pre>(b. 1970-4-8, d. 2012-3-9)</pre><br />
| or the line does not print at all.<br />
|}<br />
|-<br />
| We will not see things like:<br />
{|<br />
|-<br />
| <pre>()</pre><br />
| <pre>(, )</pre><br />
| <pre>(b.)</pre><br />
| <pre>(b., )</pre><br />
| <pre>(d.)</pre><br />
|-<br />
| <pre>(, d.)</pre><br />
| <pre>(b. 1970-4-8, )</pre><br />
| <pre>(b. 1970-4-8, d.)</pre><br />
| <pre>(, d. 2012-3-9)</pre><br />
| <pre>(b., d. 2012-3-9)</pre><br />
|}<br />
|}<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
{{-}}<br />
<br />
{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{languages}}<br />
<br />
[[Category:Documentation]]<br />
[[Category:Plugins]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Gramps_3.4_Wiki_Manual_-_Reports_-_part_2&diff=36932Gramps 3.4 Wiki Manual - Reports - part 22012-04-30T15:51:13Z<p>Ander882: /* Separators */</p>
<hr />
<div>{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{grampsmanualcopyright}}<br />
<br />
{{languages|Gramps_3.4_Wiki_Manual_-_Reports - part 2}}<br />
<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
This section describes the substitution values that can be used in the different reports available in Gramps.<br />
<br />
= Substitution Values =<br />
<br />
Many of the graphical reports allow you to customize the information that is displayed on the reports. Variable substitution is the method that is used to substitute a particular symbol (key) for specific information about the person in the database.<br />
<br />
{|<br />
|-<br />
|Example: <br />
|Will show as: (the person is alive)<br />
|-<br />
|<pre>$n<br />
b. $b( at $B}<br />
d. $d< at >$D</pre><br />
|<pre>Smith, Edwin Michael<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA<br />
d.</pre><br />
|}<br />
<br />
----<br />
{|<br />
|-<br />
|1<br />
|A list of all available variables (The Substitution Keys) follows. If you wish to display names, date, or place information differently, you may use [[#Format Strings|Format Strings]] to accomplish this.<br />
|-<br />
|2<br />
|There are also [[#Control Variables|Control Variables]] to display special characters (like the dollar sign).<br />
|-<br />
|3<br />
|You can also use [[#Grouping|Grouping]] to optionally display information. Line 2 above, uses grouping to display ' at ' only when the birth place is known.<br />
|-<br />
|4<br />
|Along with [[#Events|Events]] you can print almost anything.<br />
|-<br />
|5<br />
|Finally, [[#Separators|Separators]], to make your life complete. Line 3 above, uses this to display ' at ' only when both the birth date and place is known.<br />
|-<br />
|}<br />
<br />
<br />
== The Substitution Keys ==<br />
<br />
{|<br />
|-<br />
| colspan="2"|'''Personal variables'''<br />
| colspan="2"|'''Marital variables'''<br />
|-<br />
|$n<br />
|Displays the person's name<br />
|$s<br />
|Displays the name of the person's spouse<br />
|-<br />
|$i<br />
|Displays the GRAMPS ID for the person.<br />
|$j<br />
|Displays the GRAMPS ID for the marriage.<br />
|-<br />
|$b<br />
|Displays the person's date of birth <br />
|$m<br />
|Displays the marriage date of the person and the spouse.<br />
|-<br />
|$B<br />
|Displays the person's place of birth <br />
|$M<br />
|Displays the place of the marriage of the person and the spouse.<br />
|-<br />
|$d<br />
|Displays the person's date of death <br />
|$v<br />
|Displays the divorce date of the person and the spouse.<br />
|-<br />
|$D<br />
|Displays the person's place of death <br />
|$V<br />
|Displays the place of the divorce of the person and the spouse.<br />
|-<br />
|$a<br />
|Displays an attribute about the person.<br />
see [[#Attributes|Attributes]] for more<br />
|$u<br />
|Displays an attribute about the marriage.<br />
see [[#Attributes|Attributes]] for more<br />
|-<br />
|$e<br />
|Displays event information about the person.<br />
See [[#Events|Events]] for more<br />
|$t<br />
|Displays an event information about the marriage.<br />
See [[#Events|Events]] for more<br />
|}<br />
<br />
All of the Marital variables are defined by the person's preferred spouse in Gramps. If the person has never been married, then these variables will not display anything.<br />
<br />
----<br />
=== Default displayed formats ===<br />
<br />
{|<br />
|-<br />
|$n $s<br />
|Names will be displayed as set in 'Name format:' on the Display tab in Gramps preferences<br />
|-<br />
|$B $D $M $V<br />
|Places will display the Place title by default<br />
|-<br />
|$b $d $m $v<br />
|Dates will be displayed as set in 'Date format:' on the Display tab in Gramps preferences<br />
|-<br />
|$e $t<br />
|Events will display the description by default<br />
|}<br />
<br />
<br />
=== Deprecated variables ===<br />
<br />
Some of the old variables were deprecated because [[#Format Strings|Format Strings]] have replaced them. So here is a list of those variables and how to achieve their results:<br />
<br />
{| {{prettytable}}<br />
|-<br />
!Old Variable<br />
!How to display it now<br />
!What is displayed<br />
|-<br />
|$f<br />
|$n<br />
|Name - as by Gramps name display under Preferences<br />
|-<br />
|$n<br />
|$n(g f)<br />
|Name - FirstName LastName<br />
|-<br />
|$N<br />
|$n(f, g)<br />
|Name - LastName, FirstName (note the explicit comma)<br />
|-<br />
|$nC<br />
|$n(g F)<br />
|Name - FirstName LastName in UPPER case<br />
|-<br />
|$NC<br />
|$n(F, g)<br />
|Name - LastName in UPPER case, FirstName<br />
|-<br />
|$by<br />
|$b(yyyy)<br />
|Date of birth, year only<br />
|-<br />
|$dy<br />
|$d(yyyy)<br />
|Date of death, year only<br />
|-<br />
|$my<br />
|$m(yyyy)<br />
|Date of preferred marriage, year only<br />
|-<br />
|$p<br />
|$s<br />
|Preferred spouse's name as by Gramps name display under Preferences<br />
|-<br />
|$s<br />
|$s(g f)<br />
|Preferred spouse's name - FirstName LastName<br />
|-<br />
|$S<br />
|$s(f, g)<br />
|Preferred spouse's name - LastName, FirstName<br />
|-<br />
|$sC<br />
|$s(g F)<br />
|Preferred spouse's name - FirstName LastName in UPPER case<br />
|-<br />
|$SC<br />
|$s(F, g)<br />
|Preferred spouse's name - LastName in UPPER case, FirstName<br />
|}<br />
<br />
== Format Strings ==<br />
<br />
Format strings are used to display names and dates differently than those assigned under Gramps Preferences. Here is the syntax for a format string:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''(format string)<br />
where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'nsijbmBMdvDVauet'<br />
<br />
A format string is any text, separators or format codes (defined below) to display information about the person.<br />
<br />
=== Formatting names ===<br />
<br />
For names ($n $s) you may use the following formatting codes to display the name differently.<br />
<br />
{|<br />
|-<br />
|t<br />
|Title<br />
|<br />
|f<br />
|Given name<br />
|-<br />
|x<br />
|Common name. Call name if existing, otherwise first first name<br />
|<br />
|c<br />
|Call name<br />
|-<br />
|n<br />
|Nick name<br />
|<br />
|s<br />
|Suffix<br />
|-<br />
|l<br />
|Surname<br />
|<br />
|g<br />
|Family nickname<br />
|}<br />
<br />
These codes can be uppercased to uppercase the result.<br />
<br />
{|<br />
|-<br />
|Example code<br />
|Displays<br />
|-<br />
|<pre>$n(L, f) ($n(c)), $n(L, f){ ($n(c))}<br />
$s(f l s)</pre><br />
|<pre>SMITH, Edwin Michael (), SMITH, Edwin Michael<br />
Janice Ann Adams</pre><br />
|}<br />
<br />
<br />
<blockquote>Note:<br />
If you want to print a character 'c' within the format string (or any one of the other format codes), you will need to first add a '&#92;' in front of it. See [[#Control Variables|Control Variables]] for more.</blockquote><br />
<br />
<blockquote>Note:<br />
the curly brackets { } are used to hide information. Here it is used around ' ($n(c))' to not display ' ()' if the person does not have a call name. See [[#Grouping|Grouping]] for more.</blockquote><br />
<br />
----<br />
<br />
=== Formatting Dates ===<br />
<br />
For all of the date variables ($b $d $m $v) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|yyyy<br />
|The year as a four digit number<br />
|<br />
|yyy<br />
|The year, with a minimum of three digits<br />
|-<br />
|yy<br />
|The year, from 00 to 99<br />
|<br />
|y<br />
|The year, from 0 to 99<br />
|-<br />
|mmmm<BR><br />
MMMM<br />
|The full name of the month<BR><br />
The full name IN CAPS<br />
|<br />
|mmm<BR><br />
MMM<br />
|The abbreviated name of the month<BR><br />
The abbreviated name IN CAPS<br />
|-<br />
|mm<br />
|The month, from 00 to 12<br />
|<br />
|m<br />
|The month, from 0 to 12<br />
|-<br />
|dd<br />
|The day, from 00 to 31<br />
|<br />
|d<br />
|The day, from 0 to 31<br />
|-<br />
|o<br />
|The date type (modifier)<br />
|<br />
|<br />
|<br />
|}<br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$b(mmm-dd yy)<br />
$m(yyyy/mmm/d)<br />
$b(mmm-dd yy)</pre><br />
|<pre>May-24 61<br />
1995/May/27<br />
Jun-04 85</pre><br />
|}<br />
<br />
{{man note| For date types (modifier) |Only "Before", "After", and "About" are supported at this time. all others will not display anything.<BR><br />
And for date span and date ranges, only the starting (first) date is displayed.}}<br />
<br />
----<br />
<br />
=== Formatting Places ===<br />
<br />
For all of the place variables ($B $D $M $V) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|e<br />
|Street<br />
|<br />
|l<br />
|Locality<br />
|-<br />
|c<br />
|City<br />
|<br />
|u<br />
|County<br />
|-<br />
|s<br />
|State<br />
|<br />
|p<br />
|Postal Code<br />
|-<br />
|n<br />
|Country<br />
|<br />
|t<br />
|Title<br />
|-<br />
|x<br />
|Longitude<br />
|<br />
|y<br />
|Latitude<br />
|}<br />
These codes can be uppercased to uppercase the result. <br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
----<br />
<br />
=== Rules for format strings. ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Anything will print inside a format string<br />
|-<br />
|1a<br />
|you will have to use [[#Control Variables|Control Variables]] to display things like ')' and format codes<br />
|-<br />
|2<br />
|Separators can be within format strings.<br />
|-<br />
|3<br />
|At least ONE format code has to display something for the ENTIRE format string to display<br />
|}<br />
<br />
----<br />
<br />
=== Examples ===<br />
<br />
{|<br />
|-<br />
|code<br />
|gives<br />
|-<br />
|<pre>$n(f l)<br />
b. $b {at $B<br />
{d. $d $D</pre><br />
|<pre>Edwin Michael Smith<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA</pre>The person is still alive (or has no information present) so the line was removed.<br />
|}<br />
<br />
<br />
<br />
== Control Variables ==<br />
<br />
Control variables allow you to print characters that are special to Substitution values within a display.<br />
<br />
For example the dollar character '$' is used to note the start of a variable. If you wish to print a dollar character you would use a control character like '&#92;$'<br />
<br />
Control Variables<br />
<br />
{|<br />
|-<br />
|&#92;$<br />
|Displays a single '$'<br />
|<br />
|&#92;&#92;<br />
|Displays a single '&#92;'<br />
|-<br />
|&#92;(<br />
|Displays a single '('<br />
|<br />
|&#92;)<br />
|Displays a single ')'<br />
|-<br />
|&#92;{<br />
|Displays a single '{'<br />
|<br />
|&#92;}<br />
|Displays a single '}'<br />
|-<br />
|&#92;<<br />
|Displays a single '<'<br />
|<br />
|&#92;><br />
|Displays a single '>'<br />
|}<br />
<br />
Basically anything that comes after a '&#92;' will be printed.<br />
<br />
----<br />
Note:<br />
When you are inside a format string, you may need to use this to display a character that would normally be a format code. <br />
<br />
{|<br />
|-<br />
|Example:<br />
|would give<br />
|-<br />
|<pre>$b(m hi mom)<br />
$b(m hi \mo\m)</pre><br />
|<pre>5 hi 5o5<br />
5 hi mom</pre><br />
|}<br />
<br />
as this person was born on the fifth month.<br />
<br />
== Grouping ==<br />
<br />
There are instances where you do not want certain text to be displayed. Take the example:<br />
<br />
{|<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died on $d at $D</pre><br />
|<pre>died on 1975-06-26 at </pre> <br />
|<pre>died on at Reno, Washoe Co., NV</pre><br />
|-<br />
| colspan="3"|Neither of these are very acceptable.<br />
|-<br />
| colspan="3"|But with groups (denoted by {}), you can optionally print information if a variable within contains information.<br />
|-<br />
| colspan="3"|For example:<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died {on $d }{at $D}</pre><br />
|<pre>died on 1975-06-26</pre><br />
|<pre>died at Reno, Washoe Co., NV</pre><br />
|}<br />
<br />
which is what we want.<br />
<br />
----<br />
=== Rules for groups ===<br />
<br />
A group will only display if there is at least one variable that displays something. So if a group only has text and/or variables where the information is not known, the entire group will not print.<br />
<br />
Groups can also be nested. If this happens (like below), the outer group will only display if there is at least one variable that displays something within the outer group or any of the sub groups.<br />
<br />
Groups can also be used to remove an entire line from a display. A '{' at the start of a line will remove the entire line from the display if the above rule is true.<br />
<br />
If you do not wish to have the display code above (for death information) displayed (the person is alive, or you do not yet know the information), modify the code to look like<br />
<pre>{died {on $d }{at $D}</pre><br />
<br />
<blockquote>To have an entire line be blank instead of removing the line simply start the line with a space ' {' or make sure there is a space after the group (you will have to close the group first)</blockquote><br />
<br />
----<br />
<br />
=== Examples: ===<br />
<br />
This will hide '(' and ')' if the divorce information is not known (or still married).<br />
<br />
<pre>m. $m $M {- ($v(yyyy))</pre><br />
<br />
<br />
Only display some spouse information if married or remove the entire line if never married:<br />
<pre>{$s $m(yyyy) {- $v(\(yyyy\))}}</pre><br />
<br />
== Attributes ==<br />
<br />
Attributes do not have a format string. Instead the attribute name is placed inside []. Here is the syntax for an attribute:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name] where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'au'<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$a[Profession]<br />
$a[Social Security Number]<br />
$a[Total \$ bequeathed]</pre><br />
|<pre>Programmer<br />
7A3-29-F1C6<br />
3.00USD</pre><br />
|}<br />
<br />
<br />
----<br />
== Events ==<br />
<br />
Events have the same starting structure as attributes, $e or $t and the event name in [] but events have an extra format string after the name to display the description, date, place, id, and attributes associated with it. Each of these items can be displayed with a , a 'n', 'd', 'D', 'i', and 'a' respectively in the format string. Here is the syntax for an event:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name](format string) where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'et'<br />
<br />
=== Event format strings ===<br />
<br />
The Event format string is used to display information about the event. Here are the format codes to display parts of the event:<br />
<br />
{|<br />
|-<br />
|n<br />
|Description<br />
|<br />
|i<br />
|Event ID<br />
|-<br />
|d<br />
|Event Date&#42;<br />
|<br />
|D<br />
|Event Place&#42;<br />
|-<br />
|a<br />
|An attributes for the event&#42;&#42;<br />
|<br />
|<br />
|<br />
|}<br />
<br />
&#42;These variables can themselves have format strings. Date and a place can be formatted with format string as defined in [[#Format strings|Format strings]].<br />
<br />
&#42;&#42;Attribute needs to have the attribute name in [] and are formatted as above.<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$e[First Communion](d(yyyy-mm-d))<br />
$e[Bar Mitzvah](n&lt; at &gt; D)<br />
$e[Birth](d(yyyy mm/dd) D)</pre><br />
|<pre>2009-11-6<br />
Jerry's Bar Mitzah at Opas house<br />
2007 05/23 Grandmothers house</pre><br />
|}<br />
<br />
<br />
And:<br />
<br />
{|<br />
|-<br />
|<pre>$b(yyyy-Mmm-dd)<br />
$M</pre><br />
|is the same as<br />
|<pre>$e[Birth](d(yyyy-Mmm-dd))<br />
$t[Marriage](D)</pre><br />
|}<br />
<br />
<br />
----<br />
<br />
=== Notes for attributes and events: ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Attribute and event names are mandatory. '$a' or '$a[]' will not display anything.<br />
|-<br />
|2<br />
|Attributes and event names may have special characters within them. Most notably ']' and ')'. If this is the case, you will need to use [[#Control Variables|Control Variables]]<br />
|}<br />
<br />
== Separators ==<br />
<br />
Separators are special 'text only' groups inside '&lt;' and '&gt;' that conditionally display a separator (like ', ' or ' - ') between two groups, variables, format codes or text.<br />
<br />
Separators are displayed conditionally depending on these rules:<br />
<br />
# A variable that does '''not''' display anything will remove itself and a separator that is to the left of it from the display line only.<br />
# If there is not a separator to the left, the same variable will remove itself and a separator that is to the right of it from the displayed line. <br />
# If there are two separators together, the left one will be removed from the display line and the right is kept.<br />
# Separators at the start or end of the display line (or format strings) are removed<br />
<br />
=== Example: ===<br />
{|<br />
|-<br />
|<pre>$s(f l)&lt;, &gt;$m(yyyy)&lt; @ &gt;$M&lt; - &gt;$v(&#92;(yyyy&#92;))</pre><br />
|}<br />
<br />
Here are some things that may happen:<br />
<br />
{|<br />
|-<br />
|If '''none''' of the variables are known<br />
|None of the separators will display<br />
|-<br />
|If only one variable '''is''' known<br />
|Only that variable will print. No separators will print.<br />
|-<br />
|If only the spouse's name '''is not''' known<br />
|The first separator will not display<br />
|-<br />
|If only the marriage date '''is not''' known<br />
|The first separator does not display. We will be left with:<br />
Jane Doe&lt; - &gt;{ … }And only the divorce date needs to be known to print the second separator.<br />
|-<br />
|If only the divorce date '''is not''' known<br />
|the second separator will not display<br />
|}<br />
<br />
<br />
Separators can be inside format strings:<br />
<br />
$n(&lt;0&gt;T&lt; &gt;L&lt;, &gt;f&lt; &gt;s)<br />
<br />
Unlike groups, separators can not cross over/out of format strings. So the separator &lt;0&gt; will NEVER display. No matter what is on the left hand side of the variable.<br />
<br />
----<br />
<br />
Here is a useful example:<br />
{|<br />
|-<br />
|<pre>{({b. $b}<, >{d. $d})}</pre><br />
|}<br />
<br />
This will:<br />
{|<br />
|-<br />
| Only print the outside () if either the birth or death date displays<br />
|-<br />
| Only displays the center separator if both dates are known.<br />
|-<br />
| So here are some thing that could display<br />
{|<br />
|-<br />
| A blank line<br />
| <pre>(b. 1970-4-8)</pre><br />
| <pre>(d. 2012-3-9)</pre><br />
| <pre>(b. 1970-4-8, d. 2012-3-9)</pre><br />
|}<br />
|-<br />
| We will not see things like:<br />
{|<br />
|-<br />
| <pre>()</pre><br />
| <pre>(, )</pre><br />
| <pre>(b.)</pre><br />
| <pre>(b., )</pre><br />
| <pre>(d.)</pre><br />
|-<br />
| <pre>(, d.)</pre><br />
| <pre>(b. 1970-4-8, )</pre><br />
| <pre>(b. 1970-4-8, d.)</pre><br />
| <pre>(, d. 2012-3-9)</pre><br />
| <pre>(b., d. 2012-3-9)</pre><br />
|}<br />
|}<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
{{-}}<br />
<br />
{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{languages}}<br />
<br />
[[Category:Documentation]]<br />
[[Category:Plugins]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Gramps_3.4_Wiki_Manual_-_Reports_-_part_2&diff=36931Gramps 3.4 Wiki Manual - Reports - part 22012-04-30T15:48:46Z<p>Ander882: /* Examples: */</p>
<hr />
<div>{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{grampsmanualcopyright}}<br />
<br />
{{languages|Gramps_3.4_Wiki_Manual_-_Reports - part 2}}<br />
<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
This section describes the substitution values that can be used in the different reports available in Gramps.<br />
<br />
= Substitution Values =<br />
<br />
Many of the graphical reports allow you to customize the information that is displayed on the reports. Variable substitution is the method that is used to substitute a particular symbol (key) for specific information about the person in the database.<br />
<br />
{|<br />
|-<br />
|Example: <br />
|Will show as: (the person is alive)<br />
|-<br />
|<pre>$n<br />
b. $b( at $B}<br />
d. $d< at >$D</pre><br />
|<pre>Smith, Edwin Michael<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA<br />
d.</pre><br />
|}<br />
<br />
----<br />
{|<br />
|-<br />
|1<br />
|A list of all available variables (The Substitution Keys) follows. If you wish to display names, date, or place information differently, you may use [[#Format Strings|Format Strings]] to accomplish this.<br />
|-<br />
|2<br />
|There are also [[#Control Variables|Control Variables]] to display special characters (like the dollar sign).<br />
|-<br />
|3<br />
|You can also use [[#Grouping|Grouping]] to optionally display information. Line 2 above, uses grouping to display ' at ' only when the birth place is known.<br />
|-<br />
|4<br />
|Along with [[#Events|Events]] you can print almost anything.<br />
|-<br />
|5<br />
|Finally, [[#Separators|Separators]], to make your life complete. Line 3 above, uses this to display ' at ' only when both the birth date and place is known.<br />
|-<br />
|}<br />
<br />
<br />
== The Substitution Keys ==<br />
<br />
{|<br />
|-<br />
| colspan="2"|'''Personal variables'''<br />
| colspan="2"|'''Marital variables'''<br />
|-<br />
|$n<br />
|Displays the person's name<br />
|$s<br />
|Displays the name of the person's spouse<br />
|-<br />
|$i<br />
|Displays the GRAMPS ID for the person.<br />
|$j<br />
|Displays the GRAMPS ID for the marriage.<br />
|-<br />
|$b<br />
|Displays the person's date of birth <br />
|$m<br />
|Displays the marriage date of the person and the spouse.<br />
|-<br />
|$B<br />
|Displays the person's place of birth <br />
|$M<br />
|Displays the place of the marriage of the person and the spouse.<br />
|-<br />
|$d<br />
|Displays the person's date of death <br />
|$v<br />
|Displays the divorce date of the person and the spouse.<br />
|-<br />
|$D<br />
|Displays the person's place of death <br />
|$V<br />
|Displays the place of the divorce of the person and the spouse.<br />
|-<br />
|$a<br />
|Displays an attribute about the person.<br />
see [[#Attributes|Attributes]] for more<br />
|$u<br />
|Displays an attribute about the marriage.<br />
see [[#Attributes|Attributes]] for more<br />
|-<br />
|$e<br />
|Displays event information about the person.<br />
See [[#Events|Events]] for more<br />
|$t<br />
|Displays an event information about the marriage.<br />
See [[#Events|Events]] for more<br />
|}<br />
<br />
All of the Marital variables are defined by the person's preferred spouse in Gramps. If the person has never been married, then these variables will not display anything.<br />
<br />
----<br />
=== Default displayed formats ===<br />
<br />
{|<br />
|-<br />
|$n $s<br />
|Names will be displayed as set in 'Name format:' on the Display tab in Gramps preferences<br />
|-<br />
|$B $D $M $V<br />
|Places will display the Place title by default<br />
|-<br />
|$b $d $m $v<br />
|Dates will be displayed as set in 'Date format:' on the Display tab in Gramps preferences<br />
|-<br />
|$e $t<br />
|Events will display the description by default<br />
|}<br />
<br />
<br />
=== Deprecated variables ===<br />
<br />
Some of the old variables were deprecated because [[#Format Strings|Format Strings]] have replaced them. So here is a list of those variables and how to achieve their results:<br />
<br />
{| {{prettytable}}<br />
|-<br />
!Old Variable<br />
!How to display it now<br />
!What is displayed<br />
|-<br />
|$f<br />
|$n<br />
|Name - as by Gramps name display under Preferences<br />
|-<br />
|$n<br />
|$n(g f)<br />
|Name - FirstName LastName<br />
|-<br />
|$N<br />
|$n(f, g)<br />
|Name - LastName, FirstName (note the explicit comma)<br />
|-<br />
|$nC<br />
|$n(g F)<br />
|Name - FirstName LastName in UPPER case<br />
|-<br />
|$NC<br />
|$n(F, g)<br />
|Name - LastName in UPPER case, FirstName<br />
|-<br />
|$by<br />
|$b(yyyy)<br />
|Date of birth, year only<br />
|-<br />
|$dy<br />
|$d(yyyy)<br />
|Date of death, year only<br />
|-<br />
|$my<br />
|$m(yyyy)<br />
|Date of preferred marriage, year only<br />
|-<br />
|$p<br />
|$s<br />
|Preferred spouse's name as by Gramps name display under Preferences<br />
|-<br />
|$s<br />
|$s(g f)<br />
|Preferred spouse's name - FirstName LastName<br />
|-<br />
|$S<br />
|$s(f, g)<br />
|Preferred spouse's name - LastName, FirstName<br />
|-<br />
|$sC<br />
|$s(g F)<br />
|Preferred spouse's name - FirstName LastName in UPPER case<br />
|-<br />
|$SC<br />
|$s(F, g)<br />
|Preferred spouse's name - LastName in UPPER case, FirstName<br />
|}<br />
<br />
== Format Strings ==<br />
<br />
Format strings are used to display names and dates differently than those assigned under Gramps Preferences. Here is the syntax for a format string:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''(format string)<br />
where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'nsijbmBMdvDVauet'<br />
<br />
A format string is any text, separators or format codes (defined below) to display information about the person.<br />
<br />
=== Formatting names ===<br />
<br />
For names ($n $s) you may use the following formatting codes to display the name differently.<br />
<br />
{|<br />
|-<br />
|t<br />
|Title<br />
|<br />
|f<br />
|Given name<br />
|-<br />
|x<br />
|Common name. Call name if existing, otherwise first first name<br />
|<br />
|c<br />
|Call name<br />
|-<br />
|n<br />
|Nick name<br />
|<br />
|s<br />
|Suffix<br />
|-<br />
|l<br />
|Surname<br />
|<br />
|g<br />
|Family nickname<br />
|}<br />
<br />
These codes can be uppercased to uppercase the result.<br />
<br />
{|<br />
|-<br />
|Example code<br />
|Displays<br />
|-<br />
|<pre>$n(L, f) ($n(c)), $n(L, f){ ($n(c))}<br />
$s(f l s)</pre><br />
|<pre>SMITH, Edwin Michael (), SMITH, Edwin Michael<br />
Janice Ann Adams</pre><br />
|}<br />
<br />
<br />
<blockquote>Note:<br />
If you want to print a character 'c' within the format string (or any one of the other format codes), you will need to first add a '&#92;' in front of it. See [[#Control Variables|Control Variables]] for more.</blockquote><br />
<br />
<blockquote>Note:<br />
the curly brackets { } are used to hide information. Here it is used around ' ($n(c))' to not display ' ()' if the person does not have a call name. See [[#Grouping|Grouping]] for more.</blockquote><br />
<br />
----<br />
<br />
=== Formatting Dates ===<br />
<br />
For all of the date variables ($b $d $m $v) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|yyyy<br />
|The year as a four digit number<br />
|<br />
|yyy<br />
|The year, with a minimum of three digits<br />
|-<br />
|yy<br />
|The year, from 00 to 99<br />
|<br />
|y<br />
|The year, from 0 to 99<br />
|-<br />
|mmmm<BR><br />
MMMM<br />
|The full name of the month<BR><br />
The full name IN CAPS<br />
|<br />
|mmm<BR><br />
MMM<br />
|The abbreviated name of the month<BR><br />
The abbreviated name IN CAPS<br />
|-<br />
|mm<br />
|The month, from 00 to 12<br />
|<br />
|m<br />
|The month, from 0 to 12<br />
|-<br />
|dd<br />
|The day, from 00 to 31<br />
|<br />
|d<br />
|The day, from 0 to 31<br />
|-<br />
|o<br />
|The date type (modifier)<br />
|<br />
|<br />
|<br />
|}<br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$b(mmm-dd yy)<br />
$m(yyyy/mmm/d)<br />
$b(mmm-dd yy)</pre><br />
|<pre>May-24 61<br />
1995/May/27<br />
Jun-04 85</pre><br />
|}<br />
<br />
{{man note| For date types (modifier) |Only "Before", "After", and "About" are supported at this time. all others will not display anything.<BR><br />
And for date span and date ranges, only the starting (first) date is displayed.}}<br />
<br />
----<br />
<br />
=== Formatting Places ===<br />
<br />
For all of the place variables ($B $D $M $V) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|e<br />
|Street<br />
|<br />
|l<br />
|Locality<br />
|-<br />
|c<br />
|City<br />
|<br />
|u<br />
|County<br />
|-<br />
|s<br />
|State<br />
|<br />
|p<br />
|Postal Code<br />
|-<br />
|n<br />
|Country<br />
|<br />
|t<br />
|Title<br />
|-<br />
|x<br />
|Longitude<br />
|<br />
|y<br />
|Latitude<br />
|}<br />
These codes can be uppercased to uppercase the result. <br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
----<br />
<br />
=== Rules for format strings. ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Anything will print inside a format string<br />
|-<br />
|1a<br />
|you will have to use [[#Control Variables|Control Variables]] to display things like ')' and format codes<br />
|-<br />
|2<br />
|Separators can be within format strings.<br />
|-<br />
|3<br />
|At least ONE format code has to display something for the ENTIRE format string to display<br />
|}<br />
<br />
----<br />
<br />
=== Examples ===<br />
<br />
{|<br />
|-<br />
|code<br />
|gives<br />
|-<br />
|<pre>$n(f l)<br />
b. $b {at $B<br />
{d. $d $D</pre><br />
|<pre>Edwin Michael Smith<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA</pre>The person is still alive (or has no information present) so the line was removed.<br />
|}<br />
<br />
<br />
<br />
== Control Variables ==<br />
<br />
Control variables allow you to print characters that are special to Substitution values within a display.<br />
<br />
For example the dollar character '$' is used to note the start of a variable. If you wish to print a dollar character you would use a control character like '&#92;$'<br />
<br />
Control Variables<br />
<br />
{|<br />
|-<br />
|&#92;$<br />
|Displays a single '$'<br />
|<br />
|&#92;&#92;<br />
|Displays a single '&#92;'<br />
|-<br />
|&#92;(<br />
|Displays a single '('<br />
|<br />
|&#92;)<br />
|Displays a single ')'<br />
|-<br />
|&#92;{<br />
|Displays a single '{'<br />
|<br />
|&#92;}<br />
|Displays a single '}'<br />
|-<br />
|&#92;<<br />
|Displays a single '<'<br />
|<br />
|&#92;><br />
|Displays a single '>'<br />
|}<br />
<br />
Basically anything that comes after a '&#92;' will be printed.<br />
<br />
----<br />
Note:<br />
When you are inside a format string, you may need to use this to display a character that would normally be a format code. <br />
<br />
{|<br />
|-<br />
|Example:<br />
|would give<br />
|-<br />
|<pre>$b(m hi mom)<br />
$b(m hi \mo\m)</pre><br />
|<pre>5 hi 5o5<br />
5 hi mom</pre><br />
|}<br />
<br />
as this person was born on the fifth month.<br />
<br />
== Grouping ==<br />
<br />
There are instances where you do not want certain text to be displayed. Take the example:<br />
<br />
{|<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died on $d at $D</pre><br />
|<pre>died on 1975-06-26 at </pre> <br />
|<pre>died on at Reno, Washoe Co., NV</pre><br />
|-<br />
| colspan="3"|Neither of these are very acceptable.<br />
|-<br />
| colspan="3"|But with groups (denoted by {}), you can optionally print information if a variable within contains information.<br />
|-<br />
| colspan="3"|For example:<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died {on $d }{at $D}</pre><br />
|<pre>died on 1975-06-26</pre><br />
|<pre>died at Reno, Washoe Co., NV</pre><br />
|}<br />
<br />
which is what we want.<br />
<br />
----<br />
=== Rules for groups ===<br />
<br />
A group will only display if there is at least one variable that displays something. So if a group only has text and/or variables where the information is not known, the entire group will not print.<br />
<br />
Groups can also be nested. If this happens (like below), the outer group will only display if there is at least one variable that displays something within the outer group or any of the sub groups.<br />
<br />
Groups can also be used to remove an entire line from a display. A '{' at the start of a line will remove the entire line from the display if the above rule is true.<br />
<br />
If you do not wish to have the display code above (for death information) displayed (the person is alive, or you do not yet know the information), modify the code to look like<br />
<pre>{died {on $d }{at $D}</pre><br />
<br />
<blockquote>To have an entire line be blank instead of removing the line simply start the line with a space ' {' or make sure there is a space after the group (you will have to close the group first)</blockquote><br />
<br />
----<br />
<br />
=== Examples: ===<br />
<br />
This will hide '(' and ')' if the divorce information is not known (or still married).<br />
<br />
<pre>m. $m $M {- ($v(yyyy))</pre><br />
<br />
<br />
Only display some spouse information if married or remove the entire line if never married:<br />
<pre>{$s $m(yyyy) {- $v(\(yyyy\))}}</pre><br />
<br />
== Attributes ==<br />
<br />
Attributes do not have a format string. Instead the attribute name is placed inside []. Here is the syntax for an attribute:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name] where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'au'<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$a[Profession]<br />
$a[Social Security Number]<br />
$a[Total \$ bequeathed]</pre><br />
|<pre>Programmer<br />
7A3-29-F1C6<br />
3.00USD</pre><br />
|}<br />
<br />
<br />
----<br />
== Events ==<br />
<br />
Events have the same starting structure as attributes, $e or $t and the event name in [] but events have an extra format string after the name to display the description, date, place, id, and attributes associated with it. Each of these items can be displayed with a , a 'n', 'd', 'D', 'i', and 'a' respectively in the format string. Here is the syntax for an event:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name](format string) where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'et'<br />
<br />
=== Event format strings ===<br />
<br />
The Event format string is used to display information about the event. Here are the format codes to display parts of the event:<br />
<br />
{|<br />
|-<br />
|n<br />
|Description<br />
|<br />
|i<br />
|Event ID<br />
|-<br />
|d<br />
|Event Date&#42;<br />
|<br />
|D<br />
|Event Place&#42;<br />
|-<br />
|a<br />
|An attributes for the event&#42;&#42;<br />
|<br />
|<br />
|<br />
|}<br />
<br />
&#42;These variables can themselves have format strings. Date and a place can be formatted with format string as defined in [[#Format strings|Format strings]].<br />
<br />
&#42;&#42;Attribute needs to have the attribute name in [] and are formatted as above.<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$e[First Communion](d(yyyy-mm-d))<br />
$e[Bar Mitzvah](n&lt; at &gt; D)<br />
$e[Birth](d(yyyy mm/dd) D)</pre><br />
|<pre>2009-11-6<br />
Jerry's Bar Mitzah at Opas house<br />
2007 05/23 Grandmothers house</pre><br />
|}<br />
<br />
<br />
And:<br />
<br />
{|<br />
|-<br />
|<pre>$b(yyyy-Mmm-dd)<br />
$M</pre><br />
|is the same as<br />
|<pre>$e[Birth](d(yyyy-Mmm-dd))<br />
$t[Marriage](D)</pre><br />
|}<br />
<br />
<br />
----<br />
<br />
=== Notes for attributes and events: ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Attribute and event names are mandatory. '$a' or '$a[]' will not display anything.<br />
|-<br />
|2<br />
|Attributes and event names may have special characters within them. Most notably ']' and ')'. If this is the case, you will need to use [[#Control Variables|Control Variables]]<br />
|}<br />
<br />
== Separators ==<br />
<br />
Separators are special 'text only' groups inside '&lt;' and '&gt;' that conditionally display a separator (like ', ' or ' - ') between two groups, variables, format codes or text.<br />
<br />
Separators are displayed conditionally depending on these rules:<br />
<br />
# A variable that does '''not''' display anything will remove itself and a separator that is to the left of it from the display line only.<br />
# If there is not a separator to the left, the same variable will remove itself and a separator that is to the right of it from the displayed line. <br />
# If there are two separators together, the left one will be removed from the display line and the right is kept.<br />
# Separators at the start or end of the display line display if there is text, group, or variable that displays.<br />
## Separators at the start or end of a format string or group, will display if first the format string or group displays and the above is also true.<br />
<br />
=== Example: ===<br />
{|<br />
|-<br />
|<pre>$s(f l)&lt;, &gt;$m(yyyy)&lt; @ &gt;$M&lt; - &gt;$v(&#92;(yyyy&#92;))</pre><br />
|}<br />
<br />
Here are some things that may happen:<br />
<br />
{|<br />
|-<br />
|If '''none''' of the variables are known<br />
|None of the separators will display<br />
|-<br />
|If only one variable '''is''' known<br />
|Only that variable will print. No separators will print.<br />
|-<br />
|If only the spouse's name '''is not''' known<br />
|The first separator will not display<br />
|-<br />
|If only the marriage date '''is not''' known<br />
|The first separator does not display. We will be left with:<br />
Jane Doe&lt; - &gt;{ … }And only the divorce date needs to be known to print the second separator.<br />
|-<br />
|If only the divorce date '''is not''' known<br />
|the second separator will not display<br />
|}<br />
<br />
<br />
Separators can be inside format strings:<br />
<br />
{|<br />
|-<br />
|<pre>$n(&lt;0&gt;T&lt; &gt;L&lt;, &gt;f&lt; &gt;s)</pre><br />
|}<br />
<br />
Separators can cross over/out of format strings. As the first thing on this line is the variable, the separator &lt;0&gt; will only display only if the 'T' format code displays (the person has something in the title field).<br />
----<br />
Here is a useful example:<br />
{|<br />
|-<br />
|<pre>{({b. $b}<, >{d. $d})}</pre><br />
|}<br />
<br />
This will:<br />
{|<br />
|-<br />
| Only print the outside () if either the birth or death date displays<br />
|-<br />
| Only displays the center separator if both dates are known.<br />
|-<br />
| So here are some thing that could display<br />
{|<br />
|-<br />
| A blank line<br />
| <pre>(b. 1970-4-8)</pre><br />
| <pre>(d. 2012-3-9)</pre><br />
| <pre>(b. 1970-4-8, d. 2012-3-9)</pre><br />
|}<br />
|-<br />
| We will not see things like:<br />
{|<br />
|-<br />
| <pre>()</pre><br />
| <pre>(, )</pre><br />
| <pre>(b.)</pre><br />
| <pre>(b., )</pre><br />
| <pre>(d.)</pre><br />
|-<br />
| <pre>(, d.)</pre><br />
| <pre>(b. 1970-4-8, )</pre><br />
| <pre>(b. 1970-4-8, d.)</pre><br />
| <pre>(, d. 2012-3-9)</pre><br />
| <pre>(b., d. 2012-3-9)</pre><br />
|}<br />
|}<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
{{-}}<br />
<br />
{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{languages}}<br />
<br />
[[Category:Documentation]]<br />
[[Category:Plugins]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Gramps_3.4_Wiki_Manual_-_Reports_-_part_2&diff=36930Gramps 3.4 Wiki Manual - Reports - part 22012-04-30T15:11:31Z<p>Ander882: /* Rules for groups */</p>
<hr />
<div>{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{grampsmanualcopyright}}<br />
<br />
{{languages|Gramps_3.4_Wiki_Manual_-_Reports - part 2}}<br />
<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
This section describes the substitution values that can be used in the different reports available in Gramps.<br />
<br />
= Substitution Values =<br />
<br />
Many of the graphical reports allow you to customize the information that is displayed on the reports. Variable substitution is the method that is used to substitute a particular symbol (key) for specific information about the person in the database.<br />
<br />
{|<br />
|-<br />
|Example: <br />
|Will show as: (the person is alive)<br />
|-<br />
|<pre>$n<br />
b. $b( at $B}<br />
d. $d< at >$D</pre><br />
|<pre>Smith, Edwin Michael<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA<br />
d.</pre><br />
|}<br />
<br />
----<br />
{|<br />
|-<br />
|1<br />
|A list of all available variables (The Substitution Keys) follows. If you wish to display names, date, or place information differently, you may use [[#Format Strings|Format Strings]] to accomplish this.<br />
|-<br />
|2<br />
|There are also [[#Control Variables|Control Variables]] to display special characters (like the dollar sign).<br />
|-<br />
|3<br />
|You can also use [[#Grouping|Grouping]] to optionally display information. Line 2 above, uses grouping to display ' at ' only when the birth place is known.<br />
|-<br />
|4<br />
|Along with [[#Events|Events]] you can print almost anything.<br />
|-<br />
|5<br />
|Finally, [[#Separators|Separators]], to make your life complete. Line 3 above, uses this to display ' at ' only when both the birth date and place is known.<br />
|-<br />
|}<br />
<br />
<br />
== The Substitution Keys ==<br />
<br />
{|<br />
|-<br />
| colspan="2"|'''Personal variables'''<br />
| colspan="2"|'''Marital variables'''<br />
|-<br />
|$n<br />
|Displays the person's name<br />
|$s<br />
|Displays the name of the person's spouse<br />
|-<br />
|$i<br />
|Displays the GRAMPS ID for the person.<br />
|$j<br />
|Displays the GRAMPS ID for the marriage.<br />
|-<br />
|$b<br />
|Displays the person's date of birth <br />
|$m<br />
|Displays the marriage date of the person and the spouse.<br />
|-<br />
|$B<br />
|Displays the person's place of birth <br />
|$M<br />
|Displays the place of the marriage of the person and the spouse.<br />
|-<br />
|$d<br />
|Displays the person's date of death <br />
|$v<br />
|Displays the divorce date of the person and the spouse.<br />
|-<br />
|$D<br />
|Displays the person's place of death <br />
|$V<br />
|Displays the place of the divorce of the person and the spouse.<br />
|-<br />
|$a<br />
|Displays an attribute about the person.<br />
see [[#Attributes|Attributes]] for more<br />
|$u<br />
|Displays an attribute about the marriage.<br />
see [[#Attributes|Attributes]] for more<br />
|-<br />
|$e<br />
|Displays event information about the person.<br />
See [[#Events|Events]] for more<br />
|$t<br />
|Displays an event information about the marriage.<br />
See [[#Events|Events]] for more<br />
|}<br />
<br />
All of the Marital variables are defined by the person's preferred spouse in Gramps. If the person has never been married, then these variables will not display anything.<br />
<br />
----<br />
=== Default displayed formats ===<br />
<br />
{|<br />
|-<br />
|$n $s<br />
|Names will be displayed as set in 'Name format:' on the Display tab in Gramps preferences<br />
|-<br />
|$B $D $M $V<br />
|Places will display the Place title by default<br />
|-<br />
|$b $d $m $v<br />
|Dates will be displayed as set in 'Date format:' on the Display tab in Gramps preferences<br />
|-<br />
|$e $t<br />
|Events will display the description by default<br />
|}<br />
<br />
<br />
=== Deprecated variables ===<br />
<br />
Some of the old variables were deprecated because [[#Format Strings|Format Strings]] have replaced them. So here is a list of those variables and how to achieve their results:<br />
<br />
{| {{prettytable}}<br />
|-<br />
!Old Variable<br />
!How to display it now<br />
!What is displayed<br />
|-<br />
|$f<br />
|$n<br />
|Name - as by Gramps name display under Preferences<br />
|-<br />
|$n<br />
|$n(g f)<br />
|Name - FirstName LastName<br />
|-<br />
|$N<br />
|$n(f, g)<br />
|Name - LastName, FirstName (note the explicit comma)<br />
|-<br />
|$nC<br />
|$n(g F)<br />
|Name - FirstName LastName in UPPER case<br />
|-<br />
|$NC<br />
|$n(F, g)<br />
|Name - LastName in UPPER case, FirstName<br />
|-<br />
|$by<br />
|$b(yyyy)<br />
|Date of birth, year only<br />
|-<br />
|$dy<br />
|$d(yyyy)<br />
|Date of death, year only<br />
|-<br />
|$my<br />
|$m(yyyy)<br />
|Date of preferred marriage, year only<br />
|-<br />
|$p<br />
|$s<br />
|Preferred spouse's name as by Gramps name display under Preferences<br />
|-<br />
|$s<br />
|$s(g f)<br />
|Preferred spouse's name - FirstName LastName<br />
|-<br />
|$S<br />
|$s(f, g)<br />
|Preferred spouse's name - LastName, FirstName<br />
|-<br />
|$sC<br />
|$s(g F)<br />
|Preferred spouse's name - FirstName LastName in UPPER case<br />
|-<br />
|$SC<br />
|$s(F, g)<br />
|Preferred spouse's name - LastName in UPPER case, FirstName<br />
|}<br />
<br />
== Format Strings ==<br />
<br />
Format strings are used to display names and dates differently than those assigned under Gramps Preferences. Here is the syntax for a format string:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''(format string)<br />
where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'nsijbmBMdvDVauet'<br />
<br />
A format string is any text, separators or format codes (defined below) to display information about the person.<br />
<br />
=== Formatting names ===<br />
<br />
For names ($n $s) you may use the following formatting codes to display the name differently.<br />
<br />
{|<br />
|-<br />
|t<br />
|Title<br />
|<br />
|f<br />
|Given name<br />
|-<br />
|x<br />
|Common name. Call name if existing, otherwise first first name<br />
|<br />
|c<br />
|Call name<br />
|-<br />
|n<br />
|Nick name<br />
|<br />
|s<br />
|Suffix<br />
|-<br />
|l<br />
|Surname<br />
|<br />
|g<br />
|Family nickname<br />
|}<br />
<br />
These codes can be uppercased to uppercase the result.<br />
<br />
{|<br />
|-<br />
|Example code<br />
|Displays<br />
|-<br />
|<pre>$n(L, f) ($n(c)), $n(L, f){ ($n(c))}<br />
$s(f l s)</pre><br />
|<pre>SMITH, Edwin Michael (), SMITH, Edwin Michael<br />
Janice Ann Adams</pre><br />
|}<br />
<br />
<br />
<blockquote>Note:<br />
If you want to print a character 'c' within the format string (or any one of the other format codes), you will need to first add a '&#92;' in front of it. See [[#Control Variables|Control Variables]] for more.</blockquote><br />
<br />
<blockquote>Note:<br />
the curly brackets { } are used to hide information. Here it is used around ' ($n(c))' to not display ' ()' if the person does not have a call name. See [[#Grouping|Grouping]] for more.</blockquote><br />
<br />
----<br />
<br />
=== Formatting Dates ===<br />
<br />
For all of the date variables ($b $d $m $v) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|yyyy<br />
|The year as a four digit number<br />
|<br />
|yyy<br />
|The year, with a minimum of three digits<br />
|-<br />
|yy<br />
|The year, from 00 to 99<br />
|<br />
|y<br />
|The year, from 0 to 99<br />
|-<br />
|mmmm<BR><br />
MMMM<br />
|The full name of the month<BR><br />
The full name IN CAPS<br />
|<br />
|mmm<BR><br />
MMM<br />
|The abbreviated name of the month<BR><br />
The abbreviated name IN CAPS<br />
|-<br />
|mm<br />
|The month, from 00 to 12<br />
|<br />
|m<br />
|The month, from 0 to 12<br />
|-<br />
|dd<br />
|The day, from 00 to 31<br />
|<br />
|d<br />
|The day, from 0 to 31<br />
|-<br />
|o<br />
|The date type (modifier)<br />
|<br />
|<br />
|<br />
|}<br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$b(mmm-dd yy)<br />
$m(yyyy/mmm/d)<br />
$b(mmm-dd yy)</pre><br />
|<pre>May-24 61<br />
1995/May/27<br />
Jun-04 85</pre><br />
|}<br />
<br />
{{man note| For date types (modifier) |Only "Before", "After", and "About" are supported at this time. all others will not display anything.<BR><br />
And for date span and date ranges, only the starting (first) date is displayed.}}<br />
<br />
----<br />
<br />
=== Formatting Places ===<br />
<br />
For all of the place variables ($B $D $M $V) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|e<br />
|Street<br />
|<br />
|l<br />
|Locality<br />
|-<br />
|c<br />
|City<br />
|<br />
|u<br />
|County<br />
|-<br />
|s<br />
|State<br />
|<br />
|p<br />
|Postal Code<br />
|-<br />
|n<br />
|Country<br />
|<br />
|t<br />
|Title<br />
|-<br />
|x<br />
|Longitude<br />
|<br />
|y<br />
|Latitude<br />
|}<br />
These codes can be uppercased to uppercase the result. <br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
----<br />
<br />
=== Rules for format strings. ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Anything will print inside a format string<br />
|-<br />
|1a<br />
|you will have to use [[#Control Variables|Control Variables]] to display things like ')' and format codes<br />
|-<br />
|2<br />
|Separators can be within format strings.<br />
|-<br />
|3<br />
|At least ONE format code has to display something for the ENTIRE format string to display<br />
|}<br />
<br />
----<br />
<br />
=== Examples ===<br />
<br />
{|<br />
|-<br />
|code<br />
|gives<br />
|-<br />
|<pre>$n(f l)<br />
b. $b {at $B<br />
{d. $d $D</pre><br />
|<pre>Edwin Michael Smith<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA</pre>The person is still alive (or has no information present) so the line was removed.<br />
|}<br />
<br />
<br />
<br />
== Control Variables ==<br />
<br />
Control variables allow you to print characters that are special to Substitution values within a display.<br />
<br />
For example the dollar character '$' is used to note the start of a variable. If you wish to print a dollar character you would use a control character like '&#92;$'<br />
<br />
Control Variables<br />
<br />
{|<br />
|-<br />
|&#92;$<br />
|Displays a single '$'<br />
|<br />
|&#92;&#92;<br />
|Displays a single '&#92;'<br />
|-<br />
|&#92;(<br />
|Displays a single '('<br />
|<br />
|&#92;)<br />
|Displays a single ')'<br />
|-<br />
|&#92;{<br />
|Displays a single '{'<br />
|<br />
|&#92;}<br />
|Displays a single '}'<br />
|-<br />
|&#92;<<br />
|Displays a single '<'<br />
|<br />
|&#92;><br />
|Displays a single '>'<br />
|}<br />
<br />
Basically anything that comes after a '&#92;' will be printed.<br />
<br />
----<br />
Note:<br />
When you are inside a format string, you may need to use this to display a character that would normally be a format code. <br />
<br />
{|<br />
|-<br />
|Example:<br />
|would give<br />
|-<br />
|<pre>$b(m hi mom)<br />
$b(m hi \mo\m)</pre><br />
|<pre>5 hi 5o5<br />
5 hi mom</pre><br />
|}<br />
<br />
as this person was born on the fifth month.<br />
<br />
== Grouping ==<br />
<br />
There are instances where you do not want certain text to be displayed. Take the example:<br />
<br />
{|<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died on $d at $D</pre><br />
|<pre>died on 1975-06-26 at </pre> <br />
|<pre>died on at Reno, Washoe Co., NV</pre><br />
|-<br />
| colspan="3"|Neither of these are very acceptable.<br />
|-<br />
| colspan="3"|But with groups (denoted by {}), you can optionally print information if a variable within contains information.<br />
|-<br />
| colspan="3"|For example:<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died {on $d }{at $D}</pre><br />
|<pre>died on 1975-06-26</pre><br />
|<pre>died at Reno, Washoe Co., NV</pre><br />
|}<br />
<br />
which is what we want.<br />
<br />
----<br />
=== Rules for groups ===<br />
<br />
A group will only display if there is at least one variable that displays something. So if a group only has text and/or variables where the information is not known, the entire group will not print.<br />
<br />
Groups can also be nested. If this happens (like below), the outer group will only display if there is at least one variable that displays something within the outer group or any of the sub groups.<br />
<br />
Groups can also be used to remove an entire line from a display. A '{' at the start of a line will remove the entire line from the display if the above rule is true.<br />
<br />
If you do not wish to have the display code above (for death information) displayed (the person is alive, or you do not yet know the information), modify the code to look like<br />
<pre>{died {on $d }{at $D}</pre><br />
<br />
<blockquote>To have an entire line be blank instead of removing the line simply start the line with a space ' {' or make sure there is a space after the group (you will have to close the group first)</blockquote><br />
<br />
----<br />
<br />
=== Examples: ===<br />
<br />
This will hide '(' and ')' if the divorce information is not known (or still married).<br />
<br />
<pre>m. $m $M {- ($v(yyyy))</pre><br />
<br />
<br />
Only display some spouse information if married or remove the entire line if never married:<br />
<pre>-$s $m(yyyy) {- $v(\(yyyy\))}</pre><br />
<br />
== Attributes ==<br />
<br />
Attributes do not have a format string. Instead the attribute name is placed inside []. Here is the syntax for an attribute:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name] where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'au'<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$a[Profession]<br />
$a[Social Security Number]<br />
$a[Total \$ bequeathed]</pre><br />
|<pre>Programmer<br />
7A3-29-F1C6<br />
3.00USD</pre><br />
|}<br />
<br />
<br />
----<br />
== Events ==<br />
<br />
Events have the same starting structure as attributes, $e or $t and the event name in [] but events have an extra format string after the name to display the description, date, place, id, and attributes associated with it. Each of these items can be displayed with a , a 'n', 'd', 'D', 'i', and 'a' respectively in the format string. Here is the syntax for an event:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name](format string) where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'et'<br />
<br />
=== Event format strings ===<br />
<br />
The Event format string is used to display information about the event. Here are the format codes to display parts of the event:<br />
<br />
{|<br />
|-<br />
|n<br />
|Description<br />
|<br />
|i<br />
|Event ID<br />
|-<br />
|d<br />
|Event Date&#42;<br />
|<br />
|D<br />
|Event Place&#42;<br />
|-<br />
|a<br />
|An attributes for the event&#42;&#42;<br />
|<br />
|<br />
|<br />
|}<br />
<br />
&#42;These variables can themselves have format strings. Date and a place can be formatted with format string as defined in [[#Format strings|Format strings]].<br />
<br />
&#42;&#42;Attribute needs to have the attribute name in [] and are formatted as above.<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$e[First Communion](d(yyyy-mm-d))<br />
$e[Bar Mitzvah](n&lt; at &gt; D)<br />
$e[Birth](d(yyyy mm/dd) D)</pre><br />
|<pre>2009-11-6<br />
Jerry's Bar Mitzah at Opas house<br />
2007 05/23 Grandmothers house</pre><br />
|}<br />
<br />
<br />
And:<br />
<br />
{|<br />
|-<br />
|<pre>$b(yyyy-Mmm-dd)<br />
$M</pre><br />
|is the same as<br />
|<pre>$e[Birth](d(yyyy-Mmm-dd))<br />
$t[Marriage](D)</pre><br />
|}<br />
<br />
<br />
----<br />
<br />
=== Notes for attributes and events: ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Attribute and event names are mandatory. '$a' or '$a[]' will not display anything.<br />
|-<br />
|2<br />
|Attributes and event names may have special characters within them. Most notably ']' and ')'. If this is the case, you will need to use [[#Control Variables|Control Variables]]<br />
|}<br />
<br />
== Separators ==<br />
<br />
Separators are special 'text only' groups inside '&lt;' and '&gt;' that conditionally display a separator (like ', ' or ' - ') between two groups, variables, format codes or text.<br />
<br />
Separators are displayed conditionally depending on these rules:<br />
<br />
# A variable that does '''not''' display anything will remove itself and a separator that is to the left of it from the display line only.<br />
# If there is not a separator to the left, the same variable will remove itself and a separator that is to the right of it from the displayed line. <br />
# If there are two separators together, the left one will be removed from the display line and the right is kept.<br />
# Separators at the start or end of the display line display if there is text, group, or variable that displays.<br />
## Separators at the start or end of a format string or group, will display if first the format string or group displays and the above is also true.<br />
<br />
=== Example: ===<br />
{|<br />
|-<br />
|<pre>$s(f l)&lt;, &gt;$m(yyyy)&lt; @ &gt;$M&lt; - &gt;$v(&#92;(yyyy&#92;))</pre><br />
|}<br />
<br />
Here are some things that may happen:<br />
<br />
{|<br />
|-<br />
|If '''none''' of the variables are known<br />
|None of the separators will display<br />
|-<br />
|If only one variable '''is''' known<br />
|Only that variable will print. No separators will print.<br />
|-<br />
|If only the spouse's name '''is not''' known<br />
|The first separator will not display<br />
|-<br />
|If only the marriage date '''is not''' known<br />
|The first separator does not display. We will be left with:<br />
Jane Doe&lt; - &gt;{ … }And only the divorce date needs to be known to print the second separator.<br />
|-<br />
|If only the divorce date '''is not''' known<br />
|the second separator will not display<br />
|}<br />
<br />
<br />
Separators can be inside format strings:<br />
<br />
{|<br />
|-<br />
|<pre>$n(&lt;0&gt;T&lt; &gt;L&lt;, &gt;f&lt; &gt;s)</pre><br />
|}<br />
<br />
Separators can cross over/out of format strings. As the first thing on this line is the variable, the separator &lt;0&gt; will only display only if the 'T' format code displays (the person has something in the title field).<br />
----<br />
Here is a useful example:<br />
{|<br />
|-<br />
|<pre>{({b. $b}<, >{d. $d})}</pre><br />
|}<br />
<br />
This will:<br />
{|<br />
|-<br />
| Only print the outside () if either the birth or death date displays<br />
|-<br />
| Only displays the center separator if both dates are known.<br />
|-<br />
| So here are some thing that could display<br />
{|<br />
|-<br />
| A blank line<br />
| <pre>(b. 1970-4-8)</pre><br />
| <pre>(d. 2012-3-9)</pre><br />
| <pre>(b. 1970-4-8, d. 2012-3-9)</pre><br />
|}<br />
|-<br />
| We will not see things like:<br />
{|<br />
|-<br />
| <pre>()</pre><br />
| <pre>(, )</pre><br />
| <pre>(b.)</pre><br />
| <pre>(b., )</pre><br />
| <pre>(d.)</pre><br />
|-<br />
| <pre>(, d.)</pre><br />
| <pre>(b. 1970-4-8, )</pre><br />
| <pre>(b. 1970-4-8, d.)</pre><br />
| <pre>(, d. 2012-3-9)</pre><br />
| <pre>(b., d. 2012-3-9)</pre><br />
|}<br />
|}<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
{{-}}<br />
<br />
{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{languages}}<br />
<br />
[[Category:Documentation]]<br />
[[Category:Plugins]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Gramps_3.4_Wiki_Manual_-_Reports_-_part_2&diff=36929Gramps 3.4 Wiki Manual - Reports - part 22012-04-30T15:07:29Z<p>Ander882: </p>
<hr />
<div>{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{grampsmanualcopyright}}<br />
<br />
{{languages|Gramps_3.4_Wiki_Manual_-_Reports - part 2}}<br />
<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
This section describes the substitution values that can be used in the different reports available in Gramps.<br />
<br />
= Substitution Values =<br />
<br />
Many of the graphical reports allow you to customize the information that is displayed on the reports. Variable substitution is the method that is used to substitute a particular symbol (key) for specific information about the person in the database.<br />
<br />
{|<br />
|-<br />
|Example: <br />
|Will show as: (the person is alive)<br />
|-<br />
|<pre>$n<br />
b. $b( at $B}<br />
d. $d< at >$D</pre><br />
|<pre>Smith, Edwin Michael<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA<br />
d.</pre><br />
|}<br />
<br />
----<br />
{|<br />
|-<br />
|1<br />
|A list of all available variables (The Substitution Keys) follows. If you wish to display names, date, or place information differently, you may use [[#Format Strings|Format Strings]] to accomplish this.<br />
|-<br />
|2<br />
|There are also [[#Control Variables|Control Variables]] to display special characters (like the dollar sign).<br />
|-<br />
|3<br />
|You can also use [[#Grouping|Grouping]] to optionally display information. Line 2 above, uses grouping to display ' at ' only when the birth place is known.<br />
|-<br />
|4<br />
|Along with [[#Events|Events]] you can print almost anything.<br />
|-<br />
|5<br />
|Finally, [[#Separators|Separators]], to make your life complete. Line 3 above, uses this to display ' at ' only when both the birth date and place is known.<br />
|-<br />
|}<br />
<br />
<br />
== The Substitution Keys ==<br />
<br />
{|<br />
|-<br />
| colspan="2"|'''Personal variables'''<br />
| colspan="2"|'''Marital variables'''<br />
|-<br />
|$n<br />
|Displays the person's name<br />
|$s<br />
|Displays the name of the person's spouse<br />
|-<br />
|$i<br />
|Displays the GRAMPS ID for the person.<br />
|$j<br />
|Displays the GRAMPS ID for the marriage.<br />
|-<br />
|$b<br />
|Displays the person's date of birth <br />
|$m<br />
|Displays the marriage date of the person and the spouse.<br />
|-<br />
|$B<br />
|Displays the person's place of birth <br />
|$M<br />
|Displays the place of the marriage of the person and the spouse.<br />
|-<br />
|$d<br />
|Displays the person's date of death <br />
|$v<br />
|Displays the divorce date of the person and the spouse.<br />
|-<br />
|$D<br />
|Displays the person's place of death <br />
|$V<br />
|Displays the place of the divorce of the person and the spouse.<br />
|-<br />
|$a<br />
|Displays an attribute about the person.<br />
see [[#Attributes|Attributes]] for more<br />
|$u<br />
|Displays an attribute about the marriage.<br />
see [[#Attributes|Attributes]] for more<br />
|-<br />
|$e<br />
|Displays event information about the person.<br />
See [[#Events|Events]] for more<br />
|$t<br />
|Displays an event information about the marriage.<br />
See [[#Events|Events]] for more<br />
|}<br />
<br />
All of the Marital variables are defined by the person's preferred spouse in Gramps. If the person has never been married, then these variables will not display anything.<br />
<br />
----<br />
=== Default displayed formats ===<br />
<br />
{|<br />
|-<br />
|$n $s<br />
|Names will be displayed as set in 'Name format:' on the Display tab in Gramps preferences<br />
|-<br />
|$B $D $M $V<br />
|Places will display the Place title by default<br />
|-<br />
|$b $d $m $v<br />
|Dates will be displayed as set in 'Date format:' on the Display tab in Gramps preferences<br />
|-<br />
|$e $t<br />
|Events will display the description by default<br />
|}<br />
<br />
<br />
=== Deprecated variables ===<br />
<br />
Some of the old variables were deprecated because [[#Format Strings|Format Strings]] have replaced them. So here is a list of those variables and how to achieve their results:<br />
<br />
{| {{prettytable}}<br />
|-<br />
!Old Variable<br />
!How to display it now<br />
!What is displayed<br />
|-<br />
|$f<br />
|$n<br />
|Name - as by Gramps name display under Preferences<br />
|-<br />
|$n<br />
|$n(g f)<br />
|Name - FirstName LastName<br />
|-<br />
|$N<br />
|$n(f, g)<br />
|Name - LastName, FirstName (note the explicit comma)<br />
|-<br />
|$nC<br />
|$n(g F)<br />
|Name - FirstName LastName in UPPER case<br />
|-<br />
|$NC<br />
|$n(F, g)<br />
|Name - LastName in UPPER case, FirstName<br />
|-<br />
|$by<br />
|$b(yyyy)<br />
|Date of birth, year only<br />
|-<br />
|$dy<br />
|$d(yyyy)<br />
|Date of death, year only<br />
|-<br />
|$my<br />
|$m(yyyy)<br />
|Date of preferred marriage, year only<br />
|-<br />
|$p<br />
|$s<br />
|Preferred spouse's name as by Gramps name display under Preferences<br />
|-<br />
|$s<br />
|$s(g f)<br />
|Preferred spouse's name - FirstName LastName<br />
|-<br />
|$S<br />
|$s(f, g)<br />
|Preferred spouse's name - LastName, FirstName<br />
|-<br />
|$sC<br />
|$s(g F)<br />
|Preferred spouse's name - FirstName LastName in UPPER case<br />
|-<br />
|$SC<br />
|$s(F, g)<br />
|Preferred spouse's name - LastName in UPPER case, FirstName<br />
|}<br />
<br />
== Format Strings ==<br />
<br />
Format strings are used to display names and dates differently than those assigned under Gramps Preferences. Here is the syntax for a format string:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''(format string)<br />
where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'nsijbmBMdvDVauet'<br />
<br />
A format string is any text, separators or format codes (defined below) to display information about the person.<br />
<br />
=== Formatting names ===<br />
<br />
For names ($n $s) you may use the following formatting codes to display the name differently.<br />
<br />
{|<br />
|-<br />
|t<br />
|Title<br />
|<br />
|f<br />
|Given name<br />
|-<br />
|x<br />
|Common name. Call name if existing, otherwise first first name<br />
|<br />
|c<br />
|Call name<br />
|-<br />
|n<br />
|Nick name<br />
|<br />
|s<br />
|Suffix<br />
|-<br />
|l<br />
|Surname<br />
|<br />
|g<br />
|Family nickname<br />
|}<br />
<br />
These codes can be uppercased to uppercase the result.<br />
<br />
{|<br />
|-<br />
|Example code<br />
|Displays<br />
|-<br />
|<pre>$n(L, f) ($n(c)), $n(L, f){ ($n(c))}<br />
$s(f l s)</pre><br />
|<pre>SMITH, Edwin Michael (), SMITH, Edwin Michael<br />
Janice Ann Adams</pre><br />
|}<br />
<br />
<br />
<blockquote>Note:<br />
If you want to print a character 'c' within the format string (or any one of the other format codes), you will need to first add a '&#92;' in front of it. See [[#Control Variables|Control Variables]] for more.</blockquote><br />
<br />
<blockquote>Note:<br />
the curly brackets { } are used to hide information. Here it is used around ' ($n(c))' to not display ' ()' if the person does not have a call name. See [[#Grouping|Grouping]] for more.</blockquote><br />
<br />
----<br />
<br />
=== Formatting Dates ===<br />
<br />
For all of the date variables ($b $d $m $v) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|yyyy<br />
|The year as a four digit number<br />
|<br />
|yyy<br />
|The year, with a minimum of three digits<br />
|-<br />
|yy<br />
|The year, from 00 to 99<br />
|<br />
|y<br />
|The year, from 0 to 99<br />
|-<br />
|mmmm<BR><br />
MMMM<br />
|The full name of the month<BR><br />
The full name IN CAPS<br />
|<br />
|mmm<BR><br />
MMM<br />
|The abbreviated name of the month<BR><br />
The abbreviated name IN CAPS<br />
|-<br />
|mm<br />
|The month, from 00 to 12<br />
|<br />
|m<br />
|The month, from 0 to 12<br />
|-<br />
|dd<br />
|The day, from 00 to 31<br />
|<br />
|d<br />
|The day, from 0 to 31<br />
|-<br />
|o<br />
|The date type (modifier)<br />
|<br />
|<br />
|<br />
|}<br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$b(mmm-dd yy)<br />
$m(yyyy/mmm/d)<br />
$b(mmm-dd yy)</pre><br />
|<pre>May-24 61<br />
1995/May/27<br />
Jun-04 85</pre><br />
|}<br />
<br />
{{man note| For date types (modifier) |Only "Before", "After", and "About" are supported at this time. all others will not display anything.<BR><br />
And for date span and date ranges, only the starting (first) date is displayed.}}<br />
<br />
----<br />
<br />
=== Formatting Places ===<br />
<br />
For all of the place variables ($B $D $M $V) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|e<br />
|Street<br />
|<br />
|l<br />
|Locality<br />
|-<br />
|c<br />
|City<br />
|<br />
|u<br />
|County<br />
|-<br />
|s<br />
|State<br />
|<br />
|p<br />
|Postal Code<br />
|-<br />
|n<br />
|Country<br />
|<br />
|t<br />
|Title<br />
|-<br />
|x<br />
|Longitude<br />
|<br />
|y<br />
|Latitude<br />
|}<br />
These codes can be uppercased to uppercase the result. <br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
----<br />
<br />
=== Rules for format strings. ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Anything will print inside a format string<br />
|-<br />
|1a<br />
|you will have to use [[#Control Variables|Control Variables]] to display things like ')' and format codes<br />
|-<br />
|2<br />
|Separators can be within format strings.<br />
|-<br />
|3<br />
|At least ONE format code has to display something for the ENTIRE format string to display<br />
|}<br />
<br />
----<br />
<br />
=== Examples ===<br />
<br />
{|<br />
|-<br />
|code<br />
|gives<br />
|-<br />
|<pre>$n(f l)<br />
b. $b {at $B<br />
{d. $d $D</pre><br />
|<pre>Edwin Michael Smith<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA</pre>The person is still alive (or has no information present) so the line was removed.<br />
|}<br />
<br />
<br />
<br />
== Control Variables ==<br />
<br />
Control variables allow you to print characters that are special to Substitution values within a display.<br />
<br />
For example the dollar character '$' is used to note the start of a variable. If you wish to print a dollar character you would use a control character like '&#92;$'<br />
<br />
Control Variables<br />
<br />
{|<br />
|-<br />
|&#92;$<br />
|Displays a single '$'<br />
|<br />
|&#92;&#92;<br />
|Displays a single '&#92;'<br />
|-<br />
|&#92;(<br />
|Displays a single '('<br />
|<br />
|&#92;)<br />
|Displays a single ')'<br />
|-<br />
|&#92;{<br />
|Displays a single '{'<br />
|<br />
|&#92;}<br />
|Displays a single '}'<br />
|-<br />
|&#92;<<br />
|Displays a single '<'<br />
|<br />
|&#92;><br />
|Displays a single '>'<br />
|}<br />
<br />
Basically anything that comes after a '&#92;' will be printed.<br />
<br />
----<br />
Note:<br />
When you are inside a format string, you may need to use this to display a character that would normally be a format code. <br />
<br />
{|<br />
|-<br />
|Example:<br />
|would give<br />
|-<br />
|<pre>$b(m hi mom)<br />
$b(m hi \mo\m)</pre><br />
|<pre>5 hi 5o5<br />
5 hi mom</pre><br />
|}<br />
<br />
as this person was born on the fifth month.<br />
<br />
== Grouping ==<br />
<br />
There are instances where you do not want certain text to be displayed. Take the example:<br />
<br />
{|<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died on $d at $D</pre><br />
|<pre>died on 1975-06-26 at </pre> <br />
|<pre>died on at Reno, Washoe Co., NV</pre><br />
|-<br />
| colspan="3"|Neither of these are very acceptable.<br />
|-<br />
| colspan="3"|But with groups (denoted by {}), you can optionally print information if a variable within contains information.<br />
|-<br />
| colspan="3"|For example:<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died {on $d }{at $D}</pre><br />
|<pre>died on 1975-06-26</pre><br />
|<pre>died at Reno, Washoe Co., NV</pre><br />
|}<br />
<br />
which is what we want.<br />
<br />
----<br />
=== Rules for groups ===<br />
<br />
A group will only display if there is at least one variable that displays something. So if a group only has text and/or variables where the information is not known, the entire group will not print.<br />
<br />
Groups can also be nested. If this happens (like below), the outer group will only display if there is at least one variable that displays something within the outer group or any of the sub groups.<br />
<br />
----<br />
<br />
=== Examples: ===<br />
<br />
This will hide '(' and ')' if the divorce information is not known (or still married).<br />
<br />
<pre>m. $m $M {- ($v(yyyy))</pre><br />
<br />
<br />
Only display some spouse information if married or remove the entire line if never married:<br />
<pre>-$s $m(yyyy) {- $v(\(yyyy\))}</pre><br />
<br />
== Attributes ==<br />
<br />
Attributes do not have a format string. Instead the attribute name is placed inside []. Here is the syntax for an attribute:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name] where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'au'<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$a[Profession]<br />
$a[Social Security Number]<br />
$a[Total \$ bequeathed]</pre><br />
|<pre>Programmer<br />
7A3-29-F1C6<br />
3.00USD</pre><br />
|}<br />
<br />
<br />
----<br />
== Events ==<br />
<br />
Events have the same starting structure as attributes, $e or $t and the event name in [] but events have an extra format string after the name to display the description, date, place, id, and attributes associated with it. Each of these items can be displayed with a , a 'n', 'd', 'D', 'i', and 'a' respectively in the format string. Here is the syntax for an event:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name](format string) where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'et'<br />
<br />
=== Event format strings ===<br />
<br />
The Event format string is used to display information about the event. Here are the format codes to display parts of the event:<br />
<br />
{|<br />
|-<br />
|n<br />
|Description<br />
|<br />
|i<br />
|Event ID<br />
|-<br />
|d<br />
|Event Date&#42;<br />
|<br />
|D<br />
|Event Place&#42;<br />
|-<br />
|a<br />
|An attributes for the event&#42;&#42;<br />
|<br />
|<br />
|<br />
|}<br />
<br />
&#42;These variables can themselves have format strings. Date and a place can be formatted with format string as defined in [[#Format strings|Format strings]].<br />
<br />
&#42;&#42;Attribute needs to have the attribute name in [] and are formatted as above.<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$e[First Communion](d(yyyy-mm-d))<br />
$e[Bar Mitzvah](n&lt; at &gt; D)<br />
$e[Birth](d(yyyy mm/dd) D)</pre><br />
|<pre>2009-11-6<br />
Jerry's Bar Mitzah at Opas house<br />
2007 05/23 Grandmothers house</pre><br />
|}<br />
<br />
<br />
And:<br />
<br />
{|<br />
|-<br />
|<pre>$b(yyyy-Mmm-dd)<br />
$M</pre><br />
|is the same as<br />
|<pre>$e[Birth](d(yyyy-Mmm-dd))<br />
$t[Marriage](D)</pre><br />
|}<br />
<br />
<br />
----<br />
<br />
=== Notes for attributes and events: ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Attribute and event names are mandatory. '$a' or '$a[]' will not display anything.<br />
|-<br />
|2<br />
|Attributes and event names may have special characters within them. Most notably ']' and ')'. If this is the case, you will need to use [[#Control Variables|Control Variables]]<br />
|}<br />
<br />
== Separators ==<br />
<br />
Separators are special 'text only' groups inside '&lt;' and '&gt;' that conditionally display a separator (like ', ' or ' - ') between two groups, variables, format codes or text.<br />
<br />
Separators are displayed conditionally depending on these rules:<br />
<br />
# A variable that does '''not''' display anything will remove itself and a separator that is to the left of it from the display line only.<br />
# If there is not a separator to the left, the same variable will remove itself and a separator that is to the right of it from the displayed line. <br />
# If there are two separators together, the left one will be removed from the display line and the right is kept.<br />
# Separators at the start or end of the display line display if there is text, group, or variable that displays.<br />
## Separators at the start or end of a format string or group, will display if first the format string or group displays and the above is also true.<br />
<br />
=== Example: ===<br />
{|<br />
|-<br />
|<pre>$s(f l)&lt;, &gt;$m(yyyy)&lt; @ &gt;$M&lt; - &gt;$v(&#92;(yyyy&#92;))</pre><br />
|}<br />
<br />
Here are some things that may happen:<br />
<br />
{|<br />
|-<br />
|If '''none''' of the variables are known<br />
|None of the separators will display<br />
|-<br />
|If only one variable '''is''' known<br />
|Only that variable will print. No separators will print.<br />
|-<br />
|If only the spouse's name '''is not''' known<br />
|The first separator will not display<br />
|-<br />
|If only the marriage date '''is not''' known<br />
|The first separator does not display. We will be left with:<br />
Jane Doe&lt; - &gt;{ … }And only the divorce date needs to be known to print the second separator.<br />
|-<br />
|If only the divorce date '''is not''' known<br />
|the second separator will not display<br />
|}<br />
<br />
<br />
Separators can be inside format strings:<br />
<br />
{|<br />
|-<br />
|<pre>$n(&lt;0&gt;T&lt; &gt;L&lt;, &gt;f&lt; &gt;s)</pre><br />
|}<br />
<br />
Separators can cross over/out of format strings. As the first thing on this line is the variable, the separator &lt;0&gt; will only display only if the 'T' format code displays (the person has something in the title field).<br />
----<br />
Here is a useful example:<br />
{|<br />
|-<br />
|<pre>{({b. $b}<, >{d. $d})}</pre><br />
|}<br />
<br />
This will:<br />
{|<br />
|-<br />
| Only print the outside () if either the birth or death date displays<br />
|-<br />
| Only displays the center separator if both dates are known.<br />
|-<br />
| So here are some thing that could display<br />
{|<br />
|-<br />
| A blank line<br />
| <pre>(b. 1970-4-8)</pre><br />
| <pre>(d. 2012-3-9)</pre><br />
| <pre>(b. 1970-4-8, d. 2012-3-9)</pre><br />
|}<br />
|-<br />
| We will not see things like:<br />
{|<br />
|-<br />
| <pre>()</pre><br />
| <pre>(, )</pre><br />
| <pre>(b.)</pre><br />
| <pre>(b., )</pre><br />
| <pre>(d.)</pre><br />
|-<br />
| <pre>(, d.)</pre><br />
| <pre>(b. 1970-4-8, )</pre><br />
| <pre>(b. 1970-4-8, d.)</pre><br />
| <pre>(, d. 2012-3-9)</pre><br />
| <pre>(b., d. 2012-3-9)</pre><br />
|}<br />
|}<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
{{-}}<br />
<br />
{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{languages}}<br />
<br />
[[Category:Documentation]]<br />
[[Category:Plugins]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Gramps_3.4_Wiki_Manual_-_Reports_-_part_2&diff=36924Gramps 3.4 Wiki Manual - Reports - part 22012-04-30T02:48:52Z<p>Ander882: /* Example: */</p>
<hr />
<div>This section describes the substitution values that can be used in the different reports available in Gramps.<br />
<br />
{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{grampsmanualcopyright}}<br />
<br />
{{languages|Gramps_3.4_Wiki_Manual_-_Reports - part 2}}<br />
<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
= Substitution Values =<br />
<br />
Many of the graphical reports allow you to customize the information that is displayed on the reports. Variable substitution is the method that is used to substitute a particular symbol (key) for specific information about the person in the database.<br />
<br />
{|<br />
|-<br />
|Example: <br />
|Will show as: (the person is alive)<br />
|-<br />
|<pre>$n<br />
b. $b( at $B}<br />
-d. $d< at >$D</pre><br />
|<pre>Smith, Edwin Michael<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA<br />
</pre><br />
|}<br />
<br />
----<br />
{|<br />
|-<br />
|1<br />
|If you wish to conditionally print an entire line, start it with a '-'. Like the third line in the example above, the entire line will only display when one or more variables on the line display something. If you wish to start the line with a '-' use '\-' [[#Control Variables|Control Variables]].<br />
|-<br />
|2<br />
|A list of all available variables (The Substitution Keys) follows. If you wish to display names, date, or place information differently, you may use [[#Format Strings|Format Strings]] to accomplish this.<br />
|-<br />
|3<br />
|There are also [[#Control Variables|Control Variables]] to display special characters (like the dollar sign).<br />
|-<br />
|4<br />
|You can also use [[#Grouping|Grouping]] to optionally display information. Line 2 above, uses grouping to display ' at ' only when the birth place is known.<br />
|-<br />
|5<br />
|Along with [[#Events|Events]] you can print almost anything.<br />
|-<br />
|6<br />
|Finally, [[#Separators|Separators]], to make your life complete. Line 3 above, uses this to display ' at ' only when both the birth date and place is known.<br />
|-<br />
|}<br />
<br />
<br />
== The Substitution Keys ==<br />
<br />
{|<br />
|-<br />
| colspan="2"|'''Personal variables'''<br />
| colspan="2"|'''Marital variables'''<br />
|-<br />
|$n<br />
|Displays the person's name<br />
|$s<br />
|Displays the name of the person's spouse<br />
|-<br />
|$i<br />
|Displays the GRAMPS ID for the person.<br />
|$j<br />
|Displays the GRAMPS ID for the marriage.<br />
|-<br />
|$b<br />
|Displays the person's date of birth <br />
|$m<br />
|Displays the marriage date of the person and the spouse.<br />
|-<br />
|$B<br />
|Displays the person's place of birth <br />
|$M<br />
|Displays the place of the marriage of the person and the spouse.<br />
|-<br />
|$d<br />
|Displays the person's date of death <br />
|$v<br />
|Displays the divorce date of the person and the spouse.<br />
|-<br />
|$D<br />
|Displays the person's place of death <br />
|$V<br />
|Displays the place of the divorce of the person and the spouse.<br />
|-<br />
|$a<br />
|Displays an attribute about the person.<br />
see [[#Attributes|Attributes]] for more<br />
|$u<br />
|Displays an attribute about the marriage.<br />
see [[#Attributes|Attributes]] for more<br />
|-<br />
|$e<br />
|Displays event information about the person.<br />
See [[#Events|Events]] for more<br />
|$t<br />
|Displays an event information about the marriage.<br />
See [[#Events|Events]] for more<br />
|}<br />
<br />
All of the Marital variables are defined by the person's preferred spouse in Gramps. If the person has never been married, then these variables will not display anything.<br />
<br />
----<br />
=== Default displayed formats ===<br />
<br />
{|<br />
|-<br />
|$n $s<br />
|Names will be displayed as set in 'Name format:' on the Display tab in Gramps preferences<br />
|-<br />
|$B $D $M $V<br />
|Places will display the Place title by default<br />
|-<br />
|$b $d $m $v<br />
|Dates will be displayed as set in 'Date format:' on the Display tab in Gramps preferences<br />
|-<br />
|$e $t<br />
|Events will display the description by default<br />
|}<br />
<br />
<br />
=== Deprecated variables ===<br />
<br />
Some of the old variables were deprecated because [[#Format Strings|Format Strings]] have replaced them. So here is a list of those variables and how to achieve their results:<br />
<br />
{| {{prettytable}}<br />
|-<br />
!Old Variable<br />
!How to display it now<br />
!What is displayed<br />
|-<br />
|$f<br />
|$n<br />
|Name - as by Gramps name display under Preferences<br />
|-<br />
|$n<br />
|$n(g f)<br />
|Name - FirstName LastName<br />
|-<br />
|$N<br />
|$n(f, g)<br />
|Name - LastName, FirstName (note the explicit comma)<br />
|-<br />
|$nC<br />
|$n(g F)<br />
|Name - FirstName LastName in UPPER case<br />
|-<br />
|$NC<br />
|$n(F, g)<br />
|Name - LastName in UPPER case, FirstName<br />
|-<br />
|$by<br />
|$b(yyyy)<br />
|Date of birth, year only<br />
|-<br />
|$dy<br />
|$d(yyyy)<br />
|Date of death, year only<br />
|-<br />
|$my<br />
|$m(yyyy)<br />
|Date of preferred marriage, year only<br />
|-<br />
|$p<br />
|$s<br />
|Preferred spouse's name as by Gramps name display under Preferences<br />
|-<br />
|$s<br />
|$s(g f)<br />
|Preferred spouse's name - FirstName LastName<br />
|-<br />
|$S<br />
|$s(f, g)<br />
|Preferred spouse's name - LastName, FirstName<br />
|-<br />
|$sC<br />
|$s(g F)<br />
|Preferred spouse's name - FirstName LastName in UPPER case<br />
|-<br />
|$SC<br />
|$s(F, g)<br />
|Preferred spouse's name - LastName in UPPER case, FirstName<br />
|}<br />
<br />
== Format Strings ==<br />
<br />
Format strings are used to display names and dates differently than those assigned under Gramps Preferences. Here is the syntax for a format string:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''(format string)<br />
where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'nsijbmBMdvDVauet'<br />
<br />
A format string is any text, separators or format codes (defined below) to display information about the person.<br />
<br />
=== Formatting names ===<br />
<br />
For names ($n $s) you may use the following formatting codes to display the name differently.<br />
<br />
{|<br />
|-<br />
|t<br />
|Title<br />
|<br />
|f<br />
|Given name<br />
|-<br />
|x<br />
|Common name. Call name if existing, otherwise first first name<br />
|<br />
|c<br />
|Call name<br />
|-<br />
|n<br />
|Nick name<br />
|<br />
|s<br />
|Suffix<br />
|-<br />
|l<br />
|Surname<br />
|<br />
|g<br />
|Family nickname<br />
|}<br />
<br />
These codes can be uppercased to uppercase the result.<br />
<br />
{|<br />
|-<br />
|Example code<br />
|Displays<br />
|-<br />
|<pre>$n(L, f) ($n(c)), $n(L, f){ ($n(c))}<br />
$s(f l s)</pre><br />
|<pre>SMITH, Edwin Michael (), SMITH, Edwin Michael<br />
Janice Ann Adams</pre><br />
|}<br />
<br />
<br />
<blockquote>Note:<br />
If you want to print a character 'c' within the format string (or any one of the other format codes), you will need to first add a '&#92;' in front of it. See [[#Control Variables|Control Variables]] for more.</blockquote><br />
<br />
<blockquote>Note:<br />
the curly brackets { } are used to hide information. Here it is used around ' ($n(c))' to not display ' ()' if the person does not have a call name. See [[#Grouping|Grouping]] for more.</blockquote><br />
<br />
----<br />
<br />
=== Formatting Dates ===<br />
<br />
For all of the date variables ($b $d $m $v) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|yyyy<br />
|The year as a four digit number<br />
|<br />
|yyy<br />
|The year, with a minimum of three digits<br />
|-<br />
|yy<br />
|The year, from 00 to 99<br />
|<br />
|y<br />
|The year, from 0 to 99<br />
|-<br />
|mmmm<BR><br />
MMMM<br />
|The full name of the month<BR><br />
The full name IN CAPS<br />
|<br />
|mmm<BR><br />
MMM<br />
|The abbreviated name of the month<BR><br />
The abbreviated name IN CAPS<br />
|-<br />
|mm<br />
|The month, from 00 to 12<br />
|<br />
|m<br />
|The month, from 0 to 12<br />
|-<br />
|dd<br />
|The day, from 00 to 31<br />
|<br />
|d<br />
|The day, from 0 to 31<br />
|-<br />
|o<br />
|The date type (modifier)<br />
|<br />
|<br />
|<br />
|}<br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$b(mmm-dd yy)<br />
$m(yyyy/mmm/d)<br />
$b(mmm-dd yy)</pre><br />
|<pre>May-24 61<br />
1995/May/27<br />
Jun-04 85</pre><br />
|}<br />
<br />
{{man note| For date types (modifier) |Only "Before", "After", and "About" are supported at this time. all others will not display anything.<BR><br />
And for date span and date ranges, only the starting (first) date is displayed.}}<br />
<br />
----<br />
<br />
=== Formatting Places ===<br />
<br />
For all of the place variables ($B $D $M $V) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|e<br />
|Street<br />
|<br />
|l<br />
|Locality<br />
|-<br />
|c<br />
|City<br />
|<br />
|u<br />
|County<br />
|-<br />
|s<br />
|State<br />
|<br />
|p<br />
|Postal Code<br />
|-<br />
|n<br />
|Country<br />
|<br />
|t<br />
|Title<br />
|-<br />
|x<br />
|Longitude<br />
|<br />
|y<br />
|Latitude<br />
|}<br />
These codes can be uppercased to uppercase the result. <br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
----<br />
<br />
=== Rules for format strings. ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Anything will print inside a format string<br />
|-<br />
|1a<br />
|you will have to use [[#Control Variables|Control Variables]] to display things like ')' and format codes<br />
|-<br />
|2<br />
|Separators can be within format strings.<br />
|-<br />
|3<br />
|At least ONE format code has to display something for the ENTIRE format string to display<br />
|}<br />
<br />
----<br />
<br />
=== Examples ===<br />
<br />
{|<br />
|-<br />
|code<br />
|gives<br />
|-<br />
|<pre>$n(f l)<br />
b. $b {at $B<br />
{d. $d $D</pre><br />
|<pre>Edwin Michael Smith<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA</pre>The person is still alive (or has no information present) so the line was removed.<br />
|}<br />
<br />
<br />
<br />
== Control Variables ==<br />
<br />
Control variables allow you to print characters that are special to Substitution values within a display.<br />
<br />
For example the dollar character '$' is used to note the start of a variable. If you wish to print a dollar character you would use a control character like '&#92;$'<br />
<br />
Control Variables<br />
<br />
{|<br />
|-<br />
|&#92;$<br />
|Displays a single '$'<br />
|<br />
|&#92;&#92;<br />
|Displays a single '&#92;'<br />
|-<br />
|&#92;(<br />
|Displays a single '('<br />
|<br />
|&#92;)<br />
|Displays a single ')'<br />
|-<br />
|&#92;{<br />
|Displays a single '{'<br />
|<br />
|&#92;}<br />
|Displays a single '}'<br />
|-<br />
|&#92;<<br />
|Displays a single '<'<br />
|<br />
|&#92;><br />
|Displays a single '>'<br />
|}<br />
<br />
Basically anything that comes after a '&#92;' will be printed.<br />
<br />
----<br />
Note:<br />
When you are inside a format string, you may need to use this to display a character that would normally be a format code. <br />
<br />
{|<br />
|-<br />
|Example:<br />
|would give<br />
|-<br />
|<pre>$b(m hi mom)<br />
$b(m hi \mo\m)</pre><br />
|<pre>5 hi 5o5<br />
5 hi mom</pre><br />
|}<br />
<br />
as this person was born on the fifth month.<br />
<br />
== Grouping ==<br />
<br />
There are instances where you do not want certain text to be displayed. Take the example:<br />
<br />
{|<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died on $d at $D</pre><br />
|<pre>died on 1975-06-26 at </pre> <br />
|<pre>died on at Reno, Washoe Co., NV</pre><br />
|-<br />
| colspan="3"|Neither of these are very acceptable.<br />
|-<br />
| colspan="3"|But with groups (denoted by {}), you can optionally print information if a variable within contains information.<br />
|-<br />
| colspan="3"|For example:<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died {on $d }{at $D}</pre><br />
|<pre>died on 1975-06-26</pre><br />
|<pre>died at Reno, Washoe Co., NV</pre><br />
|}<br />
<br />
which is what we want.<br />
<br />
----<br />
=== Rules for groups ===<br />
<br />
A group will only display if there is at least one variable that displays something. So if a group only has text and/or variables where the information is not known, the entire group will not print.<br />
<br />
Groups can also be nested. If this happens (like below), the outer group will only display if there is at least one variable that displays something within the outer group or any of the sub groups.<br />
<br />
----<br />
<br />
=== Examples: ===<br />
<br />
This will hide '(' and ')' if the divorce information is not known (or still married).<br />
<br />
<pre>m. $m $M {- ($v(yyyy))</pre><br />
<br />
<br />
Only display some spouse information if married or remove the entire line if never married:<br />
<pre>-$s $m(yyyy) {- $v(\(yyyy\))}</pre><br />
<br />
== Attributes ==<br />
<br />
Attributes do not have a format string. Instead the attribute name is placed inside []. Here is the syntax for an attribute:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name] where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'au'<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$a[Profession]<br />
$a[Social Security Number]<br />
$a[Total \$ bequeathed]</pre><br />
|<pre>Programmer<br />
7A3-29-F1C6<br />
3.00USD</pre><br />
|}<br />
<br />
<br />
----<br />
== Events ==<br />
<br />
Events have the same starting structure as attributes, $e or $t and the event name in [] but events have an extra format string after the name to display the description, date, place, id, and attributes associated with it. Each of these items can be displayed with a , a 'n', 'd', 'D', 'i', and 'a' respectively in the format string. Here is the syntax for an event:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name](format string) where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'et'<br />
<br />
=== Event format strings ===<br />
<br />
The Event format string is used to display information about the event. Here are the format codes to display parts of the event:<br />
<br />
{|<br />
|-<br />
|n<br />
|Description<br />
|<br />
|i<br />
|Event ID<br />
|-<br />
|d<br />
|Event Date&#42;<br />
|<br />
|D<br />
|Event Place&#42;<br />
|-<br />
|a<br />
|An attributes for the event&#42;&#42;<br />
|<br />
|<br />
|<br />
|}<br />
<br />
&#42;These variables can themselves have format strings. Date and a place can be formatted with format string as defined in [[#Format strings|Format strings]].<br />
<br />
&#42;&#42;Attribute needs to have the attribute name in [] and are formatted as above.<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$e[First Communion](d(yyyy-mm-d))<br />
$e[Bar Mitzvah](n&lt; at &gt; D)<br />
$e[Birth](d(yyyy mm/dd) D)</pre><br />
|<pre>2009-11-6<br />
Jerry's Bar Mitzah at Opas house<br />
2007 05/23 Grandmothers house</pre><br />
|}<br />
<br />
<br />
And:<br />
<br />
{|<br />
|-<br />
|<pre>$b(yyyy-Mmm-dd)<br />
$M</pre><br />
|is the same as<br />
|<pre>$e[Birth](d(yyyy-Mmm-dd))<br />
$t[Marriage](D)</pre><br />
|}<br />
<br />
<br />
----<br />
<br />
=== Notes for attributes and events: ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Attribute and event names are mandatory. '$a' or '$a[]' will not display anything.<br />
|-<br />
|2<br />
|Attributes and event names may have special characters within them. Most notably ']' and ')'. If this is the case, you will need to use [[#Control Variables|Control Variables]]<br />
|}<br />
<br />
== Separators ==<br />
<br />
Separators are special 'text only' groups inside '&lt;' and '&gt;' that conditionally display a separator (like ', ' or ' - ') between two groups, variables, format codes or text.<br />
<br />
Separators are displayed conditionally depending on these rules:<br />
<br />
# A variable that does '''not''' display anything will remove itself and a separator that is to the left of it from the display line only.<br />
# If there is not a separator to the left, the same variable will remove itself and a separator that is to the right of it from the displayed line. <br />
# If there are two separators together, the left one will be removed from the display line and the right is kept.<br />
# Separators at the start or end of the display line display if there is text, group, or variable that displays.<br />
## Separators at the start or end of a format string or group, will display if first the format string or group displays and the above is also true.<br />
<br />
=== Example: ===<br />
{|<br />
|-<br />
|<pre>$s(f l)&lt;, &gt;$m(yyyy)&lt; @ &gt;$M&lt; - &gt;$v(&#92;(yyyy&#92;))</pre><br />
|}<br />
<br />
Here are some things that may happen:<br />
<br />
{|<br />
|-<br />
|If '''none''' of the variables are known<br />
|None of the separators will display<br />
|-<br />
|If only one variable '''is''' known<br />
|Only that variable will print. No separators will print.<br />
|-<br />
|If only the spouse's name '''is not''' known<br />
|The first separator will not display<br />
|-<br />
|If only the marriage date '''is not''' known<br />
|The first separator does not display. We will be left with:<br />
Jane Doe&lt; - &gt;{ … }And only the divorce date needs to be known to print the second separator.<br />
|-<br />
|If only the divorce date '''is not''' known<br />
|the second separator will not display<br />
|}<br />
<br />
<br />
Separators can be inside format strings:<br />
<br />
{|<br />
|-<br />
|<pre>$n(&lt;0&gt;T&lt; &gt;L&lt;, &gt;f&lt; &gt;s)</pre><br />
|}<br />
<br />
Separators can cross over/out of format strings. As the first thing on this line is the variable, the separator &lt;0&gt; will only display only if the 'T' format code displays (the person has something in the title field).<br />
----<br />
Here is a useful example:<br />
{|<br />
|-<br />
|<pre>{({b. $b}<, >{d. $d})}</pre><br />
|}<br />
<br />
This will:<br />
{|<br />
|-<br />
| Only print the outside () if either the birth or death date displays<br />
|-<br />
| Only displays the center separator if both dates are known.<br />
|-<br />
| So here are some thing that could display<br />
{|<br />
|-<br />
| A blank line<br />
| <pre>(b. 1970-4-8)</pre><br />
| <pre>(d. 2012-3-9)</pre><br />
| <pre>(b. 1970-4-8, d. 2012-3-9)</pre><br />
|}<br />
|-<br />
| We will not see things like:<br />
{|<br />
|-<br />
| <pre>()</pre><br />
| <pre>(, )</pre><br />
| <pre>(b.)</pre><br />
| <pre>(b., )</pre><br />
| <pre>(d.)</pre><br />
|-<br />
| <pre>(, d.)</pre><br />
| <pre>(b. 1970-4-8, )</pre><br />
| <pre>(b. 1970-4-8, d.)</pre><br />
| <pre>(, d. 2012-3-9)</pre><br />
| <pre>(b., d. 2012-3-9)</pre><br />
|}<br />
|}<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
{{-}}<br />
<br />
{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{languages}}<br />
<br />
[[Category:Documentation]]<br />
[[Category:Plugins]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Gramps_3.4_Wiki_Manual_-_Reports_-_part_2&diff=36923Gramps 3.4 Wiki Manual - Reports - part 22012-04-30T02:43:56Z<p>Ander882: /* Example: */</p>
<hr />
<div>This section describes the substitution values that can be used in the different reports available in Gramps.<br />
<br />
{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{grampsmanualcopyright}}<br />
<br />
{{languages|Gramps_3.4_Wiki_Manual_-_Reports - part 2}}<br />
<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
= Substitution Values =<br />
<br />
Many of the graphical reports allow you to customize the information that is displayed on the reports. Variable substitution is the method that is used to substitute a particular symbol (key) for specific information about the person in the database.<br />
<br />
{|<br />
|-<br />
|Example: <br />
|Will show as: (the person is alive)<br />
|-<br />
|<pre>$n<br />
b. $b( at $B}<br />
-d. $d< at >$D</pre><br />
|<pre>Smith, Edwin Michael<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA<br />
</pre><br />
|}<br />
<br />
----<br />
{|<br />
|-<br />
|1<br />
|If you wish to conditionally print an entire line, start it with a '-'. Like the third line in the example above, the entire line will only display when one or more variables on the line display something. If you wish to start the line with a '-' use '\-' [[#Control Variables|Control Variables]].<br />
|-<br />
|2<br />
|A list of all available variables (The Substitution Keys) follows. If you wish to display names, date, or place information differently, you may use [[#Format Strings|Format Strings]] to accomplish this.<br />
|-<br />
|3<br />
|There are also [[#Control Variables|Control Variables]] to display special characters (like the dollar sign).<br />
|-<br />
|4<br />
|You can also use [[#Grouping|Grouping]] to optionally display information. Line 2 above, uses grouping to display ' at ' only when the birth place is known.<br />
|-<br />
|5<br />
|Along with [[#Events|Events]] you can print almost anything.<br />
|-<br />
|6<br />
|Finally, [[#Separators|Separators]], to make your life complete. Line 3 above, uses this to display ' at ' only when both the birth date and place is known.<br />
|-<br />
|}<br />
<br />
<br />
== The Substitution Keys ==<br />
<br />
{|<br />
|-<br />
| colspan="2"|'''Personal variables'''<br />
| colspan="2"|'''Marital variables'''<br />
|-<br />
|$n<br />
|Displays the person's name<br />
|$s<br />
|Displays the name of the person's spouse<br />
|-<br />
|$i<br />
|Displays the GRAMPS ID for the person.<br />
|$j<br />
|Displays the GRAMPS ID for the marriage.<br />
|-<br />
|$b<br />
|Displays the person's date of birth <br />
|$m<br />
|Displays the marriage date of the person and the spouse.<br />
|-<br />
|$B<br />
|Displays the person's place of birth <br />
|$M<br />
|Displays the place of the marriage of the person and the spouse.<br />
|-<br />
|$d<br />
|Displays the person's date of death <br />
|$v<br />
|Displays the divorce date of the person and the spouse.<br />
|-<br />
|$D<br />
|Displays the person's place of death <br />
|$V<br />
|Displays the place of the divorce of the person and the spouse.<br />
|-<br />
|$a<br />
|Displays an attribute about the person.<br />
see [[#Attributes|Attributes]] for more<br />
|$u<br />
|Displays an attribute about the marriage.<br />
see [[#Attributes|Attributes]] for more<br />
|-<br />
|$e<br />
|Displays event information about the person.<br />
See [[#Events|Events]] for more<br />
|$t<br />
|Displays an event information about the marriage.<br />
See [[#Events|Events]] for more<br />
|}<br />
<br />
All of the Marital variables are defined by the person's preferred spouse in Gramps. If the person has never been married, then these variables will not display anything.<br />
<br />
----<br />
=== Default displayed formats ===<br />
<br />
{|<br />
|-<br />
|$n $s<br />
|Names will be displayed as set in 'Name format:' on the Display tab in Gramps preferences<br />
|-<br />
|$B $D $M $V<br />
|Places will display the Place title by default<br />
|-<br />
|$b $d $m $v<br />
|Dates will be displayed as set in 'Date format:' on the Display tab in Gramps preferences<br />
|-<br />
|$e $t<br />
|Events will display the description by default<br />
|}<br />
<br />
<br />
=== Deprecated variables ===<br />
<br />
Some of the old variables were deprecated because [[#Format Strings|Format Strings]] have replaced them. So here is a list of those variables and how to achieve their results:<br />
<br />
{| {{prettytable}}<br />
|-<br />
!Old Variable<br />
!How to display it now<br />
!What is displayed<br />
|-<br />
|$f<br />
|$n<br />
|Name - as by Gramps name display under Preferences<br />
|-<br />
|$n<br />
|$n(g f)<br />
|Name - FirstName LastName<br />
|-<br />
|$N<br />
|$n(f, g)<br />
|Name - LastName, FirstName (note the explicit comma)<br />
|-<br />
|$nC<br />
|$n(g F)<br />
|Name - FirstName LastName in UPPER case<br />
|-<br />
|$NC<br />
|$n(F, g)<br />
|Name - LastName in UPPER case, FirstName<br />
|-<br />
|$by<br />
|$b(yyyy)<br />
|Date of birth, year only<br />
|-<br />
|$dy<br />
|$d(yyyy)<br />
|Date of death, year only<br />
|-<br />
|$my<br />
|$m(yyyy)<br />
|Date of preferred marriage, year only<br />
|-<br />
|$p<br />
|$s<br />
|Preferred spouse's name as by Gramps name display under Preferences<br />
|-<br />
|$s<br />
|$s(g f)<br />
|Preferred spouse's name - FirstName LastName<br />
|-<br />
|$S<br />
|$s(f, g)<br />
|Preferred spouse's name - LastName, FirstName<br />
|-<br />
|$sC<br />
|$s(g F)<br />
|Preferred spouse's name - FirstName LastName in UPPER case<br />
|-<br />
|$SC<br />
|$s(F, g)<br />
|Preferred spouse's name - LastName in UPPER case, FirstName<br />
|}<br />
<br />
== Format Strings ==<br />
<br />
Format strings are used to display names and dates differently than those assigned under Gramps Preferences. Here is the syntax for a format string:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''(format string)<br />
where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'nsijbmBMdvDVauet'<br />
<br />
A format string is any text, separators or format codes (defined below) to display information about the person.<br />
<br />
=== Formatting names ===<br />
<br />
For names ($n $s) you may use the following formatting codes to display the name differently.<br />
<br />
{|<br />
|-<br />
|t<br />
|Title<br />
|<br />
|f<br />
|Given name<br />
|-<br />
|x<br />
|Common name. Call name if existing, otherwise first first name<br />
|<br />
|c<br />
|Call name<br />
|-<br />
|n<br />
|Nick name<br />
|<br />
|s<br />
|Suffix<br />
|-<br />
|l<br />
|Surname<br />
|<br />
|g<br />
|Family nickname<br />
|}<br />
<br />
These codes can be uppercased to uppercase the result.<br />
<br />
{|<br />
|-<br />
|Example code<br />
|Displays<br />
|-<br />
|<pre>$n(L, f) ($n(c)), $n(L, f){ ($n(c))}<br />
$s(f l s)</pre><br />
|<pre>SMITH, Edwin Michael (), SMITH, Edwin Michael<br />
Janice Ann Adams</pre><br />
|}<br />
<br />
<br />
<blockquote>Note:<br />
If you want to print a character 'c' within the format string (or any one of the other format codes), you will need to first add a '&#92;' in front of it. See [[#Control Variables|Control Variables]] for more.</blockquote><br />
<br />
<blockquote>Note:<br />
the curly brackets { } are used to hide information. Here it is used around ' ($n(c))' to not display ' ()' if the person does not have a call name. See [[#Grouping|Grouping]] for more.</blockquote><br />
<br />
----<br />
<br />
=== Formatting Dates ===<br />
<br />
For all of the date variables ($b $d $m $v) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|yyyy<br />
|The year as a four digit number<br />
|<br />
|yyy<br />
|The year, with a minimum of three digits<br />
|-<br />
|yy<br />
|The year, from 00 to 99<br />
|<br />
|y<br />
|The year, from 0 to 99<br />
|-<br />
|mmmm<BR><br />
MMMM<br />
|The full name of the month<BR><br />
The full name IN CAPS<br />
|<br />
|mmm<BR><br />
MMM<br />
|The abbreviated name of the month<BR><br />
The abbreviated name IN CAPS<br />
|-<br />
|mm<br />
|The month, from 00 to 12<br />
|<br />
|m<br />
|The month, from 0 to 12<br />
|-<br />
|dd<br />
|The day, from 00 to 31<br />
|<br />
|d<br />
|The day, from 0 to 31<br />
|-<br />
|o<br />
|The date type (modifier)<br />
|<br />
|<br />
|<br />
|}<br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$b(mmm-dd yy)<br />
$m(yyyy/mmm/d)<br />
$b(mmm-dd yy)</pre><br />
|<pre>May-24 61<br />
1995/May/27<br />
Jun-04 85</pre><br />
|}<br />
<br />
{{man note| For date types (modifier) |Only "Before", "After", and "About" are supported at this time. all others will not display anything.<BR><br />
And for date span and date ranges, only the starting (first) date is displayed.}}<br />
<br />
----<br />
<br />
=== Formatting Places ===<br />
<br />
For all of the place variables ($B $D $M $V) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|e<br />
|Street<br />
|<br />
|l<br />
|Locality<br />
|-<br />
|c<br />
|City<br />
|<br />
|u<br />
|County<br />
|-<br />
|s<br />
|State<br />
|<br />
|p<br />
|Postal Code<br />
|-<br />
|n<br />
|Country<br />
|<br />
|t<br />
|Title<br />
|-<br />
|x<br />
|Longitude<br />
|<br />
|y<br />
|Latitude<br />
|}<br />
These codes can be uppercased to uppercase the result. <br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
----<br />
<br />
=== Rules for format strings. ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Anything will print inside a format string<br />
|-<br />
|1a<br />
|you will have to use [[#Control Variables|Control Variables]] to display things like ')' and format codes<br />
|-<br />
|2<br />
|Separators can be within format strings.<br />
|-<br />
|3<br />
|At least ONE format code has to display something for the ENTIRE format string to display<br />
|}<br />
<br />
----<br />
<br />
=== Examples ===<br />
<br />
{|<br />
|-<br />
|code<br />
|gives<br />
|-<br />
|<pre>$n(f l)<br />
b. $b {at $B<br />
{d. $d $D</pre><br />
|<pre>Edwin Michael Smith<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA</pre>The person is still alive (or has no information present) so the line was removed.<br />
|}<br />
<br />
<br />
<br />
== Control Variables ==<br />
<br />
Control variables allow you to print characters that are special to Substitution values within a display.<br />
<br />
For example the dollar character '$' is used to note the start of a variable. If you wish to print a dollar character you would use a control character like '&#92;$'<br />
<br />
Control Variables<br />
<br />
{|<br />
|-<br />
|&#92;$<br />
|Displays a single '$'<br />
|<br />
|&#92;&#92;<br />
|Displays a single '&#92;'<br />
|-<br />
|&#92;(<br />
|Displays a single '('<br />
|<br />
|&#92;)<br />
|Displays a single ')'<br />
|-<br />
|&#92;{<br />
|Displays a single '{'<br />
|<br />
|&#92;}<br />
|Displays a single '}'<br />
|-<br />
|&#92;<<br />
|Displays a single '<'<br />
|<br />
|&#92;><br />
|Displays a single '>'<br />
|}<br />
<br />
Basically anything that comes after a '&#92;' will be printed.<br />
<br />
----<br />
Note:<br />
When you are inside a format string, you may need to use this to display a character that would normally be a format code. <br />
<br />
{|<br />
|-<br />
|Example:<br />
|would give<br />
|-<br />
|<pre>$b(m hi mom)<br />
$b(m hi \mo\m)</pre><br />
|<pre>5 hi 5o5<br />
5 hi mom</pre><br />
|}<br />
<br />
as this person was born on the fifth month.<br />
<br />
== Grouping ==<br />
<br />
There are instances where you do not want certain text to be displayed. Take the example:<br />
<br />
{|<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died on $d at $D</pre><br />
|<pre>died on 1975-06-26 at </pre> <br />
|<pre>died on at Reno, Washoe Co., NV</pre><br />
|-<br />
| colspan="3"|Neither of these are very acceptable.<br />
|-<br />
| colspan="3"|But with groups (denoted by {}), you can optionally print information if a variable within contains information.<br />
|-<br />
| colspan="3"|For example:<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died {on $d }{at $D}</pre><br />
|<pre>died on 1975-06-26</pre><br />
|<pre>died at Reno, Washoe Co., NV</pre><br />
|}<br />
<br />
which is what we want.<br />
<br />
----<br />
=== Rules for groups ===<br />
<br />
A group will only display if there is at least one variable that displays something. So if a group only has text and/or variables where the information is not known, the entire group will not print.<br />
<br />
Groups can also be nested. If this happens (like below), the outer group will only display if there is at least one variable that displays something within the outer group or any of the sub groups.<br />
<br />
----<br />
<br />
=== Examples: ===<br />
<br />
This will hide '(' and ')' if the divorce information is not known (or still married).<br />
<br />
<pre>m. $m $M {- ($v(yyyy))</pre><br />
<br />
<br />
Only display some spouse information if married or remove the entire line if never married:<br />
<pre>-$s $m(yyyy) {- $v(\(yyyy\))}</pre><br />
<br />
== Attributes ==<br />
<br />
Attributes do not have a format string. Instead the attribute name is placed inside []. Here is the syntax for an attribute:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name] where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'au'<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$a[Profession]<br />
$a[Social Security Number]<br />
$a[Total \$ bequeathed]</pre><br />
|<pre>Programmer<br />
7A3-29-F1C6<br />
3.00USD</pre><br />
|}<br />
<br />
<br />
----<br />
== Events ==<br />
<br />
Events have the same starting structure as attributes, $e or $t and the event name in [] but events have an extra format string after the name to display the description, date, place, id, and attributes associated with it. Each of these items can be displayed with a , a 'n', 'd', 'D', 'i', and 'a' respectively in the format string. Here is the syntax for an event:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name](format string) where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'et'<br />
<br />
=== Event format strings ===<br />
<br />
The Event format string is used to display information about the event. Here are the format codes to display parts of the event:<br />
<br />
{|<br />
|-<br />
|n<br />
|Description<br />
|<br />
|i<br />
|Event ID<br />
|-<br />
|d<br />
|Event Date&#42;<br />
|<br />
|D<br />
|Event Place&#42;<br />
|-<br />
|a<br />
|An attributes for the event&#42;&#42;<br />
|<br />
|<br />
|<br />
|}<br />
<br />
&#42;These variables can themselves have format strings. Date and a place can be formatted with format string as defined in [[#Format strings|Format strings]].<br />
<br />
&#42;&#42;Attribute needs to have the attribute name in [] and are formatted as above.<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$e[First Communion](d(yyyy-mm-d))<br />
$e[Bar Mitzvah](n&lt; at &gt; D)<br />
$e[Birth](d(yyyy mm/dd) D)</pre><br />
|<pre>2009-11-6<br />
Jerry's Bar Mitzah at Opas house<br />
2007 05/23 Grandmothers house</pre><br />
|}<br />
<br />
<br />
And:<br />
<br />
{|<br />
|-<br />
|<pre>$b(yyyy-Mmm-dd)<br />
$M</pre><br />
|is the same as<br />
|<pre>$e[Birth](d(yyyy-Mmm-dd))<br />
$t[Marriage](D)</pre><br />
|}<br />
<br />
<br />
----<br />
<br />
=== Notes for attributes and events: ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Attribute and event names are mandatory. '$a' or '$a[]' will not display anything.<br />
|-<br />
|2<br />
|Attributes and event names may have special characters within them. Most notably ']' and ')'. If this is the case, you will need to use [[#Control Variables|Control Variables]]<br />
|}<br />
<br />
== Separators ==<br />
<br />
Separators are special 'text only' groups inside '&lt;' and '&gt;' that conditionally display a separator (like ', ' or ' - ') between two groups, variables, format codes or text.<br />
<br />
Separators are displayed conditionally depending on these rules:<br />
<br />
# A variable that does '''not''' display anything will remove itself and a separator that is to the left of it from the display line only.<br />
# If there is not a separator to the left, the same variable will remove itself and a separator that is to the right of it from the displayed line. <br />
# If there are two separators together, the left one will be removed from the display line and the right is kept.<br />
# Separators at the start or end of the display line display if there is text, group, or variable that displays.<br />
## Separators at the start or end of a format string or group, will display if first the format string or group displays and the above is also true.<br />
<br />
=== Example: ===<br />
{|<br />
|-<br />
|<pre>$s(f l)&lt;, &gt;$m(yyyy)&lt; @ &gt;$M&lt; - &gt;$v(&#92;(yyyy&#92;))</pre><br />
|}<br />
<br />
Here are some things that may happen:<br />
<br />
{|<br />
|-<br />
|If '''none''' of the variables are known<br />
|None of the separators will display<br />
|-<br />
|If only one variable '''is''' known<br />
|Only that variable will print. No separators will print.<br />
|-<br />
|If only the spouse's name '''is not''' known<br />
|The first separator will not display<br />
|-<br />
|If only the marriage date '''is not''' known<br />
|The first separator does not display. We will be left with:<br />
Jane Doe&lt; - &gt;{ … }And only the divorce date needs to be known to print the second separator.<br />
|-<br />
|If only the divorce date '''is not''' known<br />
|the second separator will not display<br />
|}<br />
<br />
<br />
Separators can be inside format strings:<br />
<br />
{|<br />
|-<br />
|<pre>$n(&lt;0&gt;T&lt; &gt;L&lt;, &gt;f&lt; &gt;s)</pre><br />
|}<br />
<br />
Separators can cross over/out of format strings. So the separator &lt;0&gt; will display only if the 'T' format code displays and what is on the left hand side of the variable displays or if there is nothing to the left.<br />
----<br />
Here is a useful example:<br />
{|<br />
|-<br />
|<pre>{({b. $b}<, >{d. $d})}</pre><br />
|}<br />
<br />
This will:<br />
{|<br />
|-<br />
| Only print the outside () if either the birth or death date displays<br />
|-<br />
| Only displays the center separator if both dates are known.<br />
|-<br />
| So here are some thing that could display<br />
{|<br />
|-<br />
| A blank line<br />
| <pre>(b. 1970-4-8)</pre><br />
| <pre>(d. 2012-3-9)</pre><br />
| <pre>(b. 1970-4-8, d. 2012-3-9)</pre><br />
|}<br />
|-<br />
| We will not see things like:<br />
{|<br />
|-<br />
| <pre>()</pre><br />
| <pre>(, )</pre><br />
| <pre>(b.)</pre><br />
| <pre>(b., )</pre><br />
| <pre>(d.)</pre><br />
|-<br />
| <pre>(, d.)</pre><br />
| <pre>(b. 1970-4-8, )</pre><br />
| <pre>(b. 1970-4-8, d.)</pre><br />
| <pre>(, d. 2012-3-9)</pre><br />
| <pre>(b., d. 2012-3-9)</pre><br />
|}<br />
|}<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
{{-}}<br />
<br />
{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{languages}}<br />
<br />
[[Category:Documentation]]<br />
[[Category:Plugins]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Gramps_3.4_Wiki_Manual_-_Reports_-_part_2&diff=36922Gramps 3.4 Wiki Manual - Reports - part 22012-04-30T02:41:08Z<p>Ander882: /* Example: */</p>
<hr />
<div>This section describes the substitution values that can be used in the different reports available in Gramps.<br />
<br />
{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{grampsmanualcopyright}}<br />
<br />
{{languages|Gramps_3.4_Wiki_Manual_-_Reports - part 2}}<br />
<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
= Substitution Values =<br />
<br />
Many of the graphical reports allow you to customize the information that is displayed on the reports. Variable substitution is the method that is used to substitute a particular symbol (key) for specific information about the person in the database.<br />
<br />
{|<br />
|-<br />
|Example: <br />
|Will show as: (the person is alive)<br />
|-<br />
|<pre>$n<br />
b. $b( at $B}<br />
-d. $d< at >$D</pre><br />
|<pre>Smith, Edwin Michael<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA<br />
</pre><br />
|}<br />
<br />
----<br />
{|<br />
|-<br />
|1<br />
|If you wish to conditionally print an entire line, start it with a '-'. Like the third line in the example above, the entire line will only display when one or more variables on the line display something. If you wish to start the line with a '-' use '\-' [[#Control Variables|Control Variables]].<br />
|-<br />
|2<br />
|A list of all available variables (The Substitution Keys) follows. If you wish to display names, date, or place information differently, you may use [[#Format Strings|Format Strings]] to accomplish this.<br />
|-<br />
|3<br />
|There are also [[#Control Variables|Control Variables]] to display special characters (like the dollar sign).<br />
|-<br />
|4<br />
|You can also use [[#Grouping|Grouping]] to optionally display information. Line 2 above, uses grouping to display ' at ' only when the birth place is known.<br />
|-<br />
|5<br />
|Along with [[#Events|Events]] you can print almost anything.<br />
|-<br />
|6<br />
|Finally, [[#Separators|Separators]], to make your life complete. Line 3 above, uses this to display ' at ' only when both the birth date and place is known.<br />
|-<br />
|}<br />
<br />
<br />
== The Substitution Keys ==<br />
<br />
{|<br />
|-<br />
| colspan="2"|'''Personal variables'''<br />
| colspan="2"|'''Marital variables'''<br />
|-<br />
|$n<br />
|Displays the person's name<br />
|$s<br />
|Displays the name of the person's spouse<br />
|-<br />
|$i<br />
|Displays the GRAMPS ID for the person.<br />
|$j<br />
|Displays the GRAMPS ID for the marriage.<br />
|-<br />
|$b<br />
|Displays the person's date of birth <br />
|$m<br />
|Displays the marriage date of the person and the spouse.<br />
|-<br />
|$B<br />
|Displays the person's place of birth <br />
|$M<br />
|Displays the place of the marriage of the person and the spouse.<br />
|-<br />
|$d<br />
|Displays the person's date of death <br />
|$v<br />
|Displays the divorce date of the person and the spouse.<br />
|-<br />
|$D<br />
|Displays the person's place of death <br />
|$V<br />
|Displays the place of the divorce of the person and the spouse.<br />
|-<br />
|$a<br />
|Displays an attribute about the person.<br />
see [[#Attributes|Attributes]] for more<br />
|$u<br />
|Displays an attribute about the marriage.<br />
see [[#Attributes|Attributes]] for more<br />
|-<br />
|$e<br />
|Displays event information about the person.<br />
See [[#Events|Events]] for more<br />
|$t<br />
|Displays an event information about the marriage.<br />
See [[#Events|Events]] for more<br />
|}<br />
<br />
All of the Marital variables are defined by the person's preferred spouse in Gramps. If the person has never been married, then these variables will not display anything.<br />
<br />
----<br />
=== Default displayed formats ===<br />
<br />
{|<br />
|-<br />
|$n $s<br />
|Names will be displayed as set in 'Name format:' on the Display tab in Gramps preferences<br />
|-<br />
|$B $D $M $V<br />
|Places will display the Place title by default<br />
|-<br />
|$b $d $m $v<br />
|Dates will be displayed as set in 'Date format:' on the Display tab in Gramps preferences<br />
|-<br />
|$e $t<br />
|Events will display the description by default<br />
|}<br />
<br />
<br />
=== Deprecated variables ===<br />
<br />
Some of the old variables were deprecated because [[#Format Strings|Format Strings]] have replaced them. So here is a list of those variables and how to achieve their results:<br />
<br />
{| {{prettytable}}<br />
|-<br />
!Old Variable<br />
!How to display it now<br />
!What is displayed<br />
|-<br />
|$f<br />
|$n<br />
|Name - as by Gramps name display under Preferences<br />
|-<br />
|$n<br />
|$n(g f)<br />
|Name - FirstName LastName<br />
|-<br />
|$N<br />
|$n(f, g)<br />
|Name - LastName, FirstName (note the explicit comma)<br />
|-<br />
|$nC<br />
|$n(g F)<br />
|Name - FirstName LastName in UPPER case<br />
|-<br />
|$NC<br />
|$n(F, g)<br />
|Name - LastName in UPPER case, FirstName<br />
|-<br />
|$by<br />
|$b(yyyy)<br />
|Date of birth, year only<br />
|-<br />
|$dy<br />
|$d(yyyy)<br />
|Date of death, year only<br />
|-<br />
|$my<br />
|$m(yyyy)<br />
|Date of preferred marriage, year only<br />
|-<br />
|$p<br />
|$s<br />
|Preferred spouse's name as by Gramps name display under Preferences<br />
|-<br />
|$s<br />
|$s(g f)<br />
|Preferred spouse's name - FirstName LastName<br />
|-<br />
|$S<br />
|$s(f, g)<br />
|Preferred spouse's name - LastName, FirstName<br />
|-<br />
|$sC<br />
|$s(g F)<br />
|Preferred spouse's name - FirstName LastName in UPPER case<br />
|-<br />
|$SC<br />
|$s(F, g)<br />
|Preferred spouse's name - LastName in UPPER case, FirstName<br />
|}<br />
<br />
== Format Strings ==<br />
<br />
Format strings are used to display names and dates differently than those assigned under Gramps Preferences. Here is the syntax for a format string:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''(format string)<br />
where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'nsijbmBMdvDVauet'<br />
<br />
A format string is any text, separators or format codes (defined below) to display information about the person.<br />
<br />
=== Formatting names ===<br />
<br />
For names ($n $s) you may use the following formatting codes to display the name differently.<br />
<br />
{|<br />
|-<br />
|t<br />
|Title<br />
|<br />
|f<br />
|Given name<br />
|-<br />
|x<br />
|Common name. Call name if existing, otherwise first first name<br />
|<br />
|c<br />
|Call name<br />
|-<br />
|n<br />
|Nick name<br />
|<br />
|s<br />
|Suffix<br />
|-<br />
|l<br />
|Surname<br />
|<br />
|g<br />
|Family nickname<br />
|}<br />
<br />
These codes can be uppercased to uppercase the result.<br />
<br />
{|<br />
|-<br />
|Example code<br />
|Displays<br />
|-<br />
|<pre>$n(L, f) ($n(c)), $n(L, f){ ($n(c))}<br />
$s(f l s)</pre><br />
|<pre>SMITH, Edwin Michael (), SMITH, Edwin Michael<br />
Janice Ann Adams</pre><br />
|}<br />
<br />
<br />
<blockquote>Note:<br />
If you want to print a character 'c' within the format string (or any one of the other format codes), you will need to first add a '&#92;' in front of it. See [[#Control Variables|Control Variables]] for more.</blockquote><br />
<br />
<blockquote>Note:<br />
the curly brackets { } are used to hide information. Here it is used around ' ($n(c))' to not display ' ()' if the person does not have a call name. See [[#Grouping|Grouping]] for more.</blockquote><br />
<br />
----<br />
<br />
=== Formatting Dates ===<br />
<br />
For all of the date variables ($b $d $m $v) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|yyyy<br />
|The year as a four digit number<br />
|<br />
|yyy<br />
|The year, with a minimum of three digits<br />
|-<br />
|yy<br />
|The year, from 00 to 99<br />
|<br />
|y<br />
|The year, from 0 to 99<br />
|-<br />
|mmmm<BR><br />
MMMM<br />
|The full name of the month<BR><br />
The full name IN CAPS<br />
|<br />
|mmm<BR><br />
MMM<br />
|The abbreviated name of the month<BR><br />
The abbreviated name IN CAPS<br />
|-<br />
|mm<br />
|The month, from 00 to 12<br />
|<br />
|m<br />
|The month, from 0 to 12<br />
|-<br />
|dd<br />
|The day, from 00 to 31<br />
|<br />
|d<br />
|The day, from 0 to 31<br />
|-<br />
|o<br />
|The date type (modifier)<br />
|<br />
|<br />
|<br />
|}<br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$b(mmm-dd yy)<br />
$m(yyyy/mmm/d)<br />
$b(mmm-dd yy)</pre><br />
|<pre>May-24 61<br />
1995/May/27<br />
Jun-04 85</pre><br />
|}<br />
<br />
{{man note| For date types (modifier) |Only "Before", "After", and "About" are supported at this time. all others will not display anything.<BR><br />
And for date span and date ranges, only the starting (first) date is displayed.}}<br />
<br />
----<br />
<br />
=== Formatting Places ===<br />
<br />
For all of the place variables ($B $D $M $V) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|e<br />
|Street<br />
|<br />
|l<br />
|Locality<br />
|-<br />
|c<br />
|City<br />
|<br />
|u<br />
|County<br />
|-<br />
|s<br />
|State<br />
|<br />
|p<br />
|Postal Code<br />
|-<br />
|n<br />
|Country<br />
|<br />
|t<br />
|Title<br />
|-<br />
|x<br />
|Longitude<br />
|<br />
|y<br />
|Latitude<br />
|}<br />
These codes can be uppercased to uppercase the result. <br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
----<br />
<br />
=== Rules for format strings. ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Anything will print inside a format string<br />
|-<br />
|1a<br />
|you will have to use [[#Control Variables|Control Variables]] to display things like ')' and format codes<br />
|-<br />
|2<br />
|Separators can be within format strings.<br />
|-<br />
|3<br />
|At least ONE format code has to display something for the ENTIRE format string to display<br />
|}<br />
<br />
----<br />
<br />
=== Examples ===<br />
<br />
{|<br />
|-<br />
|code<br />
|gives<br />
|-<br />
|<pre>$n(f l)<br />
b. $b {at $B<br />
{d. $d $D</pre><br />
|<pre>Edwin Michael Smith<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA</pre>The person is still alive (or has no information present) so the line was removed.<br />
|}<br />
<br />
<br />
<br />
== Control Variables ==<br />
<br />
Control variables allow you to print characters that are special to Substitution values within a display.<br />
<br />
For example the dollar character '$' is used to note the start of a variable. If you wish to print a dollar character you would use a control character like '&#92;$'<br />
<br />
Control Variables<br />
<br />
{|<br />
|-<br />
|&#92;$<br />
|Displays a single '$'<br />
|<br />
|&#92;&#92;<br />
|Displays a single '&#92;'<br />
|-<br />
|&#92;(<br />
|Displays a single '('<br />
|<br />
|&#92;)<br />
|Displays a single ')'<br />
|-<br />
|&#92;{<br />
|Displays a single '{'<br />
|<br />
|&#92;}<br />
|Displays a single '}'<br />
|-<br />
|&#92;<<br />
|Displays a single '<'<br />
|<br />
|&#92;><br />
|Displays a single '>'<br />
|}<br />
<br />
Basically anything that comes after a '&#92;' will be printed.<br />
<br />
----<br />
Note:<br />
When you are inside a format string, you may need to use this to display a character that would normally be a format code. <br />
<br />
{|<br />
|-<br />
|Example:<br />
|would give<br />
|-<br />
|<pre>$b(m hi mom)<br />
$b(m hi \mo\m)</pre><br />
|<pre>5 hi 5o5<br />
5 hi mom</pre><br />
|}<br />
<br />
as this person was born on the fifth month.<br />
<br />
== Grouping ==<br />
<br />
There are instances where you do not want certain text to be displayed. Take the example:<br />
<br />
{|<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died on $d at $D</pre><br />
|<pre>died on 1975-06-26 at </pre> <br />
|<pre>died on at Reno, Washoe Co., NV</pre><br />
|-<br />
| colspan="3"|Neither of these are very acceptable.<br />
|-<br />
| colspan="3"|But with groups (denoted by {}), you can optionally print information if a variable within contains information.<br />
|-<br />
| colspan="3"|For example:<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died {on $d }{at $D}</pre><br />
|<pre>died on 1975-06-26</pre><br />
|<pre>died at Reno, Washoe Co., NV</pre><br />
|}<br />
<br />
which is what we want.<br />
<br />
----<br />
=== Rules for groups ===<br />
<br />
A group will only display if there is at least one variable that displays something. So if a group only has text and/or variables where the information is not known, the entire group will not print.<br />
<br />
Groups can also be nested. If this happens (like below), the outer group will only display if there is at least one variable that displays something within the outer group or any of the sub groups.<br />
<br />
----<br />
<br />
=== Examples: ===<br />
<br />
This will hide '(' and ')' if the divorce information is not known (or still married).<br />
<br />
<pre>m. $m $M {- ($v(yyyy))</pre><br />
<br />
<br />
Only display some spouse information if married or remove the entire line if never married:<br />
<pre>-$s $m(yyyy) {- $v(\(yyyy\))}</pre><br />
<br />
== Attributes ==<br />
<br />
Attributes do not have a format string. Instead the attribute name is placed inside []. Here is the syntax for an attribute:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name] where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'au'<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$a[Profession]<br />
$a[Social Security Number]<br />
$a[Total \$ bequeathed]</pre><br />
|<pre>Programmer<br />
7A3-29-F1C6<br />
3.00USD</pre><br />
|}<br />
<br />
<br />
----<br />
== Events ==<br />
<br />
Events have the same starting structure as attributes, $e or $t and the event name in [] but events have an extra format string after the name to display the description, date, place, id, and attributes associated with it. Each of these items can be displayed with a , a 'n', 'd', 'D', 'i', and 'a' respectively in the format string. Here is the syntax for an event:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name](format string) where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'et'<br />
<br />
=== Event format strings ===<br />
<br />
The Event format string is used to display information about the event. Here are the format codes to display parts of the event:<br />
<br />
{|<br />
|-<br />
|n<br />
|Description<br />
|<br />
|i<br />
|Event ID<br />
|-<br />
|d<br />
|Event Date&#42;<br />
|<br />
|D<br />
|Event Place&#42;<br />
|-<br />
|a<br />
|An attributes for the event&#42;&#42;<br />
|<br />
|<br />
|<br />
|}<br />
<br />
&#42;These variables can themselves have format strings. Date and a place can be formatted with format string as defined in [[#Format strings|Format strings]].<br />
<br />
&#42;&#42;Attribute needs to have the attribute name in [] and are formatted as above.<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$e[First Communion](d(yyyy-mm-d))<br />
$e[Bar Mitzvah](n&lt; at &gt; D)<br />
$e[Birth](d(yyyy mm/dd) D)</pre><br />
|<pre>2009-11-6<br />
Jerry's Bar Mitzah at Opas house<br />
2007 05/23 Grandmothers house</pre><br />
|}<br />
<br />
<br />
And:<br />
<br />
{|<br />
|-<br />
|<pre>$b(yyyy-Mmm-dd)<br />
$M</pre><br />
|is the same as<br />
|<pre>$e[Birth](d(yyyy-Mmm-dd))<br />
$t[Marriage](D)</pre><br />
|}<br />
<br />
<br />
----<br />
<br />
=== Notes for attributes and events: ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Attribute and event names are mandatory. '$a' or '$a[]' will not display anything.<br />
|-<br />
|2<br />
|Attributes and event names may have special characters within them. Most notably ']' and ')'. If this is the case, you will need to use [[#Control Variables|Control Variables]]<br />
|}<br />
<br />
== Separators ==<br />
<br />
Separators are special 'text only' groups inside '&lt;' and '&gt;' that conditionally display a separator (like ', ' or ' - ') between two groups, variables, format codes or text.<br />
<br />
Separators are displayed conditionally depending on these rules:<br />
<br />
# A variable that does '''not''' display anything will remove itself and a separator that is to the left of it from the display line only.<br />
# If there is not a separator to the left, the same variable will remove itself and a separator that is to the right of it from the displayed line. <br />
# If there are two separators together, the left one will be removed from the display line and the right is kept.<br />
# Separators at the start or end of the display line display if there is text, group, or variable that displays.<br />
## Separators at the start or end of a format string or group, will display if first the format string or group displays and the above is also true.<br />
<br />
=== Example: ===<br />
{|<br />
|-<br />
|<pre>$s(f l)&lt;, &gt;$m(yyyy)&lt; @ &gt;$M&lt; - &gt;$v(&#92;(yyyy&#92;))</pre><br />
|}<br />
<br />
Here are some things that may happen:<br />
<br />
{|<br />
|-<br />
|If '''none''' of the variables are known<br />
|None of the separators will display<br />
|-<br />
|If only one variable '''is''' known<br />
|Only that variable will print. No separators will print.<br />
|-<br />
|If only the spouse's name '''is not''' known<br />
|The first separator will not display<br />
|-<br />
|If only the marriage date '''is not''' known<br />
|The first separator does not display. We will be left with:<br />
Jane Doe&lt; - &gt;{ … }And only the divorce date needs to be known to print the second separator.<br />
|-<br />
|If only the divorce date '''is not''' known<br />
|the second separator will not display<br />
|}<br />
<br />
<br />
Separators can be inside format strings:<br />
<br />
{|<br />
|-<br />
|<pre>$n(&lt;0&gt;T&lt; &gt;L&lt;, &gt;f&lt; &gt;s)</pre><br />
|}<br />
<br />
Separators can cross over/out of format strings. So the separator &lt;0&gt; will display only if the 'T' format code displays and what is on the left hand side of the variable displays or if there is nothing to the left.<br />
----<br />
Here is a useful example:<br />
{|<br />
|-<br />
|<pre>{({b. $b}<, >{d. $d})}</pre><br />
|}<br />
<br />
This will:<br />
{|<br />
|-<br />
| Only print the outside () if either the birth or death date displays<br />
|-<br />
| Only displays the center separator if both dates are known.<br />
|-<br />
| So here are some thing that could display<br />
{|<br />
|-<br />
| <pre>(b. 1970-4-8)</pre><br />
| <pre>(d. 2012-3-9)</pre><br />
| <pre>(b. 1970-4-8, d. 2012-3-9)</pre><br />
|}<br />
|-<br />
| We will not see things like:<br />
{|<br />
|-<br />
| <pre>()</pre><br />
| <pre>(, )</pre><br />
| <pre>(b.)</pre><br />
| <pre>(b., )</pre><br />
| <pre>(d.)</pre><br />
|-<br />
| <pre>(, d.)</pre><br />
| <pre>(b. 1970-4-8, )</pre><br />
| <pre>(b. 1970-4-8, d.)</pre><br />
| <pre>(, d. 2012-3-9)</pre><br />
| <pre>(b., d. 2012-3-9)</pre><br />
|}<br />
|}<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
{{-}}<br />
<br />
{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{languages}}<br />
<br />
[[Category:Documentation]]<br />
[[Category:Plugins]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Gramps_3.4_Wiki_Manual_-_Reports_-_part_2&diff=36921Gramps 3.4 Wiki Manual - Reports - part 22012-04-30T02:36:28Z<p>Ander882: /* Example: */</p>
<hr />
<div>This section describes the substitution values that can be used in the different reports available in Gramps.<br />
<br />
{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{grampsmanualcopyright}}<br />
<br />
{{languages|Gramps_3.4_Wiki_Manual_-_Reports - part 2}}<br />
<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
= Substitution Values =<br />
<br />
Many of the graphical reports allow you to customize the information that is displayed on the reports. Variable substitution is the method that is used to substitute a particular symbol (key) for specific information about the person in the database.<br />
<br />
{|<br />
|-<br />
|Example: <br />
|Will show as: (the person is alive)<br />
|-<br />
|<pre>$n<br />
b. $b( at $B}<br />
-d. $d< at >$D</pre><br />
|<pre>Smith, Edwin Michael<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA<br />
</pre><br />
|}<br />
<br />
----<br />
{|<br />
|-<br />
|1<br />
|If you wish to conditionally print an entire line, start it with a '-'. Like the third line in the example above, the entire line will only display when one or more variables on the line display something. If you wish to start the line with a '-' use '\-' [[#Control Variables|Control Variables]].<br />
|-<br />
|2<br />
|A list of all available variables (The Substitution Keys) follows. If you wish to display names, date, or place information differently, you may use [[#Format Strings|Format Strings]] to accomplish this.<br />
|-<br />
|3<br />
|There are also [[#Control Variables|Control Variables]] to display special characters (like the dollar sign).<br />
|-<br />
|4<br />
|You can also use [[#Grouping|Grouping]] to optionally display information. Line 2 above, uses grouping to display ' at ' only when the birth place is known.<br />
|-<br />
|5<br />
|Along with [[#Events|Events]] you can print almost anything.<br />
|-<br />
|6<br />
|Finally, [[#Separators|Separators]], to make your life complete. Line 3 above, uses this to display ' at ' only when both the birth date and place is known.<br />
|-<br />
|}<br />
<br />
<br />
== The Substitution Keys ==<br />
<br />
{|<br />
|-<br />
| colspan="2"|'''Personal variables'''<br />
| colspan="2"|'''Marital variables'''<br />
|-<br />
|$n<br />
|Displays the person's name<br />
|$s<br />
|Displays the name of the person's spouse<br />
|-<br />
|$i<br />
|Displays the GRAMPS ID for the person.<br />
|$j<br />
|Displays the GRAMPS ID for the marriage.<br />
|-<br />
|$b<br />
|Displays the person's date of birth <br />
|$m<br />
|Displays the marriage date of the person and the spouse.<br />
|-<br />
|$B<br />
|Displays the person's place of birth <br />
|$M<br />
|Displays the place of the marriage of the person and the spouse.<br />
|-<br />
|$d<br />
|Displays the person's date of death <br />
|$v<br />
|Displays the divorce date of the person and the spouse.<br />
|-<br />
|$D<br />
|Displays the person's place of death <br />
|$V<br />
|Displays the place of the divorce of the person and the spouse.<br />
|-<br />
|$a<br />
|Displays an attribute about the person.<br />
see [[#Attributes|Attributes]] for more<br />
|$u<br />
|Displays an attribute about the marriage.<br />
see [[#Attributes|Attributes]] for more<br />
|-<br />
|$e<br />
|Displays event information about the person.<br />
See [[#Events|Events]] for more<br />
|$t<br />
|Displays an event information about the marriage.<br />
See [[#Events|Events]] for more<br />
|}<br />
<br />
All of the Marital variables are defined by the person's preferred spouse in Gramps. If the person has never been married, then these variables will not display anything.<br />
<br />
----<br />
=== Default displayed formats ===<br />
<br />
{|<br />
|-<br />
|$n $s<br />
|Names will be displayed as set in 'Name format:' on the Display tab in Gramps preferences<br />
|-<br />
|$B $D $M $V<br />
|Places will display the Place title by default<br />
|-<br />
|$b $d $m $v<br />
|Dates will be displayed as set in 'Date format:' on the Display tab in Gramps preferences<br />
|-<br />
|$e $t<br />
|Events will display the description by default<br />
|}<br />
<br />
<br />
=== Deprecated variables ===<br />
<br />
Some of the old variables were deprecated because [[#Format Strings|Format Strings]] have replaced them. So here is a list of those variables and how to achieve their results:<br />
<br />
{| {{prettytable}}<br />
|-<br />
!Old Variable<br />
!How to display it now<br />
!What is displayed<br />
|-<br />
|$f<br />
|$n<br />
|Name - as by Gramps name display under Preferences<br />
|-<br />
|$n<br />
|$n(g f)<br />
|Name - FirstName LastName<br />
|-<br />
|$N<br />
|$n(f, g)<br />
|Name - LastName, FirstName (note the explicit comma)<br />
|-<br />
|$nC<br />
|$n(g F)<br />
|Name - FirstName LastName in UPPER case<br />
|-<br />
|$NC<br />
|$n(F, g)<br />
|Name - LastName in UPPER case, FirstName<br />
|-<br />
|$by<br />
|$b(yyyy)<br />
|Date of birth, year only<br />
|-<br />
|$dy<br />
|$d(yyyy)<br />
|Date of death, year only<br />
|-<br />
|$my<br />
|$m(yyyy)<br />
|Date of preferred marriage, year only<br />
|-<br />
|$p<br />
|$s<br />
|Preferred spouse's name as by Gramps name display under Preferences<br />
|-<br />
|$s<br />
|$s(g f)<br />
|Preferred spouse's name - FirstName LastName<br />
|-<br />
|$S<br />
|$s(f, g)<br />
|Preferred spouse's name - LastName, FirstName<br />
|-<br />
|$sC<br />
|$s(g F)<br />
|Preferred spouse's name - FirstName LastName in UPPER case<br />
|-<br />
|$SC<br />
|$s(F, g)<br />
|Preferred spouse's name - LastName in UPPER case, FirstName<br />
|}<br />
<br />
== Format Strings ==<br />
<br />
Format strings are used to display names and dates differently than those assigned under Gramps Preferences. Here is the syntax for a format string:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''(format string)<br />
where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'nsijbmBMdvDVauet'<br />
<br />
A format string is any text, separators or format codes (defined below) to display information about the person.<br />
<br />
=== Formatting names ===<br />
<br />
For names ($n $s) you may use the following formatting codes to display the name differently.<br />
<br />
{|<br />
|-<br />
|t<br />
|Title<br />
|<br />
|f<br />
|Given name<br />
|-<br />
|x<br />
|Common name. Call name if existing, otherwise first first name<br />
|<br />
|c<br />
|Call name<br />
|-<br />
|n<br />
|Nick name<br />
|<br />
|s<br />
|Suffix<br />
|-<br />
|l<br />
|Surname<br />
|<br />
|g<br />
|Family nickname<br />
|}<br />
<br />
These codes can be uppercased to uppercase the result.<br />
<br />
{|<br />
|-<br />
|Example code<br />
|Displays<br />
|-<br />
|<pre>$n(L, f) ($n(c)), $n(L, f){ ($n(c))}<br />
$s(f l s)</pre><br />
|<pre>SMITH, Edwin Michael (), SMITH, Edwin Michael<br />
Janice Ann Adams</pre><br />
|}<br />
<br />
<br />
<blockquote>Note:<br />
If you want to print a character 'c' within the format string (or any one of the other format codes), you will need to first add a '&#92;' in front of it. See [[#Control Variables|Control Variables]] for more.</blockquote><br />
<br />
<blockquote>Note:<br />
the curly brackets { } are used to hide information. Here it is used around ' ($n(c))' to not display ' ()' if the person does not have a call name. See [[#Grouping|Grouping]] for more.</blockquote><br />
<br />
----<br />
<br />
=== Formatting Dates ===<br />
<br />
For all of the date variables ($b $d $m $v) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|yyyy<br />
|The year as a four digit number<br />
|<br />
|yyy<br />
|The year, with a minimum of three digits<br />
|-<br />
|yy<br />
|The year, from 00 to 99<br />
|<br />
|y<br />
|The year, from 0 to 99<br />
|-<br />
|mmmm<BR><br />
MMMM<br />
|The full name of the month<BR><br />
The full name IN CAPS<br />
|<br />
|mmm<BR><br />
MMM<br />
|The abbreviated name of the month<BR><br />
The abbreviated name IN CAPS<br />
|-<br />
|mm<br />
|The month, from 00 to 12<br />
|<br />
|m<br />
|The month, from 0 to 12<br />
|-<br />
|dd<br />
|The day, from 00 to 31<br />
|<br />
|d<br />
|The day, from 0 to 31<br />
|-<br />
|o<br />
|The date type (modifier)<br />
|<br />
|<br />
|<br />
|}<br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$b(mmm-dd yy)<br />
$m(yyyy/mmm/d)<br />
$b(mmm-dd yy)</pre><br />
|<pre>May-24 61<br />
1995/May/27<br />
Jun-04 85</pre><br />
|}<br />
<br />
{{man note| For date types (modifier) |Only "Before", "After", and "About" are supported at this time. all others will not display anything.<BR><br />
And for date span and date ranges, only the starting (first) date is displayed.}}<br />
<br />
----<br />
<br />
=== Formatting Places ===<br />
<br />
For all of the place variables ($B $D $M $V) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|e<br />
|Street<br />
|<br />
|l<br />
|Locality<br />
|-<br />
|c<br />
|City<br />
|<br />
|u<br />
|County<br />
|-<br />
|s<br />
|State<br />
|<br />
|p<br />
|Postal Code<br />
|-<br />
|n<br />
|Country<br />
|<br />
|t<br />
|Title<br />
|-<br />
|x<br />
|Longitude<br />
|<br />
|y<br />
|Latitude<br />
|}<br />
These codes can be uppercased to uppercase the result. <br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
----<br />
<br />
=== Rules for format strings. ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Anything will print inside a format string<br />
|-<br />
|1a<br />
|you will have to use [[#Control Variables|Control Variables]] to display things like ')' and format codes<br />
|-<br />
|2<br />
|Separators can be within format strings.<br />
|-<br />
|3<br />
|At least ONE format code has to display something for the ENTIRE format string to display<br />
|}<br />
<br />
----<br />
<br />
=== Examples ===<br />
<br />
{|<br />
|-<br />
|code<br />
|gives<br />
|-<br />
|<pre>$n(f l)<br />
b. $b {at $B<br />
{d. $d $D</pre><br />
|<pre>Edwin Michael Smith<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA</pre>The person is still alive (or has no information present) so the line was removed.<br />
|}<br />
<br />
<br />
<br />
== Control Variables ==<br />
<br />
Control variables allow you to print characters that are special to Substitution values within a display.<br />
<br />
For example the dollar character '$' is used to note the start of a variable. If you wish to print a dollar character you would use a control character like '&#92;$'<br />
<br />
Control Variables<br />
<br />
{|<br />
|-<br />
|&#92;$<br />
|Displays a single '$'<br />
|<br />
|&#92;&#92;<br />
|Displays a single '&#92;'<br />
|-<br />
|&#92;(<br />
|Displays a single '('<br />
|<br />
|&#92;)<br />
|Displays a single ')'<br />
|-<br />
|&#92;{<br />
|Displays a single '{'<br />
|<br />
|&#92;}<br />
|Displays a single '}'<br />
|-<br />
|&#92;<<br />
|Displays a single '<'<br />
|<br />
|&#92;><br />
|Displays a single '>'<br />
|}<br />
<br />
Basically anything that comes after a '&#92;' will be printed.<br />
<br />
----<br />
Note:<br />
When you are inside a format string, you may need to use this to display a character that would normally be a format code. <br />
<br />
{|<br />
|-<br />
|Example:<br />
|would give<br />
|-<br />
|<pre>$b(m hi mom)<br />
$b(m hi \mo\m)</pre><br />
|<pre>5 hi 5o5<br />
5 hi mom</pre><br />
|}<br />
<br />
as this person was born on the fifth month.<br />
<br />
== Grouping ==<br />
<br />
There are instances where you do not want certain text to be displayed. Take the example:<br />
<br />
{|<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died on $d at $D</pre><br />
|<pre>died on 1975-06-26 at </pre> <br />
|<pre>died on at Reno, Washoe Co., NV</pre><br />
|-<br />
| colspan="3"|Neither of these are very acceptable.<br />
|-<br />
| colspan="3"|But with groups (denoted by {}), you can optionally print information if a variable within contains information.<br />
|-<br />
| colspan="3"|For example:<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died {on $d }{at $D}</pre><br />
|<pre>died on 1975-06-26</pre><br />
|<pre>died at Reno, Washoe Co., NV</pre><br />
|}<br />
<br />
which is what we want.<br />
<br />
----<br />
=== Rules for groups ===<br />
<br />
A group will only display if there is at least one variable that displays something. So if a group only has text and/or variables where the information is not known, the entire group will not print.<br />
<br />
Groups can also be nested. If this happens (like below), the outer group will only display if there is at least one variable that displays something within the outer group or any of the sub groups.<br />
<br />
----<br />
<br />
=== Examples: ===<br />
<br />
This will hide '(' and ')' if the divorce information is not known (or still married).<br />
<br />
<pre>m. $m $M {- ($v(yyyy))</pre><br />
<br />
<br />
Only display some spouse information if married or remove the entire line if never married:<br />
<pre>-$s $m(yyyy) {- $v(\(yyyy\))}</pre><br />
<br />
== Attributes ==<br />
<br />
Attributes do not have a format string. Instead the attribute name is placed inside []. Here is the syntax for an attribute:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name] where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'au'<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$a[Profession]<br />
$a[Social Security Number]<br />
$a[Total \$ bequeathed]</pre><br />
|<pre>Programmer<br />
7A3-29-F1C6<br />
3.00USD</pre><br />
|}<br />
<br />
<br />
----<br />
== Events ==<br />
<br />
Events have the same starting structure as attributes, $e or $t and the event name in [] but events have an extra format string after the name to display the description, date, place, id, and attributes associated with it. Each of these items can be displayed with a , a 'n', 'd', 'D', 'i', and 'a' respectively in the format string. Here is the syntax for an event:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name](format string) where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'et'<br />
<br />
=== Event format strings ===<br />
<br />
The Event format string is used to display information about the event. Here are the format codes to display parts of the event:<br />
<br />
{|<br />
|-<br />
|n<br />
|Description<br />
|<br />
|i<br />
|Event ID<br />
|-<br />
|d<br />
|Event Date&#42;<br />
|<br />
|D<br />
|Event Place&#42;<br />
|-<br />
|a<br />
|An attributes for the event&#42;&#42;<br />
|<br />
|<br />
|<br />
|}<br />
<br />
&#42;These variables can themselves have format strings. Date and a place can be formatted with format string as defined in [[#Format strings|Format strings]].<br />
<br />
&#42;&#42;Attribute needs to have the attribute name in [] and are formatted as above.<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$e[First Communion](d(yyyy-mm-d))<br />
$e[Bar Mitzvah](n&lt; at &gt; D)<br />
$e[Birth](d(yyyy mm/dd) D)</pre><br />
|<pre>2009-11-6<br />
Jerry's Bar Mitzah at Opas house<br />
2007 05/23 Grandmothers house</pre><br />
|}<br />
<br />
<br />
And:<br />
<br />
{|<br />
|-<br />
|<pre>$b(yyyy-Mmm-dd)<br />
$M</pre><br />
|is the same as<br />
|<pre>$e[Birth](d(yyyy-Mmm-dd))<br />
$t[Marriage](D)</pre><br />
|}<br />
<br />
<br />
----<br />
<br />
=== Notes for attributes and events: ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Attribute and event names are mandatory. '$a' or '$a[]' will not display anything.<br />
|-<br />
|2<br />
|Attributes and event names may have special characters within them. Most notably ']' and ')'. If this is the case, you will need to use [[#Control Variables|Control Variables]]<br />
|}<br />
<br />
== Separators ==<br />
<br />
Separators are special 'text only' groups inside '&lt;' and '&gt;' that conditionally display a separator (like ', ' or ' - ') between two groups, variables, format codes or text.<br />
<br />
Separators are displayed conditionally depending on these rules:<br />
<br />
# A variable that does '''not''' display anything will remove itself and a separator that is to the left of it from the display line only.<br />
# If there is not a separator to the left, the same variable will remove itself and a separator that is to the right of it from the displayed line. <br />
# If there are two separators together, the left one will be removed from the display line and the right is kept.<br />
# Separators at the start or end of the display line display if there is text, group, or variable that displays.<br />
## Separators at the start or end of a format string or group, will display if first the format string or group displays and the above is also true.<br />
<br />
=== Example: ===<br />
{|<br />
|-<br />
|<pre>$s(f l)&lt;, &gt;$m(yyyy)&lt; @ &gt;$M&lt; - &gt;$v(&#92;(yyyy&#92;))</pre><br />
|}<br />
<br />
Here are some things that may happen:<br />
<br />
{|<br />
|-<br />
|If '''none''' of the variables are known<br />
|None of the separators will display<br />
|-<br />
|If only one variable '''is''' known<br />
|Only that variable will print. No separators will print.<br />
|-<br />
|If only the spouse's name '''is not''' known<br />
|The first separator will not display<br />
|-<br />
|If only the marriage date '''is not''' known<br />
|The first separator does not display. We will be left with:<br />
Jane Doe&lt; - &gt;{ … }And only the divorce date needs to be known to print the second separator.<br />
|-<br />
|If only the divorce date '''is not''' known<br />
|the second separator will not display<br />
|}<br />
<br />
<br />
Separators can be inside format strings:<br />
<br />
{|<br />
|-<br />
|<pre>$n(&lt;0&gt;T&lt; &gt;L&lt;, &gt;f&lt; &gt;s)</pre><br />
|}<br />
<br />
Separators can cross over/out of format strings. So the separator &lt;0&gt; will display only if the 'T' format code displays and what is on the left hand side of the variable displays or if there is nothing to the left.<br />
----<br />
Here is a useful example:<br />
{|<br />
|-<br />
|<pre>{({b. $b}<, >{d. $d})}</pre><br />
|}<br />
<br />
This will:<br />
{|<br />
|-<br />
| Only print the outside () if either the birth or death date displays<br />
|-<br />
| Only displays the center separator if both dates are known.<br />
|-<br />
| So here are some thing that could display<br />
{|<br />
|-<br />
| <pre>(b. 1970-4-8)</pre><br />
| <pre>(d. 2012-3-9)</pre><br />
| <pre>(b. 1970-4-8, d. 2012-3-9)</pre><br />
|}<br />
|-<br />
| We will not see things like:<br />
{|<br />
|-<br />
| <pre>()</pre><br />
| <pre>(, )</pre><br />
| <pre>(b.)</pre><br />
| <pre>(b., )</pre><br />
|-<br />
| <pre>(d.)</pre><br />
| <pre>(, d.)</pre><br />
| <pre>(b. 1970-4-8, )</pre><br />
| <pre>(b. 1970-4-8, d.)</pre><br />
|}<br />
|}<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
{{-}}<br />
<br />
{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{languages}}<br />
<br />
[[Category:Documentation]]<br />
[[Category:Plugins]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Gramps_3.4_Wiki_Manual_-_Reports_-_part_2&diff=36920Gramps 3.4 Wiki Manual - Reports - part 22012-04-30T02:32:11Z<p>Ander882: /* Example: */</p>
<hr />
<div>This section describes the substitution values that can be used in the different reports available in Gramps.<br />
<br />
{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{grampsmanualcopyright}}<br />
<br />
{{languages|Gramps_3.4_Wiki_Manual_-_Reports - part 2}}<br />
<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
= Substitution Values =<br />
<br />
Many of the graphical reports allow you to customize the information that is displayed on the reports. Variable substitution is the method that is used to substitute a particular symbol (key) for specific information about the person in the database.<br />
<br />
{|<br />
|-<br />
|Example: <br />
|Will show as: (the person is alive)<br />
|-<br />
|<pre>$n<br />
b. $b( at $B}<br />
-d. $d< at >$D</pre><br />
|<pre>Smith, Edwin Michael<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA<br />
</pre><br />
|}<br />
<br />
----<br />
{|<br />
|-<br />
|1<br />
|If you wish to conditionally print an entire line, start it with a '-'. Like the third line in the example above, the entire line will only display when one or more variables on the line display something. If you wish to start the line with a '-' use '\-' [[#Control Variables|Control Variables]].<br />
|-<br />
|2<br />
|A list of all available variables (The Substitution Keys) follows. If you wish to display names, date, or place information differently, you may use [[#Format Strings|Format Strings]] to accomplish this.<br />
|-<br />
|3<br />
|There are also [[#Control Variables|Control Variables]] to display special characters (like the dollar sign).<br />
|-<br />
|4<br />
|You can also use [[#Grouping|Grouping]] to optionally display information. Line 2 above, uses grouping to display ' at ' only when the birth place is known.<br />
|-<br />
|5<br />
|Along with [[#Events|Events]] you can print almost anything.<br />
|-<br />
|6<br />
|Finally, [[#Separators|Separators]], to make your life complete. Line 3 above, uses this to display ' at ' only when both the birth date and place is known.<br />
|-<br />
|}<br />
<br />
<br />
== The Substitution Keys ==<br />
<br />
{|<br />
|-<br />
| colspan="2"|'''Personal variables'''<br />
| colspan="2"|'''Marital variables'''<br />
|-<br />
|$n<br />
|Displays the person's name<br />
|$s<br />
|Displays the name of the person's spouse<br />
|-<br />
|$i<br />
|Displays the GRAMPS ID for the person.<br />
|$j<br />
|Displays the GRAMPS ID for the marriage.<br />
|-<br />
|$b<br />
|Displays the person's date of birth <br />
|$m<br />
|Displays the marriage date of the person and the spouse.<br />
|-<br />
|$B<br />
|Displays the person's place of birth <br />
|$M<br />
|Displays the place of the marriage of the person and the spouse.<br />
|-<br />
|$d<br />
|Displays the person's date of death <br />
|$v<br />
|Displays the divorce date of the person and the spouse.<br />
|-<br />
|$D<br />
|Displays the person's place of death <br />
|$V<br />
|Displays the place of the divorce of the person and the spouse.<br />
|-<br />
|$a<br />
|Displays an attribute about the person.<br />
see [[#Attributes|Attributes]] for more<br />
|$u<br />
|Displays an attribute about the marriage.<br />
see [[#Attributes|Attributes]] for more<br />
|-<br />
|$e<br />
|Displays event information about the person.<br />
See [[#Events|Events]] for more<br />
|$t<br />
|Displays an event information about the marriage.<br />
See [[#Events|Events]] for more<br />
|}<br />
<br />
All of the Marital variables are defined by the person's preferred spouse in Gramps. If the person has never been married, then these variables will not display anything.<br />
<br />
----<br />
=== Default displayed formats ===<br />
<br />
{|<br />
|-<br />
|$n $s<br />
|Names will be displayed as set in 'Name format:' on the Display tab in Gramps preferences<br />
|-<br />
|$B $D $M $V<br />
|Places will display the Place title by default<br />
|-<br />
|$b $d $m $v<br />
|Dates will be displayed as set in 'Date format:' on the Display tab in Gramps preferences<br />
|-<br />
|$e $t<br />
|Events will display the description by default<br />
|}<br />
<br />
<br />
=== Deprecated variables ===<br />
<br />
Some of the old variables were deprecated because [[#Format Strings|Format Strings]] have replaced them. So here is a list of those variables and how to achieve their results:<br />
<br />
{| {{prettytable}}<br />
|-<br />
!Old Variable<br />
!How to display it now<br />
!What is displayed<br />
|-<br />
|$f<br />
|$n<br />
|Name - as by Gramps name display under Preferences<br />
|-<br />
|$n<br />
|$n(g f)<br />
|Name - FirstName LastName<br />
|-<br />
|$N<br />
|$n(f, g)<br />
|Name - LastName, FirstName (note the explicit comma)<br />
|-<br />
|$nC<br />
|$n(g F)<br />
|Name - FirstName LastName in UPPER case<br />
|-<br />
|$NC<br />
|$n(F, g)<br />
|Name - LastName in UPPER case, FirstName<br />
|-<br />
|$by<br />
|$b(yyyy)<br />
|Date of birth, year only<br />
|-<br />
|$dy<br />
|$d(yyyy)<br />
|Date of death, year only<br />
|-<br />
|$my<br />
|$m(yyyy)<br />
|Date of preferred marriage, year only<br />
|-<br />
|$p<br />
|$s<br />
|Preferred spouse's name as by Gramps name display under Preferences<br />
|-<br />
|$s<br />
|$s(g f)<br />
|Preferred spouse's name - FirstName LastName<br />
|-<br />
|$S<br />
|$s(f, g)<br />
|Preferred spouse's name - LastName, FirstName<br />
|-<br />
|$sC<br />
|$s(g F)<br />
|Preferred spouse's name - FirstName LastName in UPPER case<br />
|-<br />
|$SC<br />
|$s(F, g)<br />
|Preferred spouse's name - LastName in UPPER case, FirstName<br />
|}<br />
<br />
== Format Strings ==<br />
<br />
Format strings are used to display names and dates differently than those assigned under Gramps Preferences. Here is the syntax for a format string:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''(format string)<br />
where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'nsijbmBMdvDVauet'<br />
<br />
A format string is any text, separators or format codes (defined below) to display information about the person.<br />
<br />
=== Formatting names ===<br />
<br />
For names ($n $s) you may use the following formatting codes to display the name differently.<br />
<br />
{|<br />
|-<br />
|t<br />
|Title<br />
|<br />
|f<br />
|Given name<br />
|-<br />
|x<br />
|Common name. Call name if existing, otherwise first first name<br />
|<br />
|c<br />
|Call name<br />
|-<br />
|n<br />
|Nick name<br />
|<br />
|s<br />
|Suffix<br />
|-<br />
|l<br />
|Surname<br />
|<br />
|g<br />
|Family nickname<br />
|}<br />
<br />
These codes can be uppercased to uppercase the result.<br />
<br />
{|<br />
|-<br />
|Example code<br />
|Displays<br />
|-<br />
|<pre>$n(L, f) ($n(c)), $n(L, f){ ($n(c))}<br />
$s(f l s)</pre><br />
|<pre>SMITH, Edwin Michael (), SMITH, Edwin Michael<br />
Janice Ann Adams</pre><br />
|}<br />
<br />
<br />
<blockquote>Note:<br />
If you want to print a character 'c' within the format string (or any one of the other format codes), you will need to first add a '&#92;' in front of it. See [[#Control Variables|Control Variables]] for more.</blockquote><br />
<br />
<blockquote>Note:<br />
the curly brackets { } are used to hide information. Here it is used around ' ($n(c))' to not display ' ()' if the person does not have a call name. See [[#Grouping|Grouping]] for more.</blockquote><br />
<br />
----<br />
<br />
=== Formatting Dates ===<br />
<br />
For all of the date variables ($b $d $m $v) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|yyyy<br />
|The year as a four digit number<br />
|<br />
|yyy<br />
|The year, with a minimum of three digits<br />
|-<br />
|yy<br />
|The year, from 00 to 99<br />
|<br />
|y<br />
|The year, from 0 to 99<br />
|-<br />
|mmmm<BR><br />
MMMM<br />
|The full name of the month<BR><br />
The full name IN CAPS<br />
|<br />
|mmm<BR><br />
MMM<br />
|The abbreviated name of the month<BR><br />
The abbreviated name IN CAPS<br />
|-<br />
|mm<br />
|The month, from 00 to 12<br />
|<br />
|m<br />
|The month, from 0 to 12<br />
|-<br />
|dd<br />
|The day, from 00 to 31<br />
|<br />
|d<br />
|The day, from 0 to 31<br />
|-<br />
|o<br />
|The date type (modifier)<br />
|<br />
|<br />
|<br />
|}<br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$b(mmm-dd yy)<br />
$m(yyyy/mmm/d)<br />
$b(mmm-dd yy)</pre><br />
|<pre>May-24 61<br />
1995/May/27<br />
Jun-04 85</pre><br />
|}<br />
<br />
{{man note| For date types (modifier) |Only "Before", "After", and "About" are supported at this time. all others will not display anything.<BR><br />
And for date span and date ranges, only the starting (first) date is displayed.}}<br />
<br />
----<br />
<br />
=== Formatting Places ===<br />
<br />
For all of the place variables ($B $D $M $V) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|e<br />
|Street<br />
|<br />
|l<br />
|Locality<br />
|-<br />
|c<br />
|City<br />
|<br />
|u<br />
|County<br />
|-<br />
|s<br />
|State<br />
|<br />
|p<br />
|Postal Code<br />
|-<br />
|n<br />
|Country<br />
|<br />
|t<br />
|Title<br />
|-<br />
|x<br />
|Longitude<br />
|<br />
|y<br />
|Latitude<br />
|}<br />
These codes can be uppercased to uppercase the result. <br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
----<br />
<br />
=== Rules for format strings. ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Anything will print inside a format string<br />
|-<br />
|1a<br />
|you will have to use [[#Control Variables|Control Variables]] to display things like ')' and format codes<br />
|-<br />
|2<br />
|Separators can be within format strings.<br />
|-<br />
|3<br />
|At least ONE format code has to display something for the ENTIRE format string to display<br />
|}<br />
<br />
----<br />
<br />
=== Examples ===<br />
<br />
{|<br />
|-<br />
|code<br />
|gives<br />
|-<br />
|<pre>$n(f l)<br />
b. $b {at $B<br />
{d. $d $D</pre><br />
|<pre>Edwin Michael Smith<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA</pre>The person is still alive (or has no information present) so the line was removed.<br />
|}<br />
<br />
<br />
<br />
== Control Variables ==<br />
<br />
Control variables allow you to print characters that are special to Substitution values within a display.<br />
<br />
For example the dollar character '$' is used to note the start of a variable. If you wish to print a dollar character you would use a control character like '&#92;$'<br />
<br />
Control Variables<br />
<br />
{|<br />
|-<br />
|&#92;$<br />
|Displays a single '$'<br />
|<br />
|&#92;&#92;<br />
|Displays a single '&#92;'<br />
|-<br />
|&#92;(<br />
|Displays a single '('<br />
|<br />
|&#92;)<br />
|Displays a single ')'<br />
|-<br />
|&#92;{<br />
|Displays a single '{'<br />
|<br />
|&#92;}<br />
|Displays a single '}'<br />
|-<br />
|&#92;<<br />
|Displays a single '<'<br />
|<br />
|&#92;><br />
|Displays a single '>'<br />
|}<br />
<br />
Basically anything that comes after a '&#92;' will be printed.<br />
<br />
----<br />
Note:<br />
When you are inside a format string, you may need to use this to display a character that would normally be a format code. <br />
<br />
{|<br />
|-<br />
|Example:<br />
|would give<br />
|-<br />
|<pre>$b(m hi mom)<br />
$b(m hi \mo\m)</pre><br />
|<pre>5 hi 5o5<br />
5 hi mom</pre><br />
|}<br />
<br />
as this person was born on the fifth month.<br />
<br />
== Grouping ==<br />
<br />
There are instances where you do not want certain text to be displayed. Take the example:<br />
<br />
{|<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died on $d at $D</pre><br />
|<pre>died on 1975-06-26 at </pre> <br />
|<pre>died on at Reno, Washoe Co., NV</pre><br />
|-<br />
| colspan="3"|Neither of these are very acceptable.<br />
|-<br />
| colspan="3"|But with groups (denoted by {}), you can optionally print information if a variable within contains information.<br />
|-<br />
| colspan="3"|For example:<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died {on $d }{at $D}</pre><br />
|<pre>died on 1975-06-26</pre><br />
|<pre>died at Reno, Washoe Co., NV</pre><br />
|}<br />
<br />
which is what we want.<br />
<br />
----<br />
=== Rules for groups ===<br />
<br />
A group will only display if there is at least one variable that displays something. So if a group only has text and/or variables where the information is not known, the entire group will not print.<br />
<br />
Groups can also be nested. If this happens (like below), the outer group will only display if there is at least one variable that displays something within the outer group or any of the sub groups.<br />
<br />
----<br />
<br />
=== Examples: ===<br />
<br />
This will hide '(' and ')' if the divorce information is not known (or still married).<br />
<br />
<pre>m. $m $M {- ($v(yyyy))</pre><br />
<br />
<br />
Only display some spouse information if married or remove the entire line if never married:<br />
<pre>-$s $m(yyyy) {- $v(\(yyyy\))}</pre><br />
<br />
== Attributes ==<br />
<br />
Attributes do not have a format string. Instead the attribute name is placed inside []. Here is the syntax for an attribute:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name] where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'au'<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$a[Profession]<br />
$a[Social Security Number]<br />
$a[Total \$ bequeathed]</pre><br />
|<pre>Programmer<br />
7A3-29-F1C6<br />
3.00USD</pre><br />
|}<br />
<br />
<br />
----<br />
== Events ==<br />
<br />
Events have the same starting structure as attributes, $e or $t and the event name in [] but events have an extra format string after the name to display the description, date, place, id, and attributes associated with it. Each of these items can be displayed with a , a 'n', 'd', 'D', 'i', and 'a' respectively in the format string. Here is the syntax for an event:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name](format string) where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'et'<br />
<br />
=== Event format strings ===<br />
<br />
The Event format string is used to display information about the event. Here are the format codes to display parts of the event:<br />
<br />
{|<br />
|-<br />
|n<br />
|Description<br />
|<br />
|i<br />
|Event ID<br />
|-<br />
|d<br />
|Event Date&#42;<br />
|<br />
|D<br />
|Event Place&#42;<br />
|-<br />
|a<br />
|An attributes for the event&#42;&#42;<br />
|<br />
|<br />
|<br />
|}<br />
<br />
&#42;These variables can themselves have format strings. Date and a place can be formatted with format string as defined in [[#Format strings|Format strings]].<br />
<br />
&#42;&#42;Attribute needs to have the attribute name in [] and are formatted as above.<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$e[First Communion](d(yyyy-mm-d))<br />
$e[Bar Mitzvah](n&lt; at &gt; D)<br />
$e[Birth](d(yyyy mm/dd) D)</pre><br />
|<pre>2009-11-6<br />
Jerry's Bar Mitzah at Opas house<br />
2007 05/23 Grandmothers house</pre><br />
|}<br />
<br />
<br />
And:<br />
<br />
{|<br />
|-<br />
|<pre>$b(yyyy-Mmm-dd)<br />
$M</pre><br />
|is the same as<br />
|<pre>$e[Birth](d(yyyy-Mmm-dd))<br />
$t[Marriage](D)</pre><br />
|}<br />
<br />
<br />
----<br />
<br />
=== Notes for attributes and events: ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Attribute and event names are mandatory. '$a' or '$a[]' will not display anything.<br />
|-<br />
|2<br />
|Attributes and event names may have special characters within them. Most notably ']' and ')'. If this is the case, you will need to use [[#Control Variables|Control Variables]]<br />
|}<br />
<br />
== Separators ==<br />
<br />
Separators are special 'text only' groups inside '&lt;' and '&gt;' that conditionally display a separator (like ', ' or ' - ') between two groups, variables, format codes or text.<br />
<br />
Separators are displayed conditionally depending on these rules:<br />
<br />
# A variable that does '''not''' display anything will remove itself and a separator that is to the left of it from the display line only.<br />
# If there is not a separator to the left, the same variable will remove itself and a separator that is to the right of it from the displayed line. <br />
# If there are two separators together, the left one will be removed from the display line and the right is kept.<br />
# Separators at the start or end of the display line display if there is text, group, or variable that displays.<br />
## Separators at the start or end of a format string or group, will display if first the format string or group displays and the above is also true.<br />
<br />
=== Example: ===<br />
{|<br />
|-<br />
|<pre>$s(f l)&lt;, &gt;$m(yyyy)&lt; @ &gt;$M&lt; - &gt;$v(&#92;(yyyy&#92;))</pre><br />
|}<br />
<br />
Here are some things that may happen:<br />
<br />
{|<br />
|-<br />
|If '''none''' of the variables are known<br />
|None of the separators will display<br />
|-<br />
|If only one variable '''is''' known<br />
|Only that variable will print. No separators will print.<br />
|-<br />
|If only the spouse's name '''is not''' known<br />
|The first separator will not display<br />
|-<br />
|If only the marriage date '''is not''' known<br />
|The first separator does not display. We will be left with:<br />
Jane Doe&lt; - &gt;{ … }And only the divorce date needs to be known to print the second separator.<br />
|-<br />
|If only the divorce date '''is not''' known<br />
|the second separator will not display<br />
|}<br />
<br />
<br />
Separators can be inside format strings:<br />
<br />
{|<br />
|-<br />
|<pre>$n(&lt;0&gt;T&lt; &gt;L&lt;, &gt;f&lt; &gt;s)</pre><br />
|}<br />
<br />
Separators can cross over/out of format strings. So the separator &lt;0&gt; will display only if the 'T' format code displays and what is on the left hand side of the variable displays or if there is nothing to the left.<br />
----<br />
Here is a useful example:<br />
{|<br />
|-<br />
|<pre>{({b. $b}<, >{d. $d})}</pre><br />
|}<br />
<br />
This will:<br />
{|<br />
|-<br />
| Only print the outside () if either the birth or death date displays<br />
|-<br />
| Only displays the center separator if both dates are known.<br />
|-<br />
| So here are some thing that could display<br />
{|<br />
|-<br />
| (b. 1970-4-8)<br />
| (d. 2012-3-9)<br />
| (b. 1970-4-8, d. 2012-3-9)<br />
|}<br />
|-<br />
| We will not see things like:<br />
|}<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
{{-}}<br />
<br />
{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{languages}}<br />
<br />
[[Category:Documentation]]<br />
[[Category:Plugins]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Gramps_3.4_Wiki_Manual_-_Reports_-_part_2&diff=36919Gramps 3.4 Wiki Manual - Reports - part 22012-04-30T02:24:21Z<p>Ander882: /* Example: */</p>
<hr />
<div>This section describes the substitution values that can be used in the different reports available in Gramps.<br />
<br />
{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{grampsmanualcopyright}}<br />
<br />
{{languages|Gramps_3.4_Wiki_Manual_-_Reports - part 2}}<br />
<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
= Substitution Values =<br />
<br />
Many of the graphical reports allow you to customize the information that is displayed on the reports. Variable substitution is the method that is used to substitute a particular symbol (key) for specific information about the person in the database.<br />
<br />
{|<br />
|-<br />
|Example: <br />
|Will show as: (the person is alive)<br />
|-<br />
|<pre>$n<br />
b. $b( at $B}<br />
-d. $d< at >$D</pre><br />
|<pre>Smith, Edwin Michael<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA<br />
</pre><br />
|}<br />
<br />
----<br />
{|<br />
|-<br />
|1<br />
|If you wish to conditionally print an entire line, start it with a '-'. Like the third line in the example above, the entire line will only display when one or more variables on the line display something. If you wish to start the line with a '-' use '\-' [[#Control Variables|Control Variables]].<br />
|-<br />
|2<br />
|A list of all available variables (The Substitution Keys) follows. If you wish to display names, date, or place information differently, you may use [[#Format Strings|Format Strings]] to accomplish this.<br />
|-<br />
|3<br />
|There are also [[#Control Variables|Control Variables]] to display special characters (like the dollar sign).<br />
|-<br />
|4<br />
|You can also use [[#Grouping|Grouping]] to optionally display information. Line 2 above, uses grouping to display ' at ' only when the birth place is known.<br />
|-<br />
|5<br />
|Along with [[#Events|Events]] you can print almost anything.<br />
|-<br />
|6<br />
|Finally, [[#Separators|Separators]], to make your life complete. Line 3 above, uses this to display ' at ' only when both the birth date and place is known.<br />
|-<br />
|}<br />
<br />
<br />
== The Substitution Keys ==<br />
<br />
{|<br />
|-<br />
| colspan="2"|'''Personal variables'''<br />
| colspan="2"|'''Marital variables'''<br />
|-<br />
|$n<br />
|Displays the person's name<br />
|$s<br />
|Displays the name of the person's spouse<br />
|-<br />
|$i<br />
|Displays the GRAMPS ID for the person.<br />
|$j<br />
|Displays the GRAMPS ID for the marriage.<br />
|-<br />
|$b<br />
|Displays the person's date of birth <br />
|$m<br />
|Displays the marriage date of the person and the spouse.<br />
|-<br />
|$B<br />
|Displays the person's place of birth <br />
|$M<br />
|Displays the place of the marriage of the person and the spouse.<br />
|-<br />
|$d<br />
|Displays the person's date of death <br />
|$v<br />
|Displays the divorce date of the person and the spouse.<br />
|-<br />
|$D<br />
|Displays the person's place of death <br />
|$V<br />
|Displays the place of the divorce of the person and the spouse.<br />
|-<br />
|$a<br />
|Displays an attribute about the person.<br />
see [[#Attributes|Attributes]] for more<br />
|$u<br />
|Displays an attribute about the marriage.<br />
see [[#Attributes|Attributes]] for more<br />
|-<br />
|$e<br />
|Displays event information about the person.<br />
See [[#Events|Events]] for more<br />
|$t<br />
|Displays an event information about the marriage.<br />
See [[#Events|Events]] for more<br />
|}<br />
<br />
All of the Marital variables are defined by the person's preferred spouse in Gramps. If the person has never been married, then these variables will not display anything.<br />
<br />
----<br />
=== Default displayed formats ===<br />
<br />
{|<br />
|-<br />
|$n $s<br />
|Names will be displayed as set in 'Name format:' on the Display tab in Gramps preferences<br />
|-<br />
|$B $D $M $V<br />
|Places will display the Place title by default<br />
|-<br />
|$b $d $m $v<br />
|Dates will be displayed as set in 'Date format:' on the Display tab in Gramps preferences<br />
|-<br />
|$e $t<br />
|Events will display the description by default<br />
|}<br />
<br />
<br />
=== Deprecated variables ===<br />
<br />
Some of the old variables were deprecated because [[#Format Strings|Format Strings]] have replaced them. So here is a list of those variables and how to achieve their results:<br />
<br />
{| {{prettytable}}<br />
|-<br />
!Old Variable<br />
!How to display it now<br />
!What is displayed<br />
|-<br />
|$f<br />
|$n<br />
|Name - as by Gramps name display under Preferences<br />
|-<br />
|$n<br />
|$n(g f)<br />
|Name - FirstName LastName<br />
|-<br />
|$N<br />
|$n(f, g)<br />
|Name - LastName, FirstName (note the explicit comma)<br />
|-<br />
|$nC<br />
|$n(g F)<br />
|Name - FirstName LastName in UPPER case<br />
|-<br />
|$NC<br />
|$n(F, g)<br />
|Name - LastName in UPPER case, FirstName<br />
|-<br />
|$by<br />
|$b(yyyy)<br />
|Date of birth, year only<br />
|-<br />
|$dy<br />
|$d(yyyy)<br />
|Date of death, year only<br />
|-<br />
|$my<br />
|$m(yyyy)<br />
|Date of preferred marriage, year only<br />
|-<br />
|$p<br />
|$s<br />
|Preferred spouse's name as by Gramps name display under Preferences<br />
|-<br />
|$s<br />
|$s(g f)<br />
|Preferred spouse's name - FirstName LastName<br />
|-<br />
|$S<br />
|$s(f, g)<br />
|Preferred spouse's name - LastName, FirstName<br />
|-<br />
|$sC<br />
|$s(g F)<br />
|Preferred spouse's name - FirstName LastName in UPPER case<br />
|-<br />
|$SC<br />
|$s(F, g)<br />
|Preferred spouse's name - LastName in UPPER case, FirstName<br />
|}<br />
<br />
== Format Strings ==<br />
<br />
Format strings are used to display names and dates differently than those assigned under Gramps Preferences. Here is the syntax for a format string:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''(format string)<br />
where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'nsijbmBMdvDVauet'<br />
<br />
A format string is any text, separators or format codes (defined below) to display information about the person.<br />
<br />
=== Formatting names ===<br />
<br />
For names ($n $s) you may use the following formatting codes to display the name differently.<br />
<br />
{|<br />
|-<br />
|t<br />
|Title<br />
|<br />
|f<br />
|Given name<br />
|-<br />
|x<br />
|Common name. Call name if existing, otherwise first first name<br />
|<br />
|c<br />
|Call name<br />
|-<br />
|n<br />
|Nick name<br />
|<br />
|s<br />
|Suffix<br />
|-<br />
|l<br />
|Surname<br />
|<br />
|g<br />
|Family nickname<br />
|}<br />
<br />
These codes can be uppercased to uppercase the result.<br />
<br />
{|<br />
|-<br />
|Example code<br />
|Displays<br />
|-<br />
|<pre>$n(L, f) ($n(c)), $n(L, f){ ($n(c))}<br />
$s(f l s)</pre><br />
|<pre>SMITH, Edwin Michael (), SMITH, Edwin Michael<br />
Janice Ann Adams</pre><br />
|}<br />
<br />
<br />
<blockquote>Note:<br />
If you want to print a character 'c' within the format string (or any one of the other format codes), you will need to first add a '&#92;' in front of it. See [[#Control Variables|Control Variables]] for more.</blockquote><br />
<br />
<blockquote>Note:<br />
the curly brackets { } are used to hide information. Here it is used around ' ($n(c))' to not display ' ()' if the person does not have a call name. See [[#Grouping|Grouping]] for more.</blockquote><br />
<br />
----<br />
<br />
=== Formatting Dates ===<br />
<br />
For all of the date variables ($b $d $m $v) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|yyyy<br />
|The year as a four digit number<br />
|<br />
|yyy<br />
|The year, with a minimum of three digits<br />
|-<br />
|yy<br />
|The year, from 00 to 99<br />
|<br />
|y<br />
|The year, from 0 to 99<br />
|-<br />
|mmmm<BR><br />
MMMM<br />
|The full name of the month<BR><br />
The full name IN CAPS<br />
|<br />
|mmm<BR><br />
MMM<br />
|The abbreviated name of the month<BR><br />
The abbreviated name IN CAPS<br />
|-<br />
|mm<br />
|The month, from 00 to 12<br />
|<br />
|m<br />
|The month, from 0 to 12<br />
|-<br />
|dd<br />
|The day, from 00 to 31<br />
|<br />
|d<br />
|The day, from 0 to 31<br />
|-<br />
|o<br />
|The date type (modifier)<br />
|<br />
|<br />
|<br />
|}<br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$b(mmm-dd yy)<br />
$m(yyyy/mmm/d)<br />
$b(mmm-dd yy)</pre><br />
|<pre>May-24 61<br />
1995/May/27<br />
Jun-04 85</pre><br />
|}<br />
<br />
{{man note| For date types (modifier) |Only "Before", "After", and "About" are supported at this time. all others will not display anything.<BR><br />
And for date span and date ranges, only the starting (first) date is displayed.}}<br />
<br />
----<br />
<br />
=== Formatting Places ===<br />
<br />
For all of the place variables ($B $D $M $V) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|e<br />
|Street<br />
|<br />
|l<br />
|Locality<br />
|-<br />
|c<br />
|City<br />
|<br />
|u<br />
|County<br />
|-<br />
|s<br />
|State<br />
|<br />
|p<br />
|Postal Code<br />
|-<br />
|n<br />
|Country<br />
|<br />
|t<br />
|Title<br />
|-<br />
|x<br />
|Longitude<br />
|<br />
|y<br />
|Latitude<br />
|}<br />
These codes can be uppercased to uppercase the result. <br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
----<br />
<br />
=== Rules for format strings. ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Anything will print inside a format string<br />
|-<br />
|1a<br />
|you will have to use [[#Control Variables|Control Variables]] to display things like ')' and format codes<br />
|-<br />
|2<br />
|Separators can be within format strings.<br />
|-<br />
|3<br />
|At least ONE format code has to display something for the ENTIRE format string to display<br />
|}<br />
<br />
----<br />
<br />
=== Examples ===<br />
<br />
{|<br />
|-<br />
|code<br />
|gives<br />
|-<br />
|<pre>$n(f l)<br />
b. $b {at $B<br />
{d. $d $D</pre><br />
|<pre>Edwin Michael Smith<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA</pre>The person is still alive (or has no information present) so the line was removed.<br />
|}<br />
<br />
<br />
<br />
== Control Variables ==<br />
<br />
Control variables allow you to print characters that are special to Substitution values within a display.<br />
<br />
For example the dollar character '$' is used to note the start of a variable. If you wish to print a dollar character you would use a control character like '&#92;$'<br />
<br />
Control Variables<br />
<br />
{|<br />
|-<br />
|&#92;$<br />
|Displays a single '$'<br />
|<br />
|&#92;&#92;<br />
|Displays a single '&#92;'<br />
|-<br />
|&#92;(<br />
|Displays a single '('<br />
|<br />
|&#92;)<br />
|Displays a single ')'<br />
|-<br />
|&#92;{<br />
|Displays a single '{'<br />
|<br />
|&#92;}<br />
|Displays a single '}'<br />
|-<br />
|&#92;<<br />
|Displays a single '<'<br />
|<br />
|&#92;><br />
|Displays a single '>'<br />
|}<br />
<br />
Basically anything that comes after a '&#92;' will be printed.<br />
<br />
----<br />
Note:<br />
When you are inside a format string, you may need to use this to display a character that would normally be a format code. <br />
<br />
{|<br />
|-<br />
|Example:<br />
|would give<br />
|-<br />
|<pre>$b(m hi mom)<br />
$b(m hi \mo\m)</pre><br />
|<pre>5 hi 5o5<br />
5 hi mom</pre><br />
|}<br />
<br />
as this person was born on the fifth month.<br />
<br />
== Grouping ==<br />
<br />
There are instances where you do not want certain text to be displayed. Take the example:<br />
<br />
{|<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died on $d at $D</pre><br />
|<pre>died on 1975-06-26 at </pre> <br />
|<pre>died on at Reno, Washoe Co., NV</pre><br />
|-<br />
| colspan="3"|Neither of these are very acceptable.<br />
|-<br />
| colspan="3"|But with groups (denoted by {}), you can optionally print information if a variable within contains information.<br />
|-<br />
| colspan="3"|For example:<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died {on $d }{at $D}</pre><br />
|<pre>died on 1975-06-26</pre><br />
|<pre>died at Reno, Washoe Co., NV</pre><br />
|}<br />
<br />
which is what we want.<br />
<br />
----<br />
=== Rules for groups ===<br />
<br />
A group will only display if there is at least one variable that displays something. So if a group only has text and/or variables where the information is not known, the entire group will not print.<br />
<br />
Groups can also be nested. If this happens (like below), the outer group will only display if there is at least one variable that displays something within the outer group or any of the sub groups.<br />
<br />
----<br />
<br />
=== Examples: ===<br />
<br />
This will hide '(' and ')' if the divorce information is not known (or still married).<br />
<br />
<pre>m. $m $M {- ($v(yyyy))</pre><br />
<br />
<br />
Only display some spouse information if married or remove the entire line if never married:<br />
<pre>-$s $m(yyyy) {- $v(\(yyyy\))}</pre><br />
<br />
== Attributes ==<br />
<br />
Attributes do not have a format string. Instead the attribute name is placed inside []. Here is the syntax for an attribute:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name] where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'au'<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$a[Profession]<br />
$a[Social Security Number]<br />
$a[Total \$ bequeathed]</pre><br />
|<pre>Programmer<br />
7A3-29-F1C6<br />
3.00USD</pre><br />
|}<br />
<br />
<br />
----<br />
== Events ==<br />
<br />
Events have the same starting structure as attributes, $e or $t and the event name in [] but events have an extra format string after the name to display the description, date, place, id, and attributes associated with it. Each of these items can be displayed with a , a 'n', 'd', 'D', 'i', and 'a' respectively in the format string. Here is the syntax for an event:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name](format string) where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'et'<br />
<br />
=== Event format strings ===<br />
<br />
The Event format string is used to display information about the event. Here are the format codes to display parts of the event:<br />
<br />
{|<br />
|-<br />
|n<br />
|Description<br />
|<br />
|i<br />
|Event ID<br />
|-<br />
|d<br />
|Event Date&#42;<br />
|<br />
|D<br />
|Event Place&#42;<br />
|-<br />
|a<br />
|An attributes for the event&#42;&#42;<br />
|<br />
|<br />
|<br />
|}<br />
<br />
&#42;These variables can themselves have format strings. Date and a place can be formatted with format string as defined in [[#Format strings|Format strings]].<br />
<br />
&#42;&#42;Attribute needs to have the attribute name in [] and are formatted as above.<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$e[First Communion](d(yyyy-mm-d))<br />
$e[Bar Mitzvah](n&lt; at &gt; D)<br />
$e[Birth](d(yyyy mm/dd) D)</pre><br />
|<pre>2009-11-6<br />
Jerry's Bar Mitzah at Opas house<br />
2007 05/23 Grandmothers house</pre><br />
|}<br />
<br />
<br />
And:<br />
<br />
{|<br />
|-<br />
|<pre>$b(yyyy-Mmm-dd)<br />
$M</pre><br />
|is the same as<br />
|<pre>$e[Birth](d(yyyy-Mmm-dd))<br />
$t[Marriage](D)</pre><br />
|}<br />
<br />
<br />
----<br />
<br />
=== Notes for attributes and events: ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Attribute and event names are mandatory. '$a' or '$a[]' will not display anything.<br />
|-<br />
|2<br />
|Attributes and event names may have special characters within them. Most notably ']' and ')'. If this is the case, you will need to use [[#Control Variables|Control Variables]]<br />
|}<br />
<br />
== Separators ==<br />
<br />
Separators are special 'text only' groups inside '&lt;' and '&gt;' that conditionally display a separator (like ', ' or ' - ') between two groups, variables, format codes or text.<br />
<br />
Separators are displayed conditionally depending on these rules:<br />
<br />
# A variable that does '''not''' display anything will remove itself and a separator that is to the left of it from the display line only.<br />
# If there is not a separator to the left, the same variable will remove itself and a separator that is to the right of it from the displayed line. <br />
# If there are two separators together, the left one will be removed from the display line and the right is kept.<br />
# Separators at the start or end of the display line display if there is text, group, or variable that displays.<br />
## Separators at the start or end of a format string or group, will display if first the format string or group displays and the above is also true.<br />
<br />
=== Example: ===<br />
{|<br />
|-<br />
|<pre>$s(f l)&lt;, &gt;$m(yyyy)&lt; @ &gt;$M&lt; - &gt;$v(&#92;(yyyy&#92;))</pre><br />
|}<br />
<br />
Here are some things that may happen:<br />
<br />
{|<br />
|-<br />
|If '''none''' of the variables are known<br />
|None of the separators will display<br />
|-<br />
|If only one variable '''is''' known<br />
|Only that variable will print. No separators will print.<br />
|-<br />
|If only the spouse's name '''is not''' known<br />
|The first separator will not display<br />
|-<br />
|If only the marriage date '''is not''' known<br />
|The first separator does not display. We will be left with:<br />
Jane Doe&lt; - &gt;{ … }And only the divorce date needs to be known to print the second separator.<br />
|-<br />
|If only the divorce date '''is not''' known<br />
|the second separator will not display<br />
|}<br />
<br />
<br />
Separators can be inside format strings:<br />
<br />
{|<br />
|-<br />
|<pre>$n(&lt;0&gt;T&lt; &gt;L&lt;, &gt;f&lt; &gt;s)</pre><br />
|}<br />
<br />
Separators can cross over/out of format strings. So the separator &lt;0&gt; will display only if what is on the left hand side of the variable displays or if there is nothing on the left.<br />
<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
{{-}}<br />
<br />
{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{languages}}<br />
<br />
[[Category:Documentation]]<br />
[[Category:Plugins]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Gramps_3.4_Wiki_Manual_-_Reports_-_part_2&diff=36918Gramps 3.4 Wiki Manual - Reports - part 22012-04-30T02:15:37Z<p>Ander882: /* Example: */</p>
<hr />
<div>This section describes the substitution values that can be used in the different reports available in Gramps.<br />
<br />
{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{grampsmanualcopyright}}<br />
<br />
{{languages|Gramps_3.4_Wiki_Manual_-_Reports - part 2}}<br />
<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
= Substitution Values =<br />
<br />
Many of the graphical reports allow you to customize the information that is displayed on the reports. Variable substitution is the method that is used to substitute a particular symbol (key) for specific information about the person in the database.<br />
<br />
{|<br />
|-<br />
|Example: <br />
|Will show as: (the person is alive)<br />
|-<br />
|<pre>$n<br />
b. $b( at $B}<br />
-d. $d< at >$D</pre><br />
|<pre>Smith, Edwin Michael<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA<br />
</pre><br />
|}<br />
<br />
----<br />
{|<br />
|-<br />
|1<br />
|If you wish to conditionally print an entire line, start it with a '-'. Like the third line in the example above, the entire line will only display when one or more variables on the line display something. If you wish to start the line with a '-' use '\-' [[#Control Variables|Control Variables]].<br />
|-<br />
|2<br />
|A list of all available variables (The Substitution Keys) follows. If you wish to display names, date, or place information differently, you may use [[#Format Strings|Format Strings]] to accomplish this.<br />
|-<br />
|3<br />
|There are also [[#Control Variables|Control Variables]] to display special characters (like the dollar sign).<br />
|-<br />
|4<br />
|You can also use [[#Grouping|Grouping]] to optionally display information. Line 2 above, uses grouping to display ' at ' only when the birth place is known.<br />
|-<br />
|5<br />
|Along with [[#Events|Events]] you can print almost anything.<br />
|-<br />
|6<br />
|Finally, [[#Separators|Separators]], to make your life complete. Line 3 above, uses this to display ' at ' only when both the birth date and place is known.<br />
|-<br />
|}<br />
<br />
<br />
== The Substitution Keys ==<br />
<br />
{|<br />
|-<br />
| colspan="2"|'''Personal variables'''<br />
| colspan="2"|'''Marital variables'''<br />
|-<br />
|$n<br />
|Displays the person's name<br />
|$s<br />
|Displays the name of the person's spouse<br />
|-<br />
|$i<br />
|Displays the GRAMPS ID for the person.<br />
|$j<br />
|Displays the GRAMPS ID for the marriage.<br />
|-<br />
|$b<br />
|Displays the person's date of birth <br />
|$m<br />
|Displays the marriage date of the person and the spouse.<br />
|-<br />
|$B<br />
|Displays the person's place of birth <br />
|$M<br />
|Displays the place of the marriage of the person and the spouse.<br />
|-<br />
|$d<br />
|Displays the person's date of death <br />
|$v<br />
|Displays the divorce date of the person and the spouse.<br />
|-<br />
|$D<br />
|Displays the person's place of death <br />
|$V<br />
|Displays the place of the divorce of the person and the spouse.<br />
|-<br />
|$a<br />
|Displays an attribute about the person.<br />
see [[#Attributes|Attributes]] for more<br />
|$u<br />
|Displays an attribute about the marriage.<br />
see [[#Attributes|Attributes]] for more<br />
|-<br />
|$e<br />
|Displays event information about the person.<br />
See [[#Events|Events]] for more<br />
|$t<br />
|Displays an event information about the marriage.<br />
See [[#Events|Events]] for more<br />
|}<br />
<br />
All of the Marital variables are defined by the person's preferred spouse in Gramps. If the person has never been married, then these variables will not display anything.<br />
<br />
----<br />
=== Default displayed formats ===<br />
<br />
{|<br />
|-<br />
|$n $s<br />
|Names will be displayed as set in 'Name format:' on the Display tab in Gramps preferences<br />
|-<br />
|$B $D $M $V<br />
|Places will display the Place title by default<br />
|-<br />
|$b $d $m $v<br />
|Dates will be displayed as set in 'Date format:' on the Display tab in Gramps preferences<br />
|-<br />
|$e $t<br />
|Events will display the description by default<br />
|}<br />
<br />
<br />
=== Deprecated variables ===<br />
<br />
Some of the old variables were deprecated because [[#Format Strings|Format Strings]] have replaced them. So here is a list of those variables and how to achieve their results:<br />
<br />
{| {{prettytable}}<br />
|-<br />
!Old Variable<br />
!How to display it now<br />
!What is displayed<br />
|-<br />
|$f<br />
|$n<br />
|Name - as by Gramps name display under Preferences<br />
|-<br />
|$n<br />
|$n(g f)<br />
|Name - FirstName LastName<br />
|-<br />
|$N<br />
|$n(f, g)<br />
|Name - LastName, FirstName (note the explicit comma)<br />
|-<br />
|$nC<br />
|$n(g F)<br />
|Name - FirstName LastName in UPPER case<br />
|-<br />
|$NC<br />
|$n(F, g)<br />
|Name - LastName in UPPER case, FirstName<br />
|-<br />
|$by<br />
|$b(yyyy)<br />
|Date of birth, year only<br />
|-<br />
|$dy<br />
|$d(yyyy)<br />
|Date of death, year only<br />
|-<br />
|$my<br />
|$m(yyyy)<br />
|Date of preferred marriage, year only<br />
|-<br />
|$p<br />
|$s<br />
|Preferred spouse's name as by Gramps name display under Preferences<br />
|-<br />
|$s<br />
|$s(g f)<br />
|Preferred spouse's name - FirstName LastName<br />
|-<br />
|$S<br />
|$s(f, g)<br />
|Preferred spouse's name - LastName, FirstName<br />
|-<br />
|$sC<br />
|$s(g F)<br />
|Preferred spouse's name - FirstName LastName in UPPER case<br />
|-<br />
|$SC<br />
|$s(F, g)<br />
|Preferred spouse's name - LastName in UPPER case, FirstName<br />
|}<br />
<br />
== Format Strings ==<br />
<br />
Format strings are used to display names and dates differently than those assigned under Gramps Preferences. Here is the syntax for a format string:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''(format string)<br />
where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'nsijbmBMdvDVauet'<br />
<br />
A format string is any text, separators or format codes (defined below) to display information about the person.<br />
<br />
=== Formatting names ===<br />
<br />
For names ($n $s) you may use the following formatting codes to display the name differently.<br />
<br />
{|<br />
|-<br />
|t<br />
|Title<br />
|<br />
|f<br />
|Given name<br />
|-<br />
|x<br />
|Common name. Call name if existing, otherwise first first name<br />
|<br />
|c<br />
|Call name<br />
|-<br />
|n<br />
|Nick name<br />
|<br />
|s<br />
|Suffix<br />
|-<br />
|l<br />
|Surname<br />
|<br />
|g<br />
|Family nickname<br />
|}<br />
<br />
These codes can be uppercased to uppercase the result.<br />
<br />
{|<br />
|-<br />
|Example code<br />
|Displays<br />
|-<br />
|<pre>$n(L, f) ($n(c)), $n(L, f){ ($n(c))}<br />
$s(f l s)</pre><br />
|<pre>SMITH, Edwin Michael (), SMITH, Edwin Michael<br />
Janice Ann Adams</pre><br />
|}<br />
<br />
<br />
<blockquote>Note:<br />
If you want to print a character 'c' within the format string (or any one of the other format codes), you will need to first add a '&#92;' in front of it. See [[#Control Variables|Control Variables]] for more.</blockquote><br />
<br />
<blockquote>Note:<br />
the curly brackets { } are used to hide information. Here it is used around ' ($n(c))' to not display ' ()' if the person does not have a call name. See [[#Grouping|Grouping]] for more.</blockquote><br />
<br />
----<br />
<br />
=== Formatting Dates ===<br />
<br />
For all of the date variables ($b $d $m $v) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|yyyy<br />
|The year as a four digit number<br />
|<br />
|yyy<br />
|The year, with a minimum of three digits<br />
|-<br />
|yy<br />
|The year, from 00 to 99<br />
|<br />
|y<br />
|The year, from 0 to 99<br />
|-<br />
|mmmm<BR><br />
MMMM<br />
|The full name of the month<BR><br />
The full name IN CAPS<br />
|<br />
|mmm<BR><br />
MMM<br />
|The abbreviated name of the month<BR><br />
The abbreviated name IN CAPS<br />
|-<br />
|mm<br />
|The month, from 00 to 12<br />
|<br />
|m<br />
|The month, from 0 to 12<br />
|-<br />
|dd<br />
|The day, from 00 to 31<br />
|<br />
|d<br />
|The day, from 0 to 31<br />
|-<br />
|o<br />
|The date type (modifier)<br />
|<br />
|<br />
|<br />
|}<br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$b(mmm-dd yy)<br />
$m(yyyy/mmm/d)<br />
$b(mmm-dd yy)</pre><br />
|<pre>May-24 61<br />
1995/May/27<br />
Jun-04 85</pre><br />
|}<br />
<br />
{{man note| For date types (modifier) |Only "Before", "After", and "About" are supported at this time. all others will not display anything.<BR><br />
And for date span and date ranges, only the starting (first) date is displayed.}}<br />
<br />
----<br />
<br />
=== Formatting Places ===<br />
<br />
For all of the place variables ($B $D $M $V) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|e<br />
|Street<br />
|<br />
|l<br />
|Locality<br />
|-<br />
|c<br />
|City<br />
|<br />
|u<br />
|County<br />
|-<br />
|s<br />
|State<br />
|<br />
|p<br />
|Postal Code<br />
|-<br />
|n<br />
|Country<br />
|<br />
|t<br />
|Title<br />
|-<br />
|x<br />
|Longitude<br />
|<br />
|y<br />
|Latitude<br />
|}<br />
These codes can be uppercased to uppercase the result. <br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
----<br />
<br />
=== Rules for format strings. ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Anything will print inside a format string<br />
|-<br />
|1a<br />
|you will have to use [[#Control Variables|Control Variables]] to display things like ')' and format codes<br />
|-<br />
|2<br />
|Separators can be within format strings.<br />
|-<br />
|3<br />
|At least ONE format code has to display something for the ENTIRE format string to display<br />
|}<br />
<br />
----<br />
<br />
=== Examples ===<br />
<br />
{|<br />
|-<br />
|code<br />
|gives<br />
|-<br />
|<pre>$n(f l)<br />
b. $b {at $B<br />
{d. $d $D</pre><br />
|<pre>Edwin Michael Smith<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA</pre>The person is still alive (or has no information present) so the line was removed.<br />
|}<br />
<br />
<br />
<br />
== Control Variables ==<br />
<br />
Control variables allow you to print characters that are special to Substitution values within a display.<br />
<br />
For example the dollar character '$' is used to note the start of a variable. If you wish to print a dollar character you would use a control character like '&#92;$'<br />
<br />
Control Variables<br />
<br />
{|<br />
|-<br />
|&#92;$<br />
|Displays a single '$'<br />
|<br />
|&#92;&#92;<br />
|Displays a single '&#92;'<br />
|-<br />
|&#92;(<br />
|Displays a single '('<br />
|<br />
|&#92;)<br />
|Displays a single ')'<br />
|-<br />
|&#92;{<br />
|Displays a single '{'<br />
|<br />
|&#92;}<br />
|Displays a single '}'<br />
|-<br />
|&#92;<<br />
|Displays a single '<'<br />
|<br />
|&#92;><br />
|Displays a single '>'<br />
|}<br />
<br />
Basically anything that comes after a '&#92;' will be printed.<br />
<br />
----<br />
Note:<br />
When you are inside a format string, you may need to use this to display a character that would normally be a format code. <br />
<br />
{|<br />
|-<br />
|Example:<br />
|would give<br />
|-<br />
|<pre>$b(m hi mom)<br />
$b(m hi \mo\m)</pre><br />
|<pre>5 hi 5o5<br />
5 hi mom</pre><br />
|}<br />
<br />
as this person was born on the fifth month.<br />
<br />
== Grouping ==<br />
<br />
There are instances where you do not want certain text to be displayed. Take the example:<br />
<br />
{|<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died on $d at $D</pre><br />
|<pre>died on 1975-06-26 at </pre> <br />
|<pre>died on at Reno, Washoe Co., NV</pre><br />
|-<br />
| colspan="3"|Neither of these are very acceptable.<br />
|-<br />
| colspan="3"|But with groups (denoted by {}), you can optionally print information if a variable within contains information.<br />
|-<br />
| colspan="3"|For example:<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died {on $d }{at $D}</pre><br />
|<pre>died on 1975-06-26</pre><br />
|<pre>died at Reno, Washoe Co., NV</pre><br />
|}<br />
<br />
which is what we want.<br />
<br />
----<br />
=== Rules for groups ===<br />
<br />
A group will only display if there is at least one variable that displays something. So if a group only has text and/or variables where the information is not known, the entire group will not print.<br />
<br />
Groups can also be nested. If this happens (like below), the outer group will only display if there is at least one variable that displays something within the outer group or any of the sub groups.<br />
<br />
----<br />
<br />
=== Examples: ===<br />
<br />
This will hide '(' and ')' if the divorce information is not known (or still married).<br />
<br />
<pre>m. $m $M {- ($v(yyyy))</pre><br />
<br />
<br />
Only display some spouse information if married or remove the entire line if never married:<br />
<pre>-$s $m(yyyy) {- $v(\(yyyy\))}</pre><br />
<br />
== Attributes ==<br />
<br />
Attributes do not have a format string. Instead the attribute name is placed inside []. Here is the syntax for an attribute:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name] where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'au'<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$a[Profession]<br />
$a[Social Security Number]<br />
$a[Total \$ bequeathed]</pre><br />
|<pre>Programmer<br />
7A3-29-F1C6<br />
3.00USD</pre><br />
|}<br />
<br />
<br />
----<br />
== Events ==<br />
<br />
Events have the same starting structure as attributes, $e or $t and the event name in [] but events have an extra format string after the name to display the description, date, place, id, and attributes associated with it. Each of these items can be displayed with a , a 'n', 'd', 'D', 'i', and 'a' respectively in the format string. Here is the syntax for an event:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name](format string) where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'et'<br />
<br />
=== Event format strings ===<br />
<br />
The Event format string is used to display information about the event. Here are the format codes to display parts of the event:<br />
<br />
{|<br />
|-<br />
|n<br />
|Description<br />
|<br />
|i<br />
|Event ID<br />
|-<br />
|d<br />
|Event Date&#42;<br />
|<br />
|D<br />
|Event Place&#42;<br />
|-<br />
|a<br />
|An attributes for the event&#42;&#42;<br />
|<br />
|<br />
|<br />
|}<br />
<br />
&#42;These variables can themselves have format strings. Date and a place can be formatted with format string as defined in [[#Format strings|Format strings]].<br />
<br />
&#42;&#42;Attribute needs to have the attribute name in [] and are formatted as above.<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$e[First Communion](d(yyyy-mm-d))<br />
$e[Bar Mitzvah](n&lt; at &gt; D)<br />
$e[Birth](d(yyyy mm/dd) D)</pre><br />
|<pre>2009-11-6<br />
Jerry's Bar Mitzah at Opas house<br />
2007 05/23 Grandmothers house</pre><br />
|}<br />
<br />
<br />
And:<br />
<br />
{|<br />
|-<br />
|<pre>$b(yyyy-Mmm-dd)<br />
$M</pre><br />
|is the same as<br />
|<pre>$e[Birth](d(yyyy-Mmm-dd))<br />
$t[Marriage](D)</pre><br />
|}<br />
<br />
<br />
----<br />
<br />
=== Notes for attributes and events: ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Attribute and event names are mandatory. '$a' or '$a[]' will not display anything.<br />
|-<br />
|2<br />
|Attributes and event names may have special characters within them. Most notably ']' and ')'. If this is the case, you will need to use [[#Control Variables|Control Variables]]<br />
|}<br />
<br />
== Separators ==<br />
<br />
Separators are special 'text only' groups inside '&lt;' and '&gt;' that conditionally display a separator (like ', ' or ' - ') between two groups, variables, format codes or text.<br />
<br />
Separators are displayed conditionally depending on these rules:<br />
<br />
# A variable that does '''not''' display anything will remove itself and a separator that is to the left of it from the display line only.<br />
# If there is not a separator to the left, the same variable will remove itself and a separator that is to the right of it from the displayed line. <br />
# If there are two separators together, the left one will be removed from the display line and the right is kept.<br />
# Separators at the start or end of the display line display if there is text, group, or variable that displays.<br />
## Separators at the start or end of a format string or group, will display if first the format string or group displays and the above is also true.<br />
<br />
=== Example: ===<br />
{|<br />
|-<br />
|<pre>$s(f l)&lt;, &gt;$m(yyyy)&lt; @ &gt;$M&lt; - &gt;$v(&#92;(yyyy&#92;))</pre><br />
|}<br />
<br />
Here are some things that may happen:<br />
<br />
{|<br />
|-<br />
|If '''none''' of the variables are known<br />
|None of the separators will display<br />
|-<br />
|If only one variable '''is''' known<br />
|Only that variable will print. No separators will print.<br />
|-<br />
|If only the spouse's name '''is not''' known<br />
|The first separator will not display<br />
|-<br />
|If only the marriage date '''is not''' known<br />
|The first separator does not display. We will be left with:<br />
Jane Doe&lt; - &gt;{ … }And only the divorce date needs to be known to print the second separator.<br />
|-<br />
|If only the divorce date '''is not''' known<br />
|the second separator will not display<br />
|}<br />
<br />
<br />
Separators can be inside format strings:<br />
<br />
$n(&lt;0&gt;T&lt; &gt;L&lt;, &gt;f&lt; &gt;s)<br />
<br />
Unlike groups, separators can not cross over/out of format strings. So the separator &lt;0&gt; will NEVER display. No matter what is on the left hand side of the variable.<br />
<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
{{-}}<br />
<br />
{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{languages}}<br />
<br />
[[Category:Documentation]]<br />
[[Category:Plugins]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Gramps_3.4_Wiki_Manual_-_Reports_-_part_2&diff=36917Gramps 3.4 Wiki Manual - Reports - part 22012-04-30T02:13:49Z<p>Ander882: /* Example: */</p>
<hr />
<div>This section describes the substitution values that can be used in the different reports available in Gramps.<br />
<br />
{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{grampsmanualcopyright}}<br />
<br />
{{languages|Gramps_3.4_Wiki_Manual_-_Reports - part 2}}<br />
<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
= Substitution Values =<br />
<br />
Many of the graphical reports allow you to customize the information that is displayed on the reports. Variable substitution is the method that is used to substitute a particular symbol (key) for specific information about the person in the database.<br />
<br />
{|<br />
|-<br />
|Example: <br />
|Will show as: (the person is alive)<br />
|-<br />
|<pre>$n<br />
b. $b( at $B}<br />
-d. $d< at >$D</pre><br />
|<pre>Smith, Edwin Michael<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA<br />
</pre><br />
|}<br />
<br />
----<br />
{|<br />
|-<br />
|1<br />
|If you wish to conditionally print an entire line, start it with a '-'. Like the third line in the example above, the entire line will only display when one or more variables on the line display something. If you wish to start the line with a '-' use '\-' [[#Control Variables|Control Variables]].<br />
|-<br />
|2<br />
|A list of all available variables (The Substitution Keys) follows. If you wish to display names, date, or place information differently, you may use [[#Format Strings|Format Strings]] to accomplish this.<br />
|-<br />
|3<br />
|There are also [[#Control Variables|Control Variables]] to display special characters (like the dollar sign).<br />
|-<br />
|4<br />
|You can also use [[#Grouping|Grouping]] to optionally display information. Line 2 above, uses grouping to display ' at ' only when the birth place is known.<br />
|-<br />
|5<br />
|Along with [[#Events|Events]] you can print almost anything.<br />
|-<br />
|6<br />
|Finally, [[#Separators|Separators]], to make your life complete. Line 3 above, uses this to display ' at ' only when both the birth date and place is known.<br />
|-<br />
|}<br />
<br />
<br />
== The Substitution Keys ==<br />
<br />
{|<br />
|-<br />
| colspan="2"|'''Personal variables'''<br />
| colspan="2"|'''Marital variables'''<br />
|-<br />
|$n<br />
|Displays the person's name<br />
|$s<br />
|Displays the name of the person's spouse<br />
|-<br />
|$i<br />
|Displays the GRAMPS ID for the person.<br />
|$j<br />
|Displays the GRAMPS ID for the marriage.<br />
|-<br />
|$b<br />
|Displays the person's date of birth <br />
|$m<br />
|Displays the marriage date of the person and the spouse.<br />
|-<br />
|$B<br />
|Displays the person's place of birth <br />
|$M<br />
|Displays the place of the marriage of the person and the spouse.<br />
|-<br />
|$d<br />
|Displays the person's date of death <br />
|$v<br />
|Displays the divorce date of the person and the spouse.<br />
|-<br />
|$D<br />
|Displays the person's place of death <br />
|$V<br />
|Displays the place of the divorce of the person and the spouse.<br />
|-<br />
|$a<br />
|Displays an attribute about the person.<br />
see [[#Attributes|Attributes]] for more<br />
|$u<br />
|Displays an attribute about the marriage.<br />
see [[#Attributes|Attributes]] for more<br />
|-<br />
|$e<br />
|Displays event information about the person.<br />
See [[#Events|Events]] for more<br />
|$t<br />
|Displays an event information about the marriage.<br />
See [[#Events|Events]] for more<br />
|}<br />
<br />
All of the Marital variables are defined by the person's preferred spouse in Gramps. If the person has never been married, then these variables will not display anything.<br />
<br />
----<br />
=== Default displayed formats ===<br />
<br />
{|<br />
|-<br />
|$n $s<br />
|Names will be displayed as set in 'Name format:' on the Display tab in Gramps preferences<br />
|-<br />
|$B $D $M $V<br />
|Places will display the Place title by default<br />
|-<br />
|$b $d $m $v<br />
|Dates will be displayed as set in 'Date format:' on the Display tab in Gramps preferences<br />
|-<br />
|$e $t<br />
|Events will display the description by default<br />
|}<br />
<br />
<br />
=== Deprecated variables ===<br />
<br />
Some of the old variables were deprecated because [[#Format Strings|Format Strings]] have replaced them. So here is a list of those variables and how to achieve their results:<br />
<br />
{| {{prettytable}}<br />
|-<br />
!Old Variable<br />
!How to display it now<br />
!What is displayed<br />
|-<br />
|$f<br />
|$n<br />
|Name - as by Gramps name display under Preferences<br />
|-<br />
|$n<br />
|$n(g f)<br />
|Name - FirstName LastName<br />
|-<br />
|$N<br />
|$n(f, g)<br />
|Name - LastName, FirstName (note the explicit comma)<br />
|-<br />
|$nC<br />
|$n(g F)<br />
|Name - FirstName LastName in UPPER case<br />
|-<br />
|$NC<br />
|$n(F, g)<br />
|Name - LastName in UPPER case, FirstName<br />
|-<br />
|$by<br />
|$b(yyyy)<br />
|Date of birth, year only<br />
|-<br />
|$dy<br />
|$d(yyyy)<br />
|Date of death, year only<br />
|-<br />
|$my<br />
|$m(yyyy)<br />
|Date of preferred marriage, year only<br />
|-<br />
|$p<br />
|$s<br />
|Preferred spouse's name as by Gramps name display under Preferences<br />
|-<br />
|$s<br />
|$s(g f)<br />
|Preferred spouse's name - FirstName LastName<br />
|-<br />
|$S<br />
|$s(f, g)<br />
|Preferred spouse's name - LastName, FirstName<br />
|-<br />
|$sC<br />
|$s(g F)<br />
|Preferred spouse's name - FirstName LastName in UPPER case<br />
|-<br />
|$SC<br />
|$s(F, g)<br />
|Preferred spouse's name - LastName in UPPER case, FirstName<br />
|}<br />
<br />
== Format Strings ==<br />
<br />
Format strings are used to display names and dates differently than those assigned under Gramps Preferences. Here is the syntax for a format string:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''(format string)<br />
where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'nsijbmBMdvDVauet'<br />
<br />
A format string is any text, separators or format codes (defined below) to display information about the person.<br />
<br />
=== Formatting names ===<br />
<br />
For names ($n $s) you may use the following formatting codes to display the name differently.<br />
<br />
{|<br />
|-<br />
|t<br />
|Title<br />
|<br />
|f<br />
|Given name<br />
|-<br />
|x<br />
|Common name. Call name if existing, otherwise first first name<br />
|<br />
|c<br />
|Call name<br />
|-<br />
|n<br />
|Nick name<br />
|<br />
|s<br />
|Suffix<br />
|-<br />
|l<br />
|Surname<br />
|<br />
|g<br />
|Family nickname<br />
|}<br />
<br />
These codes can be uppercased to uppercase the result.<br />
<br />
{|<br />
|-<br />
|Example code<br />
|Displays<br />
|-<br />
|<pre>$n(L, f) ($n(c)), $n(L, f){ ($n(c))}<br />
$s(f l s)</pre><br />
|<pre>SMITH, Edwin Michael (), SMITH, Edwin Michael<br />
Janice Ann Adams</pre><br />
|}<br />
<br />
<br />
<blockquote>Note:<br />
If you want to print a character 'c' within the format string (or any one of the other format codes), you will need to first add a '&#92;' in front of it. See [[#Control Variables|Control Variables]] for more.</blockquote><br />
<br />
<blockquote>Note:<br />
the curly brackets { } are used to hide information. Here it is used around ' ($n(c))' to not display ' ()' if the person does not have a call name. See [[#Grouping|Grouping]] for more.</blockquote><br />
<br />
----<br />
<br />
=== Formatting Dates ===<br />
<br />
For all of the date variables ($b $d $m $v) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|yyyy<br />
|The year as a four digit number<br />
|<br />
|yyy<br />
|The year, with a minimum of three digits<br />
|-<br />
|yy<br />
|The year, from 00 to 99<br />
|<br />
|y<br />
|The year, from 0 to 99<br />
|-<br />
|mmmm<BR><br />
MMMM<br />
|The full name of the month<BR><br />
The full name IN CAPS<br />
|<br />
|mmm<BR><br />
MMM<br />
|The abbreviated name of the month<BR><br />
The abbreviated name IN CAPS<br />
|-<br />
|mm<br />
|The month, from 00 to 12<br />
|<br />
|m<br />
|The month, from 0 to 12<br />
|-<br />
|dd<br />
|The day, from 00 to 31<br />
|<br />
|d<br />
|The day, from 0 to 31<br />
|-<br />
|o<br />
|The date type (modifier)<br />
|<br />
|<br />
|<br />
|}<br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$b(mmm-dd yy)<br />
$m(yyyy/mmm/d)<br />
$b(mmm-dd yy)</pre><br />
|<pre>May-24 61<br />
1995/May/27<br />
Jun-04 85</pre><br />
|}<br />
<br />
{{man note| For date types (modifier) |Only "Before", "After", and "About" are supported at this time. all others will not display anything.<BR><br />
And for date span and date ranges, only the starting (first) date is displayed.}}<br />
<br />
----<br />
<br />
=== Formatting Places ===<br />
<br />
For all of the place variables ($B $D $M $V) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|e<br />
|Street<br />
|<br />
|l<br />
|Locality<br />
|-<br />
|c<br />
|City<br />
|<br />
|u<br />
|County<br />
|-<br />
|s<br />
|State<br />
|<br />
|p<br />
|Postal Code<br />
|-<br />
|n<br />
|Country<br />
|<br />
|t<br />
|Title<br />
|-<br />
|x<br />
|Longitude<br />
|<br />
|y<br />
|Latitude<br />
|}<br />
These codes can be uppercased to uppercase the result. <br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
----<br />
<br />
=== Rules for format strings. ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Anything will print inside a format string<br />
|-<br />
|1a<br />
|you will have to use [[#Control Variables|Control Variables]] to display things like ')' and format codes<br />
|-<br />
|2<br />
|Separators can be within format strings.<br />
|-<br />
|3<br />
|At least ONE format code has to display something for the ENTIRE format string to display<br />
|}<br />
<br />
----<br />
<br />
=== Examples ===<br />
<br />
{|<br />
|-<br />
|code<br />
|gives<br />
|-<br />
|<pre>$n(f l)<br />
b. $b {at $B<br />
{d. $d $D</pre><br />
|<pre>Edwin Michael Smith<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA</pre>The person is still alive (or has no information present) so the line was removed.<br />
|}<br />
<br />
<br />
<br />
== Control Variables ==<br />
<br />
Control variables allow you to print characters that are special to Substitution values within a display.<br />
<br />
For example the dollar character '$' is used to note the start of a variable. If you wish to print a dollar character you would use a control character like '&#92;$'<br />
<br />
Control Variables<br />
<br />
{|<br />
|-<br />
|&#92;$<br />
|Displays a single '$'<br />
|<br />
|&#92;&#92;<br />
|Displays a single '&#92;'<br />
|-<br />
|&#92;(<br />
|Displays a single '('<br />
|<br />
|&#92;)<br />
|Displays a single ')'<br />
|-<br />
|&#92;{<br />
|Displays a single '{'<br />
|<br />
|&#92;}<br />
|Displays a single '}'<br />
|-<br />
|&#92;<<br />
|Displays a single '<'<br />
|<br />
|&#92;><br />
|Displays a single '>'<br />
|}<br />
<br />
Basically anything that comes after a '&#92;' will be printed.<br />
<br />
----<br />
Note:<br />
When you are inside a format string, you may need to use this to display a character that would normally be a format code. <br />
<br />
{|<br />
|-<br />
|Example:<br />
|would give<br />
|-<br />
|<pre>$b(m hi mom)<br />
$b(m hi \mo\m)</pre><br />
|<pre>5 hi 5o5<br />
5 hi mom</pre><br />
|}<br />
<br />
as this person was born on the fifth month.<br />
<br />
== Grouping ==<br />
<br />
There are instances where you do not want certain text to be displayed. Take the example:<br />
<br />
{|<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died on $d at $D</pre><br />
|<pre>died on 1975-06-26 at </pre> <br />
|<pre>died on at Reno, Washoe Co., NV</pre><br />
|-<br />
| colspan="3"|Neither of these are very acceptable.<br />
|-<br />
| colspan="3"|But with groups (denoted by {}), you can optionally print information if a variable within contains information.<br />
|-<br />
| colspan="3"|For example:<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died {on $d }{at $D}</pre><br />
|<pre>died on 1975-06-26</pre><br />
|<pre>died at Reno, Washoe Co., NV</pre><br />
|}<br />
<br />
which is what we want.<br />
<br />
----<br />
=== Rules for groups ===<br />
<br />
A group will only display if there is at least one variable that displays something. So if a group only has text and/or variables where the information is not known, the entire group will not print.<br />
<br />
Groups can also be nested. If this happens (like below), the outer group will only display if there is at least one variable that displays something within the outer group or any of the sub groups.<br />
<br />
----<br />
<br />
=== Examples: ===<br />
<br />
This will hide '(' and ')' if the divorce information is not known (or still married).<br />
<br />
<pre>m. $m $M {- ($v(yyyy))</pre><br />
<br />
<br />
Only display some spouse information if married or remove the entire line if never married:<br />
<pre>-$s $m(yyyy) {- $v(\(yyyy\))}</pre><br />
<br />
== Attributes ==<br />
<br />
Attributes do not have a format string. Instead the attribute name is placed inside []. Here is the syntax for an attribute:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name] where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'au'<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$a[Profession]<br />
$a[Social Security Number]<br />
$a[Total \$ bequeathed]</pre><br />
|<pre>Programmer<br />
7A3-29-F1C6<br />
3.00USD</pre><br />
|}<br />
<br />
<br />
----<br />
== Events ==<br />
<br />
Events have the same starting structure as attributes, $e or $t and the event name in [] but events have an extra format string after the name to display the description, date, place, id, and attributes associated with it. Each of these items can be displayed with a , a 'n', 'd', 'D', 'i', and 'a' respectively in the format string. Here is the syntax for an event:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name](format string) where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'et'<br />
<br />
=== Event format strings ===<br />
<br />
The Event format string is used to display information about the event. Here are the format codes to display parts of the event:<br />
<br />
{|<br />
|-<br />
|n<br />
|Description<br />
|<br />
|i<br />
|Event ID<br />
|-<br />
|d<br />
|Event Date&#42;<br />
|<br />
|D<br />
|Event Place&#42;<br />
|-<br />
|a<br />
|An attributes for the event&#42;&#42;<br />
|<br />
|<br />
|<br />
|}<br />
<br />
&#42;These variables can themselves have format strings. Date and a place can be formatted with format string as defined in [[#Format strings|Format strings]].<br />
<br />
&#42;&#42;Attribute needs to have the attribute name in [] and are formatted as above.<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$e[First Communion](d(yyyy-mm-d))<br />
$e[Bar Mitzvah](n&lt; at &gt; D)<br />
$e[Birth](d(yyyy mm/dd) D)</pre><br />
|<pre>2009-11-6<br />
Jerry's Bar Mitzah at Opas house<br />
2007 05/23 Grandmothers house</pre><br />
|}<br />
<br />
<br />
And:<br />
<br />
{|<br />
|-<br />
|<pre>$b(yyyy-Mmm-dd)<br />
$M</pre><br />
|is the same as<br />
|<pre>$e[Birth](d(yyyy-Mmm-dd))<br />
$t[Marriage](D)</pre><br />
|}<br />
<br />
<br />
----<br />
<br />
=== Notes for attributes and events: ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Attribute and event names are mandatory. '$a' or '$a[]' will not display anything.<br />
|-<br />
|2<br />
|Attributes and event names may have special characters within them. Most notably ']' and ')'. If this is the case, you will need to use [[#Control Variables|Control Variables]]<br />
|}<br />
<br />
== Separators ==<br />
<br />
Separators are special 'text only' groups inside '&lt;' and '&gt;' that conditionally display a separator (like ', ' or ' - ') between two groups, variables, format codes or text.<br />
<br />
Separators are displayed conditionally depending on these rules:<br />
<br />
# A variable that does '''not''' display anything will remove itself and a separator that is to the left of it from the display line only.<br />
# If there is not a separator to the left, the same variable will remove itself and a separator that is to the right of it from the displayed line. <br />
# If there are two separators together, the left one will be removed from the display line and the right is kept.<br />
# Separators at the start or end of the display line display if there is text, group, or variable that displays.<br />
## Separators at the start or end of a format string or group, will display if first the format string or group displays and the above is also true.<br />
<br />
=== Example: ===<br />
{|<br />
|-<br />
|<pre>$s(f l)&lt;, &gt;$m(yyyy)&lt; @ &gt;$M&lt; - &gt;$v(&#92;(yyyy&#92;))<br />
</pre>|}<br />
<br />
Here are some things that may happen:<br />
<br />
{|<br />
|-<br />
|If '''none''' of the variables are known<br />
|None of the separators will display<br />
|-<br />
|If only one variable '''is''' known<br />
|Only that variable will print. No separators will print.<br />
|-<br />
|If only the spouse's name '''is not''' known<br />
|The first separator will not display<br />
|-<br />
|If only the marriage date '''is not''' known<br />
|The first separator does not display. We will be left with:<br />
Jane Doe&lt; - &gt;{ … }And only the divorce date needs to be known to print the second separator.<br />
|-<br />
|If only the divorce date '''is not''' known<br />
|the second separator will not display<br />
|}<br />
<br />
<br />
Separators can be inside format strings:<br />
<br />
$n(&lt;0&gt;T&lt; &gt;L&lt;, &gt;f&lt; &gt;s)<br />
<br />
Unlike groups, separators can not cross over/out of format strings. So the separator &lt;0&gt; will NEVER display. No matter what is on the left hand side of the variable.<br />
<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
{{-}}<br />
<br />
{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{languages}}<br />
<br />
[[Category:Documentation]]<br />
[[Category:Plugins]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Gramps_3.4_Wiki_Manual_-_Reports_-_part_2&diff=36916Gramps 3.4 Wiki Manual - Reports - part 22012-04-30T02:12:21Z<p>Ander882: /* Separators */</p>
<hr />
<div>This section describes the substitution values that can be used in the different reports available in Gramps.<br />
<br />
{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{grampsmanualcopyright}}<br />
<br />
{{languages|Gramps_3.4_Wiki_Manual_-_Reports - part 2}}<br />
<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
= Substitution Values =<br />
<br />
Many of the graphical reports allow you to customize the information that is displayed on the reports. Variable substitution is the method that is used to substitute a particular symbol (key) for specific information about the person in the database.<br />
<br />
{|<br />
|-<br />
|Example: <br />
|Will show as: (the person is alive)<br />
|-<br />
|<pre>$n<br />
b. $b( at $B}<br />
-d. $d< at >$D</pre><br />
|<pre>Smith, Edwin Michael<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA<br />
</pre><br />
|}<br />
<br />
----<br />
{|<br />
|-<br />
|1<br />
|If you wish to conditionally print an entire line, start it with a '-'. Like the third line in the example above, the entire line will only display when one or more variables on the line display something. If you wish to start the line with a '-' use '\-' [[#Control Variables|Control Variables]].<br />
|-<br />
|2<br />
|A list of all available variables (The Substitution Keys) follows. If you wish to display names, date, or place information differently, you may use [[#Format Strings|Format Strings]] to accomplish this.<br />
|-<br />
|3<br />
|There are also [[#Control Variables|Control Variables]] to display special characters (like the dollar sign).<br />
|-<br />
|4<br />
|You can also use [[#Grouping|Grouping]] to optionally display information. Line 2 above, uses grouping to display ' at ' only when the birth place is known.<br />
|-<br />
|5<br />
|Along with [[#Events|Events]] you can print almost anything.<br />
|-<br />
|6<br />
|Finally, [[#Separators|Separators]], to make your life complete. Line 3 above, uses this to display ' at ' only when both the birth date and place is known.<br />
|-<br />
|}<br />
<br />
<br />
== The Substitution Keys ==<br />
<br />
{|<br />
|-<br />
| colspan="2"|'''Personal variables'''<br />
| colspan="2"|'''Marital variables'''<br />
|-<br />
|$n<br />
|Displays the person's name<br />
|$s<br />
|Displays the name of the person's spouse<br />
|-<br />
|$i<br />
|Displays the GRAMPS ID for the person.<br />
|$j<br />
|Displays the GRAMPS ID for the marriage.<br />
|-<br />
|$b<br />
|Displays the person's date of birth <br />
|$m<br />
|Displays the marriage date of the person and the spouse.<br />
|-<br />
|$B<br />
|Displays the person's place of birth <br />
|$M<br />
|Displays the place of the marriage of the person and the spouse.<br />
|-<br />
|$d<br />
|Displays the person's date of death <br />
|$v<br />
|Displays the divorce date of the person and the spouse.<br />
|-<br />
|$D<br />
|Displays the person's place of death <br />
|$V<br />
|Displays the place of the divorce of the person and the spouse.<br />
|-<br />
|$a<br />
|Displays an attribute about the person.<br />
see [[#Attributes|Attributes]] for more<br />
|$u<br />
|Displays an attribute about the marriage.<br />
see [[#Attributes|Attributes]] for more<br />
|-<br />
|$e<br />
|Displays event information about the person.<br />
See [[#Events|Events]] for more<br />
|$t<br />
|Displays an event information about the marriage.<br />
See [[#Events|Events]] for more<br />
|}<br />
<br />
All of the Marital variables are defined by the person's preferred spouse in Gramps. If the person has never been married, then these variables will not display anything.<br />
<br />
----<br />
=== Default displayed formats ===<br />
<br />
{|<br />
|-<br />
|$n $s<br />
|Names will be displayed as set in 'Name format:' on the Display tab in Gramps preferences<br />
|-<br />
|$B $D $M $V<br />
|Places will display the Place title by default<br />
|-<br />
|$b $d $m $v<br />
|Dates will be displayed as set in 'Date format:' on the Display tab in Gramps preferences<br />
|-<br />
|$e $t<br />
|Events will display the description by default<br />
|}<br />
<br />
<br />
=== Deprecated variables ===<br />
<br />
Some of the old variables were deprecated because [[#Format Strings|Format Strings]] have replaced them. So here is a list of those variables and how to achieve their results:<br />
<br />
{| {{prettytable}}<br />
|-<br />
!Old Variable<br />
!How to display it now<br />
!What is displayed<br />
|-<br />
|$f<br />
|$n<br />
|Name - as by Gramps name display under Preferences<br />
|-<br />
|$n<br />
|$n(g f)<br />
|Name - FirstName LastName<br />
|-<br />
|$N<br />
|$n(f, g)<br />
|Name - LastName, FirstName (note the explicit comma)<br />
|-<br />
|$nC<br />
|$n(g F)<br />
|Name - FirstName LastName in UPPER case<br />
|-<br />
|$NC<br />
|$n(F, g)<br />
|Name - LastName in UPPER case, FirstName<br />
|-<br />
|$by<br />
|$b(yyyy)<br />
|Date of birth, year only<br />
|-<br />
|$dy<br />
|$d(yyyy)<br />
|Date of death, year only<br />
|-<br />
|$my<br />
|$m(yyyy)<br />
|Date of preferred marriage, year only<br />
|-<br />
|$p<br />
|$s<br />
|Preferred spouse's name as by Gramps name display under Preferences<br />
|-<br />
|$s<br />
|$s(g f)<br />
|Preferred spouse's name - FirstName LastName<br />
|-<br />
|$S<br />
|$s(f, g)<br />
|Preferred spouse's name - LastName, FirstName<br />
|-<br />
|$sC<br />
|$s(g F)<br />
|Preferred spouse's name - FirstName LastName in UPPER case<br />
|-<br />
|$SC<br />
|$s(F, g)<br />
|Preferred spouse's name - LastName in UPPER case, FirstName<br />
|}<br />
<br />
== Format Strings ==<br />
<br />
Format strings are used to display names and dates differently than those assigned under Gramps Preferences. Here is the syntax for a format string:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''(format string)<br />
where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'nsijbmBMdvDVauet'<br />
<br />
A format string is any text, separators or format codes (defined below) to display information about the person.<br />
<br />
=== Formatting names ===<br />
<br />
For names ($n $s) you may use the following formatting codes to display the name differently.<br />
<br />
{|<br />
|-<br />
|t<br />
|Title<br />
|<br />
|f<br />
|Given name<br />
|-<br />
|x<br />
|Common name. Call name if existing, otherwise first first name<br />
|<br />
|c<br />
|Call name<br />
|-<br />
|n<br />
|Nick name<br />
|<br />
|s<br />
|Suffix<br />
|-<br />
|l<br />
|Surname<br />
|<br />
|g<br />
|Family nickname<br />
|}<br />
<br />
These codes can be uppercased to uppercase the result.<br />
<br />
{|<br />
|-<br />
|Example code<br />
|Displays<br />
|-<br />
|<pre>$n(L, f) ($n(c)), $n(L, f){ ($n(c))}<br />
$s(f l s)</pre><br />
|<pre>SMITH, Edwin Michael (), SMITH, Edwin Michael<br />
Janice Ann Adams</pre><br />
|}<br />
<br />
<br />
<blockquote>Note:<br />
If you want to print a character 'c' within the format string (or any one of the other format codes), you will need to first add a '&#92;' in front of it. See [[#Control Variables|Control Variables]] for more.</blockquote><br />
<br />
<blockquote>Note:<br />
the curly brackets { } are used to hide information. Here it is used around ' ($n(c))' to not display ' ()' if the person does not have a call name. See [[#Grouping|Grouping]] for more.</blockquote><br />
<br />
----<br />
<br />
=== Formatting Dates ===<br />
<br />
For all of the date variables ($b $d $m $v) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|yyyy<br />
|The year as a four digit number<br />
|<br />
|yyy<br />
|The year, with a minimum of three digits<br />
|-<br />
|yy<br />
|The year, from 00 to 99<br />
|<br />
|y<br />
|The year, from 0 to 99<br />
|-<br />
|mmmm<BR><br />
MMMM<br />
|The full name of the month<BR><br />
The full name IN CAPS<br />
|<br />
|mmm<BR><br />
MMM<br />
|The abbreviated name of the month<BR><br />
The abbreviated name IN CAPS<br />
|-<br />
|mm<br />
|The month, from 00 to 12<br />
|<br />
|m<br />
|The month, from 0 to 12<br />
|-<br />
|dd<br />
|The day, from 00 to 31<br />
|<br />
|d<br />
|The day, from 0 to 31<br />
|-<br />
|o<br />
|The date type (modifier)<br />
|<br />
|<br />
|<br />
|}<br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$b(mmm-dd yy)<br />
$m(yyyy/mmm/d)<br />
$b(mmm-dd yy)</pre><br />
|<pre>May-24 61<br />
1995/May/27<br />
Jun-04 85</pre><br />
|}<br />
<br />
{{man note| For date types (modifier) |Only "Before", "After", and "About" are supported at this time. all others will not display anything.<BR><br />
And for date span and date ranges, only the starting (first) date is displayed.}}<br />
<br />
----<br />
<br />
=== Formatting Places ===<br />
<br />
For all of the place variables ($B $D $M $V) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|e<br />
|Street<br />
|<br />
|l<br />
|Locality<br />
|-<br />
|c<br />
|City<br />
|<br />
|u<br />
|County<br />
|-<br />
|s<br />
|State<br />
|<br />
|p<br />
|Postal Code<br />
|-<br />
|n<br />
|Country<br />
|<br />
|t<br />
|Title<br />
|-<br />
|x<br />
|Longitude<br />
|<br />
|y<br />
|Latitude<br />
|}<br />
These codes can be uppercased to uppercase the result. <br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
----<br />
<br />
=== Rules for format strings. ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Anything will print inside a format string<br />
|-<br />
|1a<br />
|you will have to use [[#Control Variables|Control Variables]] to display things like ')' and format codes<br />
|-<br />
|2<br />
|Separators can be within format strings.<br />
|-<br />
|3<br />
|At least ONE format code has to display something for the ENTIRE format string to display<br />
|}<br />
<br />
----<br />
<br />
=== Examples ===<br />
<br />
{|<br />
|-<br />
|code<br />
|gives<br />
|-<br />
|<pre>$n(f l)<br />
b. $b {at $B<br />
{d. $d $D</pre><br />
|<pre>Edwin Michael Smith<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA</pre>The person is still alive (or has no information present) so the line was removed.<br />
|}<br />
<br />
<br />
<br />
== Control Variables ==<br />
<br />
Control variables allow you to print characters that are special to Substitution values within a display.<br />
<br />
For example the dollar character '$' is used to note the start of a variable. If you wish to print a dollar character you would use a control character like '&#92;$'<br />
<br />
Control Variables<br />
<br />
{|<br />
|-<br />
|&#92;$<br />
|Displays a single '$'<br />
|<br />
|&#92;&#92;<br />
|Displays a single '&#92;'<br />
|-<br />
|&#92;(<br />
|Displays a single '('<br />
|<br />
|&#92;)<br />
|Displays a single ')'<br />
|-<br />
|&#92;{<br />
|Displays a single '{'<br />
|<br />
|&#92;}<br />
|Displays a single '}'<br />
|-<br />
|&#92;<<br />
|Displays a single '<'<br />
|<br />
|&#92;><br />
|Displays a single '>'<br />
|}<br />
<br />
Basically anything that comes after a '&#92;' will be printed.<br />
<br />
----<br />
Note:<br />
When you are inside a format string, you may need to use this to display a character that would normally be a format code. <br />
<br />
{|<br />
|-<br />
|Example:<br />
|would give<br />
|-<br />
|<pre>$b(m hi mom)<br />
$b(m hi \mo\m)</pre><br />
|<pre>5 hi 5o5<br />
5 hi mom</pre><br />
|}<br />
<br />
as this person was born on the fifth month.<br />
<br />
== Grouping ==<br />
<br />
There are instances where you do not want certain text to be displayed. Take the example:<br />
<br />
{|<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died on $d at $D</pre><br />
|<pre>died on 1975-06-26 at </pre> <br />
|<pre>died on at Reno, Washoe Co., NV</pre><br />
|-<br />
| colspan="3"|Neither of these are very acceptable.<br />
|-<br />
| colspan="3"|But with groups (denoted by {}), you can optionally print information if a variable within contains information.<br />
|-<br />
| colspan="3"|For example:<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died {on $d }{at $D}</pre><br />
|<pre>died on 1975-06-26</pre><br />
|<pre>died at Reno, Washoe Co., NV</pre><br />
|}<br />
<br />
which is what we want.<br />
<br />
----<br />
=== Rules for groups ===<br />
<br />
A group will only display if there is at least one variable that displays something. So if a group only has text and/or variables where the information is not known, the entire group will not print.<br />
<br />
Groups can also be nested. If this happens (like below), the outer group will only display if there is at least one variable that displays something within the outer group or any of the sub groups.<br />
<br />
----<br />
<br />
=== Examples: ===<br />
<br />
This will hide '(' and ')' if the divorce information is not known (or still married).<br />
<br />
<pre>m. $m $M {- ($v(yyyy))</pre><br />
<br />
<br />
Only display some spouse information if married or remove the entire line if never married:<br />
<pre>-$s $m(yyyy) {- $v(\(yyyy\))}</pre><br />
<br />
== Attributes ==<br />
<br />
Attributes do not have a format string. Instead the attribute name is placed inside []. Here is the syntax for an attribute:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name] where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'au'<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$a[Profession]<br />
$a[Social Security Number]<br />
$a[Total \$ bequeathed]</pre><br />
|<pre>Programmer<br />
7A3-29-F1C6<br />
3.00USD</pre><br />
|}<br />
<br />
<br />
----<br />
== Events ==<br />
<br />
Events have the same starting structure as attributes, $e or $t and the event name in [] but events have an extra format string after the name to display the description, date, place, id, and attributes associated with it. Each of these items can be displayed with a , a 'n', 'd', 'D', 'i', and 'a' respectively in the format string. Here is the syntax for an event:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name](format string) where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'et'<br />
<br />
=== Event format strings ===<br />
<br />
The Event format string is used to display information about the event. Here are the format codes to display parts of the event:<br />
<br />
{|<br />
|-<br />
|n<br />
|Description<br />
|<br />
|i<br />
|Event ID<br />
|-<br />
|d<br />
|Event Date&#42;<br />
|<br />
|D<br />
|Event Place&#42;<br />
|-<br />
|a<br />
|An attributes for the event&#42;&#42;<br />
|<br />
|<br />
|<br />
|}<br />
<br />
&#42;These variables can themselves have format strings. Date and a place can be formatted with format string as defined in [[#Format strings|Format strings]].<br />
<br />
&#42;&#42;Attribute needs to have the attribute name in [] and are formatted as above.<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$e[First Communion](d(yyyy-mm-d))<br />
$e[Bar Mitzvah](n&lt; at &gt; D)<br />
$e[Birth](d(yyyy mm/dd) D)</pre><br />
|<pre>2009-11-6<br />
Jerry's Bar Mitzah at Opas house<br />
2007 05/23 Grandmothers house</pre><br />
|}<br />
<br />
<br />
And:<br />
<br />
{|<br />
|-<br />
|<pre>$b(yyyy-Mmm-dd)<br />
$M</pre><br />
|is the same as<br />
|<pre>$e[Birth](d(yyyy-Mmm-dd))<br />
$t[Marriage](D)</pre><br />
|}<br />
<br />
<br />
----<br />
<br />
=== Notes for attributes and events: ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Attribute and event names are mandatory. '$a' or '$a[]' will not display anything.<br />
|-<br />
|2<br />
|Attributes and event names may have special characters within them. Most notably ']' and ')'. If this is the case, you will need to use [[#Control Variables|Control Variables]]<br />
|}<br />
<br />
== Separators ==<br />
<br />
Separators are special 'text only' groups inside '&lt;' and '&gt;' that conditionally display a separator (like ', ' or ' - ') between two groups, variables, format codes or text.<br />
<br />
Separators are displayed conditionally depending on these rules:<br />
<br />
# A variable that does '''not''' display anything will remove itself and a separator that is to the left of it from the display line only.<br />
# If there is not a separator to the left, the same variable will remove itself and a separator that is to the right of it from the displayed line. <br />
# If there are two separators together, the left one will be removed from the display line and the right is kept.<br />
# Separators at the start or end of the display line display if there is text, group, or variable that displays.<br />
## Separators at the start or end of a format string or group, will display if first the format string or group displays and the above is also true.<br />
<br />
=== Example: ===<br />
<br />
$s(f l)&lt;, &gt;$m(yyyy)&lt; @ &gt;$M&lt; - &gt;$v(&#92;(yyyy&#92;))<br />
<br />
Here are some things that may happen:<br />
<br />
{|<br />
|-<br />
|If '''none''' of the variables are known<br />
|None of the separators will display<br />
|-<br />
|If only one variable '''is''' known<br />
|Only that variable will print. No separators will print.<br />
|-<br />
|If only the spouse's name '''is not''' known<br />
|The first separator will not display<br />
|-<br />
|If only the marriage date '''is not''' known<br />
|The first separator does not display. We will be left with:<br />
Jane Doe&lt; - &gt;{ … }And only the divorce date needs to be known to print the second separator.<br />
|-<br />
|If only the divorce date '''is not''' known<br />
|the second separator will not display<br />
|}<br />
<br />
<br />
Separators can be inside format strings:<br />
<br />
$n(&lt;0&gt;T&lt; &gt;L&lt;, &gt;f&lt; &gt;s)<br />
<br />
Unlike groups, separators can not cross over/out of format strings. So the separator &lt;0&gt; will NEVER display. No matter what is on the left hand side of the variable.<br />
<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
{{-}}<br />
<br />
{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{languages}}<br />
<br />
[[Category:Documentation]]<br />
[[Category:Plugins]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Gramps_3.4_Wiki_Manual_-_Reports_-_part_2&diff=36915Gramps 3.4 Wiki Manual - Reports - part 22012-04-30T02:07:20Z<p>Ander882: /* Examples: */</p>
<hr />
<div>This section describes the substitution values that can be used in the different reports available in Gramps.<br />
<br />
{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{grampsmanualcopyright}}<br />
<br />
{{languages|Gramps_3.4_Wiki_Manual_-_Reports - part 2}}<br />
<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
= Substitution Values =<br />
<br />
Many of the graphical reports allow you to customize the information that is displayed on the reports. Variable substitution is the method that is used to substitute a particular symbol (key) for specific information about the person in the database.<br />
<br />
{|<br />
|-<br />
|Example: <br />
|Will show as: (the person is alive)<br />
|-<br />
|<pre>$n<br />
b. $b( at $B}<br />
-d. $d< at >$D</pre><br />
|<pre>Smith, Edwin Michael<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA<br />
</pre><br />
|}<br />
<br />
----<br />
{|<br />
|-<br />
|1<br />
|If you wish to conditionally print an entire line, start it with a '-'. Like the third line in the example above, the entire line will only display when one or more variables on the line display something. If you wish to start the line with a '-' use '\-' [[#Control Variables|Control Variables]].<br />
|-<br />
|2<br />
|A list of all available variables (The Substitution Keys) follows. If you wish to display names, date, or place information differently, you may use [[#Format Strings|Format Strings]] to accomplish this.<br />
|-<br />
|3<br />
|There are also [[#Control Variables|Control Variables]] to display special characters (like the dollar sign).<br />
|-<br />
|4<br />
|You can also use [[#Grouping|Grouping]] to optionally display information. Line 2 above, uses grouping to display ' at ' only when the birth place is known.<br />
|-<br />
|5<br />
|Along with [[#Events|Events]] you can print almost anything.<br />
|-<br />
|6<br />
|Finally, [[#Separators|Separators]], to make your life complete. Line 3 above, uses this to display ' at ' only when both the birth date and place is known.<br />
|-<br />
|}<br />
<br />
<br />
== The Substitution Keys ==<br />
<br />
{|<br />
|-<br />
| colspan="2"|'''Personal variables'''<br />
| colspan="2"|'''Marital variables'''<br />
|-<br />
|$n<br />
|Displays the person's name<br />
|$s<br />
|Displays the name of the person's spouse<br />
|-<br />
|$i<br />
|Displays the GRAMPS ID for the person.<br />
|$j<br />
|Displays the GRAMPS ID for the marriage.<br />
|-<br />
|$b<br />
|Displays the person's date of birth <br />
|$m<br />
|Displays the marriage date of the person and the spouse.<br />
|-<br />
|$B<br />
|Displays the person's place of birth <br />
|$M<br />
|Displays the place of the marriage of the person and the spouse.<br />
|-<br />
|$d<br />
|Displays the person's date of death <br />
|$v<br />
|Displays the divorce date of the person and the spouse.<br />
|-<br />
|$D<br />
|Displays the person's place of death <br />
|$V<br />
|Displays the place of the divorce of the person and the spouse.<br />
|-<br />
|$a<br />
|Displays an attribute about the person.<br />
see [[#Attributes|Attributes]] for more<br />
|$u<br />
|Displays an attribute about the marriage.<br />
see [[#Attributes|Attributes]] for more<br />
|-<br />
|$e<br />
|Displays event information about the person.<br />
See [[#Events|Events]] for more<br />
|$t<br />
|Displays an event information about the marriage.<br />
See [[#Events|Events]] for more<br />
|}<br />
<br />
All of the Marital variables are defined by the person's preferred spouse in Gramps. If the person has never been married, then these variables will not display anything.<br />
<br />
----<br />
=== Default displayed formats ===<br />
<br />
{|<br />
|-<br />
|$n $s<br />
|Names will be displayed as set in 'Name format:' on the Display tab in Gramps preferences<br />
|-<br />
|$B $D $M $V<br />
|Places will display the Place title by default<br />
|-<br />
|$b $d $m $v<br />
|Dates will be displayed as set in 'Date format:' on the Display tab in Gramps preferences<br />
|-<br />
|$e $t<br />
|Events will display the description by default<br />
|}<br />
<br />
<br />
=== Deprecated variables ===<br />
<br />
Some of the old variables were deprecated because [[#Format Strings|Format Strings]] have replaced them. So here is a list of those variables and how to achieve their results:<br />
<br />
{| {{prettytable}}<br />
|-<br />
!Old Variable<br />
!How to display it now<br />
!What is displayed<br />
|-<br />
|$f<br />
|$n<br />
|Name - as by Gramps name display under Preferences<br />
|-<br />
|$n<br />
|$n(g f)<br />
|Name - FirstName LastName<br />
|-<br />
|$N<br />
|$n(f, g)<br />
|Name - LastName, FirstName (note the explicit comma)<br />
|-<br />
|$nC<br />
|$n(g F)<br />
|Name - FirstName LastName in UPPER case<br />
|-<br />
|$NC<br />
|$n(F, g)<br />
|Name - LastName in UPPER case, FirstName<br />
|-<br />
|$by<br />
|$b(yyyy)<br />
|Date of birth, year only<br />
|-<br />
|$dy<br />
|$d(yyyy)<br />
|Date of death, year only<br />
|-<br />
|$my<br />
|$m(yyyy)<br />
|Date of preferred marriage, year only<br />
|-<br />
|$p<br />
|$s<br />
|Preferred spouse's name as by Gramps name display under Preferences<br />
|-<br />
|$s<br />
|$s(g f)<br />
|Preferred spouse's name - FirstName LastName<br />
|-<br />
|$S<br />
|$s(f, g)<br />
|Preferred spouse's name - LastName, FirstName<br />
|-<br />
|$sC<br />
|$s(g F)<br />
|Preferred spouse's name - FirstName LastName in UPPER case<br />
|-<br />
|$SC<br />
|$s(F, g)<br />
|Preferred spouse's name - LastName in UPPER case, FirstName<br />
|}<br />
<br />
== Format Strings ==<br />
<br />
Format strings are used to display names and dates differently than those assigned under Gramps Preferences. Here is the syntax for a format string:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''(format string)<br />
where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'nsijbmBMdvDVauet'<br />
<br />
A format string is any text, separators or format codes (defined below) to display information about the person.<br />
<br />
=== Formatting names ===<br />
<br />
For names ($n $s) you may use the following formatting codes to display the name differently.<br />
<br />
{|<br />
|-<br />
|t<br />
|Title<br />
|<br />
|f<br />
|Given name<br />
|-<br />
|x<br />
|Common name. Call name if existing, otherwise first first name<br />
|<br />
|c<br />
|Call name<br />
|-<br />
|n<br />
|Nick name<br />
|<br />
|s<br />
|Suffix<br />
|-<br />
|l<br />
|Surname<br />
|<br />
|g<br />
|Family nickname<br />
|}<br />
<br />
These codes can be uppercased to uppercase the result.<br />
<br />
{|<br />
|-<br />
|Example code<br />
|Displays<br />
|-<br />
|<pre>$n(L, f) ($n(c)), $n(L, f){ ($n(c))}<br />
$s(f l s)</pre><br />
|<pre>SMITH, Edwin Michael (), SMITH, Edwin Michael<br />
Janice Ann Adams</pre><br />
|}<br />
<br />
<br />
<blockquote>Note:<br />
If you want to print a character 'c' within the format string (or any one of the other format codes), you will need to first add a '&#92;' in front of it. See [[#Control Variables|Control Variables]] for more.</blockquote><br />
<br />
<blockquote>Note:<br />
the curly brackets { } are used to hide information. Here it is used around ' ($n(c))' to not display ' ()' if the person does not have a call name. See [[#Grouping|Grouping]] for more.</blockquote><br />
<br />
----<br />
<br />
=== Formatting Dates ===<br />
<br />
For all of the date variables ($b $d $m $v) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|yyyy<br />
|The year as a four digit number<br />
|<br />
|yyy<br />
|The year, with a minimum of three digits<br />
|-<br />
|yy<br />
|The year, from 00 to 99<br />
|<br />
|y<br />
|The year, from 0 to 99<br />
|-<br />
|mmmm<BR><br />
MMMM<br />
|The full name of the month<BR><br />
The full name IN CAPS<br />
|<br />
|mmm<BR><br />
MMM<br />
|The abbreviated name of the month<BR><br />
The abbreviated name IN CAPS<br />
|-<br />
|mm<br />
|The month, from 00 to 12<br />
|<br />
|m<br />
|The month, from 0 to 12<br />
|-<br />
|dd<br />
|The day, from 00 to 31<br />
|<br />
|d<br />
|The day, from 0 to 31<br />
|-<br />
|o<br />
|The date type (modifier)<br />
|<br />
|<br />
|<br />
|}<br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$b(mmm-dd yy)<br />
$m(yyyy/mmm/d)<br />
$b(mmm-dd yy)</pre><br />
|<pre>May-24 61<br />
1995/May/27<br />
Jun-04 85</pre><br />
|}<br />
<br />
{{man note| For date types (modifier) |Only "Before", "After", and "About" are supported at this time. all others will not display anything.<BR><br />
And for date span and date ranges, only the starting (first) date is displayed.}}<br />
<br />
----<br />
<br />
=== Formatting Places ===<br />
<br />
For all of the place variables ($B $D $M $V) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|e<br />
|Street<br />
|<br />
|l<br />
|Locality<br />
|-<br />
|c<br />
|City<br />
|<br />
|u<br />
|County<br />
|-<br />
|s<br />
|State<br />
|<br />
|p<br />
|Postal Code<br />
|-<br />
|n<br />
|Country<br />
|<br />
|t<br />
|Title<br />
|-<br />
|x<br />
|Longitude<br />
|<br />
|y<br />
|Latitude<br />
|}<br />
These codes can be uppercased to uppercase the result. <br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
----<br />
<br />
=== Rules for format strings. ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Anything will print inside a format string<br />
|-<br />
|1a<br />
|you will have to use [[#Control Variables|Control Variables]] to display things like ')' and format codes<br />
|-<br />
|2<br />
|Separators can be within format strings.<br />
|-<br />
|3<br />
|At least ONE format code has to display something for the ENTIRE format string to display<br />
|}<br />
<br />
----<br />
<br />
=== Examples ===<br />
<br />
{|<br />
|-<br />
|code<br />
|gives<br />
|-<br />
|<pre>$n(f l)<br />
b. $b {at $B<br />
{d. $d $D</pre><br />
|<pre>Edwin Michael Smith<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA</pre>The person is still alive (or has no information present) so the line was removed.<br />
|}<br />
<br />
<br />
<br />
== Control Variables ==<br />
<br />
Control variables allow you to print characters that are special to Substitution values within a display.<br />
<br />
For example the dollar character '$' is used to note the start of a variable. If you wish to print a dollar character you would use a control character like '&#92;$'<br />
<br />
Control Variables<br />
<br />
{|<br />
|-<br />
|&#92;$<br />
|Displays a single '$'<br />
|<br />
|&#92;&#92;<br />
|Displays a single '&#92;'<br />
|-<br />
|&#92;(<br />
|Displays a single '('<br />
|<br />
|&#92;)<br />
|Displays a single ')'<br />
|-<br />
|&#92;{<br />
|Displays a single '{'<br />
|<br />
|&#92;}<br />
|Displays a single '}'<br />
|-<br />
|&#92;<<br />
|Displays a single '<'<br />
|<br />
|&#92;><br />
|Displays a single '>'<br />
|}<br />
<br />
Basically anything that comes after a '&#92;' will be printed.<br />
<br />
----<br />
Note:<br />
When you are inside a format string, you may need to use this to display a character that would normally be a format code. <br />
<br />
{|<br />
|-<br />
|Example:<br />
|would give<br />
|-<br />
|<pre>$b(m hi mom)<br />
$b(m hi \mo\m)</pre><br />
|<pre>5 hi 5o5<br />
5 hi mom</pre><br />
|}<br />
<br />
as this person was born on the fifth month.<br />
<br />
== Grouping ==<br />
<br />
There are instances where you do not want certain text to be displayed. Take the example:<br />
<br />
{|<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died on $d at $D</pre><br />
|<pre>died on 1975-06-26 at </pre> <br />
|<pre>died on at Reno, Washoe Co., NV</pre><br />
|-<br />
| colspan="3"|Neither of these are very acceptable.<br />
|-<br />
| colspan="3"|But with groups (denoted by {}), you can optionally print information if a variable within contains information.<br />
|-<br />
| colspan="3"|For example:<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died {on $d }{at $D}</pre><br />
|<pre>died on 1975-06-26</pre><br />
|<pre>died at Reno, Washoe Co., NV</pre><br />
|}<br />
<br />
which is what we want.<br />
<br />
----<br />
=== Rules for groups ===<br />
<br />
A group will only display if there is at least one variable that displays something. So if a group only has text and/or variables where the information is not known, the entire group will not print.<br />
<br />
Groups can also be nested. If this happens (like below), the outer group will only display if there is at least one variable that displays something within the outer group or any of the sub groups.<br />
<br />
----<br />
<br />
=== Examples: ===<br />
<br />
This will hide '(' and ')' if the divorce information is not known (or still married).<br />
<br />
<pre>m. $m $M {- ($v(yyyy))</pre><br />
<br />
<br />
Only display some spouse information if married or remove the entire line if never married:<br />
<pre>-$s $m(yyyy) {- $v(\(yyyy\))}</pre><br />
<br />
== Attributes ==<br />
<br />
Attributes do not have a format string. Instead the attribute name is placed inside []. Here is the syntax for an attribute:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name] where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'au'<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$a[Profession]<br />
$a[Social Security Number]<br />
$a[Total \$ bequeathed]</pre><br />
|<pre>Programmer<br />
7A3-29-F1C6<br />
3.00USD</pre><br />
|}<br />
<br />
<br />
----<br />
== Events ==<br />
<br />
Events have the same starting structure as attributes, $e or $t and the event name in [] but events have an extra format string after the name to display the description, date, place, id, and attributes associated with it. Each of these items can be displayed with a , a 'n', 'd', 'D', 'i', and 'a' respectively in the format string. Here is the syntax for an event:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name](format string) where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'et'<br />
<br />
=== Event format strings ===<br />
<br />
The Event format string is used to display information about the event. Here are the format codes to display parts of the event:<br />
<br />
{|<br />
|-<br />
|n<br />
|Description<br />
|<br />
|i<br />
|Event ID<br />
|-<br />
|d<br />
|Event Date&#42;<br />
|<br />
|D<br />
|Event Place&#42;<br />
|-<br />
|a<br />
|An attributes for the event&#42;&#42;<br />
|<br />
|<br />
|<br />
|}<br />
<br />
&#42;These variables can themselves have format strings. Date and a place can be formatted with format string as defined in [[#Format strings|Format strings]].<br />
<br />
&#42;&#42;Attribute needs to have the attribute name in [] and are formatted as above.<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$e[First Communion](d(yyyy-mm-d))<br />
$e[Bar Mitzvah](n&lt; at &gt; D)<br />
$e[Birth](d(yyyy mm/dd) D)</pre><br />
|<pre>2009-11-6<br />
Jerry's Bar Mitzah at Opas house<br />
2007 05/23 Grandmothers house</pre><br />
|}<br />
<br />
<br />
And:<br />
<br />
{|<br />
|-<br />
|<pre>$b(yyyy-Mmm-dd)<br />
$M</pre><br />
|is the same as<br />
|<pre>$e[Birth](d(yyyy-Mmm-dd))<br />
$t[Marriage](D)</pre><br />
|}<br />
<br />
<br />
----<br />
<br />
=== Notes for attributes and events: ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Attribute and event names are mandatory. '$a' or '$a[]' will not display anything.<br />
|-<br />
|2<br />
|Attributes and event names may have special characters within them. Most notably ']' and ')'. If this is the case, you will need to use [[#Control Variables|Control Variables]]<br />
|}<br />
<br />
== Separators ==<br />
<br />
Separators are special 'text only' groups inside '&lt;' and '&gt;' that conditionally display a separator (like ', ' or ' - ') between two variables, format codes or text.<br />
<br />
Separators are displayed conditionally depending on these rules:<br />
<br />
# A variable that does '''not''' display anything will remove itself and a separator that is to the left of it from the display line only.<br />
# If there is not a separator to the left, the same variable will remove itself and a separator that is to the right of it from the displayed line. <br />
# If there are two separators together, the left one will be removed from the display line and the right is kept.<br />
# Separators at the start or end of the display line (or format strings) are removed<br />
<br />
=== Example: ===<br />
<br />
$s(f l)&lt;, &gt;$m(yyyy)&lt; @ &gt;$M&lt; - &gt;$v(&#92;(yyyy&#92;))<br />
<br />
Here are some things that may happen:<br />
<br />
{|<br />
|-<br />
|If '''none''' of the variables are known<br />
|None of the separators will display<br />
|-<br />
|If only one variable '''is''' known<br />
|Only that variable will print. No separators will print.<br />
|-<br />
|If only the spouse's name '''is not''' known<br />
|The first separator will not display<br />
|-<br />
|If only the marriage date '''is not''' known<br />
|The first separator does not display. We will be left with:<br />
Jane Doe&lt; - &gt;{ … }And only the divorce date needs to be known to print the second separator.<br />
|-<br />
|If only the divorce date '''is not''' known<br />
|the second separator will not display<br />
|}<br />
<br />
<br />
Separators can be inside format strings:<br />
<br />
$n(&lt;0&gt;T&lt; &gt;L&lt;, &gt;f&lt; &gt;s)<br />
<br />
Unlike groups, separators can not cross over/out of format strings. So the separator &lt;0&gt; will NEVER display. No matter what is on the left hand side of the variable.<br />
<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
{{-}}<br />
<br />
{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{languages}}<br />
<br />
[[Category:Documentation]]<br />
[[Category:Plugins]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Gramps_3.4_Wiki_Manual_-_Reports_-_part_2&diff=36914Gramps 3.4 Wiki Manual - Reports - part 22012-04-30T02:02:23Z<p>Ander882: /* Rules for groups */</p>
<hr />
<div>This section describes the substitution values that can be used in the different reports available in Gramps.<br />
<br />
{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{grampsmanualcopyright}}<br />
<br />
{{languages|Gramps_3.4_Wiki_Manual_-_Reports - part 2}}<br />
<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
= Substitution Values =<br />
<br />
Many of the graphical reports allow you to customize the information that is displayed on the reports. Variable substitution is the method that is used to substitute a particular symbol (key) for specific information about the person in the database.<br />
<br />
{|<br />
|-<br />
|Example: <br />
|Will show as: (the person is alive)<br />
|-<br />
|<pre>$n<br />
b. $b( at $B}<br />
-d. $d< at >$D</pre><br />
|<pre>Smith, Edwin Michael<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA<br />
</pre><br />
|}<br />
<br />
----<br />
{|<br />
|-<br />
|1<br />
|If you wish to conditionally print an entire line, start it with a '-'. Like the third line in the example above, the entire line will only display when one or more variables on the line display something. If you wish to start the line with a '-' use '\-' [[#Control Variables|Control Variables]].<br />
|-<br />
|2<br />
|A list of all available variables (The Substitution Keys) follows. If you wish to display names, date, or place information differently, you may use [[#Format Strings|Format Strings]] to accomplish this.<br />
|-<br />
|3<br />
|There are also [[#Control Variables|Control Variables]] to display special characters (like the dollar sign).<br />
|-<br />
|4<br />
|You can also use [[#Grouping|Grouping]] to optionally display information. Line 2 above, uses grouping to display ' at ' only when the birth place is known.<br />
|-<br />
|5<br />
|Along with [[#Events|Events]] you can print almost anything.<br />
|-<br />
|6<br />
|Finally, [[#Separators|Separators]], to make your life complete. Line 3 above, uses this to display ' at ' only when both the birth date and place is known.<br />
|-<br />
|}<br />
<br />
<br />
== The Substitution Keys ==<br />
<br />
{|<br />
|-<br />
| colspan="2"|'''Personal variables'''<br />
| colspan="2"|'''Marital variables'''<br />
|-<br />
|$n<br />
|Displays the person's name<br />
|$s<br />
|Displays the name of the person's spouse<br />
|-<br />
|$i<br />
|Displays the GRAMPS ID for the person.<br />
|$j<br />
|Displays the GRAMPS ID for the marriage.<br />
|-<br />
|$b<br />
|Displays the person's date of birth <br />
|$m<br />
|Displays the marriage date of the person and the spouse.<br />
|-<br />
|$B<br />
|Displays the person's place of birth <br />
|$M<br />
|Displays the place of the marriage of the person and the spouse.<br />
|-<br />
|$d<br />
|Displays the person's date of death <br />
|$v<br />
|Displays the divorce date of the person and the spouse.<br />
|-<br />
|$D<br />
|Displays the person's place of death <br />
|$V<br />
|Displays the place of the divorce of the person and the spouse.<br />
|-<br />
|$a<br />
|Displays an attribute about the person.<br />
see [[#Attributes|Attributes]] for more<br />
|$u<br />
|Displays an attribute about the marriage.<br />
see [[#Attributes|Attributes]] for more<br />
|-<br />
|$e<br />
|Displays event information about the person.<br />
See [[#Events|Events]] for more<br />
|$t<br />
|Displays an event information about the marriage.<br />
See [[#Events|Events]] for more<br />
|}<br />
<br />
All of the Marital variables are defined by the person's preferred spouse in Gramps. If the person has never been married, then these variables will not display anything.<br />
<br />
----<br />
=== Default displayed formats ===<br />
<br />
{|<br />
|-<br />
|$n $s<br />
|Names will be displayed as set in 'Name format:' on the Display tab in Gramps preferences<br />
|-<br />
|$B $D $M $V<br />
|Places will display the Place title by default<br />
|-<br />
|$b $d $m $v<br />
|Dates will be displayed as set in 'Date format:' on the Display tab in Gramps preferences<br />
|-<br />
|$e $t<br />
|Events will display the description by default<br />
|}<br />
<br />
<br />
=== Deprecated variables ===<br />
<br />
Some of the old variables were deprecated because [[#Format Strings|Format Strings]] have replaced them. So here is a list of those variables and how to achieve their results:<br />
<br />
{| {{prettytable}}<br />
|-<br />
!Old Variable<br />
!How to display it now<br />
!What is displayed<br />
|-<br />
|$f<br />
|$n<br />
|Name - as by Gramps name display under Preferences<br />
|-<br />
|$n<br />
|$n(g f)<br />
|Name - FirstName LastName<br />
|-<br />
|$N<br />
|$n(f, g)<br />
|Name - LastName, FirstName (note the explicit comma)<br />
|-<br />
|$nC<br />
|$n(g F)<br />
|Name - FirstName LastName in UPPER case<br />
|-<br />
|$NC<br />
|$n(F, g)<br />
|Name - LastName in UPPER case, FirstName<br />
|-<br />
|$by<br />
|$b(yyyy)<br />
|Date of birth, year only<br />
|-<br />
|$dy<br />
|$d(yyyy)<br />
|Date of death, year only<br />
|-<br />
|$my<br />
|$m(yyyy)<br />
|Date of preferred marriage, year only<br />
|-<br />
|$p<br />
|$s<br />
|Preferred spouse's name as by Gramps name display under Preferences<br />
|-<br />
|$s<br />
|$s(g f)<br />
|Preferred spouse's name - FirstName LastName<br />
|-<br />
|$S<br />
|$s(f, g)<br />
|Preferred spouse's name - LastName, FirstName<br />
|-<br />
|$sC<br />
|$s(g F)<br />
|Preferred spouse's name - FirstName LastName in UPPER case<br />
|-<br />
|$SC<br />
|$s(F, g)<br />
|Preferred spouse's name - LastName in UPPER case, FirstName<br />
|}<br />
<br />
== Format Strings ==<br />
<br />
Format strings are used to display names and dates differently than those assigned under Gramps Preferences. Here is the syntax for a format string:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''(format string)<br />
where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'nsijbmBMdvDVauet'<br />
<br />
A format string is any text, separators or format codes (defined below) to display information about the person.<br />
<br />
=== Formatting names ===<br />
<br />
For names ($n $s) you may use the following formatting codes to display the name differently.<br />
<br />
{|<br />
|-<br />
|t<br />
|Title<br />
|<br />
|f<br />
|Given name<br />
|-<br />
|x<br />
|Common name. Call name if existing, otherwise first first name<br />
|<br />
|c<br />
|Call name<br />
|-<br />
|n<br />
|Nick name<br />
|<br />
|s<br />
|Suffix<br />
|-<br />
|l<br />
|Surname<br />
|<br />
|g<br />
|Family nickname<br />
|}<br />
<br />
These codes can be uppercased to uppercase the result.<br />
<br />
{|<br />
|-<br />
|Example code<br />
|Displays<br />
|-<br />
|<pre>$n(L, f) ($n(c)), $n(L, f){ ($n(c))}<br />
$s(f l s)</pre><br />
|<pre>SMITH, Edwin Michael (), SMITH, Edwin Michael<br />
Janice Ann Adams</pre><br />
|}<br />
<br />
<br />
<blockquote>Note:<br />
If you want to print a character 'c' within the format string (or any one of the other format codes), you will need to first add a '&#92;' in front of it. See [[#Control Variables|Control Variables]] for more.</blockquote><br />
<br />
<blockquote>Note:<br />
the curly brackets { } are used to hide information. Here it is used around ' ($n(c))' to not display ' ()' if the person does not have a call name. See [[#Grouping|Grouping]] for more.</blockquote><br />
<br />
----<br />
<br />
=== Formatting Dates ===<br />
<br />
For all of the date variables ($b $d $m $v) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|yyyy<br />
|The year as a four digit number<br />
|<br />
|yyy<br />
|The year, with a minimum of three digits<br />
|-<br />
|yy<br />
|The year, from 00 to 99<br />
|<br />
|y<br />
|The year, from 0 to 99<br />
|-<br />
|mmmm<BR><br />
MMMM<br />
|The full name of the month<BR><br />
The full name IN CAPS<br />
|<br />
|mmm<BR><br />
MMM<br />
|The abbreviated name of the month<BR><br />
The abbreviated name IN CAPS<br />
|-<br />
|mm<br />
|The month, from 00 to 12<br />
|<br />
|m<br />
|The month, from 0 to 12<br />
|-<br />
|dd<br />
|The day, from 00 to 31<br />
|<br />
|d<br />
|The day, from 0 to 31<br />
|-<br />
|o<br />
|The date type (modifier)<br />
|<br />
|<br />
|<br />
|}<br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$b(mmm-dd yy)<br />
$m(yyyy/mmm/d)<br />
$b(mmm-dd yy)</pre><br />
|<pre>May-24 61<br />
1995/May/27<br />
Jun-04 85</pre><br />
|}<br />
<br />
{{man note| For date types (modifier) |Only "Before", "After", and "About" are supported at this time. all others will not display anything.<BR><br />
And for date span and date ranges, only the starting (first) date is displayed.}}<br />
<br />
----<br />
<br />
=== Formatting Places ===<br />
<br />
For all of the place variables ($B $D $M $V) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|e<br />
|Street<br />
|<br />
|l<br />
|Locality<br />
|-<br />
|c<br />
|City<br />
|<br />
|u<br />
|County<br />
|-<br />
|s<br />
|State<br />
|<br />
|p<br />
|Postal Code<br />
|-<br />
|n<br />
|Country<br />
|<br />
|t<br />
|Title<br />
|-<br />
|x<br />
|Longitude<br />
|<br />
|y<br />
|Latitude<br />
|}<br />
These codes can be uppercased to uppercase the result. <br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
----<br />
<br />
=== Rules for format strings. ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Anything will print inside a format string<br />
|-<br />
|1a<br />
|you will have to use [[#Control Variables|Control Variables]] to display things like ')' and format codes<br />
|-<br />
|2<br />
|Separators can be within format strings.<br />
|-<br />
|3<br />
|At least ONE format code has to display something for the ENTIRE format string to display<br />
|}<br />
<br />
----<br />
<br />
=== Examples ===<br />
<br />
{|<br />
|-<br />
|code<br />
|gives<br />
|-<br />
|<pre>$n(f l)<br />
b. $b {at $B<br />
{d. $d $D</pre><br />
|<pre>Edwin Michael Smith<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA</pre>The person is still alive (or has no information present) so the line was removed.<br />
|}<br />
<br />
<br />
<br />
== Control Variables ==<br />
<br />
Control variables allow you to print characters that are special to Substitution values within a display.<br />
<br />
For example the dollar character '$' is used to note the start of a variable. If you wish to print a dollar character you would use a control character like '&#92;$'<br />
<br />
Control Variables<br />
<br />
{|<br />
|-<br />
|&#92;$<br />
|Displays a single '$'<br />
|<br />
|&#92;&#92;<br />
|Displays a single '&#92;'<br />
|-<br />
|&#92;(<br />
|Displays a single '('<br />
|<br />
|&#92;)<br />
|Displays a single ')'<br />
|-<br />
|&#92;{<br />
|Displays a single '{'<br />
|<br />
|&#92;}<br />
|Displays a single '}'<br />
|-<br />
|&#92;<<br />
|Displays a single '<'<br />
|<br />
|&#92;><br />
|Displays a single '>'<br />
|}<br />
<br />
Basically anything that comes after a '&#92;' will be printed.<br />
<br />
----<br />
Note:<br />
When you are inside a format string, you may need to use this to display a character that would normally be a format code. <br />
<br />
{|<br />
|-<br />
|Example:<br />
|would give<br />
|-<br />
|<pre>$b(m hi mom)<br />
$b(m hi \mo\m)</pre><br />
|<pre>5 hi 5o5<br />
5 hi mom</pre><br />
|}<br />
<br />
as this person was born on the fifth month.<br />
<br />
== Grouping ==<br />
<br />
There are instances where you do not want certain text to be displayed. Take the example:<br />
<br />
{|<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died on $d at $D</pre><br />
|<pre>died on 1975-06-26 at </pre> <br />
|<pre>died on at Reno, Washoe Co., NV</pre><br />
|-<br />
| colspan="3"|Neither of these are very acceptable.<br />
|-<br />
| colspan="3"|But with groups (denoted by {}), you can optionally print information if a variable within contains information.<br />
|-<br />
| colspan="3"|For example:<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died {on $d }{at $D}</pre><br />
|<pre>died on 1975-06-26</pre><br />
|<pre>died at Reno, Washoe Co., NV</pre><br />
|}<br />
<br />
which is what we want.<br />
<br />
----<br />
=== Rules for groups ===<br />
<br />
A group will only display if there is at least one variable that displays something. So if a group only has text and/or variables where the information is not known, the entire group will not print.<br />
<br />
Groups can also be nested. If this happens (like below), the outer group will only display if there is at least one variable that displays something within the outer group or any of the sub groups.<br />
<br />
----<br />
<br />
=== Examples: ===<br />
<br />
This will hide '(' and ')' if the divorce information is not known (or still married).<br />
<br />
<pre>m. $m $M {- ($v(yyyy))</pre><br />
<br />
<br />
Only display some spouse information if married or remove the entire line if never married:<br />
<pre>{$s $m(yyyy) {- $v(\(yyyy\))}}</pre><br />
<br />
<br />
<br />
== Attributes ==<br />
<br />
Attributes do not have a format string. Instead the attribute name is placed inside []. Here is the syntax for an attribute:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name] where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'au'<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$a[Profession]<br />
$a[Social Security Number]<br />
$a[Total \$ bequeathed]</pre><br />
|<pre>Programmer<br />
7A3-29-F1C6<br />
3.00USD</pre><br />
|}<br />
<br />
<br />
----<br />
== Events ==<br />
<br />
Events have the same starting structure as attributes, $e or $t and the event name in [] but events have an extra format string after the name to display the description, date, place, id, and attributes associated with it. Each of these items can be displayed with a , a 'n', 'd', 'D', 'i', and 'a' respectively in the format string. Here is the syntax for an event:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name](format string) where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'et'<br />
<br />
=== Event format strings ===<br />
<br />
The Event format string is used to display information about the event. Here are the format codes to display parts of the event:<br />
<br />
{|<br />
|-<br />
|n<br />
|Description<br />
|<br />
|i<br />
|Event ID<br />
|-<br />
|d<br />
|Event Date&#42;<br />
|<br />
|D<br />
|Event Place&#42;<br />
|-<br />
|a<br />
|An attributes for the event&#42;&#42;<br />
|<br />
|<br />
|<br />
|}<br />
<br />
&#42;These variables can themselves have format strings. Date and a place can be formatted with format string as defined in [[#Format strings|Format strings]].<br />
<br />
&#42;&#42;Attribute needs to have the attribute name in [] and are formatted as above.<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$e[First Communion](d(yyyy-mm-d))<br />
$e[Bar Mitzvah](n&lt; at &gt; D)<br />
$e[Birth](d(yyyy mm/dd) D)</pre><br />
|<pre>2009-11-6<br />
Jerry's Bar Mitzah at Opas house<br />
2007 05/23 Grandmothers house</pre><br />
|}<br />
<br />
<br />
And:<br />
<br />
{|<br />
|-<br />
|<pre>$b(yyyy-Mmm-dd)<br />
$M</pre><br />
|is the same as<br />
|<pre>$e[Birth](d(yyyy-Mmm-dd))<br />
$t[Marriage](D)</pre><br />
|}<br />
<br />
<br />
----<br />
<br />
=== Notes for attributes and events: ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Attribute and event names are mandatory. '$a' or '$a[]' will not display anything.<br />
|-<br />
|2<br />
|Attributes and event names may have special characters within them. Most notably ']' and ')'. If this is the case, you will need to use [[#Control Variables|Control Variables]]<br />
|}<br />
<br />
== Separators ==<br />
<br />
Separators are special 'text only' groups inside '&lt;' and '&gt;' that conditionally display a separator (like ', ' or ' - ') between two variables, format codes or text.<br />
<br />
Separators are displayed conditionally depending on these rules:<br />
<br />
# A variable that does '''not''' display anything will remove itself and a separator that is to the left of it from the display line only.<br />
# If there is not a separator to the left, the same variable will remove itself and a separator that is to the right of it from the displayed line. <br />
# If there are two separators together, the left one will be removed from the display line and the right is kept.<br />
# Separators at the start or end of the display line (or format strings) are removed<br />
<br />
=== Example: ===<br />
<br />
$s(f l)&lt;, &gt;$m(yyyy)&lt; @ &gt;$M&lt; - &gt;$v(&#92;(yyyy&#92;))<br />
<br />
Here are some things that may happen:<br />
<br />
{|<br />
|-<br />
|If '''none''' of the variables are known<br />
|None of the separators will display<br />
|-<br />
|If only one variable '''is''' known<br />
|Only that variable will print. No separators will print.<br />
|-<br />
|If only the spouse's name '''is not''' known<br />
|The first separator will not display<br />
|-<br />
|If only the marriage date '''is not''' known<br />
|The first separator does not display. We will be left with:<br />
Jane Doe&lt; - &gt;{ … }And only the divorce date needs to be known to print the second separator.<br />
|-<br />
|If only the divorce date '''is not''' known<br />
|the second separator will not display<br />
|}<br />
<br />
<br />
Separators can be inside format strings:<br />
<br />
$n(&lt;0&gt;T&lt; &gt;L&lt;, &gt;f&lt; &gt;s)<br />
<br />
Unlike groups, separators can not cross over/out of format strings. So the separator &lt;0&gt; will NEVER display. No matter what is on the left hand side of the variable.<br />
<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
{{-}}<br />
<br />
{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{languages}}<br />
<br />
[[Category:Documentation]]<br />
[[Category:Plugins]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Gramps_3.4_Wiki_Manual_-_Reports_-_part_2&diff=36913Gramps 3.4 Wiki Manual - Reports - part 22012-04-30T01:53:08Z<p>Ander882: /* Substitution Values */</p>
<hr />
<div>This section describes the substitution values that can be used in the different reports available in Gramps.<br />
<br />
{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{grampsmanualcopyright}}<br />
<br />
{{languages|Gramps_3.4_Wiki_Manual_-_Reports - part 2}}<br />
<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
= Substitution Values =<br />
<br />
Many of the graphical reports allow you to customize the information that is displayed on the reports. Variable substitution is the method that is used to substitute a particular symbol (key) for specific information about the person in the database.<br />
<br />
{|<br />
|-<br />
|Example: <br />
|Will show as: (the person is alive)<br />
|-<br />
|<pre>$n<br />
b. $b( at $B}<br />
-d. $d< at >$D</pre><br />
|<pre>Smith, Edwin Michael<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA<br />
</pre><br />
|}<br />
<br />
----<br />
{|<br />
|-<br />
|1<br />
|If you wish to conditionally print an entire line, start it with a '-'. Like the third line in the example above, the entire line will only display when one or more variables on the line display something. If you wish to start the line with a '-' use '\-' [[#Control Variables|Control Variables]].<br />
|-<br />
|2<br />
|A list of all available variables (The Substitution Keys) follows. If you wish to display names, date, or place information differently, you may use [[#Format Strings|Format Strings]] to accomplish this.<br />
|-<br />
|3<br />
|There are also [[#Control Variables|Control Variables]] to display special characters (like the dollar sign).<br />
|-<br />
|4<br />
|You can also use [[#Grouping|Grouping]] to optionally display information. Line 2 above, uses grouping to display ' at ' only when the birth place is known.<br />
|-<br />
|5<br />
|Along with [[#Events|Events]] you can print almost anything.<br />
|-<br />
|6<br />
|Finally, [[#Separators|Separators]], to make your life complete. Line 3 above, uses this to display ' at ' only when both the birth date and place is known.<br />
|-<br />
|}<br />
<br />
<br />
== The Substitution Keys ==<br />
<br />
{|<br />
|-<br />
| colspan="2"|'''Personal variables'''<br />
| colspan="2"|'''Marital variables'''<br />
|-<br />
|$n<br />
|Displays the person's name<br />
|$s<br />
|Displays the name of the person's spouse<br />
|-<br />
|$i<br />
|Displays the GRAMPS ID for the person.<br />
|$j<br />
|Displays the GRAMPS ID for the marriage.<br />
|-<br />
|$b<br />
|Displays the person's date of birth <br />
|$m<br />
|Displays the marriage date of the person and the spouse.<br />
|-<br />
|$B<br />
|Displays the person's place of birth <br />
|$M<br />
|Displays the place of the marriage of the person and the spouse.<br />
|-<br />
|$d<br />
|Displays the person's date of death <br />
|$v<br />
|Displays the divorce date of the person and the spouse.<br />
|-<br />
|$D<br />
|Displays the person's place of death <br />
|$V<br />
|Displays the place of the divorce of the person and the spouse.<br />
|-<br />
|$a<br />
|Displays an attribute about the person.<br />
see [[#Attributes|Attributes]] for more<br />
|$u<br />
|Displays an attribute about the marriage.<br />
see [[#Attributes|Attributes]] for more<br />
|-<br />
|$e<br />
|Displays event information about the person.<br />
See [[#Events|Events]] for more<br />
|$t<br />
|Displays an event information about the marriage.<br />
See [[#Events|Events]] for more<br />
|}<br />
<br />
All of the Marital variables are defined by the person's preferred spouse in Gramps. If the person has never been married, then these variables will not display anything.<br />
<br />
----<br />
=== Default displayed formats ===<br />
<br />
{|<br />
|-<br />
|$n $s<br />
|Names will be displayed as set in 'Name format:' on the Display tab in Gramps preferences<br />
|-<br />
|$B $D $M $V<br />
|Places will display the Place title by default<br />
|-<br />
|$b $d $m $v<br />
|Dates will be displayed as set in 'Date format:' on the Display tab in Gramps preferences<br />
|-<br />
|$e $t<br />
|Events will display the description by default<br />
|}<br />
<br />
<br />
=== Deprecated variables ===<br />
<br />
Some of the old variables were deprecated because [[#Format Strings|Format Strings]] have replaced them. So here is a list of those variables and how to achieve their results:<br />
<br />
{| {{prettytable}}<br />
|-<br />
!Old Variable<br />
!How to display it now<br />
!What is displayed<br />
|-<br />
|$f<br />
|$n<br />
|Name - as by Gramps name display under Preferences<br />
|-<br />
|$n<br />
|$n(g f)<br />
|Name - FirstName LastName<br />
|-<br />
|$N<br />
|$n(f, g)<br />
|Name - LastName, FirstName (note the explicit comma)<br />
|-<br />
|$nC<br />
|$n(g F)<br />
|Name - FirstName LastName in UPPER case<br />
|-<br />
|$NC<br />
|$n(F, g)<br />
|Name - LastName in UPPER case, FirstName<br />
|-<br />
|$by<br />
|$b(yyyy)<br />
|Date of birth, year only<br />
|-<br />
|$dy<br />
|$d(yyyy)<br />
|Date of death, year only<br />
|-<br />
|$my<br />
|$m(yyyy)<br />
|Date of preferred marriage, year only<br />
|-<br />
|$p<br />
|$s<br />
|Preferred spouse's name as by Gramps name display under Preferences<br />
|-<br />
|$s<br />
|$s(g f)<br />
|Preferred spouse's name - FirstName LastName<br />
|-<br />
|$S<br />
|$s(f, g)<br />
|Preferred spouse's name - LastName, FirstName<br />
|-<br />
|$sC<br />
|$s(g F)<br />
|Preferred spouse's name - FirstName LastName in UPPER case<br />
|-<br />
|$SC<br />
|$s(F, g)<br />
|Preferred spouse's name - LastName in UPPER case, FirstName<br />
|}<br />
<br />
== Format Strings ==<br />
<br />
Format strings are used to display names and dates differently than those assigned under Gramps Preferences. Here is the syntax for a format string:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''(format string)<br />
where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'nsijbmBMdvDVauet'<br />
<br />
A format string is any text, separators or format codes (defined below) to display information about the person.<br />
<br />
=== Formatting names ===<br />
<br />
For names ($n $s) you may use the following formatting codes to display the name differently.<br />
<br />
{|<br />
|-<br />
|t<br />
|Title<br />
|<br />
|f<br />
|Given name<br />
|-<br />
|x<br />
|Common name. Call name if existing, otherwise first first name<br />
|<br />
|c<br />
|Call name<br />
|-<br />
|n<br />
|Nick name<br />
|<br />
|s<br />
|Suffix<br />
|-<br />
|l<br />
|Surname<br />
|<br />
|g<br />
|Family nickname<br />
|}<br />
<br />
These codes can be uppercased to uppercase the result.<br />
<br />
{|<br />
|-<br />
|Example code<br />
|Displays<br />
|-<br />
|<pre>$n(L, f) ($n(c)), $n(L, f){ ($n(c))}<br />
$s(f l s)</pre><br />
|<pre>SMITH, Edwin Michael (), SMITH, Edwin Michael<br />
Janice Ann Adams</pre><br />
|}<br />
<br />
<br />
<blockquote>Note:<br />
If you want to print a character 'c' within the format string (or any one of the other format codes), you will need to first add a '&#92;' in front of it. See [[#Control Variables|Control Variables]] for more.</blockquote><br />
<br />
<blockquote>Note:<br />
the curly brackets { } are used to hide information. Here it is used around ' ($n(c))' to not display ' ()' if the person does not have a call name. See [[#Grouping|Grouping]] for more.</blockquote><br />
<br />
----<br />
<br />
=== Formatting Dates ===<br />
<br />
For all of the date variables ($b $d $m $v) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|yyyy<br />
|The year as a four digit number<br />
|<br />
|yyy<br />
|The year, with a minimum of three digits<br />
|-<br />
|yy<br />
|The year, from 00 to 99<br />
|<br />
|y<br />
|The year, from 0 to 99<br />
|-<br />
|mmmm<BR><br />
MMMM<br />
|The full name of the month<BR><br />
The full name IN CAPS<br />
|<br />
|mmm<BR><br />
MMM<br />
|The abbreviated name of the month<BR><br />
The abbreviated name IN CAPS<br />
|-<br />
|mm<br />
|The month, from 00 to 12<br />
|<br />
|m<br />
|The month, from 0 to 12<br />
|-<br />
|dd<br />
|The day, from 00 to 31<br />
|<br />
|d<br />
|The day, from 0 to 31<br />
|-<br />
|o<br />
|The date type (modifier)<br />
|<br />
|<br />
|<br />
|}<br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$b(mmm-dd yy)<br />
$m(yyyy/mmm/d)<br />
$b(mmm-dd yy)</pre><br />
|<pre>May-24 61<br />
1995/May/27<br />
Jun-04 85</pre><br />
|}<br />
<br />
{{man note| For date types (modifier) |Only "Before", "After", and "About" are supported at this time. all others will not display anything.<BR><br />
And for date span and date ranges, only the starting (first) date is displayed.}}<br />
<br />
----<br />
<br />
=== Formatting Places ===<br />
<br />
For all of the place variables ($B $D $M $V) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|e<br />
|Street<br />
|<br />
|l<br />
|Locality<br />
|-<br />
|c<br />
|City<br />
|<br />
|u<br />
|County<br />
|-<br />
|s<br />
|State<br />
|<br />
|p<br />
|Postal Code<br />
|-<br />
|n<br />
|Country<br />
|<br />
|t<br />
|Title<br />
|-<br />
|x<br />
|Longitude<br />
|<br />
|y<br />
|Latitude<br />
|}<br />
These codes can be uppercased to uppercase the result. <br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
----<br />
<br />
=== Rules for format strings. ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Anything will print inside a format string<br />
|-<br />
|1a<br />
|you will have to use [[#Control Variables|Control Variables]] to display things like ')' and format codes<br />
|-<br />
|2<br />
|Separators can be within format strings.<br />
|-<br />
|3<br />
|At least ONE format code has to display something for the ENTIRE format string to display<br />
|}<br />
<br />
----<br />
<br />
=== Examples ===<br />
<br />
{|<br />
|-<br />
|code<br />
|gives<br />
|-<br />
|<pre>$n(f l)<br />
b. $b {at $B<br />
{d. $d $D</pre><br />
|<pre>Edwin Michael Smith<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA</pre>The person is still alive (or has no information present) so the line was removed.<br />
|}<br />
<br />
<br />
<br />
== Control Variables ==<br />
<br />
Control variables allow you to print characters that are special to Substitution values within a display.<br />
<br />
For example the dollar character '$' is used to note the start of a variable. If you wish to print a dollar character you would use a control character like '&#92;$'<br />
<br />
Control Variables<br />
<br />
{|<br />
|-<br />
|&#92;$<br />
|Displays a single '$'<br />
|<br />
|&#92;&#92;<br />
|Displays a single '&#92;'<br />
|-<br />
|&#92;(<br />
|Displays a single '('<br />
|<br />
|&#92;)<br />
|Displays a single ')'<br />
|-<br />
|&#92;{<br />
|Displays a single '{'<br />
|<br />
|&#92;}<br />
|Displays a single '}'<br />
|-<br />
|&#92;<<br />
|Displays a single '<'<br />
|<br />
|&#92;><br />
|Displays a single '>'<br />
|}<br />
<br />
Basically anything that comes after a '&#92;' will be printed.<br />
<br />
----<br />
Note:<br />
When you are inside a format string, you may need to use this to display a character that would normally be a format code. <br />
<br />
{|<br />
|-<br />
|Example:<br />
|would give<br />
|-<br />
|<pre>$b(m hi mom)<br />
$b(m hi \mo\m)</pre><br />
|<pre>5 hi 5o5<br />
5 hi mom</pre><br />
|}<br />
<br />
as this person was born on the fifth month.<br />
<br />
== Grouping ==<br />
<br />
There are instances where you do not want certain text to be displayed. Take the example:<br />
<br />
{|<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died on $d at $D</pre><br />
|<pre>died on 1975-06-26 at </pre> <br />
|<pre>died on at Reno, Washoe Co., NV</pre><br />
|-<br />
| colspan="3"|Neither of these are very acceptable.<br />
|-<br />
| colspan="3"|But with groups (denoted by {}), you can optionally print information if a variable within contains information.<br />
|-<br />
| colspan="3"|For example:<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died {on $d }{at $D}</pre><br />
|<pre>died on 1975-06-26</pre><br />
|<pre>died at Reno, Washoe Co., NV</pre><br />
|}<br />
<br />
which is what we want.<br />
<br />
----<br />
=== Rules for groups ===<br />
<br />
A group will only display if there is at least one variable that displays something. So if a group only has text and/or variables where the information is not known, the entire group will not print.<br />
<br />
Groups can also be nested. If this happens (like below), the outer group will only display if there is at least one variable that displays something within the outer group or any of the sub groups.<br />
<br />
Groups can also be used to remove an entire line from a display. A '{' at the start of a line will remove the entire line from the display if the above rule is true.<br />
<br />
If you do not wish to have the display code above (for death information) displayed (the person is alive, or you do not yet know the information), modify the code to look like<br />
<pre>{died {on $d }{at $D}</pre><br />
<br />
<blockquote>To have an entire line be blank instead of removing the line simply start the line with a space ' {' or make sure there is a space after the group (you will have to close the group first)</blockquote><br />
<br />
----<br />
=== Examples: ===<br />
<br />
This will hide '(' and ')' if the divorce information is not known (or still married).<br />
<br />
<pre>m. $m $M {- ($v(yyyy))</pre><br />
<br />
<br />
Only display some spouse information if married or remove the entire line if never married:<br />
<pre>{$s $m(yyyy) {- $v(\(yyyy\))}}</pre><br />
<br />
<br />
<br />
== Attributes ==<br />
<br />
Attributes do not have a format string. Instead the attribute name is placed inside []. Here is the syntax for an attribute:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name] where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'au'<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$a[Profession]<br />
$a[Social Security Number]<br />
$a[Total \$ bequeathed]</pre><br />
|<pre>Programmer<br />
7A3-29-F1C6<br />
3.00USD</pre><br />
|}<br />
<br />
<br />
----<br />
== Events ==<br />
<br />
Events have the same starting structure as attributes, $e or $t and the event name in [] but events have an extra format string after the name to display the description, date, place, id, and attributes associated with it. Each of these items can be displayed with a , a 'n', 'd', 'D', 'i', and 'a' respectively in the format string. Here is the syntax for an event:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name](format string) where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'et'<br />
<br />
=== Event format strings ===<br />
<br />
The Event format string is used to display information about the event. Here are the format codes to display parts of the event:<br />
<br />
{|<br />
|-<br />
|n<br />
|Description<br />
|<br />
|i<br />
|Event ID<br />
|-<br />
|d<br />
|Event Date&#42;<br />
|<br />
|D<br />
|Event Place&#42;<br />
|-<br />
|a<br />
|An attributes for the event&#42;&#42;<br />
|<br />
|<br />
|<br />
|}<br />
<br />
&#42;These variables can themselves have format strings. Date and a place can be formatted with format string as defined in [[#Format strings|Format strings]].<br />
<br />
&#42;&#42;Attribute needs to have the attribute name in [] and are formatted as above.<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$e[First Communion](d(yyyy-mm-d))<br />
$e[Bar Mitzvah](n&lt; at &gt; D)<br />
$e[Birth](d(yyyy mm/dd) D)</pre><br />
|<pre>2009-11-6<br />
Jerry's Bar Mitzah at Opas house<br />
2007 05/23 Grandmothers house</pre><br />
|}<br />
<br />
<br />
And:<br />
<br />
{|<br />
|-<br />
|<pre>$b(yyyy-Mmm-dd)<br />
$M</pre><br />
|is the same as<br />
|<pre>$e[Birth](d(yyyy-Mmm-dd))<br />
$t[Marriage](D)</pre><br />
|}<br />
<br />
<br />
----<br />
<br />
=== Notes for attributes and events: ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Attribute and event names are mandatory. '$a' or '$a[]' will not display anything.<br />
|-<br />
|2<br />
|Attributes and event names may have special characters within them. Most notably ']' and ')'. If this is the case, you will need to use [[#Control Variables|Control Variables]]<br />
|}<br />
<br />
== Separators ==<br />
<br />
Separators are special 'text only' groups inside '&lt;' and '&gt;' that conditionally display a separator (like ', ' or ' - ') between two variables, format codes or text.<br />
<br />
Separators are displayed conditionally depending on these rules:<br />
<br />
# A variable that does '''not''' display anything will remove itself and a separator that is to the left of it from the display line only.<br />
# If there is not a separator to the left, the same variable will remove itself and a separator that is to the right of it from the displayed line. <br />
# If there are two separators together, the left one will be removed from the display line and the right is kept.<br />
# Separators at the start or end of the display line (or format strings) are removed<br />
<br />
=== Example: ===<br />
<br />
$s(f l)&lt;, &gt;$m(yyyy)&lt; @ &gt;$M&lt; - &gt;$v(&#92;(yyyy&#92;))<br />
<br />
Here are some things that may happen:<br />
<br />
{|<br />
|-<br />
|If '''none''' of the variables are known<br />
|None of the separators will display<br />
|-<br />
|If only one variable '''is''' known<br />
|Only that variable will print. No separators will print.<br />
|-<br />
|If only the spouse's name '''is not''' known<br />
|The first separator will not display<br />
|-<br />
|If only the marriage date '''is not''' known<br />
|The first separator does not display. We will be left with:<br />
Jane Doe&lt; - &gt;{ … }And only the divorce date needs to be known to print the second separator.<br />
|-<br />
|If only the divorce date '''is not''' known<br />
|the second separator will not display<br />
|}<br />
<br />
<br />
Separators can be inside format strings:<br />
<br />
$n(&lt;0&gt;T&lt; &gt;L&lt;, &gt;f&lt; &gt;s)<br />
<br />
Unlike groups, separators can not cross over/out of format strings. So the separator &lt;0&gt; will NEVER display. No matter what is on the left hand side of the variable.<br />
<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
{{-}}<br />
<br />
{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{languages}}<br />
<br />
[[Category:Documentation]]<br />
[[Category:Plugins]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Gramps_3.4_Wiki_Manual_-_Reports_-_part_2&diff=36912Gramps 3.4 Wiki Manual - Reports - part 22012-04-30T01:41:17Z<p>Ander882: /* Substitution Values */</p>
<hr />
<div>This section describes the substitution values that can be used in the different reports available in Gramps.<br />
<br />
{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{grampsmanualcopyright}}<br />
<br />
{{languages|Gramps_3.4_Wiki_Manual_-_Reports - part 2}}<br />
<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
= Substitution Values =<br />
<br />
Many of the graphical reports allow you to customize the information that is displayed on the reports. Variable substitution is the method that is used to substitute a particular symbol (key) for specific information about the person in the database.<br />
<br />
{|<br />
|-<br />
|Example: <br />
|Will show as: (the person is alive)<br />
|-<br />
|<pre>$n<br />
b. $b( at $B}<br />
-d. $d $D</pre><br />
|<pre>Smith, Edwin Michael<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA<br />
</pre><br />
|}<br />
<br />
== The Substitution Keys ==<br />
<br />
{|<br />
|-<br />
| colspan="2"|'''Personal variables'''<br />
| colspan="2"|'''Marital variables'''<br />
|-<br />
|$n<br />
|Displays the person's name<br />
|$s<br />
|Displays the name of the person's spouse<br />
|-<br />
|$i<br />
|Displays the GRAMPS ID for the person.<br />
|$j<br />
|Displays the GRAMPS ID for the marriage.<br />
|-<br />
|$b<br />
|Displays the person's date of birth <br />
|$m<br />
|Displays the marriage date of the person and the spouse.<br />
|-<br />
|$B<br />
|Displays the person's place of birth <br />
|$M<br />
|Displays the place of the marriage of the person and the spouse.<br />
|-<br />
|$d<br />
|Displays the person's date of death <br />
|$v<br />
|Displays the divorce date of the person and the spouse.<br />
|-<br />
|$D<br />
|Displays the person's place of death <br />
|$V<br />
|Displays the place of the divorce of the person and the spouse.<br />
|-<br />
|$a<br />
|Displays an attribute about the person.<br />
see [[#Attributes|Attributes]] for more<br />
|$u<br />
|Displays an attribute about the marriage.<br />
see [[#Attributes|Attributes]] for more<br />
|-<br />
|$e<br />
|Displays event information about the person.<br />
See [[#Events|Events]] for more<br />
|$t<br />
|Displays an event information about the marriage.<br />
See [[#Events|Events]] for more<br />
|}<br />
<br />
All of the Marital variables are defined by the person's preferred spouse in Gramps. If the person has never been married, then these variables will not display anything.<br />
<br />
----<br />
=== Default displayed formats ===<br />
<br />
{|<br />
|-<br />
|$n $s<br />
|Names will be displayed as set in 'Name format:' on the Display tab in Gramps preferences<br />
|-<br />
|$B $D $M $V<br />
|Places will display the Place title by default<br />
|-<br />
|$b $d $m $v<br />
|Dates will be displayed as set in 'Date format:' on the Display tab in Gramps preferences<br />
|-<br />
|$e $t<br />
|Events will display the description by default<br />
|}<br />
<br />
----<br />
{|<br />
|-<br />
|1<br />
|If you wish to display names, date, or place information differently, you may use [[#Format Strings|Format Strings]] to accomplish this.<br />
|-<br />
|2<br />
|There are also [[#Control Variables|Control Variables]] to display special characters (like the dollar sign).<br />
|-<br />
|3<br />
|You can also use [[#Grouping|Grouping]] to optionally display information or whole lines<br />
|-<br />
|4<br />
|Along with [[#Events|Events]] you can print almost anything.<br />
|-<br />
|5<br />
|Finally, [[#Separators|Separators]], to make your life complete.<br />
|-<br />
|}<br />
<br />
----<br />
<br />
=== Deprecated variables ===<br />
<br />
Some of the old variables were deprecated because [[#Format Strings|Format Strings]] have replaced them. So here is a list of those variables and how to achieve their results:<br />
<br />
{| {{prettytable}}<br />
|-<br />
!Old Variable<br />
!How to display it now<br />
!What is displayed<br />
|-<br />
|$f<br />
|$n<br />
|Name - as by Gramps name display under Preferences<br />
|-<br />
|$n<br />
|$n(g f)<br />
|Name - FirstName LastName<br />
|-<br />
|$N<br />
|$n(f, g)<br />
|Name - LastName, FirstName (note the explicit comma)<br />
|-<br />
|$nC<br />
|$n(g F)<br />
|Name - FirstName LastName in UPPER case<br />
|-<br />
|$NC<br />
|$n(F, g)<br />
|Name - LastName in UPPER case, FirstName<br />
|-<br />
|$by<br />
|$b(yyyy)<br />
|Date of birth, year only<br />
|-<br />
|$dy<br />
|$d(yyyy)<br />
|Date of death, year only<br />
|-<br />
|$my<br />
|$m(yyyy)<br />
|Date of preferred marriage, year only<br />
|-<br />
|$p<br />
|$s<br />
|Preferred spouse's name as by Gramps name display under Preferences<br />
|-<br />
|$s<br />
|$s(g f)<br />
|Preferred spouse's name - FirstName LastName<br />
|-<br />
|$S<br />
|$s(f, g)<br />
|Preferred spouse's name - LastName, FirstName<br />
|-<br />
|$sC<br />
|$s(g F)<br />
|Preferred spouse's name - FirstName LastName in UPPER case<br />
|-<br />
|$SC<br />
|$s(F, g)<br />
|Preferred spouse's name - LastName in UPPER case, FirstName<br />
|}<br />
<br />
== Format Strings ==<br />
<br />
Format strings are used to display names and dates differently than those assigned under Gramps Preferences. Here is the syntax for a format string:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''(format string)<br />
where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'nsijbmBMdvDVauet'<br />
<br />
A format string is any text, separators or format codes (defined below) to display information about the person.<br />
<br />
=== Formatting names ===<br />
<br />
For names ($n $s) you may use the following formatting codes to display the name differently.<br />
<br />
{|<br />
|-<br />
|t<br />
|Title<br />
|<br />
|f<br />
|Given name<br />
|-<br />
|x<br />
|Common name. Call name if existing, otherwise first first name<br />
|<br />
|c<br />
|Call name<br />
|-<br />
|n<br />
|Nick name<br />
|<br />
|s<br />
|Suffix<br />
|-<br />
|l<br />
|Surname<br />
|<br />
|g<br />
|Family nickname<br />
|}<br />
<br />
These codes can be uppercased to uppercase the result.<br />
<br />
{|<br />
|-<br />
|Example code<br />
|Displays<br />
|-<br />
|<pre>$n(L, f) ($n(c)), $n(L, f){ ($n(c))}<br />
$s(f l s)</pre><br />
|<pre>SMITH, Edwin Michael (), SMITH, Edwin Michael<br />
Janice Ann Adams</pre><br />
|}<br />
<br />
<br />
<blockquote>Note:<br />
If you want to print a character 'c' within the format string (or any one of the other format codes), you will need to first add a '&#92;' in front of it. See [[#Control Variables|Control Variables]] for more.</blockquote><br />
<br />
<blockquote>Note:<br />
the curly brackets { } are used to hide information. Here it is used around ' ($n(c))' to not display ' ()' if the person does not have a call name. See [[#Grouping|Grouping]] for more.</blockquote><br />
<br />
----<br />
<br />
=== Formatting Dates ===<br />
<br />
For all of the date variables ($b $d $m $v) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|yyyy<br />
|The year as a four digit number<br />
|<br />
|yyy<br />
|The year, with a minimum of three digits<br />
|-<br />
|yy<br />
|The year, from 00 to 99<br />
|<br />
|y<br />
|The year, from 0 to 99<br />
|-<br />
|mmmm<BR><br />
MMMM<br />
|The full name of the month<BR><br />
The full name IN CAPS<br />
|<br />
|mmm<BR><br />
MMM<br />
|The abbreviated name of the month<BR><br />
The abbreviated name IN CAPS<br />
|-<br />
|mm<br />
|The month, from 00 to 12<br />
|<br />
|m<br />
|The month, from 0 to 12<br />
|-<br />
|dd<br />
|The day, from 00 to 31<br />
|<br />
|d<br />
|The day, from 0 to 31<br />
|-<br />
|o<br />
|The date type (modifier)<br />
|<br />
|<br />
|<br />
|}<br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$b(mmm-dd yy)<br />
$m(yyyy/mmm/d)<br />
$b(mmm-dd yy)</pre><br />
|<pre>May-24 61<br />
1995/May/27<br />
Jun-04 85</pre><br />
|}<br />
<br />
{{man note| For date types (modifier) |Only "Before", "After", and "About" are supported at this time. all others will not display anything.<BR><br />
And for date span and date ranges, only the starting (first) date is displayed.}}<br />
<br />
----<br />
<br />
=== Formatting Places ===<br />
<br />
For all of the place variables ($B $D $M $V) you may use the following formatting codes:<br />
<br />
{|<br />
|-<br />
|e<br />
|Street<br />
|<br />
|l<br />
|Locality<br />
|-<br />
|c<br />
|City<br />
|<br />
|u<br />
|County<br />
|-<br />
|s<br />
|State<br />
|<br />
|p<br />
|Postal Code<br />
|-<br />
|n<br />
|Country<br />
|<br />
|t<br />
|Title<br />
|-<br />
|x<br />
|Longitude<br />
|<br />
|y<br />
|Latitude<br />
|}<br />
These codes can be uppercased to uppercase the result. <br />
<br />
{|<br />
|-<br />
|Example code<br />
|displays<br />
|-<br />
|<pre>$B<br />
$B(c, s, N)</pre><br />
|<pre>St Judes Hospital<br />
Carmel, IN, USA</pre><br />
|}<br />
<br />
----<br />
<br />
=== Rules for format strings. ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Anything will print inside a format string<br />
|-<br />
|1a<br />
|you will have to use [[#Control Variables|Control Variables]] to display things like ')' and format codes<br />
|-<br />
|2<br />
|Separators can be within format strings.<br />
|-<br />
|3<br />
|At least ONE format code has to display something for the ENTIRE format string to display<br />
|}<br />
<br />
----<br />
<br />
=== Examples ===<br />
<br />
{|<br />
|-<br />
|code<br />
|gives<br />
|-<br />
|<pre>$n(f l)<br />
b. $b {at $B<br />
{d. $d $D</pre><br />
|<pre>Edwin Michael Smith<br />
b. 1961-05-24 at San Jose, Santa Clara Co., CA</pre>The person is still alive (or has no information present) so the line was removed.<br />
|}<br />
<br />
<br />
<br />
== Control Variables ==<br />
<br />
Control variables allow you to print characters that are special to Substitution values within a display.<br />
<br />
For example the dollar character '$' is used to note the start of a variable. If you wish to print a dollar character you would use a control character like '&#92;$'<br />
<br />
Control Variables<br />
<br />
{|<br />
|-<br />
|&#92;$<br />
|Displays a single '$'<br />
|<br />
|&#92;&#92;<br />
|Displays a single '&#92;'<br />
|-<br />
|&#92;(<br />
|Displays a single '('<br />
|<br />
|&#92;)<br />
|Displays a single ')'<br />
|-<br />
|&#92;{<br />
|Displays a single '{'<br />
|<br />
|&#92;}<br />
|Displays a single '}'<br />
|-<br />
|&#92;<<br />
|Displays a single '<'<br />
|<br />
|&#92;><br />
|Displays a single '>'<br />
|}<br />
<br />
Basically anything that comes after a '&#92;' will be printed.<br />
<br />
----<br />
Note:<br />
When you are inside a format string, you may need to use this to display a character that would normally be a format code. <br />
<br />
{|<br />
|-<br />
|Example:<br />
|would give<br />
|-<br />
|<pre>$b(m hi mom)<br />
$b(m hi \mo\m)</pre><br />
|<pre>5 hi 5o5<br />
5 hi mom</pre><br />
|}<br />
<br />
as this person was born on the fifth month.<br />
<br />
== Grouping ==<br />
<br />
There are instances where you do not want certain text to be displayed. Take the example:<br />
<br />
{|<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died on $d at $D</pre><br />
|<pre>died on 1975-06-26 at </pre> <br />
|<pre>died on at Reno, Washoe Co., NV</pre><br />
|-<br />
| colspan="3"|Neither of these are very acceptable.<br />
|-<br />
| colspan="3"|But with groups (denoted by {}), you can optionally print information if a variable within contains information.<br />
|-<br />
| colspan="3"|For example:<br />
|-<br />
|Code<br />
|Only date is known<br />
|Only place is known<br />
|-<br />
|<pre>died {on $d }{at $D}</pre><br />
|<pre>died on 1975-06-26</pre><br />
|<pre>died at Reno, Washoe Co., NV</pre><br />
|}<br />
<br />
which is what we want.<br />
<br />
----<br />
=== Rules for groups ===<br />
<br />
A group will only display if there is at least one variable that displays something. So if a group only has text and/or variables where the information is not known, the entire group will not print.<br />
<br />
Groups can also be nested. If this happens (like below), the outer group will only display if there is at least one variable that displays something within the outer group or any of the sub groups.<br />
<br />
Groups can also be used to remove an entire line from a display. A '{' at the start of a line will remove the entire line from the display if the above rule is true.<br />
<br />
If you do not wish to have the display code above (for death information) displayed (the person is alive, or you do not yet know the information), modify the code to look like<br />
<pre>{died {on $d }{at $D}</pre><br />
<br />
<blockquote>To have an entire line be blank instead of removing the line simply start the line with a space ' {' or make sure there is a space after the group (you will have to close the group first)</blockquote><br />
<br />
----<br />
=== Examples: ===<br />
<br />
This will hide '(' and ')' if the divorce information is not known (or still married).<br />
<br />
<pre>m. $m $M {- ($v(yyyy))</pre><br />
<br />
<br />
Only display some spouse information if married or remove the entire line if never married:<br />
<pre>{$s $m(yyyy) {- $v(\(yyyy\))}}</pre><br />
<br />
<br />
<br />
== Attributes ==<br />
<br />
Attributes do not have a format string. Instead the attribute name is placed inside []. Here is the syntax for an attribute:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name] where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'au'<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$a[Profession]<br />
$a[Social Security Number]<br />
$a[Total \$ bequeathed]</pre><br />
|<pre>Programmer<br />
7A3-29-F1C6<br />
3.00USD</pre><br />
|}<br />
<br />
<br />
----<br />
== Events ==<br />
<br />
Events have the same starting structure as attributes, $e or $t and the event name in [] but events have an extra format string after the name to display the description, date, place, id, and attributes associated with it. Each of these items can be displayed with a , a 'n', 'd', 'D', 'i', and 'a' respectively in the format string. Here is the syntax for an event:<br />
<br />
$''<span style="background: #c0c0c0">key</span>''[attribute name](format string) where: ''<span style="background: #c0c0c0">key</span>'' is one of the following characters: 'et'<br />
<br />
=== Event format strings ===<br />
<br />
The Event format string is used to display information about the event. Here are the format codes to display parts of the event:<br />
<br />
{|<br />
|-<br />
|n<br />
|Description<br />
|<br />
|i<br />
|Event ID<br />
|-<br />
|d<br />
|Event Date&#42;<br />
|<br />
|D<br />
|Event Place&#42;<br />
|-<br />
|a<br />
|An attributes for the event&#42;&#42;<br />
|<br />
|<br />
|<br />
|}<br />
<br />
&#42;These variables can themselves have format strings. Date and a place can be formatted with format string as defined in [[#Format strings|Format strings]].<br />
<br />
&#42;&#42;Attribute needs to have the attribute name in [] and are formatted as above.<br />
<br />
Example:<br />
<br />
{|<br />
|-<br />
|<pre>$e[First Communion](d(yyyy-mm-d))<br />
$e[Bar Mitzvah](n&lt; at &gt; D)<br />
$e[Birth](d(yyyy mm/dd) D)</pre><br />
|<pre>2009-11-6<br />
Jerry's Bar Mitzah at Opas house<br />
2007 05/23 Grandmothers house</pre><br />
|}<br />
<br />
<br />
And:<br />
<br />
{|<br />
|-<br />
|<pre>$b(yyyy-Mmm-dd)<br />
$M</pre><br />
|is the same as<br />
|<pre>$e[Birth](d(yyyy-Mmm-dd))<br />
$t[Marriage](D)</pre><br />
|}<br />
<br />
<br />
----<br />
<br />
=== Notes for attributes and events: ===<br />
<br />
{|<br />
|-<br />
|1<br />
|Attribute and event names are mandatory. '$a' or '$a[]' will not display anything.<br />
|-<br />
|2<br />
|Attributes and event names may have special characters within them. Most notably ']' and ')'. If this is the case, you will need to use [[#Control Variables|Control Variables]]<br />
|}<br />
<br />
== Separators ==<br />
<br />
Separators are special 'text only' groups inside '&lt;' and '&gt;' that conditionally display a separator (like ', ' or ' - ') between two variables, format codes or text.<br />
<br />
Separators are displayed conditionally depending on these rules:<br />
<br />
# A variable that does '''not''' display anything will remove itself and a separator that is to the left of it from the display line only.<br />
# If there is not a separator to the left, the same variable will remove itself and a separator that is to the right of it from the displayed line. <br />
# If there are two separators together, the left one will be removed from the display line and the right is kept.<br />
# Separators at the start or end of the display line (or format strings) are removed<br />
<br />
=== Example: ===<br />
<br />
$s(f l)&lt;, &gt;$m(yyyy)&lt; @ &gt;$M&lt; - &gt;$v(&#92;(yyyy&#92;))<br />
<br />
Here are some things that may happen:<br />
<br />
{|<br />
|-<br />
|If '''none''' of the variables are known<br />
|None of the separators will display<br />
|-<br />
|If only one variable '''is''' known<br />
|Only that variable will print. No separators will print.<br />
|-<br />
|If only the spouse's name '''is not''' known<br />
|The first separator will not display<br />
|-<br />
|If only the marriage date '''is not''' known<br />
|The first separator does not display. We will be left with:<br />
Jane Doe&lt; - &gt;{ … }And only the divorce date needs to be known to print the second separator.<br />
|-<br />
|If only the divorce date '''is not''' known<br />
|the second separator will not display<br />
|}<br />
<br />
<br />
Separators can be inside format strings:<br />
<br />
$n(&lt;0&gt;T&lt; &gt;L&lt;, &gt;f&lt; &gt;s)<br />
<br />
Unlike groups, separators can not cross over/out of format strings. So the separator &lt;0&gt; will NEVER display. No matter what is on the left hand side of the variable.<br />
<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
{{-}}<br />
<br />
{{man index|Gramps 3.4 Wiki Manual - Reports - part 1|Gramps 3.4 Wiki Manual - Reports- part 3|3.4}}<br />
<br />
{{languages}}<br />
<br />
[[Category:Documentation]]<br />
[[Category:Plugins]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Gramps_3.4_Wiki_Manual_-_Reports_-_part_4&diff=36911Gramps 3.4 Wiki Manual - Reports - part 42012-04-30T01:24:51Z<p>Ander882: /* Display tab */</p>
<hr />
<div>This section describes the different Graphical Reports available in Gramps.<br />
<br />
{{man index|Gramps 3.4 Wiki Manual - Reports - part 3|Gramps 3.4 Wiki Manual - Reports - part 4.2|3.4}}<br />
<br />
{{grampsmanualcopyright}}<br />
<br />
{{languages|Gramps_3.4_Wiki_Manual_-_Reports - part 4}}<br />
<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
==Graphical Reports==<br />
<br />
Graphical reports represent information in forms of charts and graphs. Most of the options are common among graphical reports, therefore they will be described only once, at the end of this section. The few options which are specific to a given report will be described directly in that report's entry. See also [[Gramps_3.4_Wiki_Manual_-_Reports_-_part_2|substitution values]].<br />
<br />
The following graphical reports are currently available in Gramps:<br />
<br />
===<u>Ancestor Tree</u>===<br />
<br />
This report generates the chart of people who are ancestors of the Active Person. <br />
<br />
====Paper Options====<br />
With the {{man label|Paper Options}} you can change Paper format (Size and Orientation) and margins (Left, Right, Top and Bottom) and use metric values or not.<br />
<br />
====Document Options====<br />
Choose the output format: Open Document Text, PDF document, PostScript, Print..., or SVG (Scalable Vector Graphics). A {{man label|check box}} is available where you can indicate to open the made document with [http://www.documentfoundation.org/download/ LibreOffice] Word Processor or a Document Viewer (PDF file).<br />
<br />
==== Tree Options tab ====<br />
<br />
[[Image:Ancestor_tree_tab.png|right|thumb|350px|Tree Options tab]]<br />
<br />
The {{man button|Center Person}} is chosen here. The Active person will be the default.<br />
<br />
With the input field {{man label|Generations}} you can change the number of generations considered.<br />
<br />
{{man label|Display unknown generations}} will allow you to select how many generations of empty boxes to display when the tree is not completely full.<br />
<br />
Here is also the check box {{man label|Compress tree}}.<br />
<br />
{{man label|Center person uses which format:}} allows you to specify if the center person uses the father display format or the mother display format found on the Display tab.<br />
<br />
==== Display tab ====<br />
<br />
[[Image:Ancestor_display_tab.png|right|thumb|250px|Display tab]]<br />
<br />
This tab allows you to determine the {{man label|Father Display Format}} to be used for the report. All fathers, grandfathers, etc. will use this format.<br />
<br />
The {{man label|Mother Display Format}} to be used for all mothers, grandmothers, etc. will use this format.<br />
<br />
The {} around the death information line states that the text 'd. ' will display ONLY when there is death information. See [[Gramps_3.4_Wiki_Manual_-_Reports_-_part_2|Substitution Values]] for more information, including how to include places and attributes, and format names and dates and places.<br />
<br />
{{man label|Include Marriage box}} specifies to display an extra box between a father and mother that contains marriage information. {{man label|The Marriage Display Format}} (see [[Gramps_3.4_Wiki_Manual_-_Reports_-_part_2|Substitution Values]]) specifies what will print in this box.<br />
<br />
==== Size tab ====<br />
<br />
[[Image:Ancestor_sizes_tab.png|right|thumb|250px|Sizes tab]]<br />
<br />
{{man label|Scale tree to fit}} will make the tree larger or smaller to fit the page as desired. The options are:<br />
* Do not Scale the tree<br />
* Scale tree to fit page width only<br />
* Scale tree to fit the size of the page<br />
<br />
where {{man label|Resize page to fit tree}} will make the page larger or smaller to fit the tree <br />
<br />
If both are selected, the options happen in that order; scale the tree first, then the page.<br />
<br />
These two options are better described in [[Gramps_3.4_Wiki_Manual_-_Reports_-_part_4.2|Size options]] with tips for making nicer reports.<br />
<br />
==== Include tab ====<br />
<br />
[[Image:Ancestor_include_tab.png|right|thumb|250px|Note tab]]<br />
<br />
This tab gives you the option to include other items on the report.<br />
<br />
{{man label|Report title}} allows you to choose a title for the report. <br />
* ''Do not print a title''<br />
* ''Include Report Title''<br />
<br />
And this tab also includes check boxes for {{man label|Include a border}}, {{man label|Include page numbers}}, and {{man label|Include blank pages}}.<br />
<br />
This tab also allows you to {{man label|Include a note}} to one of the corners of the report.<br />
<br />
“$T” within the note will display the day that the report was made. Regular date formatting (see [[Gramps_3.4_Wiki_Manual_-_Reports_-_part_2|Substitution Values]]) applies.<br />
<br />
Currently a note will be attached to a corner. If a person box writes over it, the note box will not move. Select another corner to see the note tab if this happens.<br />
<br />
====Final Result====<br />
<br />
[[Image:Ancestor chart.png|thumb|left|500x|Fig. 8.2 PDF Output ancestor tree]]<br />
<br />
Fig. 8.2 shows the final output result.<br />
<br />
{{-}}<br />
<br />
===<u>Calendar</u>===<br />
<br />
This report produces a calendar with birthdays and anniversaries on a page by month.<br />
<br />
====Paper Options====<br />
<br />
[[Image:Calendarreport1.png|right|thumb|350px|Fig. 8.3 Calendar Paper Options]]<br />
<br />
With the Paper Options you can change<br />
* Paper format (Size and Orientation)<br />
* Margins (Left, Right, Top and Bottom) <br />
and whether to use metric values or not.<br />
<br />
{{-}}<br />
<br />
====Document options====<br />
<br />
[[Image:Calendarreport4.png|right|thumb|350px|Fig. 8.4 Calendar Document Options]]<br />
<br />
* Output Format: choose the output format: <br />
** Open Document Text<br />
** PDF document<br />
** PostScript<br />
** Print...<br />
** SVG (Scalable Vector Graphics). A {{man label|check box}} is available where you can indicate to open the made document with [http://www.documentfoundation.org/download/ LibreOffice] Word Processor or a Document Viewer (PDF file).<br />
* Filename: default value is ''/home/<username>/calendar.pdf''.<br />
* Style: default ''default style'' . With the {{man button|Style Editor...}} you can add Document Styles.<br />
<br />
{{-}}<br />
<br />
====Report Options====<br />
<br />
[[Image:Calendarreport2.png|right|thumb|250px|Fig. 8.5 Calendar Report Options]]<br />
<br />
* Year of calendar: for which year you want the calendar to be build.<br />
* Filter: select filter to restrict people that appear on the calendar<br />
** Entire Database : not recommended!<br />
** Descendants of ...<br />
** Descendant Families of ...<br />
** Ancestors of ...<br />
** People with common ancestors with ...<br />
** any custom filter who have made<br />
* Center Person: the center person for the report<br />
* Name Format: Select the format to display names: choose between:<br />
** Surname, Given Patronymic<br />
** Given Surname<br />
** Patronymic, Given<br />
** Given<br />
* Country for holidays: Select the country to see associated holidays choose between:<br />
** Don't include holidays: default value<br />
** Canada / China / Deutschland / Finland / France / Sverige - röda dagar / United States / Ceska republika<br />
* First day of week:<br />
* Birthday surname:<br />
* Checkboxes:<br />
** Include only living people: include only living people in the calendar<br />
** Include birthdays: include birthdays in the calendar<br />
** Include anniversaries: include anniversaries in the calendar<br />
<br />
{{-}}<br />
<br />
====Calendar Text Options====<br />
<br />
[[Image:Calendarreport3.png|right|thumb|250px|Fig. 8.6 Calendar Text Options]]<br />
<br />
Here you can fill in three lines of text that will be put at the bottom of the page.<br />
* Text Area 1: First line of text at bottom of calendar default value : ''My Calendar''<br />
* Text Area 2: Second line of text at bottom of calendar default value: ''Produced by Gramps''<br />
* Text Area 3: Third line of text at bottom of calendar default value: '' http://gramps-project.org/''<br />
<br />
{{-}}<br />
<br />
====Final Result====<br />
<br />
[[Image:Calendarreport5.png|right|thumb|450px|Fig. 8.7 Calendar Result]]<br />
<br />
The final result can be seen on the right side.<br />
<br />
[[Calendar_tools_holidays|Calendar tools holidays]] explains how to add or change the holidays appearing on the output of the calendar plugin.<br />
<br />
{{-}}<br />
<br />
===<u>Descendant Tree</u>===<br />
<br />
This report generates a graph of people who are descendants of the Active Person. Specific options include the format of the displayed entries.<br />
<br />
====Paper Options====<br />
With the Paper Options you can change<br />
* Paper format (Size and Orientation)<br />
* Margins (Left, Right, Top and Bottom) <br />
and whether to use metric values or not.<br />
<br />
====Document Options====<br />
* Output Format: choose the output format: <br />
** Open Document Text<br />
** PDF document<br />
** PostScript<br />
** Print...<br />
** SVG (Scalable Vector Graphics). A {{man label|check box}} is available where you can indicate to open the made document with [http://www.documentfoundation.org/download/ LibreOffice] Word Processor or a Document Viewer (PDF file).<br />
* Filename: default value is ''/home/<username>/descend_chart.pdf''.<br />
* Style: default ''default style'' . With the {{man button|Style Editor...}} you can add Document Styles.<br />
<br />
==== Descendant report Tree tab ====<br />
<br />
[[Image:descend_treeP_tab.png|right|thumb|250px|Descendant Options tab]]<br />
<br />
{{man button|Report for:}} option will select the center person for this report. The currently home person will be the default person displayed. <br />
<br />
{{man label|Start with the parent(s) of the selected first}} will display parents of the center person if the parents are known. As such any siblings of the center person will be displayed too.<br />
<br />
This is broken apart from the tree tab as the 'Family Descendant Report' only differs in this one part on this tab.<br />
<br />
==== Tree tab ====<br />
<br />
[[Image:descend_tree2_tab.png|right|thumb|250px|Descendant Options tab]]<br />
<br />
Both of the Descendant Tree and Family Descendant Tree reports share these features on the Tree tab:<br />
<br />
The number of {{man label|Generations}} to see on the report (from the center person/family). If {{man label|Start with the parent(s) of the selected first}} is selected, this number is effectively increased by one.<br />
<br />
{{man label|Level of spouses}} specifies the how deep to display spouses. <br />
<br />
For the example: <br />
<br />
* Abe is a direct descendant<br />
** Abe has/had married Barbra and had two children<br />
** Abe also married Bridget and had one child<br />
*** Bridget has/had married Carl. <br />
**** Carl and Denise had a child.<br />
<br />
Given the above example, this is what will be displayed for the first three {{man label|Level of spouses}} options.<br />
* 0 means that only direct descendants will be shown. Nothing on the Secondary tab will be shown (Spousal information or Marriage information). For the example above, only Abe will be shown with three children directly under him<br />
* 1 means that only spouses of the direct descendants will be shown. For the example above, Abe will be shown with two pieces of marriage information. Under the first will be two children and one child under the second.<br />
* 2 means that spouses of spouses are shown. Same as 1 but Bridget will also show her other marriage. If they had any children, they would be shown too.<br />
* 3 means that everyone in the example above will be displayed.<br />
Any option above 1 is very hard to read on the report without the {{man label|Indent Spouses}} option on the Secondary tab.<br />
And last but not least is the {{man label|Compress Tree}} option which tries to move everyone up as far as they can go (compress) and still have a readable report.<br />
<br />
==== Display tab ====<br />
<br />
[[Image:descend_display_tab.png|right|thumb|250px|Descendant Display tab]]<br />
<br />
{{man label|Descendant Display Format}} sets the display for all descendants in the tree. The default is:<br />
<pre>$n<br />
b. $b<br />
{d. $d}</pre><br />
<br />
The {} around the death information line states that the text 'd. ' will display ONLY when there is death information. See [[Gramps_3.4_Wiki_Manual_-_Reports_-_part_2|Substitution Values]] for more information, including how to include places and attributes, and format names and dates and places.<br />
<br />
And the check box {{man label|Bold direct descendants}} can also make the report easier to read.<br />
<br />
You can set the {{man label|Spousal Display format}}. If you do not wish to have the separate marital box, the spousal box can be used for marriage information. This option defaults as above.<br />
<br />
{{man label|Indent spouses}} will offset spouses a little from each other making it easier to know who has married who.<br />
<br />
{{man label|Include marriage box}} will display a separate box on the tree for marriage information. The display for this box is set in {{man label|Marriage Display format}}.<br />
<br />
{{-}}<br />
<br />
==== Replace tab ====<br />
<br />
[[Image:descend_replace_tab.png|right|thumb|250px|Descendant Replace tab]]<br />
<br />
This allows you to put in pairs of strings separated by '/' that state what you want to replace and what you want to replace it with. <br />
<br />
{{-}}<br />
<br />
Example:<br />
<pre>The United States of America/USA<br />
United Kingdom of Great Britain and Northern Ireland/UK<br />
Llanfair&shy;pwllgwyn&shy;gyllgo&shy;gerychwyrn&shy;drobwll&shy;llanty&shy;silio&shy;gogogoch/Llanfairpwll</pre><br />
Every column width is defined by the widest box in the report. So if one box happens to be a lot wider than all of the others, a lot of space will be wasted. This option allows you to remove or abbreviate parts of the string that is not needed or can be cut down so the amount of space wasted is minimal.<br />
<br />
==== Include tab ====<br />
<br />
[[Image:Ancestor_include_tab.png|right|thumb|250px|Descendant Replace tab]]<br />
<br />
{{man label|Report title}} allows you to choose a title for the report. <br />
* ''Do not print a title''<br />
* ''Descendant Chart for [selected person(s)]''<br />
<br />
And this tab also includes check boxes to {{man label|Include a border}}, {{man label|Include page numbers}}, and {{man label|Include blank pages}}.<br />
<br />
This tab also allows you to {{man label|Include a note}} to one of the corners of the report. <br />
<br />
“$T” within the report will display the day that the report was made.<br />
Regular date formatting (see [[Gramps_3.4_Wiki_Manual_-_Reports_-_part_2|Substitution Values]]) applies.<br />
<br />
Currently a note will be attached to a corner. If a person box writes over it, the note box will not move. Select another corner to see the note tab if this happens.<br />
<br />
====Final Result====<br />
<br />
[[Image:Descendant_tree2.png|right|thumb|400px|Fig. 8.9 Descendant Tree Result]]<br />
<br />
The final result can be seen on the right side.<br />
<br />
{{-}}<br />
<br />
===<u>Family Descendant Tree</u>===<br />
<br />
{{man note|Shared options with the [[#Descendant Tree|Descendant Tree report]]|This report only has three differences from the 'Descendant Tree' report. The only differences are:<br />
# this report runs off of a family instead of a person (differences on the tree tab)<br />
# More options for a report title (on the Include tab)<br />
# the final result<br />
}}<br />
<br />
==== Tree Tab ====<br />
<br />
[[Image:descend_treeF_tab.png|right|thumb|250px|Descendant Options tab]]<br />
<br />
{{man button|Report for:}} option will select the center family (Father and Mother) for this report. The currently active family will be the default family displayed.<br />
<br />
Choosing {{man label|Start with the parent(s) of the selected first}} may display two sets of parents (if the parents of both the father and mother are known). One set of parents for the father, and another set of parents for the mother of the family (ie grandparents of the children). As such, any siblings of the father will be shown on the fathers side and any siblings with the mother will be displayed with her. So the children of the center family will see their grandparents, parents, uncles and aunts and even cousins if there are any.<br />
<br />
==== Include Tab ====<br />
The {{man label|Report Title}}: has these additional options:<br />
# ''Do not print a title''<br />
# ''Descendant Chart for [selected person(s)]''<br />
# ''Family Chart for [names of chosen family]''<br />
# ''Cousin Chart for [names of children]'' (Only available if {{man label|Start with the parent(s) of the selected first}} is chosen)<br />
<br />
==== Final Result ====<br />
<br />
[[Image:Family_Descendant_chart.png|right|thumb|400px|Family Descendant Tree Result]]<br />
<br />
The final result can be seen on the right side.<br />
<br />
Note: The parents for Alice Paula are not shown because they are unknown (not in the database). Otherwise her parents, siblings and nieces/nephews could be shown.<br />
<br />
{{-}}<br />
<br />
===<u>Fan Chart</u>===<br />
<br />
This report produces a chart resembling a fan, with Active person in the center, parents the semicircle next to it, grandparents in the next semicircle, and so on, for a total of five generations.<br />
<br />
====Paper Options====<br />
With the {{man label|Paper Options}} you can change Paper format (Size and Orientation) and margins (Left, Right, Top and Bottom) and use metric values or not.<br />
<br />
====Document Options====<br />
Choose the output format: Open Document Text, PDF document, PostScript, Print..., or SVG (Scalable Vector Graphics). A {{man label|check box}} is available where you can indicate to open the made document with [http://www.documentfoundation.org/download/ LibreOffice] Word Processor or a Document Viewer (PDF file).<br />
<br />
====Report Options====<br />
<br />
[[Image:Fanchartoptions.png|right|thumb|250px|Fig. 8.10 Options Fan chart]]<br />
[[Image:Fanchartpdf.png|left|thumb|250px|Fig. 8.11 Fan chart]]<br />
<br />
First the Center Person is displayed. Using the {{man button|Edit}} button you can select a different person. With the next input field {{man label|Generations}} you can change the number of generations considered.<br />
Next input field {{man label|Type of graph}}: choose via the drop down menu: full, half , or quarter circle.<br />
Next input field {{man label|Background color}}: choose white or generation dependant.<br />
Next input field {{man label|Orientation of radial text}} : choose upright or roundabout<br />
<br />
{{-}}<br />
<br />
===<u>Statistics Chart</u>===<br />
<br />
This report can collect and display a wealth of statistical data about your database. Specific options include filter, sorting methods, and additional birth- and gender-based limit for inclusion into statistics. You can also set the minimum number of items to qualify for the bar chart, so that the charts with fewer items will generate a pie chart instead. The '''Chart Selection''' tab allows you to check which charts you want to include in your report.<br />
<br />
{{-}}<br />
<br />
====Paper Options====<br />
<br />
With the {{man label|Paper Options}} you can change Paper format (Size and Orientation) and margins (Left, Right, Top and Bottom) and use metric values or not.<br />
<br />
====Document Options====<br />
<br />
Document options: choose the output format: Open Document Text, PDF document, PostScript, Print..., or SVG (Scalable Vector Graphics). A {{man label|check box}} is available where you can indicate to open the made document with [http://www.documentfoundation.org/download/ LibreOffice] Word Processor or a Document Viewer (PDF file).<br />
<br />
====Report Options====<br />
<br />
[[Image:Statistic.png|right|thumb|250px|right|Fig. 8.12 Report Options]]<br />
<br />
* Filter: determines what people are included in the report. You can choose the entire Database, or descendants of a certain person, people with a common ancestor as... or a default/common made filter.<br />
* Filter person: The center person for the filter: only available if as filter not entire database selected. {{man button|Edit}} button let you choose another filter person.<br />
* Sort chart items by: Select how the statistical data is sorted: Choose Item count or item name from the drop down list.<br />
* check box: sort in reverse order<br />
* People born after: Birth year from which to include people: fill in a year to start from<br />
* People born before: Birth year until which to include people: fill in a year<br />
* check box: Whether to include people without known birth years<br />
* Gender included: Select which genders are included into statistics. Choose both, men, or women.<br />
* Max. items for a pie: With fewer items pie chart and legend will be used instead of a bar chart. Choose a number from the drop down list.<br />
<br />
{{-}}<br />
<br />
====Chart Options====<br />
<br />
[[Image:Statistic1.png|right|thumb|350px|Fig. 8.13 Statistics chart options]]<br />
<br />
* Charts 1: 9 check boxes are available to include charts with indicated data:<br />
<br />
[[Image:Statgraftaart.png|right|thumb|350px|Fig. 8.14 Results]]<br />
<br />
[[Image:Statistic2.png|right|thumb|350px|Fig. 8.15 Results]]<br />
<br />
** Age<br />
** Death place<br />
** Death month<br />
** Age when first child born<br />
** Title<br />
** Age when last child born<br />
** Birth month<br />
** Age at marriage<br />
** Age at death<br />
* Charts 2: 10 check boxes are available to include charts with indicated data:<br />
** Event type<br />
** Number of children<br />
** Marriage place <br />
** Number of relationships<br />
** Surname<br />
** Death year<br />
** Gender<br />
** Forename<br />
** Birth year<br />
** Birth place<br />
<br />
If all needed info is filled in click on {{man button|OK}} to start the data collecting. A progress bar will be shown: Collecting Data... ->Sorting Data...->Saving charts...<br />
<br />
The (Fig. 8.15) shows the result of '''Age of first child''' for all women born between 1500 and 2008. For most (576) persons personal information was missing, for some birth information was missing, but for 33 women their first child was born at age 20. With the detailed information further analysis can be done: calculate average, std. dev. etc.<br />
<br />
{{-}}<br />
<br />
===<u>Timeline Chart</u>===<br />
<br />
This report outputs the list of people with their lifetimes represented by intervals on a common chronological scale. Specific options include filter, sorting method, and the title of the report.<br />
<br />
====Paper Options====<br />
<br />
With the {{man label|Paper Options}} you can change Paper format (Size and Orientation) and margins (Left, Right, Top and Bottom) and use metric values or not.<br />
<br />
====Document Options====<br />
<br />
Document options: choose the output format: Open Document Text, PDF document, PostScript, Print..., or SVG (Scalable Vector Graphics). A {{man label|check box}} is available where you can indicate to open the made document with [http://www.documentfoundation.org/download/ LibreOffice] Word Processor or a Document Viewer (PDF file).<br />
<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
{{-}}<br />
<br />
{{man index|Gramps 3.4 Wiki Manual - Reports - part 3|Gramps 3.4 Wiki Manual - Reports - part 4.2|3.4}}<br />
<br />
{{languages}}<br />
<br />
[[Category:Documentation]]<br />
[[Category:Plugins]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Gramps_3.4_Wiki_Manual_-_Reports_-_part_4&diff=36910Gramps 3.4 Wiki Manual - Reports - part 42012-04-30T01:24:00Z<p>Ander882: /* Display tab */</p>
<hr />
<div>This section describes the different Graphical Reports available in Gramps.<br />
<br />
{{man index|Gramps 3.4 Wiki Manual - Reports - part 3|Gramps 3.4 Wiki Manual - Reports - part 4.2|3.4}}<br />
<br />
{{grampsmanualcopyright}}<br />
<br />
{{languages|Gramps_3.4_Wiki_Manual_-_Reports - part 4}}<br />
<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
==Graphical Reports==<br />
<br />
Graphical reports represent information in forms of charts and graphs. Most of the options are common among graphical reports, therefore they will be described only once, at the end of this section. The few options which are specific to a given report will be described directly in that report's entry. See also [[Gramps_3.4_Wiki_Manual_-_Reports_-_part_2|substitution values]].<br />
<br />
The following graphical reports are currently available in Gramps:<br />
<br />
===<u>Ancestor Tree</u>===<br />
<br />
This report generates the chart of people who are ancestors of the Active Person. <br />
<br />
====Paper Options====<br />
With the {{man label|Paper Options}} you can change Paper format (Size and Orientation) and margins (Left, Right, Top and Bottom) and use metric values or not.<br />
<br />
====Document Options====<br />
Choose the output format: Open Document Text, PDF document, PostScript, Print..., or SVG (Scalable Vector Graphics). A {{man label|check box}} is available where you can indicate to open the made document with [http://www.documentfoundation.org/download/ LibreOffice] Word Processor or a Document Viewer (PDF file).<br />
<br />
==== Tree Options tab ====<br />
<br />
[[Image:Ancestor_tree_tab.png|right|thumb|350px|Tree Options tab]]<br />
<br />
The {{man button|Center Person}} is chosen here. The Active person will be the default.<br />
<br />
With the input field {{man label|Generations}} you can change the number of generations considered.<br />
<br />
{{man label|Display unknown generations}} will allow you to select how many generations of empty boxes to display when the tree is not completely full.<br />
<br />
Here is also the check box {{man label|Compress tree}}.<br />
<br />
{{man label|Center person uses which format:}} allows you to specify if the center person uses the father display format or the mother display format found on the Display tab.<br />
<br />
==== Display tab ====<br />
<br />
[[Image:Ancestor_display_tab.png|right|thumb|250px|Display tab]]<br />
<br />
This tab allows you to determine the {{man label|Father Display Format}} to be used for the report. All fathers, grandfathers, etc. will use this format.<br />
<br />
The {{man label|Mother Display Format}} to be used for all mothers, grandmothers, etc. will use this format.<br />
<br />
The {} around the death information line states that the text 'd. ' will display ONLY when there is death information. See [[Gramps_3.4_Wiki_Manual_-_Reports_-_part_2|Substitution Values]] for more information, including how to include places and attributes, and format names and dates and places.<br />
<br />
{{man label|Include Marriage box}} specifies to display an extra box between a father and mother that contains marriage information. {{man label|The Marriage Display Format}} (see [[Gramps_3.4_Wiki_Manual_-_Reports_-_part_2|Substitution Values]]) specifies what will print in this box.<br />
<br />
==== Size tab ====<br />
<br />
[[Image:Ancestor_sizes_tab.png|right|thumb|250px|Sizes tab]]<br />
<br />
{{man label|Scale tree to fit}} will make the tree larger or smaller to fit the page as desired. The options are:<br />
* Do not Scale the tree<br />
* Scale tree to fit page width only<br />
* Scale tree to fit the size of the page<br />
<br />
where {{man label|Resize page to fit tree}} will make the page larger or smaller to fit the tree <br />
<br />
If both are selected, the options happen in that order; scale the tree first, then the page.<br />
<br />
These two options are better described in [[Gramps_3.4_Wiki_Manual_-_Reports_-_part_4.2|Size options]] with tips for making nicer reports.<br />
<br />
==== Include tab ====<br />
<br />
[[Image:Ancestor_include_tab.png|right|thumb|250px|Note tab]]<br />
<br />
This tab gives you the option to include other items on the report.<br />
<br />
{{man label|Report title}} allows you to choose a title for the report. <br />
* ''Do not print a title''<br />
* ''Include Report Title''<br />
<br />
And this tab also includes check boxes for {{man label|Include a border}}, {{man label|Include page numbers}}, and {{man label|Include blank pages}}.<br />
<br />
This tab also allows you to {{man label|Include a note}} to one of the corners of the report.<br />
<br />
“$T” within the note will display the day that the report was made. Regular date formatting (see [[Gramps_3.4_Wiki_Manual_-_Reports_-_part_2|Substitution Values]]) applies.<br />
<br />
Currently a note will be attached to a corner. If a person box writes over it, the note box will not move. Select another corner to see the note tab if this happens.<br />
<br />
====Final Result====<br />
<br />
[[Image:Ancestor chart.png|thumb|left|500x|Fig. 8.2 PDF Output ancestor tree]]<br />
<br />
Fig. 8.2 shows the final output result.<br />
<br />
{{-}}<br />
<br />
===<u>Calendar</u>===<br />
<br />
This report produces a calendar with birthdays and anniversaries on a page by month.<br />
<br />
====Paper Options====<br />
<br />
[[Image:Calendarreport1.png|right|thumb|350px|Fig. 8.3 Calendar Paper Options]]<br />
<br />
With the Paper Options you can change<br />
* Paper format (Size and Orientation)<br />
* Margins (Left, Right, Top and Bottom) <br />
and whether to use metric values or not.<br />
<br />
{{-}}<br />
<br />
====Document options====<br />
<br />
[[Image:Calendarreport4.png|right|thumb|350px|Fig. 8.4 Calendar Document Options]]<br />
<br />
* Output Format: choose the output format: <br />
** Open Document Text<br />
** PDF document<br />
** PostScript<br />
** Print...<br />
** SVG (Scalable Vector Graphics). A {{man label|check box}} is available where you can indicate to open the made document with [http://www.documentfoundation.org/download/ LibreOffice] Word Processor or a Document Viewer (PDF file).<br />
* Filename: default value is ''/home/<username>/calendar.pdf''.<br />
* Style: default ''default style'' . With the {{man button|Style Editor...}} you can add Document Styles.<br />
<br />
{{-}}<br />
<br />
====Report Options====<br />
<br />
[[Image:Calendarreport2.png|right|thumb|250px|Fig. 8.5 Calendar Report Options]]<br />
<br />
* Year of calendar: for which year you want the calendar to be build.<br />
* Filter: select filter to restrict people that appear on the calendar<br />
** Entire Database : not recommended!<br />
** Descendants of ...<br />
** Descendant Families of ...<br />
** Ancestors of ...<br />
** People with common ancestors with ...<br />
** any custom filter who have made<br />
* Center Person: the center person for the report<br />
* Name Format: Select the format to display names: choose between:<br />
** Surname, Given Patronymic<br />
** Given Surname<br />
** Patronymic, Given<br />
** Given<br />
* Country for holidays: Select the country to see associated holidays choose between:<br />
** Don't include holidays: default value<br />
** Canada / China / Deutschland / Finland / France / Sverige - röda dagar / United States / Ceska republika<br />
* First day of week:<br />
* Birthday surname:<br />
* Checkboxes:<br />
** Include only living people: include only living people in the calendar<br />
** Include birthdays: include birthdays in the calendar<br />
** Include anniversaries: include anniversaries in the calendar<br />
<br />
{{-}}<br />
<br />
====Calendar Text Options====<br />
<br />
[[Image:Calendarreport3.png|right|thumb|250px|Fig. 8.6 Calendar Text Options]]<br />
<br />
Here you can fill in three lines of text that will be put at the bottom of the page.<br />
* Text Area 1: First line of text at bottom of calendar default value : ''My Calendar''<br />
* Text Area 2: Second line of text at bottom of calendar default value: ''Produced by Gramps''<br />
* Text Area 3: Third line of text at bottom of calendar default value: '' http://gramps-project.org/''<br />
<br />
{{-}}<br />
<br />
====Final Result====<br />
<br />
[[Image:Calendarreport5.png|right|thumb|450px|Fig. 8.7 Calendar Result]]<br />
<br />
The final result can be seen on the right side.<br />
<br />
[[Calendar_tools_holidays|Calendar tools holidays]] explains how to add or change the holidays appearing on the output of the calendar plugin.<br />
<br />
{{-}}<br />
<br />
===<u>Descendant Tree</u>===<br />
<br />
This report generates a graph of people who are descendants of the Active Person. Specific options include the format of the displayed entries.<br />
<br />
====Paper Options====<br />
With the Paper Options you can change<br />
* Paper format (Size and Orientation)<br />
* Margins (Left, Right, Top and Bottom) <br />
and whether to use metric values or not.<br />
<br />
====Document Options====<br />
* Output Format: choose the output format: <br />
** Open Document Text<br />
** PDF document<br />
** PostScript<br />
** Print...<br />
** SVG (Scalable Vector Graphics). A {{man label|check box}} is available where you can indicate to open the made document with [http://www.documentfoundation.org/download/ LibreOffice] Word Processor or a Document Viewer (PDF file).<br />
* Filename: default value is ''/home/<username>/descend_chart.pdf''.<br />
* Style: default ''default style'' . With the {{man button|Style Editor...}} you can add Document Styles.<br />
<br />
==== Descendant report Tree tab ====<br />
<br />
[[Image:descend_treeP_tab.png|right|thumb|250px|Descendant Options tab]]<br />
<br />
{{man button|Report for:}} option will select the center person for this report. The currently home person will be the default person displayed. <br />
<br />
{{man label|Start with the parent(s) of the selected first}} will display parents of the center person if the parents are known. As such any siblings of the center person will be displayed too.<br />
<br />
This is broken apart from the tree tab as the 'Family Descendant Report' only differs in this one part on this tab.<br />
<br />
==== Tree tab ====<br />
<br />
[[Image:descend_tree2_tab.png|right|thumb|250px|Descendant Options tab]]<br />
<br />
Both of the Descendant Tree and Family Descendant Tree reports share these features on the Tree tab:<br />
<br />
The number of {{man label|Generations}} to see on the report (from the center person/family). If {{man label|Start with the parent(s) of the selected first}} is selected, this number is effectively increased by one.<br />
<br />
{{man label|Level of spouses}} specifies the how deep to display spouses. <br />
<br />
For the example: <br />
<br />
* Abe is a direct descendant<br />
** Abe has/had married Barbra and had two children<br />
** Abe also married Bridget and had one child<br />
*** Bridget has/had married Carl. <br />
**** Carl and Denise had a child.<br />
<br />
Given the above example, this is what will be displayed for the first three {{man label|Level of spouses}} options.<br />
* 0 means that only direct descendants will be shown. Nothing on the Secondary tab will be shown (Spousal information or Marriage information). For the example above, only Abe will be shown with three children directly under him<br />
* 1 means that only spouses of the direct descendants will be shown. For the example above, Abe will be shown with two pieces of marriage information. Under the first will be two children and one child under the second.<br />
* 2 means that spouses of spouses are shown. Same as 1 but Bridget will also show her other marriage. If they had any children, they would be shown too.<br />
* 3 means that everyone in the example above will be displayed.<br />
Any option above 1 is very hard to read on the report without the {{man label|Indent Spouses}} option on the Secondary tab.<br />
And last but not least is the {{man label|Compress Tree}} option which tries to move everyone up as far as they can go (compress) and still have a readable report.<br />
<br />
==== Display tab ====<br />
<br />
[[Image:descend_display_tab.png|right|thumb|250px|Descendant Display tab]]<br />
<br />
{{man label|Descendant Display Format}} sets the display for all descendants in the tree. The default is:<br />
<pre>$n<br />
b. $b<br />
{d. $d}</pre><br />
<br />
The {} around the death information line states that this entire line will display ONLY when there is death information. See [[Gramps_3.4_Wiki_Manual_-_Reports_-_part_2|Substitution Values]] for more information, including how to include places and attributes, and format names and dates and places.<br />
<br />
And the check box {{man label|Bold direct descendants}} can also make the report easier to read.<br />
<br />
You can set the {{man label|Spousal Display format}}. If you do not wish to have the separate marital box, the spousal box can be used for marriage information. This option defaults as above.<br />
<br />
{{man label|Indent spouses}} will offset spouses a little from each other making it easier to know who has married who.<br />
<br />
{{man label|Include marriage box}} will display a separate box on the tree for marriage information. The display for this box is set in {{man label|Marriage Display format}}.<br />
<br />
{{-}}<br />
<br />
==== Replace tab ====<br />
<br />
[[Image:descend_replace_tab.png|right|thumb|250px|Descendant Replace tab]]<br />
<br />
This allows you to put in pairs of strings separated by '/' that state what you want to replace and what you want to replace it with. <br />
<br />
{{-}}<br />
<br />
Example:<br />
<pre>The United States of America/USA<br />
United Kingdom of Great Britain and Northern Ireland/UK<br />
Llanfair&shy;pwllgwyn&shy;gyllgo&shy;gerychwyrn&shy;drobwll&shy;llanty&shy;silio&shy;gogogoch/Llanfairpwll</pre><br />
Every column width is defined by the widest box in the report. So if one box happens to be a lot wider than all of the others, a lot of space will be wasted. This option allows you to remove or abbreviate parts of the string that is not needed or can be cut down so the amount of space wasted is minimal.<br />
<br />
==== Include tab ====<br />
<br />
[[Image:Ancestor_include_tab.png|right|thumb|250px|Descendant Replace tab]]<br />
<br />
{{man label|Report title}} allows you to choose a title for the report. <br />
* ''Do not print a title''<br />
* ''Descendant Chart for [selected person(s)]''<br />
<br />
And this tab also includes check boxes to {{man label|Include a border}}, {{man label|Include page numbers}}, and {{man label|Include blank pages}}.<br />
<br />
This tab also allows you to {{man label|Include a note}} to one of the corners of the report. <br />
<br />
“$T” within the report will display the day that the report was made.<br />
Regular date formatting (see [[Gramps_3.4_Wiki_Manual_-_Reports_-_part_2|Substitution Values]]) applies.<br />
<br />
Currently a note will be attached to a corner. If a person box writes over it, the note box will not move. Select another corner to see the note tab if this happens.<br />
<br />
====Final Result====<br />
<br />
[[Image:Descendant_tree2.png|right|thumb|400px|Fig. 8.9 Descendant Tree Result]]<br />
<br />
The final result can be seen on the right side.<br />
<br />
{{-}}<br />
<br />
===<u>Family Descendant Tree</u>===<br />
<br />
{{man note|Shared options with the [[#Descendant Tree|Descendant Tree report]]|This report only has three differences from the 'Descendant Tree' report. The only differences are:<br />
# this report runs off of a family instead of a person (differences on the tree tab)<br />
# More options for a report title (on the Include tab)<br />
# the final result<br />
}}<br />
<br />
==== Tree Tab ====<br />
<br />
[[Image:descend_treeF_tab.png|right|thumb|250px|Descendant Options tab]]<br />
<br />
{{man button|Report for:}} option will select the center family (Father and Mother) for this report. The currently active family will be the default family displayed.<br />
<br />
Choosing {{man label|Start with the parent(s) of the selected first}} may display two sets of parents (if the parents of both the father and mother are known). One set of parents for the father, and another set of parents for the mother of the family (ie grandparents of the children). As such, any siblings of the father will be shown on the fathers side and any siblings with the mother will be displayed with her. So the children of the center family will see their grandparents, parents, uncles and aunts and even cousins if there are any.<br />
<br />
==== Include Tab ====<br />
The {{man label|Report Title}}: has these additional options:<br />
# ''Do not print a title''<br />
# ''Descendant Chart for [selected person(s)]''<br />
# ''Family Chart for [names of chosen family]''<br />
# ''Cousin Chart for [names of children]'' (Only available if {{man label|Start with the parent(s) of the selected first}} is chosen)<br />
<br />
==== Final Result ====<br />
<br />
[[Image:Family_Descendant_chart.png|right|thumb|400px|Family Descendant Tree Result]]<br />
<br />
The final result can be seen on the right side.<br />
<br />
Note: The parents for Alice Paula are not shown because they are unknown (not in the database). Otherwise her parents, siblings and nieces/nephews could be shown.<br />
<br />
{{-}}<br />
<br />
===<u>Fan Chart</u>===<br />
<br />
This report produces a chart resembling a fan, with Active person in the center, parents the semicircle next to it, grandparents in the next semicircle, and so on, for a total of five generations.<br />
<br />
====Paper Options====<br />
With the {{man label|Paper Options}} you can change Paper format (Size and Orientation) and margins (Left, Right, Top and Bottom) and use metric values or not.<br />
<br />
====Document Options====<br />
Choose the output format: Open Document Text, PDF document, PostScript, Print..., or SVG (Scalable Vector Graphics). A {{man label|check box}} is available where you can indicate to open the made document with [http://www.documentfoundation.org/download/ LibreOffice] Word Processor or a Document Viewer (PDF file).<br />
<br />
====Report Options====<br />
<br />
[[Image:Fanchartoptions.png|right|thumb|250px|Fig. 8.10 Options Fan chart]]<br />
[[Image:Fanchartpdf.png|left|thumb|250px|Fig. 8.11 Fan chart]]<br />
<br />
First the Center Person is displayed. Using the {{man button|Edit}} button you can select a different person. With the next input field {{man label|Generations}} you can change the number of generations considered.<br />
Next input field {{man label|Type of graph}}: choose via the drop down menu: full, half , or quarter circle.<br />
Next input field {{man label|Background color}}: choose white or generation dependant.<br />
Next input field {{man label|Orientation of radial text}} : choose upright or roundabout<br />
<br />
{{-}}<br />
<br />
===<u>Statistics Chart</u>===<br />
<br />
This report can collect and display a wealth of statistical data about your database. Specific options include filter, sorting methods, and additional birth- and gender-based limit for inclusion into statistics. You can also set the minimum number of items to qualify for the bar chart, so that the charts with fewer items will generate a pie chart instead. The '''Chart Selection''' tab allows you to check which charts you want to include in your report.<br />
<br />
{{-}}<br />
<br />
====Paper Options====<br />
<br />
With the {{man label|Paper Options}} you can change Paper format (Size and Orientation) and margins (Left, Right, Top and Bottom) and use metric values or not.<br />
<br />
====Document Options====<br />
<br />
Document options: choose the output format: Open Document Text, PDF document, PostScript, Print..., or SVG (Scalable Vector Graphics). A {{man label|check box}} is available where you can indicate to open the made document with [http://www.documentfoundation.org/download/ LibreOffice] Word Processor or a Document Viewer (PDF file).<br />
<br />
====Report Options====<br />
<br />
[[Image:Statistic.png|right|thumb|250px|right|Fig. 8.12 Report Options]]<br />
<br />
* Filter: determines what people are included in the report. You can choose the entire Database, or descendants of a certain person, people with a common ancestor as... or a default/common made filter.<br />
* Filter person: The center person for the filter: only available if as filter not entire database selected. {{man button|Edit}} button let you choose another filter person.<br />
* Sort chart items by: Select how the statistical data is sorted: Choose Item count or item name from the drop down list.<br />
* check box: sort in reverse order<br />
* People born after: Birth year from which to include people: fill in a year to start from<br />
* People born before: Birth year until which to include people: fill in a year<br />
* check box: Whether to include people without known birth years<br />
* Gender included: Select which genders are included into statistics. Choose both, men, or women.<br />
* Max. items for a pie: With fewer items pie chart and legend will be used instead of a bar chart. Choose a number from the drop down list.<br />
<br />
{{-}}<br />
<br />
====Chart Options====<br />
<br />
[[Image:Statistic1.png|right|thumb|350px|Fig. 8.13 Statistics chart options]]<br />
<br />
* Charts 1: 9 check boxes are available to include charts with indicated data:<br />
<br />
[[Image:Statgraftaart.png|right|thumb|350px|Fig. 8.14 Results]]<br />
<br />
[[Image:Statistic2.png|right|thumb|350px|Fig. 8.15 Results]]<br />
<br />
** Age<br />
** Death place<br />
** Death month<br />
** Age when first child born<br />
** Title<br />
** Age when last child born<br />
** Birth month<br />
** Age at marriage<br />
** Age at death<br />
* Charts 2: 10 check boxes are available to include charts with indicated data:<br />
** Event type<br />
** Number of children<br />
** Marriage place <br />
** Number of relationships<br />
** Surname<br />
** Death year<br />
** Gender<br />
** Forename<br />
** Birth year<br />
** Birth place<br />
<br />
If all needed info is filled in click on {{man button|OK}} to start the data collecting. A progress bar will be shown: Collecting Data... ->Sorting Data...->Saving charts...<br />
<br />
The (Fig. 8.15) shows the result of '''Age of first child''' for all women born between 1500 and 2008. For most (576) persons personal information was missing, for some birth information was missing, but for 33 women their first child was born at age 20. With the detailed information further analysis can be done: calculate average, std. dev. etc.<br />
<br />
{{-}}<br />
<br />
===<u>Timeline Chart</u>===<br />
<br />
This report outputs the list of people with their lifetimes represented by intervals on a common chronological scale. Specific options include filter, sorting method, and the title of the report.<br />
<br />
====Paper Options====<br />
<br />
With the {{man label|Paper Options}} you can change Paper format (Size and Orientation) and margins (Left, Right, Top and Bottom) and use metric values or not.<br />
<br />
====Document Options====<br />
<br />
Document options: choose the output format: Open Document Text, PDF document, PostScript, Print..., or SVG (Scalable Vector Graphics). A {{man label|check box}} is available where you can indicate to open the made document with [http://www.documentfoundation.org/download/ LibreOffice] Word Processor or a Document Viewer (PDF file).<br />
<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
{{-}}<br />
<br />
{{man index|Gramps 3.4 Wiki Manual - Reports - part 3|Gramps 3.4 Wiki Manual - Reports - part 4.2|3.4}}<br />
<br />
{{languages}}<br />
<br />
[[Category:Documentation]]<br />
[[Category:Plugins]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Gramps_3.4_Wiki_Manual_-_Reports_-_part_4&diff=36909Gramps 3.4 Wiki Manual - Reports - part 42012-04-30T01:23:21Z<p>Ander882: /* Display tab */</p>
<hr />
<div>This section describes the different Graphical Reports available in Gramps.<br />
<br />
{{man index|Gramps 3.4 Wiki Manual - Reports - part 3|Gramps 3.4 Wiki Manual - Reports - part 4.2|3.4}}<br />
<br />
{{grampsmanualcopyright}}<br />
<br />
{{languages|Gramps_3.4_Wiki_Manual_-_Reports - part 4}}<br />
<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
==Graphical Reports==<br />
<br />
Graphical reports represent information in forms of charts and graphs. Most of the options are common among graphical reports, therefore they will be described only once, at the end of this section. The few options which are specific to a given report will be described directly in that report's entry. See also [[Gramps_3.4_Wiki_Manual_-_Reports_-_part_2|substitution values]].<br />
<br />
The following graphical reports are currently available in Gramps:<br />
<br />
===<u>Ancestor Tree</u>===<br />
<br />
This report generates the chart of people who are ancestors of the Active Person. <br />
<br />
====Paper Options====<br />
With the {{man label|Paper Options}} you can change Paper format (Size and Orientation) and margins (Left, Right, Top and Bottom) and use metric values or not.<br />
<br />
====Document Options====<br />
Choose the output format: Open Document Text, PDF document, PostScript, Print..., or SVG (Scalable Vector Graphics). A {{man label|check box}} is available where you can indicate to open the made document with [http://www.documentfoundation.org/download/ LibreOffice] Word Processor or a Document Viewer (PDF file).<br />
<br />
==== Tree Options tab ====<br />
<br />
[[Image:Ancestor_tree_tab.png|right|thumb|350px|Tree Options tab]]<br />
<br />
The {{man button|Center Person}} is chosen here. The Active person will be the default.<br />
<br />
With the input field {{man label|Generations}} you can change the number of generations considered.<br />
<br />
{{man label|Display unknown generations}} will allow you to select how many generations of empty boxes to display when the tree is not completely full.<br />
<br />
Here is also the check box {{man label|Compress tree}}.<br />
<br />
{{man label|Center person uses which format:}} allows you to specify if the center person uses the father display format or the mother display format found on the Display tab.<br />
<br />
==== Display tab ====<br />
<br />
[[Image:Ancestor_display_tab.png|right|thumb|250px|Display tab]]<br />
<br />
This tab allows you to determine the {{man label|Father Display Format}} to be used for the report. All fathers, grandfathers, etc. will use this format.<br />
<br />
The {{man label|Mother Display Format}} to be used for all mothers, grandmothers, etc. will use this format.<br />
<br />
The {} around the death information line states that 'd. ' will display ONLY when there is death information. See [[Gramps_3.4_Wiki_Manual_-_Reports_-_part_2|Substitution Values]] for more information, including how to include places and attributes, and format names and dates and places.<br />
<br />
{{man label|Include Marriage box}} specifies to display an extra box between a father and mother that contains marriage information. {{man label|The Marriage Display Format}} (see [[Gramps_3.4_Wiki_Manual_-_Reports_-_part_2|Substitution Values]]) specifies what will print in this box.<br />
<br />
==== Size tab ====<br />
<br />
[[Image:Ancestor_sizes_tab.png|right|thumb|250px|Sizes tab]]<br />
<br />
{{man label|Scale tree to fit}} will make the tree larger or smaller to fit the page as desired. The options are:<br />
* Do not Scale the tree<br />
* Scale tree to fit page width only<br />
* Scale tree to fit the size of the page<br />
<br />
where {{man label|Resize page to fit tree}} will make the page larger or smaller to fit the tree <br />
<br />
If both are selected, the options happen in that order; scale the tree first, then the page.<br />
<br />
These two options are better described in [[Gramps_3.4_Wiki_Manual_-_Reports_-_part_4.2|Size options]] with tips for making nicer reports.<br />
<br />
==== Include tab ====<br />
<br />
[[Image:Ancestor_include_tab.png|right|thumb|250px|Note tab]]<br />
<br />
This tab gives you the option to include other items on the report.<br />
<br />
{{man label|Report title}} allows you to choose a title for the report. <br />
* ''Do not print a title''<br />
* ''Include Report Title''<br />
<br />
And this tab also includes check boxes for {{man label|Include a border}}, {{man label|Include page numbers}}, and {{man label|Include blank pages}}.<br />
<br />
This tab also allows you to {{man label|Include a note}} to one of the corners of the report.<br />
<br />
“$T” within the note will display the day that the report was made. Regular date formatting (see [[Gramps_3.4_Wiki_Manual_-_Reports_-_part_2|Substitution Values]]) applies.<br />
<br />
Currently a note will be attached to a corner. If a person box writes over it, the note box will not move. Select another corner to see the note tab if this happens.<br />
<br />
====Final Result====<br />
<br />
[[Image:Ancestor chart.png|thumb|left|500x|Fig. 8.2 PDF Output ancestor tree]]<br />
<br />
Fig. 8.2 shows the final output result.<br />
<br />
{{-}}<br />
<br />
===<u>Calendar</u>===<br />
<br />
This report produces a calendar with birthdays and anniversaries on a page by month.<br />
<br />
====Paper Options====<br />
<br />
[[Image:Calendarreport1.png|right|thumb|350px|Fig. 8.3 Calendar Paper Options]]<br />
<br />
With the Paper Options you can change<br />
* Paper format (Size and Orientation)<br />
* Margins (Left, Right, Top and Bottom) <br />
and whether to use metric values or not.<br />
<br />
{{-}}<br />
<br />
====Document options====<br />
<br />
[[Image:Calendarreport4.png|right|thumb|350px|Fig. 8.4 Calendar Document Options]]<br />
<br />
* Output Format: choose the output format: <br />
** Open Document Text<br />
** PDF document<br />
** PostScript<br />
** Print...<br />
** SVG (Scalable Vector Graphics). A {{man label|check box}} is available where you can indicate to open the made document with [http://www.documentfoundation.org/download/ LibreOffice] Word Processor or a Document Viewer (PDF file).<br />
* Filename: default value is ''/home/<username>/calendar.pdf''.<br />
* Style: default ''default style'' . With the {{man button|Style Editor...}} you can add Document Styles.<br />
<br />
{{-}}<br />
<br />
====Report Options====<br />
<br />
[[Image:Calendarreport2.png|right|thumb|250px|Fig. 8.5 Calendar Report Options]]<br />
<br />
* Year of calendar: for which year you want the calendar to be build.<br />
* Filter: select filter to restrict people that appear on the calendar<br />
** Entire Database : not recommended!<br />
** Descendants of ...<br />
** Descendant Families of ...<br />
** Ancestors of ...<br />
** People with common ancestors with ...<br />
** any custom filter who have made<br />
* Center Person: the center person for the report<br />
* Name Format: Select the format to display names: choose between:<br />
** Surname, Given Patronymic<br />
** Given Surname<br />
** Patronymic, Given<br />
** Given<br />
* Country for holidays: Select the country to see associated holidays choose between:<br />
** Don't include holidays: default value<br />
** Canada / China / Deutschland / Finland / France / Sverige - röda dagar / United States / Ceska republika<br />
* First day of week:<br />
* Birthday surname:<br />
* Checkboxes:<br />
** Include only living people: include only living people in the calendar<br />
** Include birthdays: include birthdays in the calendar<br />
** Include anniversaries: include anniversaries in the calendar<br />
<br />
{{-}}<br />
<br />
====Calendar Text Options====<br />
<br />
[[Image:Calendarreport3.png|right|thumb|250px|Fig. 8.6 Calendar Text Options]]<br />
<br />
Here you can fill in three lines of text that will be put at the bottom of the page.<br />
* Text Area 1: First line of text at bottom of calendar default value : ''My Calendar''<br />
* Text Area 2: Second line of text at bottom of calendar default value: ''Produced by Gramps''<br />
* Text Area 3: Third line of text at bottom of calendar default value: '' http://gramps-project.org/''<br />
<br />
{{-}}<br />
<br />
====Final Result====<br />
<br />
[[Image:Calendarreport5.png|right|thumb|450px|Fig. 8.7 Calendar Result]]<br />
<br />
The final result can be seen on the right side.<br />
<br />
[[Calendar_tools_holidays|Calendar tools holidays]] explains how to add or change the holidays appearing on the output of the calendar plugin.<br />
<br />
{{-}}<br />
<br />
===<u>Descendant Tree</u>===<br />
<br />
This report generates a graph of people who are descendants of the Active Person. Specific options include the format of the displayed entries.<br />
<br />
====Paper Options====<br />
With the Paper Options you can change<br />
* Paper format (Size and Orientation)<br />
* Margins (Left, Right, Top and Bottom) <br />
and whether to use metric values or not.<br />
<br />
====Document Options====<br />
* Output Format: choose the output format: <br />
** Open Document Text<br />
** PDF document<br />
** PostScript<br />
** Print...<br />
** SVG (Scalable Vector Graphics). A {{man label|check box}} is available where you can indicate to open the made document with [http://www.documentfoundation.org/download/ LibreOffice] Word Processor or a Document Viewer (PDF file).<br />
* Filename: default value is ''/home/<username>/descend_chart.pdf''.<br />
* Style: default ''default style'' . With the {{man button|Style Editor...}} you can add Document Styles.<br />
<br />
==== Descendant report Tree tab ====<br />
<br />
[[Image:descend_treeP_tab.png|right|thumb|250px|Descendant Options tab]]<br />
<br />
{{man button|Report for:}} option will select the center person for this report. The currently home person will be the default person displayed. <br />
<br />
{{man label|Start with the parent(s) of the selected first}} will display parents of the center person if the parents are known. As such any siblings of the center person will be displayed too.<br />
<br />
This is broken apart from the tree tab as the 'Family Descendant Report' only differs in this one part on this tab.<br />
<br />
==== Tree tab ====<br />
<br />
[[Image:descend_tree2_tab.png|right|thumb|250px|Descendant Options tab]]<br />
<br />
Both of the Descendant Tree and Family Descendant Tree reports share these features on the Tree tab:<br />
<br />
The number of {{man label|Generations}} to see on the report (from the center person/family). If {{man label|Start with the parent(s) of the selected first}} is selected, this number is effectively increased by one.<br />
<br />
{{man label|Level of spouses}} specifies the how deep to display spouses. <br />
<br />
For the example: <br />
<br />
* Abe is a direct descendant<br />
** Abe has/had married Barbra and had two children<br />
** Abe also married Bridget and had one child<br />
*** Bridget has/had married Carl. <br />
**** Carl and Denise had a child.<br />
<br />
Given the above example, this is what will be displayed for the first three {{man label|Level of spouses}} options.<br />
* 0 means that only direct descendants will be shown. Nothing on the Secondary tab will be shown (Spousal information or Marriage information). For the example above, only Abe will be shown with three children directly under him<br />
* 1 means that only spouses of the direct descendants will be shown. For the example above, Abe will be shown with two pieces of marriage information. Under the first will be two children and one child under the second.<br />
* 2 means that spouses of spouses are shown. Same as 1 but Bridget will also show her other marriage. If they had any children, they would be shown too.<br />
* 3 means that everyone in the example above will be displayed.<br />
Any option above 1 is very hard to read on the report without the {{man label|Indent Spouses}} option on the Secondary tab.<br />
And last but not least is the {{man label|Compress Tree}} option which tries to move everyone up as far as they can go (compress) and still have a readable report.<br />
<br />
==== Display tab ====<br />
<br />
[[Image:descend_display_tab.png|right|thumb|250px|Descendant Display tab]]<br />
<br />
{{man label|Descendant Display Format}} sets the display for all descendants in the tree. The default is:<br />
<pre>$n<br />
b. $b<br />
{d. $d}</pre><br />
<br />
The {} around the death information line states that this entire line will display ONLY when there is death information. See [[Gramps_3.4_Wiki_Manual_-_Reports_-_part_2|Substitution Values]] for more information, including how to include places and attributes, and format names and dates and places.<br />
<br />
And the check box {{man label|Bold direct descendants}} can also make the report easier to read.<br />
<br />
You can set the {{man label|Spousal Display format}}. If you do not wish to have the separate marital box, the spousal box can be used for marriage information. This option defaults as above.<br />
<br />
{{man label|Indent spouses}} will offset spouses a little from each other making it easier to know who has married who.<br />
<br />
{{man label|Include marriage box}} will display a separate box on the tree for marriage information. The display for this box is set in {{man label|Marriage Display format}}.<br />
<br />
{{-}}<br />
<br />
==== Replace tab ====<br />
<br />
[[Image:descend_replace_tab.png|right|thumb|250px|Descendant Replace tab]]<br />
<br />
This allows you to put in pairs of strings separated by '/' that state what you want to replace and what you want to replace it with. <br />
<br />
{{-}}<br />
<br />
Example:<br />
<pre>The United States of America/USA<br />
United Kingdom of Great Britain and Northern Ireland/UK<br />
Llanfair&shy;pwllgwyn&shy;gyllgo&shy;gerychwyrn&shy;drobwll&shy;llanty&shy;silio&shy;gogogoch/Llanfairpwll</pre><br />
Every column width is defined by the widest box in the report. So if one box happens to be a lot wider than all of the others, a lot of space will be wasted. This option allows you to remove or abbreviate parts of the string that is not needed or can be cut down so the amount of space wasted is minimal.<br />
<br />
==== Include tab ====<br />
<br />
[[Image:Ancestor_include_tab.png|right|thumb|250px|Descendant Replace tab]]<br />
<br />
{{man label|Report title}} allows you to choose a title for the report. <br />
* ''Do not print a title''<br />
* ''Descendant Chart for [selected person(s)]''<br />
<br />
And this tab also includes check boxes to {{man label|Include a border}}, {{man label|Include page numbers}}, and {{man label|Include blank pages}}.<br />
<br />
This tab also allows you to {{man label|Include a note}} to one of the corners of the report. <br />
<br />
“$T” within the report will display the day that the report was made.<br />
Regular date formatting (see [[Gramps_3.4_Wiki_Manual_-_Reports_-_part_2|Substitution Values]]) applies.<br />
<br />
Currently a note will be attached to a corner. If a person box writes over it, the note box will not move. Select another corner to see the note tab if this happens.<br />
<br />
====Final Result====<br />
<br />
[[Image:Descendant_tree2.png|right|thumb|400px|Fig. 8.9 Descendant Tree Result]]<br />
<br />
The final result can be seen on the right side.<br />
<br />
{{-}}<br />
<br />
===<u>Family Descendant Tree</u>===<br />
<br />
{{man note|Shared options with the [[#Descendant Tree|Descendant Tree report]]|This report only has three differences from the 'Descendant Tree' report. The only differences are:<br />
# this report runs off of a family instead of a person (differences on the tree tab)<br />
# More options for a report title (on the Include tab)<br />
# the final result<br />
}}<br />
<br />
==== Tree Tab ====<br />
<br />
[[Image:descend_treeF_tab.png|right|thumb|250px|Descendant Options tab]]<br />
<br />
{{man button|Report for:}} option will select the center family (Father and Mother) for this report. The currently active family will be the default family displayed.<br />
<br />
Choosing {{man label|Start with the parent(s) of the selected first}} may display two sets of parents (if the parents of both the father and mother are known). One set of parents for the father, and another set of parents for the mother of the family (ie grandparents of the children). As such, any siblings of the father will be shown on the fathers side and any siblings with the mother will be displayed with her. So the children of the center family will see their grandparents, parents, uncles and aunts and even cousins if there are any.<br />
<br />
==== Include Tab ====<br />
The {{man label|Report Title}}: has these additional options:<br />
# ''Do not print a title''<br />
# ''Descendant Chart for [selected person(s)]''<br />
# ''Family Chart for [names of chosen family]''<br />
# ''Cousin Chart for [names of children]'' (Only available if {{man label|Start with the parent(s) of the selected first}} is chosen)<br />
<br />
==== Final Result ====<br />
<br />
[[Image:Family_Descendant_chart.png|right|thumb|400px|Family Descendant Tree Result]]<br />
<br />
The final result can be seen on the right side.<br />
<br />
Note: The parents for Alice Paula are not shown because they are unknown (not in the database). Otherwise her parents, siblings and nieces/nephews could be shown.<br />
<br />
{{-}}<br />
<br />
===<u>Fan Chart</u>===<br />
<br />
This report produces a chart resembling a fan, with Active person in the center, parents the semicircle next to it, grandparents in the next semicircle, and so on, for a total of five generations.<br />
<br />
====Paper Options====<br />
With the {{man label|Paper Options}} you can change Paper format (Size and Orientation) and margins (Left, Right, Top and Bottom) and use metric values or not.<br />
<br />
====Document Options====<br />
Choose the output format: Open Document Text, PDF document, PostScript, Print..., or SVG (Scalable Vector Graphics). A {{man label|check box}} is available where you can indicate to open the made document with [http://www.documentfoundation.org/download/ LibreOffice] Word Processor or a Document Viewer (PDF file).<br />
<br />
====Report Options====<br />
<br />
[[Image:Fanchartoptions.png|right|thumb|250px|Fig. 8.10 Options Fan chart]]<br />
[[Image:Fanchartpdf.png|left|thumb|250px|Fig. 8.11 Fan chart]]<br />
<br />
First the Center Person is displayed. Using the {{man button|Edit}} button you can select a different person. With the next input field {{man label|Generations}} you can change the number of generations considered.<br />
Next input field {{man label|Type of graph}}: choose via the drop down menu: full, half , or quarter circle.<br />
Next input field {{man label|Background color}}: choose white or generation dependant.<br />
Next input field {{man label|Orientation of radial text}} : choose upright or roundabout<br />
<br />
{{-}}<br />
<br />
===<u>Statistics Chart</u>===<br />
<br />
This report can collect and display a wealth of statistical data about your database. Specific options include filter, sorting methods, and additional birth- and gender-based limit for inclusion into statistics. You can also set the minimum number of items to qualify for the bar chart, so that the charts with fewer items will generate a pie chart instead. The '''Chart Selection''' tab allows you to check which charts you want to include in your report.<br />
<br />
{{-}}<br />
<br />
====Paper Options====<br />
<br />
With the {{man label|Paper Options}} you can change Paper format (Size and Orientation) and margins (Left, Right, Top and Bottom) and use metric values or not.<br />
<br />
====Document Options====<br />
<br />
Document options: choose the output format: Open Document Text, PDF document, PostScript, Print..., or SVG (Scalable Vector Graphics). A {{man label|check box}} is available where you can indicate to open the made document with [http://www.documentfoundation.org/download/ LibreOffice] Word Processor or a Document Viewer (PDF file).<br />
<br />
====Report Options====<br />
<br />
[[Image:Statistic.png|right|thumb|250px|right|Fig. 8.12 Report Options]]<br />
<br />
* Filter: determines what people are included in the report. You can choose the entire Database, or descendants of a certain person, people with a common ancestor as... or a default/common made filter.<br />
* Filter person: The center person for the filter: only available if as filter not entire database selected. {{man button|Edit}} button let you choose another filter person.<br />
* Sort chart items by: Select how the statistical data is sorted: Choose Item count or item name from the drop down list.<br />
* check box: sort in reverse order<br />
* People born after: Birth year from which to include people: fill in a year to start from<br />
* People born before: Birth year until which to include people: fill in a year<br />
* check box: Whether to include people without known birth years<br />
* Gender included: Select which genders are included into statistics. Choose both, men, or women.<br />
* Max. items for a pie: With fewer items pie chart and legend will be used instead of a bar chart. Choose a number from the drop down list.<br />
<br />
{{-}}<br />
<br />
====Chart Options====<br />
<br />
[[Image:Statistic1.png|right|thumb|350px|Fig. 8.13 Statistics chart options]]<br />
<br />
* Charts 1: 9 check boxes are available to include charts with indicated data:<br />
<br />
[[Image:Statgraftaart.png|right|thumb|350px|Fig. 8.14 Results]]<br />
<br />
[[Image:Statistic2.png|right|thumb|350px|Fig. 8.15 Results]]<br />
<br />
** Age<br />
** Death place<br />
** Death month<br />
** Age when first child born<br />
** Title<br />
** Age when last child born<br />
** Birth month<br />
** Age at marriage<br />
** Age at death<br />
* Charts 2: 10 check boxes are available to include charts with indicated data:<br />
** Event type<br />
** Number of children<br />
** Marriage place <br />
** Number of relationships<br />
** Surname<br />
** Death year<br />
** Gender<br />
** Forename<br />
** Birth year<br />
** Birth place<br />
<br />
If all needed info is filled in click on {{man button|OK}} to start the data collecting. A progress bar will be shown: Collecting Data... ->Sorting Data...->Saving charts...<br />
<br />
The (Fig. 8.15) shows the result of '''Age of first child''' for all women born between 1500 and 2008. For most (576) persons personal information was missing, for some birth information was missing, but for 33 women their first child was born at age 20. With the detailed information further analysis can be done: calculate average, std. dev. etc.<br />
<br />
{{-}}<br />
<br />
===<u>Timeline Chart</u>===<br />
<br />
This report outputs the list of people with their lifetimes represented by intervals on a common chronological scale. Specific options include filter, sorting method, and the title of the report.<br />
<br />
====Paper Options====<br />
<br />
With the {{man label|Paper Options}} you can change Paper format (Size and Orientation) and margins (Left, Right, Top and Bottom) and use metric values or not.<br />
<br />
====Document Options====<br />
<br />
Document options: choose the output format: Open Document Text, PDF document, PostScript, Print..., or SVG (Scalable Vector Graphics). A {{man label|check box}} is available where you can indicate to open the made document with [http://www.documentfoundation.org/download/ LibreOffice] Word Processor or a Document Viewer (PDF file).<br />
<br />
Back to [[Gramps_3.4_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
{{-}}<br />
<br />
{{man index|Gramps 3.4 Wiki Manual - Reports - part 3|Gramps 3.4 Wiki Manual - Reports - part 4.2|3.4}}<br />
<br />
{{languages}}<br />
<br />
[[Category:Documentation]]<br />
[[Category:Plugins]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Plugins3.2&diff=29927Plugins3.22011-08-21T16:46:40Z<p>Ander882: </p>
<hr />
<div>{| {{Prettytable}}<br />
|-<br />
! Plugin / Documentation<br />
! Type<br />
! Image<br />
! Description<br />
! Use<br />
! Rating (out of 4)<br />
! Contact<br />
! Download<br />
|-<br />
| Narrative Web Report 1.0.1<br />
| Webreport<br />
| <br />
| Temporary fix for Gramps 3.2.6; adds a fixed Narrative Web Report<br />
| All<br />
| 4 <br />
| [mailto:doug.blank@gmail.com Doug Blank]<br />
| [http://gramps-addons.svn.sourceforge.net/svnroot/gramps-addons/branches/gramps32/download/NarrativeWeb.addon.tgz NarrativeWeb.addon.tgz]<br />
|-<br />
| [[All Names Quickview]]<br />
| Quickview<br />
| [[Image:AllNames.gif|150px]]<br />
| Shows all names for all people.<br />
| All<br />
| 4 <br />
| [mailto:doug.blank@gmail.com Doug Blank]<br />
| [http://gramps-addons.svn.sourceforge.net/svnroot/gramps-addons/branches/gramps32/download/AllNamesQuickview.addon.tgz AllNamesQuickview.addon.tgz]<br />
|-<br />
| [[AttachSourceTool]]<br />
| Tool<br />
| [[Image:AttachSourceTool.jpg|150px]]<br />
| A tool to attach a source to a group of people.<br />
| All<br />
| 1<br />
| [mailto:doug.blank@gmail.com Doug Blank]<br />
| [http://gramps-addons.svn.sourceforge.net/svnroot/gramps-addons/branches/gramps32/download/AttachSourceTool.addon.tgz AttachSourceTool.addon.tgz]<br />
|-<br />
| [[BirthdaysGramplet]]<br />
| Gramplet<br />
| [[Image:BirthdaysGramplet.png|150px]]<br />
| Display the upcoming birthdays<br />
| All<br />
| 1<br />
| [mailto:peter017@gmail.com Peter Potrowl]<br />
| [http://gramps-addons.svn.sourceforge.net/svnroot/gramps-addons/branches/gramps32/download/BirthdaysGramplet.addon.tgz BirthdayGramplet.addon.tgz] <br />
|-<br />
| [[Gramplets#GUI_Interface|Cairo Clock Gramplet]]<br />
| Gramplet<br />
| [[Image:ClockGramplet.png|150px]] <br />
| A sample Cairo clock gramplet.<br />
| Developers<br />
| 1<br />
| [mailto:doug.blank@gmail.com Doug Blank]<br />
| [http://gramps-addons.svn.sourceforge.net/svnroot/gramps-addons/branches/gramps32/download/ClockGramplet.addon.tgz ClockGramplet.addon.tgz]<br />
|-<br />
| [[Calculate Estimated Dates]]<br />
| Tool<br />
| [[Image:Calcestdates_tab.png|150px]] <br />
| A tool to set estimated birth and death dates.<br />
| All<br />
| 2 <br />
| [mailto:doug.blank@gmail.com Doug Blank]<br />
| [http://gramps-addons.svn.sourceforge.net/svnroot/gramps-addons/branches/gramps32/download/CalculateEstimatedDates.addon.tgz CalculateEstimatedDates.addon.tgz]<br />
page.php Gramps Bugtracker]<br />
|-<br />
| [[Census Addons|Census Gramplet]]<br />
| Gramplet<br />
| [[Image:SourceForCensus.png|150px]] <br />
| Lists census events for the active person. Allows users to create and edit census data in a single form.<br />
| Expert users<br />
| 3 <br />
| [mailto:nick__hall@hotmail.com Nick Hall]<br />
| [http://gramps-addons.svn.sourceforge.net/svnroot/gramps-addons/branches/gramps32/download/Census.addon.tgz Census.addon.tgz]<br />
|-<br />
| [[DataEntryGramplet|Data Entry Gramplet]]<br />
| Gramplet<br />
| [[Image:DataEntryGramplet.png|150px]]<br />
| Quick Data Entry for People data.<br />
| Expert users<br />
| 4 <br />
| [http://www.gramps-project.org/bugs/my_view_page.php Gramps Bugtracker]<br />
| [http://gramps-addons.svn.sourceforge.net/svnroot/gramps-addons/branches/gramps32/download/DataEntryGramplet.addon.tgz DataEntryGramplet.addon.tgz]<br />
|-<br />
| [[DeepConnectionsGramplet|Deep Connections Gramplet]]<br />
| Gramplet<br />
| [[Image:DeepConnectionsGramplet.png|150px]]<br />
| Finds deep relationships between home and active people.<br />
| All<br />
| 3 <br />
| [http://www.gramps-project.org/bugs/my_view_|-<br />
| [http://gramps-addons.svn.sourceforge.net/svnroot/gramps-addons/branches/gramps32/download/DeepConnectionsGramplet.addon.tgz DeepConnectionsGramplet.addon.tgz]<br />
|-<br />
| [[DenominoViso]]<br />
| Web report<br />
| [[Image:DenominoVisoWebReport.png|150px]] <br />
| Creates interactive graphical ancestor/descendant tree on a webpage. <br />
| All<br />
| 3<br />
| Michiel Nauta<br />
| [http://members.tele2.nl/m.d.nauta/DenominoViso.addon.tgz DenominoViso.addon.tgz]<br />
|-<br />
| [[Descendant Count Gramplet]]<br />
| Gramplet<br />
| [[Image:DescendantCountGramplet.jpg|150px]]<br />
| Gives a count of descendants for each person.<br />
| All<br />
| 4 <br />
| [mailto:doug.blank@gmail.com Doug Blank]<br />
| [http://gramps-addons.svn.sourceforge.net/svnroot/gramps-addons/branches/gramps32/download/DescendantCount.addon.tgz DescendantCount.addon.tgz]<br />
|-<br />
| [[GEPS_013:_GRAMPS_Webapp#Getting_Started_with_Gramps_in_Django|Django Import/Export]]<br />
| Importer/Exporter<br />
| [[Image:DjangoImportExport.jpg|150px]] <br />
| Code to import and export your data from gramps-connect.<br />
| All<br />
| 3 <br />
| [mailto:doug.blank@gmail.com Doug Blank]<br />
| [http://gramps-addons.svn.sourceforge.net/svnroot/gramps-addons/branches/gramps32/download/Django.addon.tgz Django.addon.tgz]<br />
|- <br />
| [[ExportRaw]]<br />
| Exporter<br />
| [[Image:ExportRaw.jpg|150px]] <br />
| A GRAMPS exporter that will dump your BSDDB database into a flat text version (.raw) of the Python objects.<br />
| Developers<br />
| 4<br />
| [mailto:doug.blank@gmail.com Doug Blank]<br />
| [http://gramps-addons.svn.sourceforge.net/svnroot/gramps-addons/branches/gramps32/download/ExportRaw.addon.tgz ExportRaw.addon.tgz]<br />
|- <br />
| [[Family Sheet]]<br />
| Report<br />
| [[Image:FamilySheet.jpg|150px|Sample Family Sheet]]<br />
| Generates a form with all information about a person, their spouses and children.<br />
| All<br />
| 4<br />
| Reinhard Müller<br />
| [http://gramps-addons.svn.sourceforge.net/svnroot/gramps-addons/branches/gramps32/download/FamilySheet.addon.tgz FamilySheet.addon.tgz]<br />
|- <br />
| [[Family Tree]]<br />
| Report<br />
| [[Image:FamilyTree.gif|150px]]<br />
| Generates a graphical tree of a family with its ancestors and/or descendants.<br />
| All<br />
| 3<br />
| Reinhard Müller<br />
| [http://gramps-addons.svn.sourceforge.net/svnroot/gramps-addons/branches/gramps32/download/FamilyTree.addon.tgz FamilyTree.addon.tgz]<br />
|-<br />
| [[Filtered Reports]]<br />
| Report<br />
| [[Image:FilteredDescendantReport.png|150px]]<br />
| Create a descendant report using a filter.<br />
| Developer<br />Expert user<br />
| 2<br />
| [mailto:adam@csh.rit.edu Adam Stein]<br />
| [http://www.csh.rit.edu/~adam/Gramps/FilteredReports-0.1.0.tar.gz FilteredReports-0.1.0.tar.gz]<br />
|-<br />
| [[GRAMPS SQL Database]]<br />
| Exporter/Importer<br />
| [[Image:ExportSQL.jpg|150px]] <br />
| A GRAMPS exporter and importer that will export/import your BSDDB database as a fully-relational SQLite database.<br />
| Expert users<br />
| 3<br />
| [mailto:doug.blank@gmail.com Doug Blank]<br />
| [http://gramps-addons.svn.sourceforge.net/svnroot/gramps-addons/branches/gramps32/download/Sqlite.addon.tgz Sqlite.addon.tgz]<br />
|- <br />
| [[MapSevices|GoogleEarth]]<br />
| Mapservice<br />
| [[Image:GoogleEarth.jpg|150px]] <br />
| Show places with GoogleEarth.<br />
| All<br />
| 3 <br />
| [mailto:peter.talken@telia.com Peter Landgren]<br />
| [http://gramps-addons.svn.sourceforge.net/svnroot/gramps-addons/branches/gramps32/download/GoogleEarthWriteKML.addon.tgz GoogleEarthWriteKML.addon.tgz] <br />
|- <br />
| [[Graph View]]<br />
| Experimental View<br />
| [[Image:Graph_view.jpg|150px]] <br />
| A view that displays a descendant tree based on the active person. Requires PyGoocanvas and Goocanvas.<br />
| Testing<br />
| N/A<br />
| [mailto:gary.burton@zen.co.uk Gary Burton]<br />
| [http://gramps-addons.svn.sourceforge.net/svnroot/gramps-addons/branches/gramps32/download/GraphView.addon.tgz GraphView.addon.tgz]<br />
|-<br />
| [[Addon:Graphical|Graphical]]<br />
| Report<br />
| [[Image:Ancestor_chart.png|150px]] <br />
| Much improved replacements for the Ancestor and Descendant Graphical reports and new Familial Graphical report.<br />
| All<br />
| 4<br />
| [mailto:ander882@hotmail.com Craig Anderson]<br />
| [http://cjgeno.atspace.com/gramps/Graphical32.tar.gz Graphical32.tar.gz]<br />
|-<br />
| [[Handle.bash]]<br />
| External utility<br />
| [[Image:bashhandle.gif|150px]]<br />
| A bash script which makes it possible to work with multiple databases merging select branches at will without collisions.<br />
| All<br />
| 3<br />
| [[User:Lcc]] ([mailto:lcc.mailaddress@gmail.com e-mail])<br />
| [[Media:Handle.bash.tar.gz|Handle.bash.tar.gz]]<br />
|-<br />
| [[HeadlineNewsGramplet|Headline News Gramplet]]<br />
| Gramplet<br />
| [[Image:HeadlineNewsGramplet.png|150px]]<br />
| Shows GRAMPS breaking news, once per hour.<br />
| All<br />
| 4 <br />
| [http://www.gramps-project.org/bugs/my_view_page.php Gramps Bugtracker]<br />
| [http://gramps-addons.svn.sourceforge.net/svnroot/gramps-addons/branches/gramps32/download/HeadlineNewsGramplet.addon.tgz HeadlineNewsGramplet.addon.tgz]<br />
|-<br />
| [[Image Metadata Gramplet-v0.2]]<br />
| Gramplet<br />
| [[Image:Image Metadata Gramplet.png|150px]] <br />
| Allows you to add, edit, and remove image exif metadata.<br />
| Expert users<br />
| ?<br />
| [mailto:robhealey1@gmail.com Rob G. Healey]<br />
| [http://gramps-addons.svn.sourceforge.net/svnroot/gramps-addons/branches/gramps32/download/ImageMetadataGramplet.addon.tgz ImageMetadataGramplet.addon.tgz]<br />
|-<br />
| [[InformationGraph]]<br />
| Report<br />
| N/A<br />
| Generate detailed GraphViz graphs by spidering over the database.<br />
| All<br />
| N/A<br />
| [mailto:rah@bash.sh Bob Ham]<br />
| [http://pkl.net/~node/software/GVInformationGraph.py GVInformationGraph.py]<br />
|-<br />
| [[LastChange]]<br />
| Report and Gramplet<br />
| [[Image:Last_change_report_sample.png|150px]]<br />
| A gramplet and report to display the last ten records changed in the open family tree. The gramplet only displays persons, while the report can display changed famlies, places, and events too.<br />
| All<br />
| 1<br />
| [mailto:jmodule@friant.org Jakim Friant]<br />
| [http://gramps-addons.svn.sourceforge.net/svnroot/gramps-addons/branches/gramps32/download/LastChange.addon.tgz LastChange.addon.tgz]<br />
|-<br />
| [http://blog.gramps-project.org/?p=211 libaccess]<br />
| Library<br />
| [[Image:libaccess.jpg|150px]]<br />
| An experimental gen.lib interface.<br />
| Developers<br />
| 1<br />
| [mailto:doug.blank@gmail.com Doug Blank]<br />
| [http://gramps-addons.svn.sourceforge.net/svnroot/gramps-addons/branches/gramps32/download/libaccess.addon.tgz libaccess.addon.tgz]<br />
|-<br />
| [[Lines of Descendency Report]]<br />
| Report<br />
| [[Image:Lines-of-descendency.jpeg|150px]]<br />
| Prints out all descendency lines from a given ancestor to a given descendent in text.<br />
| All<br />
| 2.5<br />
| [[User:Lcc]] ([mailto:lcc.mailaddress@gmail.com e-mail])<br />
| [http://gramps-addons.svn.sourceforge.net/svnroot/gramps-addons/branches/gramps32/download/LinesOfDescendency.addon.tgz LinesOfDescendency.addon.tgz]<br />
|-<br />
| [[NoteGramplet]]<br />
| Gramplet<br />
| [[Image:NoteGramplet.png|150px]] <br />
| A data entry gramplet for notes.<br />
| All<br />
| 3<br />
| [mailto:doug.blank@gmail.com Doug Blank]<br />
| [http://gramps-addons.svn.sourceforge.net/svnroot/gramps-addons/branches/gramps32/download/NoteGramplet.addon.tgz NoteGramplet.addon.tgz]<br />
|-<br />
| [[Number Of Descendants Quickview]]<br />
| Quickview<br />
| [[Image:descendant_count_3.1.0.png|150px]]<br />
| Shows the number of descendants of the current person.<br />
| All<br />
| 4 <br />
| Reinhard Müller<br />
| [http://gramps-addons.svn.sourceforge.net/svnroot/gramps-addons/branches/gramps32/download/NumberOfDescendantsQuickview.addon.tgz NumberOfDescendantsQuickview.addon.tgz]<br />
|-<br />
| [[Place completion tool]]<br />
| Tool<br />
| [[Image:Place_completion_tool_empty.jpg|150px]] <br />
| A tool to fill in places.<br />
| All<br />
| 3<br />
| see package.<br />
| [http://gramps-addons.svn.sourceforge.net/svnroot/gramps-addons/branches/gramps32/download/PlaceCompletion.addon.tgz PlaceCompletion.addon.tgz]<br />
|-<br />
| [[PythonGramplet|Python Gramplet]]<br />
| Gramplet<br />
| [[Image:Pythongadget.png|150px]] <br />
| Interactive Python Shell.<br />
| Developers<br />
| 4 <br />
| [http://www.gramps-project.org/bugs/my_view_page.php Gramps Bugtracker]<br />
| [http://gramps-addons.svn.sourceforge.net/svnroot/gramps-addons/branches/gramps32/download/PythonGramplet.addon.tgz PythonGramplet.addon.tgz]<br />
|-<br />
| [[QueryGramplet]]<br />
| Gramplet and Report<br />
| [[Image:QueryGramplet.jpg|150px]]<br />
| A SQL-like query system.<br />
| All<br />
| 1<br />
| [mailto:doug.blank@gmail.com Doug Blank]<br />
| [http://gramps-addons.svn.sourceforge.net/svnroot/gramps-addons/branches/gramps32/download/Query.addon.tgz Query.addon.tgz]<br />
|-<br />
| [[RepositoriesReport]]<br />
| Report<br />
| [[Image:RepositoriesReport.png|150px]]<br />
| Lists repositories and their related sources informations.<br />
| All<br />
| 3<br />
| Jérôme Rapinat<br />
| [http://gramps-addons.svn.sourceforge.net/svnroot/gramps-addons/branches/gramps32/download/RepositoriesReport.addon.tgz RepositoriesReport.addon.tgz]<br />
|-<br />
| [[RelatedRelativesGramplet]]<br />
| Gramplet<br />
| [[Image:RelatedRelativesGramplet.png|150px]]<br />
| Display all persons in the database with a relation to a relative.<br />
| All<br />
| 1<br />
| [mailto:heinzbrinker@yahoo.de Heinz Brinker]<br />
| [http://gramps-addons.svn.sourceforge.net/viewvc/gramps-addons/branches/gramps32/download/RelatedRelativesGramplet.addon.tgz RelatedRelativesGramplet.addon.tgz] <br />
|-<br />
| [[SetAttributeTool]]<br />
| Tool<br />
| [[Image:SetAttributeTool.jpg|150px]]<br />
| A tool for setting attributes and their values on people.<br />
| All<br />
| 2<br />
| [mailto:doug.blank@gmail.com Doug Blank]<br />
| [http://gramps-addons.svn.sourceforge.net/svnroot/gramps-addons/branches/gramps32/download/SetAttributeTool.addon.tgz SetAttributeTool.addon.tgz]<br />
|-<br />
| [[SetMarkerTool]]<br />
| Tool<br />
| [[Image:SetMarkerTool.png|150px]]<br />
| Select a filter and mark people as "ToDo" (or anything else).<br />
| All<br />
| 1<br />
| [mailto:doug.blank@gmail.com Doug Blank]<br />
| [http://gramps-addons.svn.sourceforge.net/svnroot/gramps-addons/branches/gramps32/download/SetMarkerTool.addon.tgz SetMarkerTool.addon.tgz] <br />
|-<br />
| [[Split Views]]<br />
| Views<br />
| [[Image:SplitView.jpg|150px]] <br />
| A set of views that displays each main view type with a secondary gramplet pane.<br />
| All<br />
| 4 <br />
| [mailto:doug.blank@gmail.com Doug Blank]<br />
| [http://gramps-addons.svn.sourceforge.net/svnroot/gramps-addons/branches/gramps32/download/GrampletSidebarViews.addon.tgz GrampletSidebarViews.addon.tgz]<br />
|-<br />
| [[Timeline Quickview]]<br />
| Quickview<br />
| [[Image:TimelineQuickview.gif|150px]]<br />
| Shows timeline of events in immediate family members' lives.<br />
| All<br />
| 4 <br />
| [mailto:doug.blank@gmail.com Doug Blank]<br />
| [http://gramps-addons.svn.sourceforge.net/svnroot/gramps-addons/branches/gramps32/download/TimelineQuickview.addon.tgz TimelineQuickview.addon.tgz]<br />
|-<br />
| [[TimelinePedigreeView]]<br />
| View<br />
| [[Image:TimelinePedigreeView.jpg|150px]]<br />
| Pedigree showing timeline and relationships.<br />
| All<br />
| 3<br />
| [mailto:doug.blank@gmail.com Doug Blank]<br />
| [http://gramps-addons.svn.sourceforge.net/svnroot/gramps-addons/branches/gramps32/download/TimelinePedigreeView.addon.tgz TimelinePedigreeView.addon.tgz]<br />
|-<br />
| [[ToDoReport]]<br />
| Report<br />
| N/A<br />
| Tag notes as ToDo (or anything else) and you can generate a report with the notes and the records they are attached to. Another way of maintaining a to-do list within GRAMPS.<br />
| All<br />
| 1<br />
| [mailto:jmodule@friant.org Jakim Friant]<br />
| [http://gramps-addons.svn.sourceforge.net/svnroot/gramps-addons/branches/gramps32/download/ToDoReport.addon.tgz ToDoReport.addon.tgz]<br />
|}<br />
<br />
[[Category:Plugins]]<br />
[[Category:Developers/General]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Gramps_3.3_Wiki_Manual_-_Reports_-_part_4&diff=28220Gramps 3.3 Wiki Manual - Reports - part 42011-04-07T23:32:30Z<p>Ander882: /* Include Tab */</p>
<hr />
<div>This section describes the different Graphical Reports available in GRAMPS.<br />
{{man index|Gramps 3.3 Wiki Manual - Reports - part 3|Gramps 3.3 Wiki Manual - Reports - part 5|3.3}}<br />
<br />
<br />
[[Category:Documentation]][[Category:Plugins]]<br />
<br />
<br />
{{grampsmanualcopyright}}<br />
<br />
{{languages|Gramps_3.3_Wiki_Manual_-_Reports - part 4}}<br />
<br />
<br />
Back to [[Gramps_3.3_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
==Graphical Reports==<br />
<br />
Graphical reports represent information in forms of charts and graphs. Most of the options are common among graphical reports, therefore they will be described only once, at the end of this section. The few options which are specific to a given report will be described directly in that report's entry. See also [[Gramps_3.3_Wiki_Manual_-_Reports_-_part_2|substitution values]].<br />
<br />
The following graphical reports are currently available in GRAMPS:<br />
<br />
<br />
===<u>Ancestor Tree</u>===<br />
<br />
This report generates the chart of people who are ancestors of the Active Person. <br />
<br clear="all"/><br />
====Paper Options====<br />
With the {{man label|Paper Options}} you can change Paper format (Size and Orientation) and margins (Left, Right, Top and Bottom) and use metric values or not.<br />
<br />
====Document Options====<br />
Choose the output format: Open Document Text, PDF document, PostScript, Print..., or SVG (Scalable Vector Graphics). A {{man label|check box}} is available were you can indicate to open the made document with [http://www.documentfoundation.org/download/ LibreOffice] Word Processor or a Document Viewer (PDF file).<br />
<br />
==== Tree Options tab ====<br />
[[Image:Ancestor_tree_tab.png|right|thumb|250px|Tree Options tab]]<br />
<br />
The {{man button|Center Person}} is chosen here. The Active person will be the default.<br />
<br />
With the input field {{man label|Generations}} you can change the number of generations considered.<br />
<br />
{{man label|Display unknown generations}} will allow you to select how many generations of empty boxes to display when the tree is not completely full.<br />
<br />
Here is also the check box {{man label|Compress tree}}.<br />
<br />
{{man label|Center person uses which format:}} allows you to specify if the center person uses the father display format or the mother display format found on the Display tab.<br />
<br />
==== Display tab ====<br />
[[Image:Ancestor_display_tab.png|right|thumb|250px|Display tab]]<br />
<br />
This tab allows you to determine the {{man label|Father Display Format}} to be used for the report. All fathers, grandfathers, ect will use this format.<br />
<br />
The {{man label|Mother Display Format}} to be used for all mothers, grandmothers, ect will use this format.<br />
<br />
The {} around the death information line states that this entire line will display ONLY when there is death information. See [[Gramps_3.3_Wiki_Manual_-_Reports_-_part_2|Substitution Values]] for more.<br />
<br />
{{man label|Include Marriage box}} specifies to display an extra box between a father and mother that contains marriage information. {{man label|The Marriage Display Format}} (see [[Gramps_3.3_Wiki_Manual_-_Reports_-_part_2|Substitution Values]]) specifies what will print in this box.<br />
<br />
==== Size tab ====<br />
[[Image:Ancestor_sizes_tab.png|right|thumb|250px|Sizes tab]]<br />
<br />
{{man label|Scale tree to fit}} will make the tree larger or smaller to fit the page as desired. The options are:<br />
* Do not Scale the tree<br />
* Scale tree to fit page width only<br />
* Scale tree to fit the size of the page<br />
<br />
where {{man label|Resize page to fit tree}} will make the page larger or smaller to fit the tree <br />
<br />
If both are selected, the options happen in that order; scale the tree first, then the page.<br />
<br />
These two options are better described in [[Gramps_3.3_Wiki_Manual_-_Reports_-_part_4.2|Size options]] with tips for making nicer reports.<br />
<br />
==== Include tab ====<br />
[[Image:Ancestor_include_tab.png|right|thumb|250px|Note tab]]<br />
<br />
This tab gives you the option to include other items on the report.<br />
<br />
{{man label|Report title}} allows you to choose a title for the report. <br />
* ''Do not print a title''<br />
* ''Include Report Title''<br />
<br />
And this tab also includes check boxes for {{man label|Include a border}}, {{man label|Include page numbers}}, and {{man label|Include blank pages}}.<br />
<br />
This tab also allows you to {{man label|Include a note}} to one of the corners of the report.<br />
<br />
“$T” within the note will display the day that the report was made. Regular date formatting (see [[Gramps_3.3_Wiki_Manual_-_Reports_-_part_2|Substitution Values]]) applies.<br />
<br />
Currently a note will be attached to a corner. If a person box writes over it, the note box will not move. Select another corner to see the note tab if this happens.<br />
<br />
====Final Result====<br />
<br />
[[Image:Ancestor chart.png|thumb|250x|Fig. 8.2 PDF Output ancestor tree]]<br />
<br />
The final result can be seen on the right side.<br />
<br />
<br clear="all"/><br />
<br />
===<u>Calendar</u>===<br />
<br />
This report produces a calendar with birthdays and anniversaries on a page by month.<br />
<br />
====Paper Options====<br />
<br />
[[Image:Calendarreport1.png|right|thumb|250px|Fig. 8.3 Calendar Paper Options]]<br />
<br />
With the Paper Options you can change<br />
* Paper format (Size and Orientation)<br />
* Margins (Left, Right, Top and Bottom) <br />
and whether to use metric values or not.<br />
<br />
<br clear="all"/><br />
<br />
====Document options====<br />
<br />
[[Image:Calendarreport4.png|right|thumb|250px|Fig. 8.4 Calendar Document Options]]<br />
<br />
* Output Format: choose the output format: <br />
** Open Document Text<br />
** PDF document<br />
** PostScript<br />
** Print...<br />
** SVG (Scalable Vector Graphics). A {{man label|check box}} is available were you can indicate to open the made document with [http://www.documentfoundation.org/download/ LibreOffice] Word Processor or a Document Viewer (PDF file).<br />
* Filename: default value is ''/home/<username>/calendar.pdf''.<br />
* Style: default ''default style'' . With the {{man button|Style Editor...}} you can add Document Styles.<br />
<br />
<br clear="all"/><br />
<br />
====Report Options====<br />
<br />
[[Image:Calendarreport2.png|right|thumb|250px|Fig. 8.5 Calendar Report Options]]<br />
<br />
* Year of calendar: for which year you want the calendar to be build.<br />
* Filter: select filter to restrict people that appear on the calendar<br />
** Entire Database : not recommended!<br />
** Descendants of ...<br />
** Descendant Families of ...<br />
** Ancestors of ...<br />
** People with common ancestors with ...<br />
** any custom filter who have made<br />
* Center Person: the center person for the report<br />
* Name Format: Select the format to display names: choose between:<br />
** Surname, Given Patronymic<br />
** Given Surname<br />
** Patronymic, Given<br />
** Given<br />
* Country for holidays: Select the country to see associated holidays choose between:<br />
** Don't include holidays: default value<br />
** Canada / China / Deutschland / Finland / France / Sverige - röda dagar / United States / Ceska republika<br />
* First day of week:<br />
* Birthday surname:<br />
* Checkboxes:<br />
** Include only living people: include only living people in the calendar<br />
** Include birthdays: include birthdays in the calendar<br />
** Include anniversaries: include anniversaries in the calendar<br />
<br />
<br clear="all"/><br />
<br />
====Calendar Test Options====<br />
<br />
[[Image:Calendarreport3.png|right|thumb|250px|Fig. 8.6 Calendar Text Options]]<br />
<br />
Here you can fill in three lines of text that will be put at the bottom of the page.<br />
* Text Area 1: First line of text at bottom of calendar default value : ''My Calendar''<br />
* Text Area 2: Second line of text at bottom of calendar default value: ''Produced by GRAMPS''<br />
* Text Area 3: Third line of text at bottom of calendar default value: '' http://gramps-project.org/''<br />
<br />
<br clear="all"/><br />
<br />
====Final Result====<br />
<br />
[[Image:Calendarreport5.png|right|thumb|450px|Fig. 8.7 Calendar Result]]<br />
<br />
The final result can be seen on the right side.<br />
<br />
[[Calendar_tools_holidays|Calendar tools holidays]] explains how to add or change the holidays appearing on the output of the calendar plugin.<br />
<br />
<br clear="all"/><br />
<br />
===<u>Descendant Tree</u>===<br />
<br />
This report generates a graph of people who are descendants of the Active Person. Specific options include the format of the displayed entries.<br />
<br />
====Paper Options====<br />
With the Paper Options you can change<br />
* Paper format (Size and Orientation)<br />
* Margins (Left, Right, Top and Bottom) <br />
and whether to use metric values or not.<br />
<br />
====Document Options====<br />
* Output Format: choose the output format: <br />
** Open Document Text<br />
** PDF document<br />
** PostScript<br />
** Print...<br />
** SVG (Scalable Vector Graphics). A {{man label|check box}} is available were you can indicate to open the made document with [http://www.documentfoundation.org/download/ LibreOffice] Word Processor or a Document Viewer (PDF file).<br />
* Filename: default value is ''/home/<username>/descend_chart.pdf''.<br />
* Style: default ''default style'' . With the {{man button|Style Editor...}} you can add Document Styles.<br />
<br />
==== Descendant report Tree tab ====<br />
[[Image:descend_treeP_tab.png|right|thumb|250px|Descendant Options tab]]<br />
{{man button|Report for:}} option will select the center person for this report. The currently active person will be the default person displayed. <br />
<br />
{{man label|Start with the parent(s) of the selected first}} will display parents of the center person if the parents are known. As such any siblings of the center person will be displayed too.<br />
<br />
This is broken apart from the tree tab as the 'Family Descendant Report' only differs in this one part on this tab.<br />
<br />
==== Tree tab ====<br />
[[Image:descend_tree2_tab.png|right|thumb|250px|Descendant Options tab]]<br />
Both of the Descendant Tree and Family Descendant Tree reports share these features on the Tree tab:<br />
<br />
The number of {{man label|Generations}} to see on the report (from the center person/family). If {{man label|Start with the parent(s) of the selected first}} is selected, this number is effectively increased by one.<br />
<br />
{{man label|Level of spouses}} specifies the how deep to display spouses. <br />
<br />
For the example: <br />
<br />
* Abe is a direct descendant<br />
** Abe has/had married Barbra and had two children<br />
** Abe also married Bridget and had one child<br />
*** Bridget has/had married Carl. <br />
**** Carl and Denise had a child.<br />
<br />
Given the above example, this is what will be displayed for the first three {{man label|Level of spouses}} options.<br />
* 0 means that only direct descendants will be shown. Nothing on the Secondary tab will be shown (Spousal information or Marriage information). For the example above, only Abe will be shown with three children directly under him<br />
* 1 means that only spouses of the direct descendants will be shown. For the example above, Abe will be shown with two pieces of marriage information. Under the first will be two children and one child under the second.<br />
* 2 means that spouses of spouses are shown. Same as 1 but Bridget will also show her other marriage. If they had any children, they would be shown too.<br />
* 3 means that everyone in the example above will be displayed.<br />
Any option above 1 is very hard to read on the report without the {{man label|Indent Spouses}} option on the Secondary tab.<br />
And last but not least is the {{man label|Compress Tree}} option which tries to move everyone up as far as they can go (compress) and still have a readable report.<br />
<br />
==== Display tab ====<br />
[[Image:descend_display_tab.png|right|thumb|250px|Descendant Display tab]]<br />
<br />
{{man label|Descendant Display Format}} sets the display for all descendants in the tree. The default is:<br />
<pre>$n<br />
b. $b<br />
{d. $d}</pre><br />
<br />
And the check box {{man label|Bold direct descendants}} can also make the report easier to read.<br />
<br />
You can set the {{man label|Spousal Display format}}. If you do not wish to have the separate marital box, the spousal box can be used for marriage information. This option defaults as above.<br />
<br />
{{man label|Indent spouses}} will offset spouses a little from each other making it easier to know who has married who.<br />
<br />
{{man label|Include marriage box}} will display a separate box on the tree for marriage information. The display for this box is set in {{man label|Marriage Display format}}.<br />
<br />
see [[Display_formatting3_3|Substitution Values]] for more display options and how '{' can remove groups of information or an entire line.<br />
<br />
==== Replace tab ====<br />
[[Image:descend_replace_tab.png|right|thumb|250px|Descendant Replace tab]]<br />
This allows you to put in pairs of strings separated by '/' that state what you want to replace and what you want to replace it with. <br />
Example:<br />
<pre>The United States of America/USA<br />
United Kingdom of Great Britain and Northern Ireland/UK<br />
Llanfair&shy;pwllgwyn&shy;gyllgo&shy;gerychwyrn&shy;drobwll&shy;llanty&shy;silio&shy;gogogoch/Llanfairpwll</pre><br />
Every column width is defined by the widest box in the report. So if one box happens to be a lot wider than all of the others, a lot of space will be wasted. This option allows you to remove or abbreviate parts of the string that is not needed or can be cut down so the amount of space wasted is minimal. <br />
<br />
<br />
==== Include tab ====<br />
[[Image:Ancestor_include_tab.png|right|thumb|250px|Descendant Replace tab]]<br />
{{man label|Report title}} allows you to choose a title for the report. <br />
* ''Do not print a title''<br />
* ''Descendant Chart for [selected person(s)]''<br />
<br />
And this tab also includes check boxes to {{man label|Include a border}}, {{man label|Include page numbers}}, and {{man label|Include blank pages}}.<br />
<br />
This tab also allows you to {{man label|Include a note}} to one of the corners of the report. <br />
<br />
“$T” within the report will display the day that the report was made. Regular date formatting (see [[Display_formatting3_3|Substitution Values]]) applies.<br />
<br />
Currently a note will be attached to a corner. If a person box writes over it, the note box will not move. Select another corner to see the note tab if this happens.<br />
<br />
====Final Result====<br />
[[Image:Descendant_tree2.png|right|thumb|400px|Fig. 8.9 Descendant Tree Result]]<br />
<br />
The final result can be seen on the right side.<br />
<br />
<br clear="all"/><br />
<br />
===<u>Family Descendant Tree</u>===<br />
<br />
{{man note|Shared options with the [[#Descendant Tree|Descendant Tree report]]|This report only has three differences from the 'Descendant Tree' report. The only differences are:<br />
# is this report runs off of a family instead of a person (differences on the tree tab)<br />
# More options for a report title (on the Include tab)<br />
# the final result<br />
}}<br />
<br />
==== Tree Tab ====<br />
[[Image:descend_treeF_tab.png|right|thumb|250px|Descendant Options tab]]<br />
{{man button|Report for:}} option will select the center family (Father and Mother) for this report. The currently active family will be the default family displayed.<br />
<br />
Choosing {{man label|Start with the parent(s) of the selected first}} may display two sets of parents (if the parents of both the father and mother are known). One set of parents for the father, and another set of parents for the mother of the family (ie grandparents of the children). As such, any siblings of the father will be shown on the fathers side and any siblings with the mother will be displayed with her. So the children of the center family will see their grandparents, parents, uncles and aunts and even cousins if there are any.<br />
<br />
==== Include Tab ====<br />
The {{man label|Report Title}}: has these additional options:<br />
# ''Do not print a title''<br />
# ''Descendant Chart for [selected person(s)]''<br />
# ''Family Chart for [names of chosen family]''<br />
# ''Cousin Chart for [names of children]'' (Only available if {{man label|Start with the parent(s) of the selected first}} is chosen)<br />
<br />
==== Final Result ====<br />
[[Image:Family_Descendant_chart.png|right|thumb|400px|Family Descendant Tree Result]]<br />
<br />
The final result can be seen on the right side.<br />
<br />
Note: The parents for Alice Paula are not shown because they are unknown (not in the database). Otherwise her parents, siblings and nieces/nephews could be shown.<br />
<br />
<br clear="all"/><br />
<br />
===<u>Fan Chart</u>===<br />
<br />
This report produces a chart resembling a fan, with Active person in the center, parents the semicircle next to it, grandparents in the next semicircle, and so on, for a total of five generations.<br />
<br />
====Paper Options====<br />
With the {{man label|Paper Options}} you can change Paper format (Size and Orientation) and margins (Left, Right, Top and Bottom) and use metric values or not.<br />
<br />
====Document Options====<br />
Choose the output format: Open Document Text, PDF document, PostScript, Print..., or SVG (Scalable Vector Graphics). A {{man label|check box}} is available were you can indicate to open the made document with [http://www.documentfoundation.org/download/ LibreOffice] Word Processor or a Document Viewer (PDF file).<br />
<br />
====Report Options====<br />
<br />
[[Image:Fanchartoptions.png|right|thumb|250px|Fig. 8.10 Options Fan chart]]<br />
[[Image:Fanchartpdf.png|left|thumb|250px|Fig. 8.11 Fan chart]]<br />
<br />
First the Center Person is displayed. Using the {{man button|Edit}} button you can select a different person. With the next input field {{man label|Generations}} you can change the number of generations considered.<br />
Next input field {{man label|Type of graph}}: choose via the drop down menu: full, half , or quarter circle.<br />
Next input field {{man label|Background color}}: choose white or generation dependant.<br />
Next input field {{man label|Orientation of radial text}} : choose upright or roundabout<br />
<br />
<br clear="all"/><br />
<br />
===<u>Statistics Chart</u>===<br />
<br />
This report can collect and display a wealth of statistical data about your database. Specific options include filter, sorting methods, and additional birth- and gender-based limit for inclusion into statistics. You can also set the minimum number of items to qualify for the bar chart, so that the charts with fewer items will generate a pie chart instead. The '''Chart Selection''' tab allows you to check which charts you want to include in your report.<br />
<br />
<br clear="all"/><br />
<br />
====Paper Options====<br />
With the {{man label|Paper Options}} you can change Paper format (Size and Orientation) and margins (Left, Right, Top and Bottom) and use metric values or not.<br />
<br />
====Document Options====<br />
<br />
Document options: choose the output format: Open Document Text, PDF document, PostScript, Print..., or SVG (Scalable Vector Graphics). A {{man label|check box}} is available were you can indicate to open the made document with [http://www.documentfoundation.org/download/ LibreOffice] Word Processor or a Document Viewer (PDF file).<br />
<br />
====Report Options====<br />
<br />
[[Image:Statistic.png|right|thumb|250px|right|Fig. 8.12 Report Options]]<br />
<br />
* Filter: determines what people are included in the report. You can choose the entire Database, or descendants of a certain person, people with a common ancestor as... or a default/common made filter.<br />
* Filter person: The center person for the filter: only available if as filter not entire database selected. {{man button|Edit}} button let you choose another filter person.<br />
* Sort chart items by: Select how the statistical data is sorted: Choose Item count or item name from the drop down list.<br />
* check box: sort in reverse order<br />
* People born after: Birth year from which to include people: fill in a year to start from<br />
* People born before: Birth year until which to include people: fill in a year<br />
* check box: Whether to include people without known birth years<br />
* Gender included: Select which genders are included into statistics. Choose both, men, or women.<br />
* Max. items for a pie: With fewer items pie chart and legend will be used instead of a bar chart. Choose a number from the drop down list.<br />
<br />
<br clear="all"/><br />
<br />
====Chart Options====<br />
<br />
[[Image:Statistic1.png|right|thumb|250px|Fig. 8.13 Statistics chart options]]<br />
* Charts 1: 9 check boxes are available to include charts with indicated data:<br />
[[Image:Statgraftaart.png|right|thumb|250px|Fig. 8.14 Results]]<br />
[[Image:Statistic2.png|right|thumb|250px|Fig. 8.15 Results]]<br />
** Age<br />
** Death place<br />
** Death month<br />
** Age when first child born<br />
** Title<br />
** Age when last child born<br />
** Birth month<br />
** Age at marriage<br />
** Age at death<br />
* Charts 2: 10 check boxes are available to include charts with indicated data:<br />
** Event type<br />
** Number of children<br />
** Marriage place <br />
** Number of relationships<br />
** Surname<br />
** Death year<br />
** Gender<br />
** Forename<br />
** Birth year<br />
** Birth place<br />
<br />
If all needed info is filled in click on {{man button|OK}} to start the data collecting. A progress bar will be shown: Collecting Data... ->Sorting Data...->Saving charts...<br />
<br />
The image shows the result of '''Age of first child''' for all women born between 1500 and 2008. For most (576) persons personal information was missing, for some birth information was missing, but for 33 women their first child was born at age 20. With the detailed iformation further analysis can be done: calculate average, std. dev. etc.<br />
<br />
<br clear="all"/><br />
<br />
===<u>Timeline Chart</u>===<br />
<br />
This report outputs the list of people with their lifetimes represented by intervals on a common chronological scale. Specific options include filter, sorting method, and the title of the report.<br />
<br />
====Paper Options====<br />
With the {{man label|Paper Options}} you can change Paper format (Size and Orientation) and margins (Left, Right, Top and Bottom) and use metric values or not.<br />
<br />
====Document Options====<br />
<br />
Document options: choose the output format: Open Document Text, PDF document, PostScript, Print..., or SVG (Scalable Vector Graphics). A {{man label|check box}} is available were you can indicate to open the made document with [http://www.documentfoundation.org/download/ LibreOffice] Word Processor or a Document Viewer (PDF file).<br />
<br />
Back to [[Gramps_3.3_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
<br clear="all"/><br />
<br />
{{man index|Gramps 3.3 Wiki Manual - Reports - part 3|Gramps 3.3 Wiki Manual - Reports - part 5|3.3}}<br />
{{languages}}<br />
[[Category:Documentation]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Gramps_3.3_Wiki_Manual_-_Reports_-_part_4&diff=28219Gramps 3.3 Wiki Manual - Reports - part 42011-04-07T23:31:08Z<p>Ander882: /* Family Descendant Tree */</p>
<hr />
<div>This section describes the different Graphical Reports available in GRAMPS.<br />
{{man index|Gramps 3.3 Wiki Manual - Reports - part 3|Gramps 3.3 Wiki Manual - Reports - part 5|3.3}}<br />
<br />
<br />
[[Category:Documentation]][[Category:Plugins]]<br />
<br />
<br />
{{grampsmanualcopyright}}<br />
<br />
{{languages|Gramps_3.3_Wiki_Manual_-_Reports - part 4}}<br />
<br />
<br />
Back to [[Gramps_3.3_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
==Graphical Reports==<br />
<br />
Graphical reports represent information in forms of charts and graphs. Most of the options are common among graphical reports, therefore they will be described only once, at the end of this section. The few options which are specific to a given report will be described directly in that report's entry. See also [[Gramps_3.3_Wiki_Manual_-_Reports_-_part_2|substitution values]].<br />
<br />
The following graphical reports are currently available in GRAMPS:<br />
<br />
<br />
===<u>Ancestor Tree</u>===<br />
<br />
This report generates the chart of people who are ancestors of the Active Person. <br />
<br clear="all"/><br />
====Paper Options====<br />
With the {{man label|Paper Options}} you can change Paper format (Size and Orientation) and margins (Left, Right, Top and Bottom) and use metric values or not.<br />
<br />
====Document Options====<br />
Choose the output format: Open Document Text, PDF document, PostScript, Print..., or SVG (Scalable Vector Graphics). A {{man label|check box}} is available were you can indicate to open the made document with [http://www.documentfoundation.org/download/ LibreOffice] Word Processor or a Document Viewer (PDF file).<br />
<br />
==== Tree Options tab ====<br />
[[Image:Ancestor_tree_tab.png|right|thumb|250px|Tree Options tab]]<br />
<br />
The {{man button|Center Person}} is chosen here. The Active person will be the default.<br />
<br />
With the input field {{man label|Generations}} you can change the number of generations considered.<br />
<br />
{{man label|Display unknown generations}} will allow you to select how many generations of empty boxes to display when the tree is not completely full.<br />
<br />
Here is also the check box {{man label|Compress tree}}.<br />
<br />
{{man label|Center person uses which format:}} allows you to specify if the center person uses the father display format or the mother display format found on the Display tab.<br />
<br />
==== Display tab ====<br />
[[Image:Ancestor_display_tab.png|right|thumb|250px|Display tab]]<br />
<br />
This tab allows you to determine the {{man label|Father Display Format}} to be used for the report. All fathers, grandfathers, ect will use this format.<br />
<br />
The {{man label|Mother Display Format}} to be used for all mothers, grandmothers, ect will use this format.<br />
<br />
The {} around the death information line states that this entire line will display ONLY when there is death information. See [[Gramps_3.3_Wiki_Manual_-_Reports_-_part_2|Substitution Values]] for more.<br />
<br />
{{man label|Include Marriage box}} specifies to display an extra box between a father and mother that contains marriage information. {{man label|The Marriage Display Format}} (see [[Gramps_3.3_Wiki_Manual_-_Reports_-_part_2|Substitution Values]]) specifies what will print in this box.<br />
<br />
==== Size tab ====<br />
[[Image:Ancestor_sizes_tab.png|right|thumb|250px|Sizes tab]]<br />
<br />
{{man label|Scale tree to fit}} will make the tree larger or smaller to fit the page as desired. The options are:<br />
* Do not Scale the tree<br />
* Scale tree to fit page width only<br />
* Scale tree to fit the size of the page<br />
<br />
where {{man label|Resize page to fit tree}} will make the page larger or smaller to fit the tree <br />
<br />
If both are selected, the options happen in that order; scale the tree first, then the page.<br />
<br />
These two options are better described in [[Gramps_3.3_Wiki_Manual_-_Reports_-_part_4.2|Size options]] with tips for making nicer reports.<br />
<br />
==== Include tab ====<br />
[[Image:Ancestor_include_tab.png|right|thumb|250px|Note tab]]<br />
<br />
This tab gives you the option to include other items on the report.<br />
<br />
{{man label|Report title}} allows you to choose a title for the report. <br />
* ''Do not print a title''<br />
* ''Include Report Title''<br />
<br />
And this tab also includes check boxes for {{man label|Include a border}}, {{man label|Include page numbers}}, and {{man label|Include blank pages}}.<br />
<br />
This tab also allows you to {{man label|Include a note}} to one of the corners of the report.<br />
<br />
“$T” within the note will display the day that the report was made. Regular date formatting (see [[Gramps_3.3_Wiki_Manual_-_Reports_-_part_2|Substitution Values]]) applies.<br />
<br />
Currently a note will be attached to a corner. If a person box writes over it, the note box will not move. Select another corner to see the note tab if this happens.<br />
<br />
====Final Result====<br />
<br />
[[Image:Ancestor chart.png|thumb|250x|Fig. 8.2 PDF Output ancestor tree]]<br />
<br />
The final result can be seen on the right side.<br />
<br />
<br clear="all"/><br />
<br />
===<u>Calendar</u>===<br />
<br />
This report produces a calendar with birthdays and anniversaries on a page by month.<br />
<br />
====Paper Options====<br />
<br />
[[Image:Calendarreport1.png|right|thumb|250px|Fig. 8.3 Calendar Paper Options]]<br />
<br />
With the Paper Options you can change<br />
* Paper format (Size and Orientation)<br />
* Margins (Left, Right, Top and Bottom) <br />
and whether to use metric values or not.<br />
<br />
<br clear="all"/><br />
<br />
====Document options====<br />
<br />
[[Image:Calendarreport4.png|right|thumb|250px|Fig. 8.4 Calendar Document Options]]<br />
<br />
* Output Format: choose the output format: <br />
** Open Document Text<br />
** PDF document<br />
** PostScript<br />
** Print...<br />
** SVG (Scalable Vector Graphics). A {{man label|check box}} is available were you can indicate to open the made document with [http://www.documentfoundation.org/download/ LibreOffice] Word Processor or a Document Viewer (PDF file).<br />
* Filename: default value is ''/home/<username>/calendar.pdf''.<br />
* Style: default ''default style'' . With the {{man button|Style Editor...}} you can add Document Styles.<br />
<br />
<br clear="all"/><br />
<br />
====Report Options====<br />
<br />
[[Image:Calendarreport2.png|right|thumb|250px|Fig. 8.5 Calendar Report Options]]<br />
<br />
* Year of calendar: for which year you want the calendar to be build.<br />
* Filter: select filter to restrict people that appear on the calendar<br />
** Entire Database : not recommended!<br />
** Descendants of ...<br />
** Descendant Families of ...<br />
** Ancestors of ...<br />
** People with common ancestors with ...<br />
** any custom filter who have made<br />
* Center Person: the center person for the report<br />
* Name Format: Select the format to display names: choose between:<br />
** Surname, Given Patronymic<br />
** Given Surname<br />
** Patronymic, Given<br />
** Given<br />
* Country for holidays: Select the country to see associated holidays choose between:<br />
** Don't include holidays: default value<br />
** Canada / China / Deutschland / Finland / France / Sverige - röda dagar / United States / Ceska republika<br />
* First day of week:<br />
* Birthday surname:<br />
* Checkboxes:<br />
** Include only living people: include only living people in the calendar<br />
** Include birthdays: include birthdays in the calendar<br />
** Include anniversaries: include anniversaries in the calendar<br />
<br />
<br clear="all"/><br />
<br />
====Calendar Test Options====<br />
<br />
[[Image:Calendarreport3.png|right|thumb|250px|Fig. 8.6 Calendar Text Options]]<br />
<br />
Here you can fill in three lines of text that will be put at the bottom of the page.<br />
* Text Area 1: First line of text at bottom of calendar default value : ''My Calendar''<br />
* Text Area 2: Second line of text at bottom of calendar default value: ''Produced by GRAMPS''<br />
* Text Area 3: Third line of text at bottom of calendar default value: '' http://gramps-project.org/''<br />
<br />
<br clear="all"/><br />
<br />
====Final Result====<br />
<br />
[[Image:Calendarreport5.png|right|thumb|450px|Fig. 8.7 Calendar Result]]<br />
<br />
The final result can be seen on the right side.<br />
<br />
[[Calendar_tools_holidays|Calendar tools holidays]] explains how to add or change the holidays appearing on the output of the calendar plugin.<br />
<br />
<br clear="all"/><br />
<br />
===<u>Descendant Tree</u>===<br />
<br />
This report generates a graph of people who are descendants of the Active Person. Specific options include the format of the displayed entries.<br />
<br />
====Paper Options====<br />
With the Paper Options you can change<br />
* Paper format (Size and Orientation)<br />
* Margins (Left, Right, Top and Bottom) <br />
and whether to use metric values or not.<br />
<br />
====Document Options====<br />
* Output Format: choose the output format: <br />
** Open Document Text<br />
** PDF document<br />
** PostScript<br />
** Print...<br />
** SVG (Scalable Vector Graphics). A {{man label|check box}} is available were you can indicate to open the made document with [http://www.documentfoundation.org/download/ LibreOffice] Word Processor or a Document Viewer (PDF file).<br />
* Filename: default value is ''/home/<username>/descend_chart.pdf''.<br />
* Style: default ''default style'' . With the {{man button|Style Editor...}} you can add Document Styles.<br />
<br />
==== Descendant report Tree tab ====<br />
[[Image:descend_treeP_tab.png|right|thumb|250px|Descendant Options tab]]<br />
{{man button|Report for:}} option will select the center person for this report. The currently active person will be the default person displayed. <br />
<br />
{{man label|Start with the parent(s) of the selected first}} will display parents of the center person if the parents are known. As such any siblings of the center person will be displayed too.<br />
<br />
This is broken apart from the tree tab as the 'Family Descendant Report' only differs in this one part on this tab.<br />
<br />
==== Tree tab ====<br />
[[Image:descend_tree2_tab.png|right|thumb|250px|Descendant Options tab]]<br />
Both of the Descendant Tree and Family Descendant Tree reports share these features on the Tree tab:<br />
<br />
The number of {{man label|Generations}} to see on the report (from the center person/family). If {{man label|Start with the parent(s) of the selected first}} is selected, this number is effectively increased by one.<br />
<br />
{{man label|Level of spouses}} specifies the how deep to display spouses. <br />
<br />
For the example: <br />
<br />
* Abe is a direct descendant<br />
** Abe has/had married Barbra and had two children<br />
** Abe also married Bridget and had one child<br />
*** Bridget has/had married Carl. <br />
**** Carl and Denise had a child.<br />
<br />
Given the above example, this is what will be displayed for the first three {{man label|Level of spouses}} options.<br />
* 0 means that only direct descendants will be shown. Nothing on the Secondary tab will be shown (Spousal information or Marriage information). For the example above, only Abe will be shown with three children directly under him<br />
* 1 means that only spouses of the direct descendants will be shown. For the example above, Abe will be shown with two pieces of marriage information. Under the first will be two children and one child under the second.<br />
* 2 means that spouses of spouses are shown. Same as 1 but Bridget will also show her other marriage. If they had any children, they would be shown too.<br />
* 3 means that everyone in the example above will be displayed.<br />
Any option above 1 is very hard to read on the report without the {{man label|Indent Spouses}} option on the Secondary tab.<br />
And last but not least is the {{man label|Compress Tree}} option which tries to move everyone up as far as they can go (compress) and still have a readable report.<br />
<br />
==== Display tab ====<br />
[[Image:descend_display_tab.png|right|thumb|250px|Descendant Display tab]]<br />
<br />
{{man label|Descendant Display Format}} sets the display for all descendants in the tree. The default is:<br />
<pre>$n<br />
b. $b<br />
{d. $d}</pre><br />
<br />
And the check box {{man label|Bold direct descendants}} can also make the report easier to read.<br />
<br />
You can set the {{man label|Spousal Display format}}. If you do not wish to have the separate marital box, the spousal box can be used for marriage information. This option defaults as above.<br />
<br />
{{man label|Indent spouses}} will offset spouses a little from each other making it easier to know who has married who.<br />
<br />
{{man label|Include marriage box}} will display a separate box on the tree for marriage information. The display for this box is set in {{man label|Marriage Display format}}.<br />
<br />
see [[Display_formatting3_3|Substitution Values]] for more display options and how '{' can remove groups of information or an entire line.<br />
<br />
==== Replace tab ====<br />
[[Image:descend_replace_tab.png|right|thumb|250px|Descendant Replace tab]]<br />
This allows you to put in pairs of strings separated by '/' that state what you want to replace and what you want to replace it with. <br />
Example:<br />
<pre>The United States of America/USA<br />
United Kingdom of Great Britain and Northern Ireland/UK<br />
Llanfair&shy;pwllgwyn&shy;gyllgo&shy;gerychwyrn&shy;drobwll&shy;llanty&shy;silio&shy;gogogoch/Llanfairpwll</pre><br />
Every column width is defined by the widest box in the report. So if one box happens to be a lot wider than all of the others, a lot of space will be wasted. This option allows you to remove or abbreviate parts of the string that is not needed or can be cut down so the amount of space wasted is minimal. <br />
<br />
<br />
==== Include tab ====<br />
[[Image:Ancestor_include_tab.png|right|thumb|250px|Descendant Replace tab]]<br />
{{man label|Report title}} allows you to choose a title for the report. <br />
* ''Do not print a title''<br />
* ''Descendant Chart for [selected person(s)]''<br />
<br />
And this tab also includes check boxes to {{man label|Include a border}}, {{man label|Include page numbers}}, and {{man label|Include blank pages}}.<br />
<br />
This tab also allows you to {{man label|Include a note}} to one of the corners of the report. <br />
<br />
“$T” within the report will display the day that the report was made. Regular date formatting (see [[Display_formatting3_3|Substitution Values]]) applies.<br />
<br />
Currently a note will be attached to a corner. If a person box writes over it, the note box will not move. Select another corner to see the note tab if this happens.<br />
<br />
====Final Result====<br />
[[Image:Descendant_tree2.png|right|thumb|400px|Fig. 8.9 Descendant Tree Result]]<br />
<br />
The final result can be seen on the right side.<br />
<br />
<br clear="all"/><br />
<br />
===<u>Family Descendant Tree</u>===<br />
<br />
{{man note|Shared options with the [[#Descendant Tree|Descendant Tree report]]|This report only has three differences from the 'Descendant Tree' report. The only differences are:<br />
# is this report runs off of a family instead of a person (differences on the tree tab)<br />
# More options for a report title (on the Include tab)<br />
# the final result<br />
}}<br />
<br />
==== Tree Tab ====<br />
[[Image:descend_treeF_tab.png|right|thumb|250px|Descendant Options tab]]<br />
{{man button|Report for:}} option will select the center family (Father and Mother) for this report. The currently active family will be the default family displayed.<br />
<br />
Choosing {{man label|Start with the parent(s) of the selected first}} may display two sets of parents (if the parents of both the father and mother are known). One set of parents for the father, and another set of parents for the mother of the family (ie grandparents of the children). As such, any siblings of the father will be shown on the fathers side and any siblings with the mother will be displayed with her. So the children of the center family will see their grandparents, parents, uncles and aunts and even cousins if there are any.<br />
<br />
==== Include Tab ====<br />
The {{man label|Report Title}}: has these options:<br />
# ''Do not print a title''<br />
# ''Descendant Chart for [selected person(s)]''<br />
# ''Family Chart for [names of chosen family]''<br />
# ''Cousin Chart for [names of children]'' (Only available if {{man label|Start with the parent(s) of the selected first}} is chosen)<br />
<br />
==== Final Result ====<br />
[[Image:Family_Descendant_chart.png|right|thumb|400px|Family Descendant Tree Result]]<br />
<br />
The final result can be seen on the right side.<br />
<br />
Note: The parents for Alice Paula are not shown because they are unknown (not in the database). Otherwise her parents, siblings and nieces/nephews could be shown.<br />
<br />
<br clear="all"/><br />
<br />
===<u>Fan Chart</u>===<br />
<br />
This report produces a chart resembling a fan, with Active person in the center, parents the semicircle next to it, grandparents in the next semicircle, and so on, for a total of five generations.<br />
<br />
====Paper Options====<br />
With the {{man label|Paper Options}} you can change Paper format (Size and Orientation) and margins (Left, Right, Top and Bottom) and use metric values or not.<br />
<br />
====Document Options====<br />
Choose the output format: Open Document Text, PDF document, PostScript, Print..., or SVG (Scalable Vector Graphics). A {{man label|check box}} is available were you can indicate to open the made document with [http://www.documentfoundation.org/download/ LibreOffice] Word Processor or a Document Viewer (PDF file).<br />
<br />
====Report Options====<br />
<br />
[[Image:Fanchartoptions.png|right|thumb|250px|Fig. 8.10 Options Fan chart]]<br />
[[Image:Fanchartpdf.png|left|thumb|250px|Fig. 8.11 Fan chart]]<br />
<br />
First the Center Person is displayed. Using the {{man button|Edit}} button you can select a different person. With the next input field {{man label|Generations}} you can change the number of generations considered.<br />
Next input field {{man label|Type of graph}}: choose via the drop down menu: full, half , or quarter circle.<br />
Next input field {{man label|Background color}}: choose white or generation dependant.<br />
Next input field {{man label|Orientation of radial text}} : choose upright or roundabout<br />
<br />
<br clear="all"/><br />
<br />
===<u>Statistics Chart</u>===<br />
<br />
This report can collect and display a wealth of statistical data about your database. Specific options include filter, sorting methods, and additional birth- and gender-based limit for inclusion into statistics. You can also set the minimum number of items to qualify for the bar chart, so that the charts with fewer items will generate a pie chart instead. The '''Chart Selection''' tab allows you to check which charts you want to include in your report.<br />
<br />
<br clear="all"/><br />
<br />
====Paper Options====<br />
With the {{man label|Paper Options}} you can change Paper format (Size and Orientation) and margins (Left, Right, Top and Bottom) and use metric values or not.<br />
<br />
====Document Options====<br />
<br />
Document options: choose the output format: Open Document Text, PDF document, PostScript, Print..., or SVG (Scalable Vector Graphics). A {{man label|check box}} is available were you can indicate to open the made document with [http://www.documentfoundation.org/download/ LibreOffice] Word Processor or a Document Viewer (PDF file).<br />
<br />
====Report Options====<br />
<br />
[[Image:Statistic.png|right|thumb|250px|right|Fig. 8.12 Report Options]]<br />
<br />
* Filter: determines what people are included in the report. You can choose the entire Database, or descendants of a certain person, people with a common ancestor as... or a default/common made filter.<br />
* Filter person: The center person for the filter: only available if as filter not entire database selected. {{man button|Edit}} button let you choose another filter person.<br />
* Sort chart items by: Select how the statistical data is sorted: Choose Item count or item name from the drop down list.<br />
* check box: sort in reverse order<br />
* People born after: Birth year from which to include people: fill in a year to start from<br />
* People born before: Birth year until which to include people: fill in a year<br />
* check box: Whether to include people without known birth years<br />
* Gender included: Select which genders are included into statistics. Choose both, men, or women.<br />
* Max. items for a pie: With fewer items pie chart and legend will be used instead of a bar chart. Choose a number from the drop down list.<br />
<br />
<br clear="all"/><br />
<br />
====Chart Options====<br />
<br />
[[Image:Statistic1.png|right|thumb|250px|Fig. 8.13 Statistics chart options]]<br />
* Charts 1: 9 check boxes are available to include charts with indicated data:<br />
[[Image:Statgraftaart.png|right|thumb|250px|Fig. 8.14 Results]]<br />
[[Image:Statistic2.png|right|thumb|250px|Fig. 8.15 Results]]<br />
** Age<br />
** Death place<br />
** Death month<br />
** Age when first child born<br />
** Title<br />
** Age when last child born<br />
** Birth month<br />
** Age at marriage<br />
** Age at death<br />
* Charts 2: 10 check boxes are available to include charts with indicated data:<br />
** Event type<br />
** Number of children<br />
** Marriage place <br />
** Number of relationships<br />
** Surname<br />
** Death year<br />
** Gender<br />
** Forename<br />
** Birth year<br />
** Birth place<br />
<br />
If all needed info is filled in click on {{man button|OK}} to start the data collecting. A progress bar will be shown: Collecting Data... ->Sorting Data...->Saving charts...<br />
<br />
The image shows the result of '''Age of first child''' for all women born between 1500 and 2008. For most (576) persons personal information was missing, for some birth information was missing, but for 33 women their first child was born at age 20. With the detailed iformation further analysis can be done: calculate average, std. dev. etc.<br />
<br />
<br clear="all"/><br />
<br />
===<u>Timeline Chart</u>===<br />
<br />
This report outputs the list of people with their lifetimes represented by intervals on a common chronological scale. Specific options include filter, sorting method, and the title of the report.<br />
<br />
====Paper Options====<br />
With the {{man label|Paper Options}} you can change Paper format (Size and Orientation) and margins (Left, Right, Top and Bottom) and use metric values or not.<br />
<br />
====Document Options====<br />
<br />
Document options: choose the output format: Open Document Text, PDF document, PostScript, Print..., or SVG (Scalable Vector Graphics). A {{man label|check box}} is available were you can indicate to open the made document with [http://www.documentfoundation.org/download/ LibreOffice] Word Processor or a Document Viewer (PDF file).<br />
<br />
Back to [[Gramps_3.3_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
<br clear="all"/><br />
<br />
{{man index|Gramps 3.3 Wiki Manual - Reports - part 3|Gramps 3.3 Wiki Manual - Reports - part 5|3.3}}<br />
{{languages}}<br />
[[Category:Documentation]]</div>Ander882https://gramps-project.org/wiki/index.php?title=Gramps_3.3_Wiki_Manual_-_Reports_-_part_4&diff=28218Gramps 3.3 Wiki Manual - Reports - part 42011-04-07T23:23:23Z<p>Ander882: /* Include tab */</p>
<hr />
<div>This section describes the different Graphical Reports available in GRAMPS.<br />
{{man index|Gramps 3.3 Wiki Manual - Reports - part 3|Gramps 3.3 Wiki Manual - Reports - part 5|3.3}}<br />
<br />
<br />
[[Category:Documentation]][[Category:Plugins]]<br />
<br />
<br />
{{grampsmanualcopyright}}<br />
<br />
{{languages|Gramps_3.3_Wiki_Manual_-_Reports - part 4}}<br />
<br />
<br />
Back to [[Gramps_3.3_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
==Graphical Reports==<br />
<br />
Graphical reports represent information in forms of charts and graphs. Most of the options are common among graphical reports, therefore they will be described only once, at the end of this section. The few options which are specific to a given report will be described directly in that report's entry. See also [[Gramps_3.3_Wiki_Manual_-_Reports_-_part_2|substitution values]].<br />
<br />
The following graphical reports are currently available in GRAMPS:<br />
<br />
<br />
===<u>Ancestor Tree</u>===<br />
<br />
This report generates the chart of people who are ancestors of the Active Person. <br />
<br clear="all"/><br />
====Paper Options====<br />
With the {{man label|Paper Options}} you can change Paper format (Size and Orientation) and margins (Left, Right, Top and Bottom) and use metric values or not.<br />
<br />
====Document Options====<br />
Choose the output format: Open Document Text, PDF document, PostScript, Print..., or SVG (Scalable Vector Graphics). A {{man label|check box}} is available were you can indicate to open the made document with [http://www.documentfoundation.org/download/ LibreOffice] Word Processor or a Document Viewer (PDF file).<br />
<br />
==== Tree Options tab ====<br />
[[Image:Ancestor_tree_tab.png|right|thumb|250px|Tree Options tab]]<br />
<br />
The {{man button|Center Person}} is chosen here. The Active person will be the default.<br />
<br />
With the input field {{man label|Generations}} you can change the number of generations considered.<br />
<br />
{{man label|Display unknown generations}} will allow you to select how many generations of empty boxes to display when the tree is not completely full.<br />
<br />
Here is also the check box {{man label|Compress tree}}.<br />
<br />
{{man label|Center person uses which format:}} allows you to specify if the center person uses the father display format or the mother display format found on the Display tab.<br />
<br />
==== Display tab ====<br />
[[Image:Ancestor_display_tab.png|right|thumb|250px|Display tab]]<br />
<br />
This tab allows you to determine the {{man label|Father Display Format}} to be used for the report. All fathers, grandfathers, ect will use this format.<br />
<br />
The {{man label|Mother Display Format}} to be used for all mothers, grandmothers, ect will use this format.<br />
<br />
The {} around the death information line states that this entire line will display ONLY when there is death information. See [[Gramps_3.3_Wiki_Manual_-_Reports_-_part_2|Substitution Values]] for more.<br />
<br />
{{man label|Include Marriage box}} specifies to display an extra box between a father and mother that contains marriage information. {{man label|The Marriage Display Format}} (see [[Gramps_3.3_Wiki_Manual_-_Reports_-_part_2|Substitution Values]]) specifies what will print in this box.<br />
<br />
==== Size tab ====<br />
[[Image:Ancestor_sizes_tab.png|right|thumb|250px|Sizes tab]]<br />
<br />
{{man label|Scale tree to fit}} will make the tree larger or smaller to fit the page as desired. The options are:<br />
* Do not Scale the tree<br />
* Scale tree to fit page width only<br />
* Scale tree to fit the size of the page<br />
<br />
where {{man label|Resize page to fit tree}} will make the page larger or smaller to fit the tree <br />
<br />
If both are selected, the options happen in that order; scale the tree first, then the page.<br />
<br />
These two options are better described in [[Gramps_3.3_Wiki_Manual_-_Reports_-_part_4.2|Size options]] with tips for making nicer reports.<br />
<br />
==== Include tab ====<br />
[[Image:Ancestor_include_tab.png|right|thumb|250px|Note tab]]<br />
<br />
This tab gives you the option to include other items on the report.<br />
<br />
{{man label|Report title}} allows you to choose a title for the report. <br />
* ''Do not print a title''<br />
* ''Include Report Title''<br />
<br />
And this tab also includes check boxes for {{man label|Include a border}}, {{man label|Include page numbers}}, and {{man label|Include blank pages}}.<br />
<br />
This tab also allows you to {{man label|Include a note}} to one of the corners of the report.<br />
<br />
“$T” within the note will display the day that the report was made. Regular date formatting (see [[Gramps_3.3_Wiki_Manual_-_Reports_-_part_2|Substitution Values]]) applies.<br />
<br />
Currently a note will be attached to a corner. If a person box writes over it, the note box will not move. Select another corner to see the note tab if this happens.<br />
<br />
====Final Result====<br />
<br />
[[Image:Ancestor chart.png|thumb|250x|Fig. 8.2 PDF Output ancestor tree]]<br />
<br />
The final result can be seen on the right side.<br />
<br />
<br clear="all"/><br />
<br />
===<u>Calendar</u>===<br />
<br />
This report produces a calendar with birthdays and anniversaries on a page by month.<br />
<br />
====Paper Options====<br />
<br />
[[Image:Calendarreport1.png|right|thumb|250px|Fig. 8.3 Calendar Paper Options]]<br />
<br />
With the Paper Options you can change<br />
* Paper format (Size and Orientation)<br />
* Margins (Left, Right, Top and Bottom) <br />
and whether to use metric values or not.<br />
<br />
<br clear="all"/><br />
<br />
====Document options====<br />
<br />
[[Image:Calendarreport4.png|right|thumb|250px|Fig. 8.4 Calendar Document Options]]<br />
<br />
* Output Format: choose the output format: <br />
** Open Document Text<br />
** PDF document<br />
** PostScript<br />
** Print...<br />
** SVG (Scalable Vector Graphics). A {{man label|check box}} is available were you can indicate to open the made document with [http://www.documentfoundation.org/download/ LibreOffice] Word Processor or a Document Viewer (PDF file).<br />
* Filename: default value is ''/home/<username>/calendar.pdf''.<br />
* Style: default ''default style'' . With the {{man button|Style Editor...}} you can add Document Styles.<br />
<br />
<br clear="all"/><br />
<br />
====Report Options====<br />
<br />
[[Image:Calendarreport2.png|right|thumb|250px|Fig. 8.5 Calendar Report Options]]<br />
<br />
* Year of calendar: for which year you want the calendar to be build.<br />
* Filter: select filter to restrict people that appear on the calendar<br />
** Entire Database : not recommended!<br />
** Descendants of ...<br />
** Descendant Families of ...<br />
** Ancestors of ...<br />
** People with common ancestors with ...<br />
** any custom filter who have made<br />
* Center Person: the center person for the report<br />
* Name Format: Select the format to display names: choose between:<br />
** Surname, Given Patronymic<br />
** Given Surname<br />
** Patronymic, Given<br />
** Given<br />
* Country for holidays: Select the country to see associated holidays choose between:<br />
** Don't include holidays: default value<br />
** Canada / China / Deutschland / Finland / France / Sverige - röda dagar / United States / Ceska republika<br />
* First day of week:<br />
* Birthday surname:<br />
* Checkboxes:<br />
** Include only living people: include only living people in the calendar<br />
** Include birthdays: include birthdays in the calendar<br />
** Include anniversaries: include anniversaries in the calendar<br />
<br />
<br clear="all"/><br />
<br />
====Calendar Test Options====<br />
<br />
[[Image:Calendarreport3.png|right|thumb|250px|Fig. 8.6 Calendar Text Options]]<br />
<br />
Here you can fill in three lines of text that will be put at the bottom of the page.<br />
* Text Area 1: First line of text at bottom of calendar default value : ''My Calendar''<br />
* Text Area 2: Second line of text at bottom of calendar default value: ''Produced by GRAMPS''<br />
* Text Area 3: Third line of text at bottom of calendar default value: '' http://gramps-project.org/''<br />
<br />
<br clear="all"/><br />
<br />
====Final Result====<br />
<br />
[[Image:Calendarreport5.png|right|thumb|450px|Fig. 8.7 Calendar Result]]<br />
<br />
The final result can be seen on the right side.<br />
<br />
[[Calendar_tools_holidays|Calendar tools holidays]] explains how to add or change the holidays appearing on the output of the calendar plugin.<br />
<br />
<br clear="all"/><br />
<br />
===<u>Descendant Tree</u>===<br />
<br />
This report generates a graph of people who are descendants of the Active Person. Specific options include the format of the displayed entries.<br />
<br />
====Paper Options====<br />
With the Paper Options you can change<br />
* Paper format (Size and Orientation)<br />
* Margins (Left, Right, Top and Bottom) <br />
and whether to use metric values or not.<br />
<br />
====Document Options====<br />
* Output Format: choose the output format: <br />
** Open Document Text<br />
** PDF document<br />
** PostScript<br />
** Print...<br />
** SVG (Scalable Vector Graphics). A {{man label|check box}} is available were you can indicate to open the made document with [http://www.documentfoundation.org/download/ LibreOffice] Word Processor or a Document Viewer (PDF file).<br />
* Filename: default value is ''/home/<username>/descend_chart.pdf''.<br />
* Style: default ''default style'' . With the {{man button|Style Editor...}} you can add Document Styles.<br />
<br />
==== Descendant report Tree tab ====<br />
[[Image:descend_treeP_tab.png|right|thumb|250px|Descendant Options tab]]<br />
{{man button|Report for:}} option will select the center person for this report. The currently active person will be the default person displayed. <br />
<br />
{{man label|Start with the parent(s) of the selected first}} will display parents of the center person if the parents are known. As such any siblings of the center person will be displayed too.<br />
<br />
This is broken apart from the tree tab as the 'Family Descendant Report' only differs in this one part on this tab.<br />
<br />
==== Tree tab ====<br />
[[Image:descend_tree2_tab.png|right|thumb|250px|Descendant Options tab]]<br />
Both of the Descendant Tree and Family Descendant Tree reports share these features on the Tree tab:<br />
<br />
The number of {{man label|Generations}} to see on the report (from the center person/family). If {{man label|Start with the parent(s) of the selected first}} is selected, this number is effectively increased by one.<br />
<br />
{{man label|Level of spouses}} specifies the how deep to display spouses. <br />
<br />
For the example: <br />
<br />
* Abe is a direct descendant<br />
** Abe has/had married Barbra and had two children<br />
** Abe also married Bridget and had one child<br />
*** Bridget has/had married Carl. <br />
**** Carl and Denise had a child.<br />
<br />
Given the above example, this is what will be displayed for the first three {{man label|Level of spouses}} options.<br />
* 0 means that only direct descendants will be shown. Nothing on the Secondary tab will be shown (Spousal information or Marriage information). For the example above, only Abe will be shown with three children directly under him<br />
* 1 means that only spouses of the direct descendants will be shown. For the example above, Abe will be shown with two pieces of marriage information. Under the first will be two children and one child under the second.<br />
* 2 means that spouses of spouses are shown. Same as 1 but Bridget will also show her other marriage. If they had any children, they would be shown too.<br />
* 3 means that everyone in the example above will be displayed.<br />
Any option above 1 is very hard to read on the report without the {{man label|Indent Spouses}} option on the Secondary tab.<br />
And last but not least is the {{man label|Compress Tree}} option which tries to move everyone up as far as they can go (compress) and still have a readable report.<br />
<br />
==== Display tab ====<br />
[[Image:descend_display_tab.png|right|thumb|250px|Descendant Display tab]]<br />
<br />
{{man label|Descendant Display Format}} sets the display for all descendants in the tree. The default is:<br />
<pre>$n<br />
b. $b<br />
{d. $d}</pre><br />
<br />
And the check box {{man label|Bold direct descendants}} can also make the report easier to read.<br />
<br />
You can set the {{man label|Spousal Display format}}. If you do not wish to have the separate marital box, the spousal box can be used for marriage information. This option defaults as above.<br />
<br />
{{man label|Indent spouses}} will offset spouses a little from each other making it easier to know who has married who.<br />
<br />
{{man label|Include marriage box}} will display a separate box on the tree for marriage information. The display for this box is set in {{man label|Marriage Display format}}.<br />
<br />
see [[Display_formatting3_3|Substitution Values]] for more display options and how '{' can remove groups of information or an entire line.<br />
<br />
==== Replace tab ====<br />
[[Image:descend_replace_tab.png|right|thumb|250px|Descendant Replace tab]]<br />
This allows you to put in pairs of strings separated by '/' that state what you want to replace and what you want to replace it with. <br />
Example:<br />
<pre>The United States of America/USA<br />
United Kingdom of Great Britain and Northern Ireland/UK<br />
Llanfair&shy;pwllgwyn&shy;gyllgo&shy;gerychwyrn&shy;drobwll&shy;llanty&shy;silio&shy;gogogoch/Llanfairpwll</pre><br />
Every column width is defined by the widest box in the report. So if one box happens to be a lot wider than all of the others, a lot of space will be wasted. This option allows you to remove or abbreviate parts of the string that is not needed or can be cut down so the amount of space wasted is minimal. <br />
<br />
<br />
==== Include tab ====<br />
[[Image:Ancestor_include_tab.png|right|thumb|250px|Descendant Replace tab]]<br />
{{man label|Report title}} allows you to choose a title for the report. <br />
* ''Do not print a title''<br />
* ''Descendant Chart for [selected person(s)]''<br />
<br />
And this tab also includes check boxes to {{man label|Include a border}}, {{man label|Include page numbers}}, and {{man label|Include blank pages}}.<br />
<br />
This tab also allows you to {{man label|Include a note}} to one of the corners of the report. <br />
<br />
“$T” within the report will display the day that the report was made. Regular date formatting (see [[Display_formatting3_3|Substitution Values]]) applies.<br />
<br />
Currently a note will be attached to a corner. If a person box writes over it, the note box will not move. Select another corner to see the note tab if this happens.<br />
<br />
====Final Result====<br />
[[Image:Descendant_tree2.png|right|thumb|400px|Fig. 8.9 Descendant Tree Result]]<br />
<br />
The final result can be seen on the right side.<br />
<br />
<br clear="all"/><br />
<br />
===<u>Family Descendant Tree</u>===<br />
<br />
{{man note|Shared options with the [[#Descendant Tree|Descendant Tree report]]|This report only has two differences from the 'Descendant Tree' report. The only differences are:<br />
# is this report runs off of a family instead of a person<br />
# More options for a report title<br />
}}<br />
<br />
==== Tree Tab ====<br />
[[Image:descend_treeF_tab.png|right|thumb|250px|Descendant Options tab]]<br />
{{man button|Report for:}} option will select the center family (Father and Mother) for this report. The currently active family will be the default family displayed.<br />
<br />
Choosing {{man label|Start with the parent(s) of the selected first}} may display two sets of parents (if the parents of both the father and mother are known). One set of parents for the father, and another set of parents for the mother of the family (ie grandparents of the children). As such, any siblings of the father will be shown with the father and any siblings with the mother will be displayed with her. So the children of the center family will see their parents, uncles and aunts and even cousins if there are any.<br />
<br />
==== Print Tab ====<br />
The {{man label|Report Title}}: has these options:<br />
# ''Do not print a title''<br />
# ''Descendant Chart for [selected person(s)]''<br />
# ''Family Chart for [names of chosen family]''<br />
# ''Cousin Chart for [names of children]'' (Only available if {{man label|Start with the parent(s) of the selected first}} is chosen)<br />
<br />
==== Final Result ====<br />
[[Image:Family_Descendant_chart.png|right|thumb|400px|Family Descendant Tree Result]]<br />
<br />
The final result can be seen on the right side.<br />
<br />
Note: The parents for Alice Paula are not shown because they are unknown (not in the database). Otherwise her parents, siblings and nieces/nephews could be shown.<br />
<br />
<br clear="all"/><br />
<br />
===<u>Fan Chart</u>===<br />
<br />
This report produces a chart resembling a fan, with Active person in the center, parents the semicircle next to it, grandparents in the next semicircle, and so on, for a total of five generations.<br />
<br />
====Paper Options====<br />
With the {{man label|Paper Options}} you can change Paper format (Size and Orientation) and margins (Left, Right, Top and Bottom) and use metric values or not.<br />
<br />
====Document Options====<br />
Choose the output format: Open Document Text, PDF document, PostScript, Print..., or SVG (Scalable Vector Graphics). A {{man label|check box}} is available were you can indicate to open the made document with [http://www.documentfoundation.org/download/ LibreOffice] Word Processor or a Document Viewer (PDF file).<br />
<br />
====Report Options====<br />
<br />
[[Image:Fanchartoptions.png|right|thumb|250px|Fig. 8.10 Options Fan chart]]<br />
[[Image:Fanchartpdf.png|left|thumb|250px|Fig. 8.11 Fan chart]]<br />
<br />
First the Center Person is displayed. Using the {{man button|Edit}} button you can select a different person. With the next input field {{man label|Generations}} you can change the number of generations considered.<br />
Next input field {{man label|Type of graph}}: choose via the drop down menu: full, half , or quarter circle.<br />
Next input field {{man label|Background color}}: choose white or generation dependant.<br />
Next input field {{man label|Orientation of radial text}} : choose upright or roundabout<br />
<br />
<br clear="all"/><br />
<br />
===<u>Statistics Chart</u>===<br />
<br />
This report can collect and display a wealth of statistical data about your database. Specific options include filter, sorting methods, and additional birth- and gender-based limit for inclusion into statistics. You can also set the minimum number of items to qualify for the bar chart, so that the charts with fewer items will generate a pie chart instead. The '''Chart Selection''' tab allows you to check which charts you want to include in your report.<br />
<br />
<br clear="all"/><br />
<br />
====Paper Options====<br />
With the {{man label|Paper Options}} you can change Paper format (Size and Orientation) and margins (Left, Right, Top and Bottom) and use metric values or not.<br />
<br />
====Document Options====<br />
<br />
Document options: choose the output format: Open Document Text, PDF document, PostScript, Print..., or SVG (Scalable Vector Graphics). A {{man label|check box}} is available were you can indicate to open the made document with [http://www.documentfoundation.org/download/ LibreOffice] Word Processor or a Document Viewer (PDF file).<br />
<br />
====Report Options====<br />
<br />
[[Image:Statistic.png|right|thumb|250px|right|Fig. 8.12 Report Options]]<br />
<br />
* Filter: determines what people are included in the report. You can choose the entire Database, or descendants of a certain person, people with a common ancestor as... or a default/common made filter.<br />
* Filter person: The center person for the filter: only available if as filter not entire database selected. {{man button|Edit}} button let you choose another filter person.<br />
* Sort chart items by: Select how the statistical data is sorted: Choose Item count or item name from the drop down list.<br />
* check box: sort in reverse order<br />
* People born after: Birth year from which to include people: fill in a year to start from<br />
* People born before: Birth year until which to include people: fill in a year<br />
* check box: Whether to include people without known birth years<br />
* Gender included: Select which genders are included into statistics. Choose both, men, or women.<br />
* Max. items for a pie: With fewer items pie chart and legend will be used instead of a bar chart. Choose a number from the drop down list.<br />
<br />
<br clear="all"/><br />
<br />
====Chart Options====<br />
<br />
[[Image:Statistic1.png|right|thumb|250px|Fig. 8.13 Statistics chart options]]<br />
* Charts 1: 9 check boxes are available to include charts with indicated data:<br />
[[Image:Statgraftaart.png|right|thumb|250px|Fig. 8.14 Results]]<br />
[[Image:Statistic2.png|right|thumb|250px|Fig. 8.15 Results]]<br />
** Age<br />
** Death place<br />
** Death month<br />
** Age when first child born<br />
** Title<br />
** Age when last child born<br />
** Birth month<br />
** Age at marriage<br />
** Age at death<br />
* Charts 2: 10 check boxes are available to include charts with indicated data:<br />
** Event type<br />
** Number of children<br />
** Marriage place <br />
** Number of relationships<br />
** Surname<br />
** Death year<br />
** Gender<br />
** Forename<br />
** Birth year<br />
** Birth place<br />
<br />
If all needed info is filled in click on {{man button|OK}} to start the data collecting. A progress bar will be shown: Collecting Data... ->Sorting Data...->Saving charts...<br />
<br />
The image shows the result of '''Age of first child''' for all women born between 1500 and 2008. For most (576) persons personal information was missing, for some birth information was missing, but for 33 women their first child was born at age 20. With the detailed iformation further analysis can be done: calculate average, std. dev. etc.<br />
<br />
<br clear="all"/><br />
<br />
===<u>Timeline Chart</u>===<br />
<br />
This report outputs the list of people with their lifetimes represented by intervals on a common chronological scale. Specific options include filter, sorting method, and the title of the report.<br />
<br />
====Paper Options====<br />
With the {{man label|Paper Options}} you can change Paper format (Size and Orientation) and margins (Left, Right, Top and Bottom) and use metric values or not.<br />
<br />
====Document Options====<br />
<br />
Document options: choose the output format: Open Document Text, PDF document, PostScript, Print..., or SVG (Scalable Vector Graphics). A {{man label|check box}} is available were you can indicate to open the made document with [http://www.documentfoundation.org/download/ LibreOffice] Word Processor or a Document Viewer (PDF file).<br />
<br />
Back to [[Gramps_3.3_Wiki_Manual_-_Reports|Index of Reports]].<br />
<br />
<br clear="all"/><br />
<br />
{{man index|Gramps 3.3 Wiki Manual - Reports - part 3|Gramps 3.3 Wiki Manual - Reports - part 5|3.3}}<br />
{{languages}}<br />
[[Category:Documentation]]</div>Ander882