GnuCash
Contact   Instructions
Bug 796826 - Report HTML - it is not possible to suppress the document header
Summary: Report HTML - it is not possible to suppress the document header
Status: RESOLVED FIXED
Alias: None
Product: GnuCash
Classification: Unclassified
Component: Reports (show other bugs)
Version: git-maint
Hardware: PC Linux
: Normal normal
Target Milestone: ---
Assignee: reports
QA Contact: reports
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-29 13:06 EDT by Carsten Rinke
Modified: 2019-03-29 17:54 EDT (History)
4 users (show)

See Also:


Attachments

Description Carsten Rinke 2018-08-29 13:06:39 EDT
In gnc:html-document-render the statement (not (null? headers?)) is always true, and by that a suppression of the header is not possible.
Comment 1 John Ralls 2018-08-29 20:04:17 EDT
Do you mean the <HEAD>...</HEAD> part of the HTML document or the header containing the title of the report?

And why is it a bug that it's not suppressible?
Comment 2 Geert Janssens 2018-08-30 02:21:18 EDT
Because of the multi-column report. That report embeds several reports in one html file. And in this case there should only be one HEAD section. I believe this issue has been reported in the past. But I haven't searched for it yet (something related to reports failing html validation).

Having said that, the challenge will be more than just being able to skip the HEAD section. Some reports store information (like a css file) in that section. And if that report gets included in a multi-column report, this data should be moved to the global HEAD section.

I don't know if Carsten had other use cases in mind so I'll leave the bug in NEEDINFO state for him to answer as well.
Comment 3 Carsten Rinke 2018-08-31 03:30:29 EDT
No other use cases I can think of right now.

I came across it when writing the tests for it 
https://github.com/Gnucash/gnucash/pull/391

I see that the html doc renderer is designed to check if header (and btw: also title) shall be set or not.
But these checks are implemented in a way that is these fields will always be included, there is no way to create a condition, that these checks will prevent adding these fields (at least I did not find one up to now).

So I added a test as "expected to fail" to the set of tests with a reference to this bug (not yet uploaded to PR#391).
Comment 4 Carsten Rinke 2018-09-19 09:31:32 EDT
A solution proposal is covered in PR#391

see
https://github.com/Gnucash/gnucash/pull/391/commits/d493eaee32faf4e101557e2b6cf335f03057a2fa

Note You need to log in before you can comment on or make changes to this bug.