Apache OpenOffice (AOO) Bugzilla – Issue 78128
RPT: cannot group by constant value
Last modified: 2012-03-01 22:31:57 UTC
This is a follow-up of issue 78098. Therein, it was requested that the report header should be generated before the page header on the first page, since this is what other applications do, and this is what allows to do tabular reports including a report header. The agreement within the iTeam was that tabular reports should not be done by placing the table header controls in the page header, but in the header of a artificial group, which groups by a constant value. Trying to do this reveals that it is currently not supported by the engine - which boils down to: You cannot do reports which look like this: page 1: +-------------------------------+ | Report Header | +-----------+---------+---------+ | Field 1 | Field 2 | Field 3 | +-----------+---------+---------+ | data | data | data | | data | data | data | | data | data | data | | data | data | data | | data | data | data | | data | data | data | | data | data | data | | data | data | data | +-----------+---------+---------+ page 2: +-----------+---------+---------+ | Field 1 | Field 2 | Field 3 | +-----------+---------+---------+ | data | data | data | | data | data | data | | data | data | data | | data | data | data | | data | data | data | | data | data | data | | data | data | data | | data | data | data | +-----------+---------+---------+ The rows "| Field 1 | Field 2 | Field 3 |" could either be page headers - which doesn't work because of issue 78098 - or headers of a constant group - which doesn't work because of this issue here. To reproduce: - open the attached database document - open the report "countries, tabular" for editing - note that the report contains one group, which is set up to group by a constant value "1" - execute the report (enter "Europe" when asked for a parameter) => you'll get an error message saying that the report could not be executed. The "More" button in this message box gives you an error saying java stack trace: com.sun.star.lang.IllegalArgumentException at com.sun.star.report.pentaho.SOReportJobFactory$_SOReportJobFactory.execute(SOReportJobFactory.java:197)
Created attachment 45683 [details] document to reproduce the bug case
More findings: Trying to order by a constant string (instead of a constant value), i.e. by '1' instead of 1, gives an error message from the database engine, if you use HSQLDB. Seems HSQL doesn't support ordering by constant string values as well ..
The Report Designer iTeam decided that this issue is a "should fix" for the first release of the report designer. Targeting to 2.x, thus.
This is a new implementation in CWS oj14. Adding keyword "new_implementation".
oops - resetting target
When changing the example in that way that the group has "Repeat Section" enabled. The group header will not be repeated on a second page.
The missing/invalid repeating headers have been fixed. Now the system reliably generates pagebreaks before and after a repeating header gets active or inactive. Those manual pagebreaks are the only way to activate a new master-page, therefore a repeated header or footer always implies a pagebreak before the header and after the footer. There is nothing we can do about it - except someone volunteers for changing both the fileformat specification and the writer implementation. :)
In this case, we should have an issue for the misbehaviour (it *is* a misbehaviour since it's not expectation conformant). See issue 80155.
Please verify. Thanks. You have to change the property "Repeat Section" for the group header and you have to change the height of the section to get page breaks.
targeting to 2.3, since the fix is part of a CWS aiming for this release
verified in CWS rpt23fix02 find more information about this CWS, like when it is available in the master builds, in EIS, the Environment Information System: http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=SRC680%2Frpt23fix02
Tested w/ 2.3m_1 SRB 1.0 OK - the group header repeats, with the page break after the report header. closing