Bug Hunting Session
Bug 47473 - EDITING: Legacy reports created by Report Wizard fail to load data
Summary: EDITING: Legacy reports created by Report Wizard fail to load data
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
3.5.2 release
Hardware: All All
: medium normal
Assignee: Lionel Elie Mamane
URL:
Whiteboard: BSA target:3.7.0 target:3.6.3.6Beta1 ...
Keywords:
: 49279 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-03-18 08:34 UTC by Ian~G
Modified: 2012-06-06 14:54 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
test odb file showing legacy and new report failures and workarounds (82.35 KB, application/vnd.oasis.opendocument.database)
2012-06-02 03:58 UTC, Ian~G
Details
test odb file with report 'Students' with borked Grouping (112.49 KB, application/vnd.oasis.opendocument.database)
2012-06-06 02:09 UTC, Ian~G
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ian~G 2012-03-18 08:34:04 UTC
Problem description: As you know, legacy reports do not run in current versions of LO. Report builder is still very klunky, so I stripped it out and attempted to generate reports with the wizard with which I am fairly familiar.
The resultant reports do not display any data. Just like all my existing reports (legacy from ooffice 3.2.1). BUT the reason they don't run is different.
New reports generated by the wizard end up with an empty command field. If I copy the command from a legacy report into this field the report runs perfectly. Group fields, sorting, the whole nine yards.

Steps to reproduce:
1. ....Get rid of report-builder
2. ....Create a report with the wizard
3. ....View the report

Current behavior: No data in report

Expected behavior: Report with data

Platform (if different from the browser): Ubuntu 11.10
              
Browser: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:11.0) Gecko/20100101 Firefox/11.0
Comment 1 Ian~G 2012-04-18 08:22:38 UTC
I've got a workaround for this until it gets fixed.

I'm using libreoffice version 3.5.2 and ubuntu 12.04 now, but I reckon this'll work on earlier versions too.

use the wizard to create a report based on a query. run the report (don't try to edit it directly. there is a bug!). save and close it.

now go to the query on which you based the report. edit in sql view and highlight and copy the entire command line (or modify it to taste)

reopen the report in edit mode. go to the form navigator and select the command and choose properties. paste your command into the empty command field and save the report.

bingo. it all works.

better yet, it also runs in earlier versions of openoffice, like 3.2.1 or 3.3
Comment 2 Ian~G 2012-05-11 02:55:50 UTC
Still the same on version 3.5.3

Just to clarify this is not a problem with the ubuntu version per se, as I have also tested versions downloaded direct (non-repository).

Also, just in case it is pertinent, I use MySQL databases via the direct MySQL Connector, which works a treat.
Comment 3 Ian~G 2012-05-11 08:41:56 UTC
Just checked out the latest OpenOffice ver 3.4 from Apache and guess what?

SAME BUG!

It ran legacy reports from 3.2.1 and 3.3 OK, but would not create new ones that would run without manually inserting the command into the hidden command field.
Comment 4 Julien Nabet 2012-06-01 15:33:46 UTC
Could you attach an example which fails then the same file which works because you copy pasted the command field ?
Comment 5 Ian~G 2012-06-02 03:58:38 UTC
Created attachment 62417 [details]
test odb file showing legacy and new report failures and workarounds

I couldn't give you a copy of our actual database (sensitive data) but I found an old test file lurking in the depths of my hard drive and modded it to suit. This is just a simple hsql db (no MySQL involved) version which illustrates the problems clearly.

File was produced on OO 3.2.1 and opened in LO 3.5.4 then modified.

Four reports:
1Query_Students_Legacy_3.2.1  This doesn't run in LO 3.5 as there is no hidden control field 'Sorting' in the report.

2Query_Students_add_hidden_control_Sorting  This is a copy of the above report with the hidden control 'Sorting' added. It now runs, as do all my legacy reports once this control has been added.

3Query_Students-New_Report_3.5.4 This is a report based on the same original Query and created in LO 3.5.4  It does not run because the hidden control 'Command' is empty and thus there is no command to run the report.

4Query_students-New_report_3.5.4_add_command  This is a copy of the above item 3 with the sql command from the original query pasted in to the hidden 'Command' control. It now runs properly.

Also note in the new reports that the templates are still a bit messy. For example the second page defaults to letter size despite this being an en-GB version. The original legacy reports don't show this problem because I bodged the templates to get them to work the way I wanted on my old system.

Thanks for your help. One day very soon there will be a useable version of LO. It's nice to see it happening.
Comment 6 Lionel Elie Mamane 2012-06-05 09:26:58 UTC
Cannot reproduce with LibreOffice 3.5.2.2
Build ID: 281b639-6baa1d3-ef66a77-d866f25-f36d45f

TDF binaries running on Debian GNU/Linux amd64.

Double-click "use wizard to create report"
click ">>" to add all fields
next
next
next
sort by: choose one
next
dynamic report & create report now
also tried dynamic report & modify report now
Comment 7 Tyler 2012-06-05 09:43:58 UTC
Lionel Elie Mamane,

Thank you for looking into this problem. While this is my first comment, I need you to clarify. Did you try to make a report about a table or a query? I too have this problem, but only queries fail to load properly as Ian~G has described. Even in his post with the report examples, they were all reports based on queries according to his naming convention.

Thank you again for looking into this for us.

-Tyler
Comment 8 Lionel Elie Mamane 2012-06-05 09:51:25 UTC
OK, confirmed / reproduced using a query (and not a table) as source for the report.
Comment 9 Not Assigned 2012-06-05 12:43:01 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=32c943e161117e4362ac9246baac2c0fb54e7c79

fdo#47473 try to set new order only after field columns are available
Comment 10 Not Assigned 2012-06-05 12:48:57 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "libreoffice-3-6":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=183ac99a1ceebd08f750963dce6170656a201626&g=libreoffice-3-6

fdo#47473 try to set new order only after field columns are available


It will be available in LibreOffice 3.6.
Comment 11 Lionel Elie Mamane 2012-06-05 13:16:05 UTC
Blank command means (in LibO 3.5 and later) "no hardcoded SQL, use the SQL from the query". This comes from the fix of i#98163. But the latter fix was done buggily, and the whole "load data" operation aborted with an (undisplayed...) error / exception.

My patch fixes that "load data" operation aborted with an (undisplayed...) error / exception problem, and leaves the Command blank.
Comment 12 Lionel Elie Mamane 2012-06-06 01:48:24 UTC
*** Bug 49279 has been marked as a duplicate of this bug. ***
Comment 13 Ian~G 2012-06-06 02:09:47 UTC
Created attachment 62646 [details]
test odb file with report 'Students' with borked Grouping
Comment 14 Ian~G 2012-06-06 02:15:50 UTC
Great Stuff!

I'm wondering if this will fix bug 48018 (grouping problems) also?

creating a report based on a TABLE results in a report which runs but has borked Grouping. groups are split in a seemingly random fashion.

if the report is based on a QUERY, the grouping and sorting runs correctly.

I've attached another version of the first file with an additional report 'Students' that shows the failed Grouping.

Regards, Ian Grayland
Comment 15 Not Assigned 2012-06-06 03:51:42 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "libreoffice-3-5":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0b2bafa35699240d51270576370c7700eb277289&g=libreoffice-3-5

fdo#47473 try to set new order only after field columns are available


It will be available in LibreOffice 3.5.5.