Web based family history software

Question How to call report class functions in report xml?

More
1 year 6 days ago #1 by SG
Hi,

I'm trying to write a custom report to list events on any given day(s), for any/selected individuals/families, from the entire database/gedcom.
These events should be listed in chronological order

The most obvious way to do this to me seems to be to copy & modify the code from OnThisDayModule.php.
If I can get this to give me a list of events, then I should then be able to lay them out in the xml file.

My question is how do I access functions/fields (the list of events) in ExampleModuleReport from the "report.xml"?
i.e. What's the visibility between ExampleModuleReport class (in ExampleModuleReport.php) and "report.xml"?

Please Log in or Create an account to join the conversation.

More
1 year 5 hours ago #2 by fisharebest
Replied by fisharebest on topic How to call report class functions in report xml?
> What's the visibility between ExampleModuleReport class (in ExampleModuleReport.php) and "report.xml"?

None. The XML files can only access functions built into the XML parser (ReportParserGenerate.php).

To add new features to the reports, you must first design the XML tags and attributes, and then write a parser to handle them.

This makes it difficult to extend the functionality - which is why I have never attempted it :-)

For the effort involved in updating the code, it would be easier to ditch the XML format and replace it would custom code feeding into PhpSpreadsheet/PhpDocument - and render that as PDF, XLS, etc.

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

More
11 months 4 weeks ago #3 by SG
Thanks Greg.

I've been going round in circles trying to resolve this.

I've also been looking back at your previous comments over the last 10 years or so about reporting and agree the current XML system isn't able to cope with the reporting expectations from webtrees users.

I'm happy to help go down the path of replacing the reporting system, albeit with a couple of caviats;
1) I don't know how far you have gone already and don't want to mess up anything you've already done.
2) While I'm a programmer, web languages are not my strong point. I could probably code in PHP, but style sheets and HTML are not my strong points.

If you think I could still help, please let me know.

In the meantime, I will try to code a module in PHP.

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum
}