* Is there a "ReportRoot" equivalent to the FileRoot function?

Questions regarding use of any Version of Family Historian. Please ensure you have set your Version of Family Historian in your Profile. If your question fits in one of these subject-specific sub-forums, please ask it there.
Post Reply
User avatar
bssmith
Gold
Posts: 12
Joined: 26 Jul 2021 02:38
Family Historian: V7
Location: Fairfax County, Virginia

Is there a "ReportRoot" equivalent to the FileRoot function?

Post by bssmith »

Can I approximate a "ReportRoot" equivalent to the FileRoot function to leverage when printing a Narrative Report? Yes ;) I know that "ReportRoot" is not a real function.

Details:

I have reviewed the "Birth & Baptism Events" section in Knowledge Base > Narrative Report Fact Sentence Templates.

Per that page, this sentence template...

Code: Select all

{individual} was born< {date}>< {place}>< ({age})>{=CombineText( Text( " and is " . FileRoot() . "'s "),
TextIf(IsSameItem(FileRoot(),%CUR_PRIN%) or IsSameItem(FileRoot(),%CUR_PRIN.~FATH>%) or
IsSameItem(FileRoot(),%CUR_PRIN.~MOTH>%), "", Relationship(FileRoot(),%CUR_PRIN%,TEXT,1) ) )}
...yields this structure of a sentence:

He was born on 1 May 1900 in London and is John Smith's grandfather.

When I make that the sentence template for the Birth fact type, and run a Narrative Report / Ancestors by Generation starting with John Smith (who is my File Root), all of the birth references end with "is John Smith's grandfather" or "is John Smith's great grandmother" etc. All as expected.

But I'd like those sentences instead to read from the perspective of the person on which the report is based, who in most cases will not be the person I have designated as the File Root.

For example, if I have John's sister Teresa as the starting point of the report, each of her entries refers to her ancestor as "is John Smith's grandfather" or "is John Smith's great grandmother" - when what I'd like to see instead is "is Teresa Smith's grandfather" or "is Teresa Smith's great grandmother".

Here is my question: I see and understand the FileRoot function reference above; is there something like a "ReportRoot" equivalent which would get me to where I have described?

If not, perhaps my best path is to always reset the file root person (from John to Teresa, in this example) before I generate any report where Teresa is the starting point, and then set it back to John after I run that report.

Thanks.
-- Ben
User avatar
tatewise
Megastar
Posts: 28414
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Is there a "ReportRoot" equivalent to the FileRoot function?

Post by tatewise »

That is an interesting idea but has some caveats.

There are equivalent %CUR_DGM_ROOT% and %CUR_TREE_ROOT% data refs available for Diagrams, but are only valid within Text Schemes that can only apply within Diagrams.

The snag with =ReportRoot() or %CUR_REP_ROOT% is that Sentence Templates can be applied outside Reports in Queries, etc, by using the =FactSentence() function and then there is no Report Root record.
Even the Sentence box on the Facts tab would not have a Report Root record defined so would fail.
So there would need to be a fallback mode that used =FileRoot() instead, when there was no Report Root record.

Furthermore, some Reports such as the Family Group Sheet do not have an Individual root but a Family record root.
c.f. %CUR_DGM_ROOT_FAM%, %CUR_TREE_ROOT_FAM%, %CUR_DGM_ROOT_COUPLE_FAM%
I guess the =ReportRoot() would have to be one of the spouses of the Family record.

So currently the only workable solution is to temporarily change the File Root as you suggested.

If you are interested we could discuss the requirements of a =ReportRoot() or %CUR_REP_ROOT% feature for the Wish List.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Post Reply