Page 1 of 1
Group report by months
Posted: Mon Oct 16, 2023 4:51 pm
by qwertyjjj
I am trying to run a report called AllStatementsNew from this data.
It used to separate the data by month but has stopped working due to a computer crash and some of the macros being lost in the excel file so I think it is a date formatting problem but no matter what I change in the source excel file, I cannot get the BASE report to separate the data by month again.
It prints August in the top group but then puts all August and July invoices into the same group.
Any ideas what I should change?

- dates.PNG (12.58 KiB) Viewed 12610 times
Re: Group report by months
Posted: Mon Oct 16, 2023 6:16 pm
by Nick N,
Pls see attachments.
Regards
Re: Group report by months
Posted: Tue Oct 17, 2023 7:34 pm
by qwertyjjj
It is already in date order in my odb showing July first.
The grouping should work without that anyway no since it groups by Month name.
The report is supposed to show a header with July and all the invoices, then a header with August and all the August invoices and then any other months if they were there.
But what it does is show a header with August and then all invoices with no grouping or separation.
Edit: I just tried ordering Sheet1 in the tables both directions and the report shows the same result no matter which way it is ordered.
Re: Group report by months
Posted: Tue Oct 17, 2023 7:51 pm
by Nick N,
Very sorry but couldn't find your topic in the list. Ah, ok, here it is...
Couldn't anyway fully open your odb. That's why i builded a small odb draft.
Check your month format as criterion or in the sql statement.
Regards
Nick

Re: Group report by months
Posted: Tue Oct 17, 2023 8:30 pm
by qwertyjjj
Is text currently. Shouldnèt it group on the text?
Re: Group report by months
Posted: Tue Oct 17, 2023 8:41 pm
by Villeroy
A pivot table does this for spreadsheet data:
https://ask.libreoffice.org/uploads/sho ... 4i3NPb.ods
First, create the pivot table with the dates as row field.
Then click any date in the pivot table and call menu:Data>Group>Group (F12) and group by month and year.
Re: Group report by months
Posted: Tue Oct 17, 2023 8:46 pm
by Nick N,
Thanks for having helped.

Re: Group report by months
Posted: Wed Oct 18, 2023 12:12 am
by chrisb
@qwertyjjj,
i created a fresh attachment because i needed to know that my report would handle multiple customers and multiple years.
your report considers the months but ignores the YEARS which results in garbage whenever the data spans more than a single year.
you have images in the page header.
for me using images at the top of every page is a none starter (unless absolutely essential) because it interrupts the data flow.
instead you could use a report header which would display images once at the head of the report.
take a look at the attachment first and see how you feel about it.
if you drag and drop the report into your db it should work.
Re: Group report by months
Posted: Wed Oct 18, 2023 4:35 am
by qwertyjjj
Unfortunately, it needs to be in the formatted report I attached not a pivot table

Re: Group report by months
Posted: Wed Oct 18, 2023 4:37 am
by qwertyjjj
chrisb wrote: ↑Wed Oct 18, 2023 12:12 am
@qwertyjjj,
i created a fresh attachment because i needed to know that my report would handle multiple customers and multiple years.
your report considers the months but ignores the YEARS which results in garbage whenever the data spans more than a single year.
you have images in the page header.
for me using images at the top of every page is a none starter (unless absolutely essential) because it interrupts the data flow.
instead you could use a report header which would display images once at the head of the report.
take a look at the attachment first and see how you feel about it.
if you drag and drop the report into your db it should work.
ReportGroupingDemo.odb
ReportGroupingDemo.ods
yes but the data doesn't span more than a year currently.
I guess my question is why ios the grouping I have set in the report not split the data. That's the whole point of grouping
Re: Group report by months
Posted: Wed Oct 18, 2023 1:04 pm
by chrisb
i first wish to advise users that qwertyjjj uses libreoffice and libreoffice reports do not work with openoffice.
secondly, all of the reports in all of the above attachments are not fit for purpose because sorting accurately by month requires the month number and not the month name.
@qwertyjjj,
using your database(odb) and spreadsheet(xls) i am unable to accurately sort your report in alphabetical order using the text field "RealDate" which contains one of two values 'July' and 'August'.
using my database(odb) and your spreadsheet(xls) i can accurately sort your report using the text field "RealDate".
it's likely that your report is corrupted.
i never use the report wizard, all of my reports are built from scratch in design mode.
i upload 'Requires_Unpaid.xls.odb'
drop it into the same folder as your spreadsheet 'Unpaid.xls' then open it.
i also upload 'GroupingDemo_odb.odb' and 'GroupingDemo_odb.ods'
drop them both into the same folder and then open open the odb.
both reports are sourced by queries because we need to extract the month number from the date field.
i used libreoffice so these reports will NOT work with open office.
if you want to prove to yourself that ORDER BY TEXT_FIELD is not buggy then simply create another ODB preferably using design mode.