In a reportbuilder report, when grouping on the same field multiple times (with different interval/prefix characters setting), the two groupings interact and in the end it does not work right; both grouping levels behave like one of them.
That's because the report function created by Report Builder for each of the groupings share the same name (!). Have to make that name unique in some way (and possibly switch to a better way of storing that information, the current system is horrible).
Note to people trying to reproduce that: Groupings on interval/prefix characters did not work at all until commit on branch master (126.96.36.199.alpha0+):
Author: Lionel Elie Mamane <firstname.lastname@example.org>
AuthorDate: Tue Mar 12 17:57:57 2013 +0100
Commit: Lionel Elie Mamane <email@example.com>
CommitDate: Tue Mar 12 18:16:45 2013 +0100
reportbuilder: make "Group on" not-"Each Value" actually work
So don't bother trying with anything older than that.
That's where the name is chosen. Need to make it unique somehow.
Please choose a naming scheme that is predictable and stable. I mean:
- the user that happens to know LibreOffice's implementation details knows
what the function name is just from the grouping information
- stable: does not change as long as the grouping information does not change
Take care that in file reportdesign/source/filter/xml/xmlGroup.cxx
parses back what ORptExport::exportGroupsExpressionAsFunction
creates. You need to keep that in sync *but* take care of
backwards compatibility! That code needs to be able to parse
old files, that is what *old* versions of ORptExport::exportGroupsExpressionAsFunction
were creating, as well as new files.
Rather than piling up fragility in this parsing, you might want to actually take the occasion to clean up this mess by actually storing the values chosen by the user in the UI directly (in new attributes of the <group> node). See the introduction of sort-expression in commit 4178806bb010129f3b13b62825476666fe48ddcd to see what I mean. For backwards compatibility, if the new clean way is not present, fall back to parsing the group-expression attribute.
This situation, i.e. where I attempt to define, e.g. an accumulation function on the same field in both the Group Footer and Detail sections of the report, appears to cause a mutex lock / race condition on Mac OSX, requiring a force kill of the office for all versions I have tested so far :
3.5.7 - beachball requiring force kill
188.8.131.52 - direct SIGABRT
184.108.40.206 - beachball requiring force kill
Version 220.127.116.11.alpha0+ (Build ID: 44019e1c9a6b2072c70de121d15ad477e38cacb)
Created attachment 84162 [details]
Shows, how multiple groupings should work (by interval) and what happens with the same group
adding LibreOffice developer list as CC to unresolved EasyHacks for better visibility.
see e.g. http://nabble.documentfoundation.org/minutes-of-ESC-call-td4076214.html for details
Adding self to CC if not already on
Migrating Whiteboard tags to Keywords: (EasyHack DifficultyInteresting SkillCpp)
JanI is default CC for Easy Hacks (Add Jan; remove LibreOffice Dev List from CC)