Filters are great! Why don't all reports use them?

A bit of filter magic can do so much…

I created filters for all close relatives, male descendants, children and spouses of current person (name genealogy), relationship paths etc…

But, most reports don’t filter… Which is a real shame. Do I really first need to export a smaller subset of my family tree, then import it in a new tree, to be able to create those reports the way I want them?

Eugène Dubois

I am using gramps 5.1.3 on Linux mint

Most reports are built to satisfy a specific need for a user. And since reports are often a first foray into hacking Gramps, they generally start simplistic in design with few options. The options that tend to be targeted first are things that CANNOT be done with a simple workaround… like a filtered export.

That’s why filters tend to be bolted on later.

It seems like documenting how to add a filter option to an existing report would be a lovely expansion page to the “Adapt a built-in Report” wiki article. Right now, it is just an un-validated shell about about how to properly fork a built-in report so that you can experiment.

But an article about how to add a filter option would make it a USEFUL set of documentation. (Started the “example of a gramplet with a custom filter configuration option” topic Sep 2024) And along with adding a Sorting option article, it might get a some people playing with improving our reports.

Both articles are beyond my Python experience levels.

1 Like

Which reports do you expect to find filtering that do not have the option?

1 Like

Most reports really… For example descendants. Sometimes you just want to run a subset…
For example family members with the same surname…

That report name doesn’t sound familiar. Since you’re in the Netherlands, maybe you’re looking at a Dutch translation? Help us find the same example in English.

Add-on reports:

Hi Brian,

Sorry I wasn’t very clear. That’s a filter I have created…
Those are all descendants from the same male, with spouses and children added.

I would like to apply that filter to the descendants reports. That way I should get some kind of family name genealogy.

Btw… The relationship graph works great with this filter! Although people are a bit in a random order.

1 Like

Ok. Thanks for that clarification that “family members with the same surname” is a custom filter you have created.

But help us find a specific Report where you want to apply this filter but where that option does not exist.

Was it “6.3 Descendant Tree”, “6.4 Family Descendant Tree”, “7.5 Descendant Report”, “7.7 Detailed Descendant Report”? Or maybe one of the four add-on reports related to “Descendant”?

7.7 The detailed descendant Report would be very nice!

But I think it could be useful in nearly every report.
I don’t know much about the programming of Gramps, but I can imagine it could be a good addition in a general reports framework.

You could create a .gramps (xml) export using one of your filters and then create a temp database to import the file. Then you can run a report that is restricted to the people you want.

Maybe not ideal but it is a way to get the reports that you want/need.

That is what I have been doing up to now :slight_smile: !
Just seems a shame, filters is one of the very strong points of gramps. Just not used to its full potential.

There is no such Gramps framework like Microsoft Report Builder. There is an API.

It’s been awhile since this thread had any activity.

Perhaps we could use the built-in Complete Individual Report to illustrate the parts of enabling a People filter option in a Text Report ? (It also does Sorting so that’s a bonus example.)

What else?

Hello Brian,
I adapted my version of the Detailed descendants Report quite a bit now, and because of that feel a bit more confident in programming for Gramps.

Going to see if I can add a filter option now.

1 Like

Filters are easy because they just consist of a list of handles. So instead of working your way through the entire database, you just work through the filter.

1 Like

The harder part is probably adding the GUI selection in the Report for selecting the filter. And doing so without breaking stored configuration options and “Books” that reference the Report.

I don’t think that Eugene is going to be publishing his modified report.

@codefarmer is working with @Nick-Hall to ease the sharing of 5.2 addons. So maybe @eugene would be willing to try out the patched process.

My report will be adapted to my “special needs” :slight_smile: , so not really suitable as an add on.
Gramps has given me a lot though, and if I get the filter to work I will add the filter possibility to some other reports.

Eugene

1 Like

@GaryGriffin created a template for new reports.

And as mentioned in an earlier posting in this thread, there is an Adapt a built-in Report wiki placeholder. And a Report-writing tutorial.

Perhaps you could look through those while creating adding a filter to your adapted report? They could use some love and be improved.

There are a lot of reports. So gathering encouraging a group of people to rackle upgrading reports would have a lot of benefits.

It would give people confidence to build and publish new reports and maybe create a collaboration resource. It would be nice if someone came up with a more intuitive replacement Label for “Report options (2)”!