* Narrative reports: Birth/Baptism
-
Peter Collier
- Famous
- Posts: 191
- Joined: 04 Nov 2015 17:32
- Family Historian: V7
- Location: Worcestershire, UK
Narrative reports: Birth/Baptism
I have a narrative report set up with a limited set of facts, which includes an individual's birth and baptism events. I'd like the report to include the baptism event only if there is no birth event. Is there a way to do that?
Peter Collier
Collier, Savory, Buckerfield, Edmonds, Low, Dungey, Lester, Chambers, Walshe, Moylan, Bradley, Connors, Udale, Wilson, Benfield, Downey
Collier, Savory, Buckerfield, Edmonds, Low, Dungey, Lester, Chambers, Walshe, Moylan, Bradley, Connors, Udale, Wilson, Benfield, Downey
- tatewise
- Megastar
- Posts: 27074
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Narrative reports: Birth/Baptism
It might be feasible but does get complicated especially if you need to cope with a variety of Date formats.
This is a starting point:
{=TextIf(%CUR_PRIN.BIRT%,,Text(%CUR_PRIN.NAME% . " was baptised" . CombineText(" on ",%FACT.DATE%,,) . CombineText(" in ",%FACT.PLAC%,,)))}
That uses the {=TextIf( %CUR_PRIN.BIRT%, , Text(...) )} expression to only display text if there is no Birth Event.
The Text(...) function starts with %CUR_PRIN.NAME% . " was baptised" that always displays the full name.
It is not possible to use the {individual} code in this context to conditionally display He/She or the Name.
That is followed by CombineText(" on ",%FACT.DATE%,,) . CombineText(" in ",%FACT.PLAC%,,) to cater for optional Baptism Date and Baptism Place fields. Again the codes {date} and {place} are not allowed in this context.
So the prefix " on " before the Date only works for full simple dates such as 10 Jan 1900.
If the Date is partial such as Jan 1900 or just 1900 then the prefix needs to be " in ".
It is possible to test if a Day number exists and select the correct prefix but as I said it gets complicated.
Furthermore, a Date Range requires no prefix at all so that may need another test.
This is a starting point:
{=TextIf(%CUR_PRIN.BIRT%,,Text(%CUR_PRIN.NAME% . " was baptised" . CombineText(" on ",%FACT.DATE%,,) . CombineText(" in ",%FACT.PLAC%,,)))}
That uses the {=TextIf( %CUR_PRIN.BIRT%, , Text(...) )} expression to only display text if there is no Birth Event.
The Text(...) function starts with %CUR_PRIN.NAME% . " was baptised" that always displays the full name.
It is not possible to use the {individual} code in this context to conditionally display He/She or the Name.
That is followed by CombineText(" on ",%FACT.DATE%,,) . CombineText(" in ",%FACT.PLAC%,,) to cater for optional Baptism Date and Baptism Place fields. Again the codes {date} and {place} are not allowed in this context.
So the prefix " on " before the Date only works for full simple dates such as 10 Jan 1900.
If the Date is partial such as Jan 1900 or just 1900 then the prefix needs to be " in ".
It is possible to test if a Day number exists and select the correct prefix but as I said it gets complicated.
Furthermore, a Date Range requires no prefix at all so that may need another test.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry