-
Notifications
You must be signed in to change notification settings - Fork 301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Report additions #4945
Report additions #4945
Conversation
The app/Report tool creates reports from the collected gedcom data. The current versio has some limitation and shortcomings that this update addresses. A detailed description is incuded as a pdf file, and in short the changes are: Report tries to place text on an exact position on a page. But many pitfalls on the way. Counting lines in a textbox is not enough, the lines may be set in different font sizes; converting lines to points in HTML uses a much too high number, which results in a lot of white space, especially for long reports (many pages). The PDF reports have problems to predict when the tool TcPdf will break a line or add a page. This applies to the files HtmlRenderer.php, ReportHtmlTextbox.php, ReportHtmlText.php, PdfRenderer.php, ReportPdfTextBox.php and ReportPdfText.php, The file ReportParserGenerate.php is responsible for the interpretation of the xml code that defines the layout and contents of the report. A number of addition have been introduced. (1) GetPersonName has got a new attribute, select=..., that allows the report to present the last name used or a combination of latest and surname at birth. Another attribute, fam_relation="1", will add the relation the current person to the start person of a report, e.g. mmf which means mother's mother's father. (2) The value that is returned by GedcomValue can be a very long string. An attribute truncate=... already exists but has been two new possibilities for dates: "Y" will give only the year and "d" gives the date with the three character short for the month, "dd mmm yyyy". (3) The calculation of the family relation that can be give with the name requires a substatial amount of code. (4) The xml keyword Facts returns all facts and events of the current object (person, family) in the order they appear. But in a report one wants chronological order and that has been implemented. A special addition is that a temporary gedcom event is introduced in the process, _SP_DEAT, which when a spouse has died, if applicable. This is used only during calculations, not added to the Gedcom database or file. This (hidden) gedcom value must be added to the gedcom.php file. (A similar presentation is given on the main page for each person.) (5) The keyword SetVar has been expanded with new possibilities for the attribute value=.... The value can now specify "@$xxx" which means the the value of xxx is interpreted as the name of the varible to select. Other new values are "@Format" that responds PDF or HTML depending on whichever form of report is selected. "@$dump" can give some help in debugging new or modified reports. (6) Sometimes ancestors have married a relative. In pedigree charts these persons were given as separate persons, although with tha same name, birthdate, et c. But now such persons are detected and the second occurrance is given as "same person as ...". (7) Some errors are corrected.
Some of the reports supplied with webtrees relies on the current app/Report tool. The layout can be slightly changed with the suggested new app/report. A couple of reports try to give the result as tables. The changes here take care of that. These new xml files work well with the old app/Report xml tool.
Not sure were to put it but this seems to be a logical place.
Unfortunately I used my own indentation rules and did not know how to fix it. So please make the corrections! |
Added support for url generation for href links within the family tree
Placement of comment retried
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4945 +/- ##
============================================
+ Coverage 32.29% 32.53% +0.24%
- Complexity 11401 11535 +134
============================================
Files 1171 1172 +1
Lines 48056 48166 +110
============================================
+ Hits 15521 15673 +152
+ Misses 32535 32493 -42 ☔ View full report in Codecov by Sentry. |
The static analysis checks that still fail relate to code that "always" has been there. Therefore I want this pull request to be set to 'Ready for review' ! |
PR ready for review! |
This PR solved the 'Missing data' Feature Request. |
The change was due to bad test environment
HerzScheisse proposed this in general but that is not good for most other languages.
…t with better distances between lines
Is this PR still a candidate to be merged with the dev branch? |
Yes it is! |
Hello. I got these errors:
Is it ok that there is a missing file?
Just in case it helps. |
I doubt this is right:
Is it? |
Does the line with a fixed "55.5" is right?
EDIT |
Hello Elysch! I am really sorry that I missed your comments earlier, but I have been very busy lately.
Recently I applied the changes I was using in wt 2.1.18 to a fresh installation of 2.1.20 and everything worked out fine and I am now using the patched 2.1.20. You can fetch these files from my repo sevtor/modules. I am now trying to figure out how I shall continue. The history of this PR is too long and files are modified and reverted so either I shall continue here or restart with a new PR. There are also some numerical constants in other places that I don't like but I hesitated earlier to make more elaborated changes to the code but now I know more about how to use php. |
I am now working intensively with updates and will create a new PR that will replace this one! |
This PR includes many additions and changes starting with webtrees 2.1.17 and has become hard to update. |
The app/Report tool creates reports from the collected gedcom data. The current version has some limitation and shortcomings that this update addresses. A detailed description is included as a pdf file, and in short the changes are:
Report tries to place text on an exact position on a page. But many pitfalls on the way. Counting lines in a textbox is not enough, the lines may be set in different font sizes; converting lines to points in HTML uses a much too high number, which results in a lot of white space, especially for long reports (many pages). The PDF reports have problems to predict when the tool TcPdf will break a line or add a page. This applies to the files HtmlRenderer.php, ReportHtmlTextbox.php, ReportHtmlText.php, PdfRenderer.php, ReportPdfTextBox.php and ReportPdfText.php,
The file ReportParserGenerate.php is responsible for the interpretation of the xml code that defines the layout and contents of the report. A number of addition have been introduced.
(1) GetPersonName has got a new attribute, select=..., that allows the report to present the last name used or a combination of latest and surname at birth. Another attribute, fam_relation="1", will add the relation the current person to the start person of a report, e.g. mmf which means mother's mother's father.
(2) The value that is returned by GedcomValue can be a very long string. An attribute truncate=... already exists but has been two new possibilities for dates: "Y" will give only the year and "d" gives the date with the three character short for the month, "dd mmm yyyy".
(3) The calculation of the family relation that can be give with the name requires a substantial amount of code.
(4) The xml keyword Facts returns all facts and events of the current object (person, family) in the order they appear. But in a report one wants chronological order and that has been implemented. A special addition is that a temporary gedcom event is introduced in the process, _SP_DEAT, which when a spouse has died, if applicable. This is used only during calculations, not added to the Gedcom database or file. This (hidden) gedcom value must be added to the gedcom.php file. (A similar presentation is given on the main page for each person.)
(5) The keyword SetVar has been expanded with new possibilities for the attribute value=.... The value can now specify "@$xxx" which means the the value of xxx is interpreted as the name of the varible to select. Other new values are "@Format" that responds PDF or HTML depending on whichever form of report is selected. "@$dump" can give some help in debugging new or modified reports.
(6) Sometimes ancestors have married a relative. In pedigree charts these persons were given as separate persons, although with tha same name, birthdate, et c. But now such persons are detected and the second occurrance is given as "same person as ...".
(7) Some errors are corrected.