Bug 60953 - REPORTBUILDER: missing header and footer on first page when section "Detail" is set to Page-Break after Section
Summary: REPORTBUILDER: missing header and footer on first page when section "Detail" ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
: 60888 (view as bug list)
Depends on: 61725
Blocks: Database-Reports-Builder Database-Reports-Builder-MAB
  Show dependency treegraph
 
Reported: 2013-02-16 14:06 UTC by Ove Hansen
Modified: 2023-04-18 15:57 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Missing header (29.51 KB, image/jpeg)
2013-02-21 09:26 UTC, Ove Hansen
Details
Empty page (35.16 KB, image/jpeg)
2013-02-21 09:28 UTC, Ove Hansen
Details
Choice of Force new page (34.45 KB, image/jpeg)
2013-03-10 17:59 UTC, Ove Hansen
Details
No Header and Footer on first Page with Pagebreak after Section Detail (24.86 KB, application/vnd.sun.xml.base)
2013-03-10 18:48 UTC, Robert Großkopf
Details
Result of a test (25.58 KB, application/pdf)
2021-10-21 20:08 UTC, Julien Nabet
Details
It should look all the same: Pagebreak should have nothing to do with header and footer, (25.63 KB, application/pdf)
2021-10-22 06:43 UTC, Robert Großkopf
Details
Result of a test 2 (59.28 KB, application/pdf)
2021-10-22 11:55 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ove Hansen 2013-02-16 14:06:21 UTC
Problem description: 

Steps to reproduce:
1. Opret rapport i A5-format
2. Tilføj sidehoved og sidefod

Current behavior:
Sidehoved vises ikke på første side. Det gør den heller ikke ved A4 format.
Der vises kun data på hver anden side. Hvis sidefod fjernes, vises der data på hver side.

Expected behavior:

              
Operating System: Windows 7
Version: 4.0.0.3 release
Comment 1 Jorendc 2013-02-16 14:54:52 UTC
Please read our FDO-policy (https://wiki.documentfoundation.org/FreeDesktop_Rules_Procedures#Policies) and report your bug in English. None of our developers and bug triagers can read/speak Danish, so this bug report can't be reproduced and fixed.

Kind regards,
Joren
Comment 2 Ove Hansen 2013-02-16 17:37:04 UTC
Header in reports do not appear on the first page. When the footer is visible, only data are shown on every second page, when the page size is A5 and column shape are single column.
Comment 3 Robert Großkopf 2013-02-20 20:26:05 UTC
@Ove,

isn't this a duplicate of https://bugs.freedesktop.org/show_bug.cgi?id=60888 you reported also?
Could you create an attachment, which shows the wrong behavior?
Comment 4 Ove Hansen 2013-02-21 09:22:59 UTC
*** Bug 60888 has been marked as a duplicate of this bug. ***
Comment 5 Ove Hansen 2013-02-21 09:26:54 UTC
Created attachment 75241 [details]
Missing header
Comment 6 Ove Hansen 2013-02-21 09:28:55 UTC
Created attachment 75242 [details]
Empty page
Comment 7 Robert Großkopf 2013-03-10 16:24:21 UTC
There must be some different information. When I create a report, set page to A5, set page-header with some text and page-footer with page-number it works.
Without example-database or more details about grouping and group-header and group-footer I could not confirm this bug.
Comment 8 Ove Hansen 2013-03-10 16:45:48 UTC
I connect to an Access database. Maybe that is the cause. I have now tried to build a new database in the Libre Office format, and that seems to work. I think, you may close the bug.
Comment 9 Robert Großkopf 2013-03-10 17:09:12 UTC
I close this bug as Resolved → Worksforme. See https://bugs.freedesktop.org/show_bug.cgi?id=60953#c8
Comment 10 Ove Hansen 2013-03-10 17:59:27 UTC
Created attachment 76284 [details]
Choice of Force new page
Comment 11 Ove Hansen 2013-03-10 18:02:11 UTC
I have found out, that the error come, when I choose "After section" in the field "Force new page". I don't think, it's an error.
Comment 12 Robert Großkopf 2013-03-10 18:31:10 UTC
Yes, of course this is a bug. I have tried this. When you change the section detail to "Before section" or "Before and After section" it works right, not when set to "After section".
I will create an attachment as soon as possible.
Set this bug as "Reopened".
Comment 13 Robert Großkopf 2013-03-10 18:48:49 UTC
Created attachment 76286 [details]
No Header and Footer on first Page with Pagebreak after Section Detail

Open The attached Database and open the report. You see, that there is no page-header and no page-footer on the first page.
Section "Detail" is set to "Page-Break after Section".
Try to set this to "Page-Break before Section" - works right.
Try to set this to "Page-Break before and after Section" - works also.
Comment 14 Robert Großkopf 2013-08-07 16:47:55 UTC
Just testing all bugs from Report-Builder. This bug first appears in the oldest available version of LO, 3.3.0 beta1. So I set the first available bugzilla-version, 3.3.0 release.
Comment 15 Alex Thurgood 2015-01-03 17:38:29 UTC Comment hidden (no-value)
Comment 16 QA Administrators 2016-01-17 20:02:53 UTC Comment hidden (obsolete)
Comment 17 Robert Großkopf 2016-01-21 19:08:13 UTC
Bug still exists with LO 5.1.0.2, OpenSUSE 42.1 Leap, 64bit rpm Linux.
Comment 18 QA Administrators 2017-03-06 14:00:19 UTC Comment hidden (obsolete)
Comment 19 Robert Großkopf 2017-03-06 16:23:21 UTC
Bug still exists in LO 5.3.1.1, OpenSUSE Leap 42.1 64bit rpm Linux.
Comment 20 QA Administrators 2018-03-07 03:41:03 UTC Comment hidden (obsolete)
Comment 21 QA Administrators 2020-03-07 03:19:08 UTC Comment hidden (obsolete)
Comment 22 Robert Großkopf 2020-03-07 07:38:12 UTC
Bug still exists in LO 6.4.2.1, OpenSUSE 15.1 64bit rpm Linux.
Comment 23 Julien Nabet 2021-10-21 20:08:27 UTC
Created attachment 175867 [details]
Result of a test

Robert:
I tried this patch:
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/output/text/TextRawReportTarget.java b/reportbuilder/java/org/libreoffice/report/pentaho/output/text/TextRawReportTarget.java
index d8e50d2d4991..6888da1d204b 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/output/text/TextRawReportTarget.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/output/text/TextRawReportTarget.java
@@ -979,6 +979,12 @@ public class TextRawReportTarget extends OfficeDocumentReportTarget
             performStyleProcessing(attrs);
         }
 
+        if (isSectionPagebreakAfter(attrs))
+        {
+            // force a pagebreak ..
+            setPagebreakDefinition(new PageBreakDefinition(isResetPageNumber()));
+        }
+
         final String namespace = ReportTargetUtil.getNamespaceFromAttribute(attrs);
         final String elementType = ReportTargetUtil.getElemenTypeFromAttribute(attrs);
         final AttributeList attrList = buildAttributeList(attrs);

I'm not sure what should be the result of After, could you tell me if the pdf is ok or not?
Comment 24 Robert Großkopf 2021-10-22 06:43:08 UTC
Created attachment 175870 [details]
It should look all the same: Pagebreak should have nothing to do with header and footer,

Hi Julien,

Changing the page break in Detail shouldn't change anything of the header and footer. 
So the bug is: On first page has to appear 
Page-Header
on the top and
Page-Footer
on the button.
And this won't happen if Detail is set to "page break after section".
Comment 25 Julien Nabet 2021-10-22 11:55:11 UTC
Created attachment 175876 [details]
Result of a test 2

With this patch:
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/output/text/TextRawReportTarget.java b/reportbuilder/java/org/libreoffice/report/pentaho/output/text/TextRawReportTarget.java
index d8e50d2d4991..398dd83d42a2 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/output/text/TextRawReportTarget.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/output/text/TextRawReportTarget.java
@@ -731,8 +731,7 @@ public class TextRawReportTarget extends OfficeDocumentReportTarget
         {
             expectedTableRowCount = trc;
         }
-
-        if (isSectionPagebreakBefore(attrs))
+        if (isSectionPagebreakBefore(attrs) || isSectionPagebreakAfter(attrs))
         {
             // force a pagebreak ..
             setPagebreakDefinition(new PageBreakDefinition(isResetPageNumber()));
Comment 26 Julien Nabet 2021-10-22 11:58:00 UTC
Thank you Robert for your feedback. I gave another try in my previous comment.
It would be very useful you may be able to build sources so I could propose you to test patches. Of course, I haven't forgotten that you'd begin to code soon! :-p