Summary: | Income and Expenses report needs some HTML improvements | ||
---|---|---|---|
Product: | [Applications] kmymoney | Reporter: | Glenn <gemdancer> |
Component: | reports | Assignee: | KMyMoney Devel Mailing List <kmymoney-devel> |
Status: | REPORTED --- | ||
Severity: | minor | CC: | ostroffjh |
Priority: | NOR | ||
Version: | 5.1.3 | ||
Target Milestone: | --- | ||
Platform: | Microsoft Windows | ||
OS: | Microsoft Windows | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | PDF file showing mis-alignment of Grand Total row |
Description
Glenn
2024-09-08 19:31:00 UTC
Created attachment 173456 [details]
PDF file showing mis-alignment of Grand Total row
Forgot to attach the PDF file showing mis-alignment of Grand Total row.
OK, I understand better now about reports. The displayed report is actually HTML, and the Export just outputs that same HTML to a file. It is extra work to modify the HTML during the Export. By definition, Export means it will be used outside of KyMyMoney, so it would be nice if it actually worked properly outside of KyMyMoney. You folks might want to think about that. There is a workaround: Convert the HTML to PDF. As the treasurer for an organization, I use the Export to generate reports to present to the board. HTML is not a good format for that, so I end up saving them as PDF from the web browser. Converting to PDF seems to ignore all the HTML issues and it comes out OK, EXCEPT for the Grand Total row label not lining up with the numbers. I also use Quickbooks for another organization, and it generates reports directly in PDF format. Although it is an extra step in KyMyMoney to convert from HTML to PDF, it is more flexible because geeks like me can edit the HTML to customize the report. Since I don't use the HTML format directly, I guess I should not worry about correctness of the HTML, and just accept it as is. I have been editing the HTML file to make it more correct, but it does not make much difference in the PDF output, except for that Grand Total row. I guess I can limit my editing to just that CSS vertical-align value so the Grand Total row comes out right. Maybe you can just change that, and I would not have to edit the HTML at all (leaving the other problems intact)? The HTML validator at https://validator.w3.org/ has pointed out another minor issue, with the DOCTYPE declaration. Your doctype has a typo: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 //EN" "http://www.w3.org/TR/html4/strict.dtd"> There should NOT be a space between "4.01" and "//EN". Next time somebody works on the Report module, they should validate the HTML output and correct all the simple errors, like spacing, missing quotes, etc. Is the misalignment present when the report is viewed in KMM, when the exported report is viewed in a browser, or does it just show up when printed to PDF? On fixing the DOCTYPE and similar things, I have to actually look at the code, but I'm pretty sure that part of the HTML is not generated directly by KMyMoney code, but by a KDE or Qt library, so we'll probably have to pass the bug on to whichever of them is responsible. The mis-alignment does not show up when viewing in the browser, only when Printing from the browser. It shows up in the Print Preview, and the Printed/Saved output. BUT, the mis-alignment only shows up using Chrome and Edge. No problem in Firefox. Maybe it is not caused by KMyMoney at all, but there seems to be an easy(?) fix via KMyMoney (or manual editing, or using Firefox). After looking at this more, it is mostly an issue of non-compliance with standards, and maybe some quirks of the browsers. The HTML output looks fine. The PDF is fine, except for the Grand Total label mis-alignment, which is a minor issue. When I open the browser Inspector, the Console does not show any errors or warnings. Very low priority, or maybe even close it with no further action. Maybe let the KDE or Qt library folks know they should validate their HTML output. Sorry to bother you folks about something so trivial. You have been very responsive, and I really appreciate that. |