Bug 55385 - EDITING: Report-Builder doesn't allow to group a report by the month of a date - wrong SQL-Code
Summary: EDITING: Report-Builder doesn't allow to group a report by the month of a dat...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
3.4.0 Beta1
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-27 11:17 UTC by tomkowski
Modified: 2013-09-13 10:25 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Shows a report, which should be grouped by Month with Report-Builder (23.20 KB, application/vnd.sun.xml.base)
2013-02-09 20:21 UTC, Robert Großkopf
Details
Description where to choose the grouping by month for a date in Report-Builder (127.22 KB, application/vnd.oasis.opendocument.graphics)
2013-02-09 20:22 UTC, Robert Großkopf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tomkowski 2012-09-27 11:17:37 UTC
I use LO 3.6.1 with Report Builder 1.2.3. When I run the report, I receive error "Column not found: MONTH_ ...". In this report I group data by month with LO option "Sorting and grouping...". 

In LO 3.5.6 the report run without any problems, but the problem appeared in LO 3.6.x. and next.

Other information:
State SQL: S1000
Error: Column not found: MONTH_Data sprzedaży in statement...
Exception type: com.sun.star.lang.WrappedTargetException
Comment 1 Robert Großkopf 2012-10-03 16:01:35 UTC
Could you add an attachment to this report?

When you open the report for editing and set the report to "Analyze SQL Command: No" - does the problem exist?

What is the original name of the column in the table/query? What is the shown name, when you open the table/query?
Comment 2 tomkowski 2012-10-03 21:36:20 UTC
> When you open the report for editing and set the report to "Analyze SQL
> Command: No" - does the problem exist?

No, when I set to "No", I can run the report. 
 
> What is the original name of the column in the table/query? What is the
> shown name, when you open the table/query?

The original name of query is "sprzedaz_programow". It based on four columns: sprzedaz, program, edycja and kontrahent.

Full error message:
Column not found: MONTH_Data sprzedaży in statement [SELECT "sprzedaz"."data" AS "Data sprzedaży", "program"."nazwa" AS "Nazwa programu", "edycja"."edycja" AS "Edycja", "edycja"."wersja" AS "Wersja", "sprzedaz"."ilosc" AS "Ilość", "sprzedaz"."cena" AS "Cena", "ilosc" * "cena" AS "Razem", "kontrahent"."nazwa" AS "Klient" FROM "sprzedaz" AS "sprzedaz", "kontrahent" AS "kontrahent", "edycja" AS "edycja", "program" AS "program" WHERE "sprzedaz"."id_kontrahent" = "kontrahent"."id_kontrahent" AND "sprzedaz"."id_edycja" = "edycja"."id_edycja" AND "edycja"."id_program" = "program"."id_program" ORDER BY "MONTH_Data sprzedaży", "Klient"]

I will prepare an attachment. Thank you for your attention and comment.
Comment 3 Terrence Enger 2012-12-16 03:43:06 UTC
I am setting status NEEDINFO because I think it unlikely that
there will be any progress toward a fix without the promised
attachment with the failing report.  If the database in question
is not embedded in the attachment, we also need the definition of
the queried tables.  Basically, we need to reduce to a minimum
the number of choices to make on the way to reproducing the
failure message.

Terry.
Comment 4 Robert Großkopf 2013-02-08 20:11:02 UTC
(In reply to comment #2)
> 
> I will prepare an attachment. Thank you for your attention and comment.

4 months ago - where is the attachment. We couldn't help, when there is no reaction.

Robert
Comment 5 Robert Großkopf 2013-02-09 20:21:37 UTC
Created attachment 74506 [details]
Shows a report, which should be grouped by Month with Report-Builder

The internal function of grouping a report by the month of a date doesn't work with the Report-Builder. You could only group a report by month, when you first create a query, which should select the months of a date.
The same problem with "year".
Comment 6 Robert Großkopf 2013-02-09 20:22:40 UTC
Created attachment 74507 [details]
Description where to choose the grouping by month for a date in Report-Builder
Comment 7 Robert Großkopf 2013-02-10 10:43:55 UTC
I have made a few tests. The report of https://bugs.freedesktop.org/attachment.cgi?id=74506 works with LO 3.3.4; first version it didn't work is 3.4.0. Seems this bug was introduced with LO 3.4. So I set the version to the first version of LO 3.4 - 3.4.0 Beta1.
Comment 8 Robert Großkopf 2013-08-16 19:50:21 UTC
I have just tested it again with newer versions. Same error-message in all versions up to LO 4.0.* (last tested version LO 4.0.5.2). Works since 4.1.* (first tested version 4.1.0.0 beta2). So you could group now the reports with the new version, but not with the version, where bug-fixes would still be made for (LO 4.0 )
Should we close this bug or hold it open for a fix in LO 4.0?
Comment 9 Lionel Elie Mamane 2013-09-13 10:25:23 UTC
Cannot reproduce with 4.2.0.alpha; assuming fixed.