Bug 51452 - EDITING: ReportBuilder - group with repeating area set automatically pagebreak before and after area
Summary: EDITING: ReportBuilder - group with repeating area set automatically pagebrea...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Database-Reports-Builder Database-Reports-Builder-MAB
  Show dependency treegraph
 
Reported: 2012-06-26 08:46 UTC by Robert Großkopf
Modified: 2023-04-18 15:57 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Try the reports area_repeat_... - with one and two areas (128.77 KB, application/vnd.sun.xml.base)
2012-06-26 08:46 UTC, Robert Großkopf
Details
Description: pagebreak is set while "Force New Page" is "None" (118.06 KB, application/pdf)
2012-07-31 14:55 UTC, Robert Großkopf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Großkopf 2012-06-26 08:46:25 UTC
Created attachment 63491 [details]
Try the reports area_repeat_... - with one and two areas

When you will write a bill with adressfield at the first page and headers for the columns at the first page and all other pages you will put the adress into one grouping area and the headers for the columns in another grouping area. The grouping area for the columns should be repeated.
This works only with a pagebreak before and after the grouping area of the columns. The fist page shows only the adressfield.
Comment 1 tbb 2012-07-17 10:57:26 UTC
I can confirm this bug. If the detal section of a group section, with this option set to true, needs less than one page, each group value is separated wit a pagebreak
Comment 2 Robert Großkopf 2012-07-31 14:55:35 UTC
Created attachment 64995 [details]
Description: pagebreak is set while "Force New Page" is "None"

I have added a description where you could find the pagebreak and the repeating of a group in the properties in report-builder. Also a picture, which shows, how the printout of this properties looks like - with pagebreaks before every group-header.
Comment 3 Rainer Bielefeld Retired 2012-08-06 07:54:12 UTC
Can someone find out with what Version that problem started?
Is this function correctly and completely described in Help or is additional fixing required there?
Comment 4 Robert Großkopf 2012-08-06 10:33:26 UTC
Version: How could I choose a version, when this has been a bug in LO 3.3 and also in 3.5? The problem is, that nobody recognized it before.
In the description of LO-help is nothing to read about repeated areas.
Comment 5 Rainer Bielefeld Retired 2012-08-07 04:25:29 UTC
(In reply to comment #4)
> Version: How could I choose a version,

We explained it few days ago on <discuss@de.libreoffice.org>:
<http://wiki.documentfoundation.org/BugReport_Details#Version>
Comment 6 Robert Großkopf 2012-08-07 10:18:07 UTC
Have changed the version to the earliest LO-version. It already exists in LO 3.3.4 ...
Comment 7 Robert Großkopf 2013-08-07 14:37:03 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 8 Alex Thurgood 2015-01-03 17:40:43 UTC Comment hidden (no-value)
Comment 9 QA Administrators 2016-01-17 20:03:48 UTC Comment hidden (obsolete)
Comment 10 Robert Großkopf 2016-01-28 19:34:50 UTC
Bug still exists with LO 5.1.0.2, OpenSUSE 42.1 Leap, 64bit rpm Linux.
Comment 11 Robert Großkopf 2016-03-06 08:25:22 UTC
Bug appears in the first available LO-version (LO 3.3.0.4, OpenSUSE 42.1 64bit rpm Linux). So I set this bug as "Inherited From OOo".
Comment 12 QA Administrators 2017-03-06 15:28:24 UTC Comment hidden (obsolete)
Comment 13 Robert Großkopf 2017-03-08 17:40:11 UTC
Bug still exists with LO 5.3.1.1, OpenSUSE 42.1 Leap, 64bit rpm Linux.
Comment 14 Jan 2017-08-25 06:24:12 UTC
I confirm the bug. Still exists in LO 5.4.4.1 on Ubuntu 16.04 64bit and Windows 7 64bit. Any chance to get that fixed?
Comment 15 QA Administrators 2018-08-26 02:39:14 UTC Comment hidden (obsolete)
Comment 16 Robert Großkopf 2018-08-26 06:27:00 UTC
Bug still exists with LO 6.1.0.3, OpenSUSE 15, 64bit rpm Linux.
Comment 17 Gerrit Großkopf 2018-11-22 11:23:44 UTC
Suspecting the setPageBreakDefinition in startGroupinstance and endGroup in reportbuilder/java/org/libreoffice/report/pentaho/output/text/TextRawReportTarget.java, somehow i can't figure out how to debug this though :D kdevelop just skips my breakpoints and uncommenting those lines, setting them to false or null gets rid of the area altogether, will give it another shot later
Comment 18 Gerrit Großkopf 2018-12-04 09:05:28 UTC
it seems like the reportbuilder goes to the page too early, while the second groupheader is added to the next best header (the one on the next page), the first groupheader is added to the page body, now i just need to figure out where those flags are set :)
Comment 19 Robert Großkopf 2018-12-04 19:09:10 UTC
Note: The bug only appears if I set repeat section. 
Seems the report builder want to solve the repeat by setting the content in next page header. So it has to create a new template for the page. If I execute a report and want to edit it I could see for the group header and the detail-content new templates for the page. The footer for the group is set to a new page with the same style as the first page. 
This design could only be solved by setting the group header as a header of the table, which saves the content of "Detail". This header should be repeated.
Comment 20 Robert Großkopf 2018-12-08 16:54:38 UTC
(In reply to Robert Großkopf from comment #19)

> This design could only be solved by setting the group header as a header of
> the table, which saves the content of "Detail". This header should be
> repeated.

Better: Put the group header in a frame. You could position the content at every place you want and let the "Detail" section untouched.

When setting the group header as part of the page header you couldn't change anything by choosing page break for the header "before", "after", "before and after" or "none". No difference in the behaviour of a created report. Every time a page break before an a page break after the section "Detail" will be executed.

All this couldn't be solved with changing the code only at one position.
Comment 21 Robert Großkopf 2018-12-18 16:56:44 UTC
I have searched through the java-files from the ReportBuilder to understand it a little bit more and have found this in /pentahoo/output/text/TextRawReportTarget.java:

--------------
if (role == OfficeDocumentReportTarget.ROLE_GROUP_HEADER || role == OfficeDocumentReportTarget.ROLE_GROUP_FOOTER)
            {
                // if we have a repeating header, then skip the first one ..
                // if this is a repeating footer, skip the last one. This means,
                // we have to buffer all group footers and wait for the next section..
                startBuffering(getContentStylesCollection(), true);
            }
-----------------
(line 1069 ff)
Seems to be wrong for me: The repeating header shouldn't be skipped. Seems it is planned to put a pagebreak before beginning to write down the header. You couldn't set this to "No".
Then this:
----------------
protected void startGroupInstance(final AttributeMap attrs)
    {
        if (getGroupContext().isGroupWithRepeatingSection())
        {
            setPagebreakDefinition(new PageBreakDefinition(isResetPageNumber()));
        }
    }
-------------
Seems the page break is automatically set if there is a Group with repeating header - no way out.

Could it be this feature (repeating a group header without a pagebreak before and without a pagebreak before the footer) has never been implemented and only been planned in the GUI, not in the code? Wouldn't be the first feature, which has never been realized in code, but has a button in the GUI for ... nothing.
Comment 22 Xisco Faulí 2019-03-20 17:38:57 UTC
Dear Gerrit Großkopf,
This bug has been in ASSIGNED status for more than 3 months without any
activity. Resetting it to NEW.
Please assigned it back to yourself if you're still working on this.
Comment 23 Gerrit Großkopf 2020-12-15 16:22:57 UTC
gerrit pushed bugfix to gerrit ( https://gerrit.libreoffice.org/c/core/+/107780/1 ) hopefully this is fine that the Bugfix is avaliable to Apache Openoffice as well, making it dual-licensed with Apache License and Mozilla Public License.
Greetings,
Gerrit
Comment 24 Xisco Faulí 2021-03-31 13:51:23 UTC
Dear Gerrit Großkopf,
This bug has been in ASSIGNED status for more than 3 months without any
activity. Resetting it to NEW.
Please assign it back to yourself if you're still working on this.
Comment 25 TISSENDIER Pierre 2022-10-17 12:24:03 UTC
Please assign this bug as NEW

Version: 7.4.2.3 / LibreOffice Community
Build ID: 382eef1f22670f7f4118c8c2dd222ec7ad009daf
CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Calc: threaded
Comment 26 Robert Großkopf 2022-10-17 12:56:01 UTC
(In reply to TISSENDIER Pierre from comment #25)
> Please assign this bug as NEW
> 
> Version: 7.4.2.3 / LibreOffice Community
> Build ID: 382eef1f22670f7f4118c8c2dd222ec7ad009daf
> CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: gtk3
> Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
> Calc: threaded

This bug is st to NEW since many years. Please don't switch the version. It has to be the first version the bug appears. So if you switch to LO 7.4.2.3 other people say: Oh, it is working in LO 7.4.1.2 - so let us see what has to be changed.

This never worked, so it has been set to "Inherited From OOo"