* Changing the way a Family Group Sheet is created

Questions about the various ways of sharing your research with others
Post Reply
avatar
KFN
Superstar
Posts: 295
Joined: 20 Jun 2021 01:00
Family Historian: V7

Changing the way a Family Group Sheet is created

Post by KFN »

Has anyone, can anyone, change the way parts of the Family Group Sheet ("FGS") gets produced.

I want the Index created in the sheet to perform differently, two changes!
1) I am not a fan of the index including all names and places together in the same index. In MS-Word this is a very simple addition of an additional switch \f with a quoted name.
2) Rather than creating the XE value as Surname, Given name. The index would read much better with the XE value as Surname : Given Name This cause the index to create a Surname level with given names indented.

I can add the switch and ":" to the XE code by hand but with a thousand names and many thousand places this is rather hard.

If not, is it possible to create a program that creates a FGS with the additional switches and ":"?
User avatar
ColeValleyGirl
Megastar
Posts: 5520
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Changing the way a Family Group Sheet is created

Post by ColeValleyGirl »

Fh7 has the ability for users to write lua plugins to generate custom reports. You probably need to explore that.
avatar
KFN
Superstar
Posts: 295
Joined: 20 Jun 2021 01:00
Family Historian: V7

Re: Changing the way a Family Group Sheet is created

Post by KFN »

Are we talking here about using "luacom" to generate a report or using the Report Plugin "Special Plugin Types"?

I've create MS-Word documents using COM in the past, and while it is very powerful it is also very tedious and not so much fun!

Looking at the snippets of Lua code in the "Special Plugin Types" for Report Plugins the first Lua snippet in "How to Create a Report Plugin does not do what the document says it does:
If you run it (not under the debugger!), it will prompt you to choose one or more Individual records and will then output a report which has the name of each selected person as heading, and the text "Hello World" in the body of the report, for each selected person
Running it, does not prompt anything nor does it create a "Hello World" report.

I did augment the given code to, Create a section, add a prompt for an Individual Ptr and set the index and count to 1 and still nothing happened! We are told not to run this in "Debug" so I also ran it from the Tools Menu.

Has anyone actually create a report using Lua that I can review as a starting point?

Thanks
User avatar
ColeValleyGirl
Megastar
Posts: 5520
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Changing the way a Family Group Sheet is created

Post by ColeValleyGirl »

KFN wrote: 01 Feb 2024 13:39 Are we talking here about using "luacom" to generate a report or using the Report Plugin "Special Plugin Types"?
The second.

Has anyone actually create a report using Lua that I can review as a starting point?
Calico Pie has done it -- see C:\Program Files (x86)\Family Historian\Reports\lua for examples (or equivalent on your system).

Other examples at https://pluginstore.family-historian.co.uk/report although they only report on Notes.
avatar
KFN
Superstar
Posts: 295
Joined: 20 Jun 2021 01:00
Family Historian: V7

Re: Changing the way a Family Group Sheet is created

Post by KFN »

I just learned that I can't run this from the Tools Menu either but I must go to the Publish>Custom Reports to run.

Now I see that it does work!

I also can see that the Sample Notes Plug In can also be run from Publish>Custom Reports

So I'm back at it, moving forward!
avatar
KFN
Superstar
Posts: 295
Joined: 20 Jun 2021 01:00
Family Historian: V7

Re: Changing the way a Family Group Sheet is created

Post by KFN »

Discussed the issue with CP.

They indicated that it would be better to write a script in MS-Word to fix the problem. They only support RTF and implied that RTF would not support my needs.

The other option is to use luacom to write the report. I've used Microsoft Office Automation in the past (luacom or COM) and it can be a real pain on larger reports.

Therefore I'll be writing something outside of FH7 to fix this problem with Indexes. The name issue is doable, but cant see my way yet around creating a second Index for places with the way FH7 creates their files!

If anyone has thoughts, I'm open to suggestions!
Post Reply