* Showing Timeline Facts in Narrative Report?

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
AdrianBruce
Megastar
Posts: 2090
Joined: 09 Aug 2003 21:02
Family Historian: V7
Location: South Cheshire
Contact:

Showing Timeline Facts in Narrative Report?

Post by AdrianBruce »

I am currently reviewing a Narrative Report for an Individual, who I've been researching off and on for some time for a friend and distant cousin. Basically I'm just trying to see if the report reads OK and makes sense to someone who isn't au fait with Family Historian.

Some of the more complex facts are represented by replacing their default narrative sentence by <para>{note} - that way I can show the note, which I've written to contain complex dates, etc., rather than the standard Sentence where the dates may be just slightly misleading.

But one or two facts seem to suddenly leap out at the reader with no introduction. For instance, the report's subject married twice but there is, unless someone knows differently, nothing that I can easily set in the report's options to show that the first wife has died. Whereas on the individual's Facts tab, the death of the first wife shows up as a grey timeline fact - because the Timeline Fact settings are set to show (for me) divorces and death of spouses.

But, I can see no similar setting to make said facts appear in an Individual Narrative Report. Am I missing anything?

I can fix this particular case by adding a bit to the notes for the second marriage to say that the bride hadn't been married before, while the groom was a widower after the death of his first wife in 1827. But a general solution would be nice.

I'd also like to trigger sentences re the birth and death of his children to appear in the Narrative. I am already showing the names (with abbreviated life dates) of the children at the end of the Narrative Report, but that's several pages away from the chronologically correct point for their birth (or death) within his life-story. This is actually slightly more difficult to insert into the notes as there's no obvious event in their father's life to contain these updated notes.

Maybe sticking a family tree at the front will have to suffice. Grateful for any ideas about hacking the report in FH...
Adrian
User avatar
LornaCraig
Megastar
Posts: 3190
Joined: 11 Jan 2005 17:36
Family Historian: V7
Location: Oxfordshire, UK

Re: Showing Timeline Facts in Narrative Report?

Post by LornaCraig »

Unfortunately the options to include Spouse Events/Attributes and Child Events/Attributes just put those events/attributes in separate sections of the report. They can be controlled to include only the birth and death events, but there is no option to integrate those facts chronologically with the main individual's facts.

To indicate the death of the first wife, what about creating a custom 'widowed' fact, with a sentence like "He was widowed when his first wife died on ...." That fact could have a note which adds any relevant information about the circumstances.

Or maybe just make him a 'witness' to his wife's death event and children's birth events, and include Witnessed Events in the report?
Lorna
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Showing Timeline Facts in Narrative Report?

Post by tatewise »

Try the Publish > Miscellaneous Reports > Individual Timeline report that includes Timeline Facts.
It uses the narrative Sentence Templates so includes your Notes but the facts are listed as bullet points.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
AdrianBruce
Megastar
Posts: 2090
Joined: 09 Aug 2003 21:02
Family Historian: V7
Location: South Cheshire
Contact:

Re: Showing Timeline Facts in Narrative Report?

Post by AdrianBruce »

tatewise wrote: 03 Aug 2021 16:14 Try the Publish > Miscellaneous Reports > Individual Timeline report that includes Timeline Facts.
...
Hmm. Don't remember that one, thanks. However, I'm a touch baffled as to which facts it's actually printing. There's no visible means to select / exclude facts, so I'm seeing my "zDiagram Note" (custom) attribute, which is there solely to hold text to appear in the person's box on a chart. Conversely, my "Military Service" (custom) attribute doesn't appear. (Addendum - hang on - it shows the last such fact - huh?)

The Help for the Publish Menu states:
Individual Timeline
A report showing important events in a person's life (comparable to the information displayed in the Facts tab of the Property Box).
My emphasis on the word "important" there. No idea where facts are defined as "important" or not.

Hmmm. I think I need to look at Lorna's suggestion next... Intriguing though this is, it does seem to be some way off the full fat Narrative Report. But thanks - it might come in use somewhere.
Adrian
User avatar
AdrianBruce
Megastar
Posts: 2090
Joined: 09 Aug 2003 21:02
Family Historian: V7
Location: South Cheshire
Contact:

Re: Showing Timeline Facts in Narrative Report?

Post by AdrianBruce »

LornaCraig wrote: 03 Aug 2021 16:13 ... maybe just make him a 'witness' to his wife's death event and children's birth events, and include Witnessed Events in the report?
That looks eminently reasonable - I just tried a quick lash-up of a very basic sentence and that appeared where I wanted it. I'd need to think a lot more carefully about the content of the witness sentence for real, and how many of these so-called Timeline facts I personally would want in my Narrative Reports. Or rather, might want, because I have to add the parents or spouse individually as witnesses if, when and where I want to produce a comprehensive Narrative Report that includes such non-principal timeline details.

Thanks very much for that!
Adrian
User avatar
Jane
Site Admin
Posts: 8508
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Re: Showing Timeline Facts in Narrative Report?

Post by Jane »

Adrian, the Timeline report is a lua based one, so you might be able to simply make a custom copy of that and include the information you want.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Showing Timeline Facts in Narrative Report?

Post by tatewise »

What Jane forgot to mention is where the Lua Report Plugins are hiding.
C:\Program Files (x86)\Family Historian\Reports\lua\ holds 9 such Report Plugins including Individual Timeline.fh_lua

Just double-click the file to import into the FH Tools > Plugins where it can be edited just like any other Plugin.

A quick review of the Plugin suggests it includes all Facts, Witness Facts & Timeline Facts for an Individual because it uses the statement fhIndGetFactList(ptrEntryRecord, true, true, true) which is defined to do just that.

So it should include your "zDiagram Note" (custom) attribute and all "Military Service" (custom) attributes.
Are you saying that multiple instances of facts are not all reported? They are all reported in my tests.

The fhIndGetFactList() function has extra options to exclude facts that have the Private flag set or the Rejected flag set which you could perhaps use to govern your "zDiagram Note" (custom) attribute. If you set the Rejected flag on the "zDiagram Note" (custom) attribute facts then they should be excluded.

However, you can also exclude facts by setting their Sentence Template to {blank}.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
LornaCraig
Megastar
Posts: 3190
Joined: 11 Jan 2005 17:36
Family Historian: V7
Location: Oxfordshire, UK

Re: Showing Timeline Facts in Narrative Report?

Post by LornaCraig »

tatewise wrote: 04 Aug 2021 08:53 If you set the Rejected flag on the "zDiagram Note" (custom) attribute facts then they should be excluded.
Mike, facts which have the Rejected flag are also excluded by default from diagrams. But Adrian's custom attribute is specifically intended for diagrams!
Lorna
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Showing Timeline Facts in Narrative Report?

Post by tatewise »

True, but that can be overridden by using the [1,+r] index in the Diagram Text Scheme item.
Anyway, the alternative of a {blank} Sentence Template is even easier.

BTW:
I toyed with the Report Plugin and easily modified it to remove the bullets and honour the <br> and <para> codes in Sentence Templates, but could not get it to run sentences together in a paragraph. Every fact sentence always starts on a new line.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
AdrianBruce
Megastar
Posts: 2090
Joined: 09 Aug 2003 21:02
Family Historian: V7
Location: South Cheshire
Contact:

Re: Showing Timeline Facts in Narrative Report?

Post by AdrianBruce »

Thanks for that LUA suggestion. I have yet to take a look at the beast but it does occur to me that there must surely be a good chance that most of the heavy lifting of navigating the FH Object Model (if that's the correct terminology) will already be done, leaving me with perhaps slightly simpler language elements to understand. I've fought shy of LUA up to now but just maybe... Having said that, I have a job to do that can probably be accomplished quicker by using witness type elements as suggested by Lorna.

Re that LUA report:
Every fact sentence always starts on a new line.
That wouldn't be a problem to me - that's how I like it.
Are you saying that multiple instances of facts are not all reported? They are all reported in my tests.
I think I found what it is. The omitted facts are the ones where I have replaced the normal narrative sentence by the note using the
<para>{note} over-ride construction. When I removed that over-ride from one of the lost facts, it reappeared. I've not checked it all through yet but that's my best idea at the moment.

Re Narrative Reports:
I've altered "zDiagram Note" attribute to have its Sentence Template set to {blank}, as Mike suggests, with the intended result on the LUA Timeline Report. I'm even wondering whether to set the Census event to have a similar {blank} template because that and "zDiagram Note" are the two that I always suppress in Narrative Reports. (To explain - everything that I find on a census form is entered in things like Birth, Occupation, Residence, etc. The Census event is used solely as an internal check to ensure that I have the relevant census.)

Thanks for those thoughts...
Adrian
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Showing Timeline Facts in Narrative Report?

Post by tatewise »

Yes, the Individual Timeline report uses fact Sentence Templates similar to the standard Narrative reports.
So, <para>{note} will produce nothing (except perhaps some blank lines) if there is no local Note.

My LUA changes simply involved inhibiting a few lines to remove the bullets and retain <br> and <para> blank lines.
You correct that all the 'heavy lifting' needs no changes.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
AdrianBruce
Megastar
Posts: 2090
Joined: 09 Aug 2003 21:02
Family Historian: V7
Location: South Cheshire
Contact:

Re: Showing Timeline Facts in Narrative Report?

Post by AdrianBruce »

tatewise wrote: 04 Aug 2021 13:13 ... So, <para>{note} will produce nothing (except perhaps some blank lines) if there is no local Note. ...
But there is a local note!

So far as I can see, having just tried some tests, the <para>{note} construction works in this report for short Notes but fails with longer Notes (which mine are, of course, me being me). Somewhere over 998 characters in the Note for the fact will cause the report to omit the entire fact from the Timeline Report. My character count comes straight out of the position count in Notepad++ so may not equal a byte count!
Adrian
User avatar
ColeValleyGirl
Megastar
Posts: 5465
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Showing Timeline Facts in Narrative Report?

Post by ColeValleyGirl »

Adrian, are they plain text or rich text notes?
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Showing Timeline Facts in Narrative Report?

Post by tatewise »

I get the same effect with both an unformatted plain text Note and a formatted rich text Note.

The long Note text is shown correctly by a standard Narrative report.

The amount of text that gets shown varies depending on whether {note} or {%FACT.NOTE2%} codes are used.

It seems that the fhCallBuiltInFunction("FactSentence",...) function is truncating or removing the long text.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
AdrianBruce
Megastar
Posts: 2090
Joined: 09 Aug 2003 21:02
Family Historian: V7
Location: South Cheshire
Contact:

Re: Showing Timeline Facts in Narrative Report?

Post by AdrianBruce »

plain text or rich text notes
Assuming that "_FMT 1" means Rich Text (I'm looking directly at the GEDCOM - not sure if that's the most sensible way of doing it) then I'd confirm Mike's statement - the lost notes are both.

As for whether {note} or {%FACT.NOTE2%} are used, I guess that's out of my hand in the LUA Report or deeper.
Adrian
User avatar
AdrianBruce
Megastar
Posts: 2090
Joined: 09 Aug 2003 21:02
Family Historian: V7
Location: South Cheshire
Contact:

Re: Showing Timeline Facts in Narrative Report?

Post by AdrianBruce »

Just to add that I'm running with the Narrative Report and, as per Lorna's useful suggestion, ensuring that certain facts like birth of children or death of spouses are witnessed by (at least) the Principal who will form the subject of the Narrative Report. I can also control the Report's contents by having children's deaths witnessed by parents only if they occur while the child is living with their parents.
Adrian
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Showing Timeline Facts in Narrative Report?

Post by tatewise »

Adrian, the {note} or {%FACT.NOTE2%} codes are in the Sentence Templates that you can and do use, or at least you said you use <para>{note} and theoretically <para>{%FACT.NOTE2%} should produce the same effect.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Showing Timeline Facts in Narrative Report?

Post by tatewise »

I have been investigating the fhCallBuiltInFunction("FactSentence",...) function truncating/removing text.
It seems the problem exists in the underlying FH functions such as =FactSentence(), =CombineText(), and probably others.
They have arbitrary limits on the text length of their parameters and returned text.
This is a recurring theme in FH where CP have used fixed string length items instead of variable string length items.
When users happen to stray beyond the fixed limits then things go wrong without warning.
Apart from reporting each occurrence when it arises, I am not sure what we can do about it.
I've lost count of how many times similar string limits have been reported and eventually fixed.

In this case, I used the =FactSentence(%FACT%) function in a Query Column, and just like in the Individual Timeline report, it lists no text when the sentence Note is too long.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
AdrianBruce
Megastar
Posts: 2090
Joined: 09 Aug 2003 21:02
Family Historian: V7
Location: South Cheshire
Contact:

Re: Showing Timeline Facts in Narrative Report?

Post by AdrianBruce »

tatewise wrote: 04 Aug 2021 16:59 Adrian, the {note} or {%FACT.NOTE2%} codes are in the Sentence Templates that you can and do use, or at least you said you use <para>{note} and theoretically <para>{%FACT.NOTE2%} should produce the same effect.
Yes - I do use the <para>{note} construction in the over-ride templates for some individual facts. The point I was trying to make clear for anyone else reading, is that in normal Narrative Reports, it works fine. But in this LUA based Timeline Report, the same construction fails dismally - that's what I was trying to convey.

I've not used the {%FACT.NOTE2%} variant, primarily because I have it in my head that I was told long ago that {note} was better because {%FACT.NOTE2[1]%} is liable to truncation with an ellipsis - though not vanishing, as here. Whether or not I always have the choice, I'm not sure!

Thanks for the investigation of fhCallBuiltInFunction.
Adrian
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Showing Timeline Facts in Narrative Report?

Post by tatewise »

I have raised a CP support request on the Subject: Text string limits are too small and presented the following limits that I discovered by experimentation, but should not be considered as exhaustive:
  • Query Result Set Column text is limited to 2047 characters; anything bigger is discarded.
  • Plugin fhCallBuiltInFunction() returned text limit is 999 characters; anything bigger is truncated or discarded.
  • Data References like %FACT.NOTE2% are limited to about 500 characters; anything bigger is truncated.
  • Function =FactSentence() returned text is limited to 1023 characters; anything bigger is discarded.
  • Function =CombineText() has its 4 parameters limited to 127, 511, 127 & 511 characters respectively, either as a literal text string or the text from a data reference; anything bigger is truncated.
I've asked: Is it time for a widespread review? Can all scripts using fixed-length strings be replaced with variable-length strings where appropriate?

In reply, they say: "I will pass your comments on to the developers for consideration."

BTW: It is the fhCallBuiltInFunction() and =FactSentence() limits that impact the Indiviudal Timeline report.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
AdrianBruce
Megastar
Posts: 2090
Joined: 09 Aug 2003 21:02
Family Historian: V7
Location: South Cheshire
Contact:

Re: Showing Timeline Facts in Narrative Report?

Post by AdrianBruce »

Thanks Mike.
Adrian
Post Reply