Page 1 of 1

Exclude/Include Media in Reports

Posted: 26 Aug 2020 11:23
by ikas
Hi,

If I have media attached to a source record I usually set check boxes to exclude the media from reports and diagrams.
On occasion I would like a report to include all the source media. So I am looking for a way of automating the process
of checking/unchecking the Exclude from Reports check box.

I am considering two options.

1. Find/Replace in GEDCOM
2. Autohotkey script

I cannot locate the relevant data in the GEDCOM file. Could someone give me a pointer.

Also is there another, better approach?

Thanks

Re: Exclude/Include Media in Reports

Posted: 26 Aug 2020 11:45
by ColeValleyGirl
What about creating two custom reports, one with the checkbox ticked and one with the checkbox unticked?

Re: Exclude/Include Media in Reports

Posted: 26 Aug 2020 12:34
by ikas
ColeValleyGirl - I was assuming because each source record has the checkbox "Exclude from Reports" checked then every report would exclude source media. Are you saying I can set up a custom report that over-rides that setting? If so that would be a much simpler solution.

Re: Exclude/Include Media in Reports

Posted: 26 Aug 2020 12:38
by tatewise
What Helen is suggesting is to go through every Media item attached to a Source Citation and untick Exclude From Reports. There is no override option.

Then in Report > Options on the Sources tab tick or untick the Show Source Pictures and the Show Source Citation Pictures to enable or disable them all for that Report. As Helen says, you can save those two settings as Custom Reports.

The GEDCOM structure is quite complicated...

The Source record links to the Media record and has an associated _ASID ref number.
0 @S30@ SOUR
1 TITL Baptism Certificate: Helen Mary Addison
1 OBJE @O26@
2 _ASID 1

The Media record has a Note structure with a matching _ASID ref number and _EXCLude options.
0 @O26@ OBJE
1 FORM png
1 TITL BAC-Helen-Mary-Addison
1 _FILE Media\Certificates\BAC_Helen_Mary_Addison.png
1 _KEYS Picture
1 NOTE
2 _ASID 1
2 _EXCL ALL

If the Media is linked to multiple parent records there will be multiple NOTE tags with different _ASID numbers.
The _EXCL tag can be RPT for Reports, or DGM for Diagrams, or ALL for both.

Re: Exclude/Include Media in Reports

Posted: 26 Aug 2020 14:14
by ikas
Thanks Mike. Too many source records to do it manually especially as I want to include the media on certain occasions and exclude them on other occasions. I will take a look at the find/replace option with your information on where the flag is located in the GEDCOM file.

Re: Exclude/Include Media in Reports

Posted: 26 Aug 2020 14:23
by tatewise
I am still unclear about your objective for Reports and which Media you want to exclude or include.

Do you just want two alternative options?
i.e. 1) Exclude all Source Media; and 2) Display all Source Media

Or do you want to selectively exclude and display various groups of Source Media from time to time?
This will be difficult but might be possible with a Plugin and suitable Keywords to identify the groups.

Re: Exclude/Include Media in Reports

Posted: 26 Aug 2020 14:39
by ikas
Mike - It is an all or none situation. In general I want all source media excluded from reports but on certain occasions I want to include all source media in the report.

I have just tested the Find/Replace option using the information you supplied, replacing all EXCLUDE ALL with EXCLUDE DGM and it seems to have worked. Will test it further but looks good at the moment. Many thanks for your help.

Re: Exclude/Include Media in Reports

Posted: 26 Aug 2020 15:05
by tatewise
Ok, understood.
Do you realise that global Find/Replace will adjust all Media records and not just those linked to Source records?
It also assumes you always ticked both options and not just Exclude From Reports.

BTW: Leaving Exclude From Diagrams ticked for Media linked to Source records is unecesary, because those Media can never appear in Diagrams anyway. The Pictures in Diagrams are only the Media linked to Individual records.

Re: Exclude/Include Media in Reports

Posted: 27 Aug 2020 09:08
by ikas
Just to say I have now thoroughly tested it and it works a treat. Thanks again, Mike