Bug 48681 - : Grid display of a query in a subform does not show all fields correctly
Summary: : Grid display of a query in a subform does not show all fields correctly
Status: RESOLVED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
3.5.2 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-14 03:20 UTC by Peter Toye
Modified: 2012-07-13 14:18 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
Screenshots from LibreOffice and OpenOffice. (191.42 KB, application/x-zip-compressed)
2012-04-14 03:20 UTC, Peter Toye
Details
Database which shows the bug. (346.64 KB, application/vnd.sun.xml.base)
2012-07-09 17:30 UTC, Peter Toye
Details
Corrected database - problems with macros inside (36.64 KB, application/vnd.sun.xml.base)
2012-07-11 17:44 UTC, Robert Großkopf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Toye 2012-04-14 03:20:05 UTC
Created attachment 59962 [details]
Screenshots from LibreOffice and OpenOffice.

Problem description: 

Steps to reproduce:
1. Open the form (see screenshot)


Current behavior:
Some fields are displayed as "0". This does not happen in OpenOffice.

Expected behavior:
The correct contents of the fields "Name", "Supplier" and "Comments". Note that "Name" and "Comments" are text fields (VARCHAR). "Supplier" is a field from a linked table. Other fields from linked tables display correctly. 

Running the query directly gives the correct results.

Copying the database to a Linux system gives the correct display (except for the fonts).

The OS is Windows 7 Home Premium 64-bit.

I've tried the mailing list without success.

Platform (if different from the browser): 
              
Browser: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.1) Gecko/20100101 Firefox/10.0.1
Comment 1 Robert Großkopf 2012-07-09 14:57:18 UTC
Could be a problem with Java and LO 3.5. In your form are listfields. The listfields aren't shown - only the values that were in the table. When you click at the column-header it could be, that there appear the listfields with the text, as in the example of OpenOffice (which version?).
An attachment with an example-database would be helpful.
Comment 2 Peter Toye 2012-07-09 17:30:49 UTC
Created attachment 64039 [details]
Database which shows the bug.

Obey the q
Comment 3 Peter Toye 2012-07-09 17:32:22 UTC
Go to the form "Bottles left with subform" which shows the problem on my machine at least..
Comment 4 Peter Toye 2012-07-11 16:56:29 UTC
(In reply to comment #1)
> Could be a problem with Java and LO 3.5. In your form are listfields. The
> listfields aren't shown - only the values that were in the table. When you
> click at the column-header it could be, that there appear the listfields with
> the text, as in the example of OpenOffice (which version?).
> An attachment with an example-database would be helpful.

I'm not quite sure what you mean by "listfield". Of the fields which don't appear correctly, two are simple text fields (Name, Comment), the third (Supplier) comes from a linked table.

Clicking on the column header does nothing at all.
Comment 5 Robert Großkopf 2012-07-11 17:44:38 UTC
Created attachment 64121 [details]
Corrected database - problems with macros inside

Opening the original database the macro-warning appears. Disabling macros an openening the form in OOo 3.3, LO 3.3.4 and LO 3.5.5 - all the same: 0 is show, not any text. First I thought that were listfields, were you can change the text and the number is written in the table. But that are fields for text.
Haven't seen such a behaviour before. So I tried to delete all macros inside. I could delete the macor for executing xray - nothing else. When I deleted the Module1 it appears again by next opening of the file. Don't know, what it is.
After deleting the macro it works with all office-versions.
There is something corrupt in the file, because the macro-warning appears and Module1 exists again after it was deleted.
Remark: You could get a smaller file, when you run "SHUTDOWN COMPACT" in Tools → SQL, after you have deleted much rows of a table.
Comment 6 Robert Großkopf 2012-07-11 17:47:30 UTC
Macro in the database seems to be corrupt. Without macro it works. So I set the Status to "Resolved" and "Notourbug".
Comment 7 Peter Toye 2012-07-11 18:00:44 UTC
(In reply to comment #5)
> Created attachment 64121 [details]
> Corrected database - problems with macros inside
> 
> Opening the original database the macro-warning appears. Disabling macros an
> openening the form in OOo 3.3, LO 3.3.4 and LO 3.5.5 - all the same: 0 is show,
> not any text. First I thought that were listfields, were you can change the
> text and the number is written in the table. But that are fields for text.
> Haven't seen such a behaviour before. So I tried to delete all macros inside. I
> could delete the macor for executing xray - nothing else. When I deleted the
> Module1 it appears again by next opening of the file. Don't know, what it is.
> After deleting the macro it works with all office-versions.
> There is something corrupt in the file, because the macro-warning appears and
> Module1 exists again after it was deleted.
> Remark: You could get a smaller file, when you run "SHUTDOWN COMPACT" in Tools
> → SQL, after you have deleted much rows of a table.

There's only the Xray macro (linked to the button) in there. If you delete it the macro seems to disappear, but the module remains. Is this a bug?

I didn't know about SHUTDOWN COMPACT - thanks. Would have saved some upload time!
Comment 8 Peter Toye 2012-07-11 18:02:13 UTC
(In reply to comment #6)
> Macro in the database seems to be corrupt. Without macro it works. So I set the
> Status to "Resolved" and "Notourbug".

When you say it works without the macro, you've already said that you couldn't delete the macro. I don't quite understand! I've deleted the macro and still have the bug. I've shut down LO, but not rebooted, so maybe I should try that just in case.
Comment 9 Robert Großkopf 2012-07-11 18:21:43 UTC
I have deleted the procedure inside "Module1". Have a look at the attachment. It works. 
Problem with this document: I can not delete "Module1". When I have deleted this, it appears again when reopening the database.
Comment 10 Robert Großkopf 2012-07-11 18:43:28 UTC
I have had a look what it could be. In the Menue View → Toolbars there is a Toolbar "Macros". This Toolbar appears only in your database - not in my own. When I delete this toolbar and the button "xray" the "Module1" has gone - but not the macro-warning. Don't know, where there is any hint about a macro inside your document.
There must be nothing rebooted. Only the hint to "xray" in "Module1" must be deleted. Then you have to close the database and reopen it.
Comment 11 Robert Großkopf 2012-07-11 18:57:12 UTC
Now I have opened the database with a packing-program and deleted the folder inside the database called "Basic". Then the macro-warning has gone.
Won't attach this file here. You could take the same way with your original database. If you have any problems to delete the macro-warning you could send the database to me and I will fix it.
Comment 12 Peter Toye 2012-07-12 18:34:41 UTC
(In reply to comment #11)
> Now I have opened the database with a packing-program and deleted the folder
> inside the database called "Basic". Then the macro-warning has gone.
> Won't attach this file here. You could take the same way with your original
> database. If you have any problems to delete the macro-warning you could send
> the database to me and I will fix it.

Well, this is very interesting. I've deleted the macros from my original database and they still give the wrong display of the form. But you have done the same and your version displays correctly on my machine. In fact I went further than you and deleted the button marked "XRay" as well, as it still had an attached event calling a non-existent macro.

There seem to be three different issues here.

1) A macro in my database seems to be corrupting the display. But when I delete it the display is still corrupt. When you delete it the display is no longer corrupt. Can I upload my latest version to see if it displays correctly on your machine?

2) My database loads with the macro warning, which disappears (I believe what you tell me) if you manually remove the Basic folder from the file. Could this possibly be LO does not remove this folder even if there are no macros in the file? This sounds like a bug to me.

3) Issue (1) does not happen with Open Office. Does this imply that OO has a bug which prevents some sort of macro corruption giving wrong displays? It sounds unlikely!
Comment 13 Robert Großkopf 2012-07-12 19:24:11 UTC
The bug from
https://bugs.freedesktop.org/attachment.cgi?id=64039
appears in all Version of LO and in OOo 3.3 on my system. You say, that it isn't seen in OOo. On which System do you have installed xray?

You cold better send me that database at private mailadress. When it displays correct on my system and not on yours we will see, if we could find the reason. For a bug this must be reproducable for other persons - but such a behaviour I have seen in the forms I haven't seen before.
Comment 14 Peter Toye 2012-07-12 21:06:41 UTC
(In reply to comment #10)
> I have had a look what it could be. In the Menue View → Toolbars there is a
> Toolbar "Macros". This Toolbar appears only in your database - not in my own.
> When I delete this toolbar and the button "xray" the "Module1" has gone - but
> not the macro-warning. Don't know, where there is any hint about a macro inside
> your document.
> There must be nothing rebooted. Only the hint to "xray" in "Module1" must be
> deleted. Then you have to close the database and reopen it.

I've done another test with a new database about the macro warning issue.

Create a new database. Go to tools|macros|organise|LO Basic. Select the database and click "New". Close the Basic window, save everything and close the database. 

Re-open it, click "enable macros". Go to Tools|macros|organise|lo Basic, select the database's Module1, click "organise" and delete it. Save everything. At this point there are no macros in the database. Close it.

Re-open the database. You get the macro warning, but you shouldn't.

This looks to me like an LO bug. Shall I report it separately?
Comment 15 Robert Großkopf 2012-07-13 08:51:57 UTC
The macro-warning apperas, when there are no macros inside, because the warning apperas, when there is a folder in the database called "Basic". This folder could not be deleted by the GUI, only with a packing programm. The warning is correct, the folder hasn't to be there after deleting all macros and modules.
Comment 16 Peter Toye 2012-07-13 10:35:37 UTC
(In reply to comment #15)
> The macro-warning apperas, when there are no macros inside, because the warning
> apperas, when there is a folder in the database called "Basic". This folder
> could not be deleted by the GUI, only with a packing programm. The warning is
> correct, the folder hasn't to be there after deleting all macros and modules.

I think there is a slight problem here - I don't quite understand your comment. Do you mean that the folder shouldn't be there after deleting the modules? In which case it's an LO bug and I'll report it separately.

I don't think that we should have to use a separate packing program to remove unwanted error messages!
Comment 17 Robert Großkopf 2012-07-13 14:18:39 UTC
> I think there is a slight problem here - I don't quite understand your comment.
> Do you mean that the folder shouldn't be there after deleting the modules? In
> which case it's an LO bug and I'll report it separately.

That is the right way. When I have deleted all macros and the module, there exists a library. There are two possibilities:
1) Delete the library when deleting the last module in Tools → Macors → Organize Macros → LibreOffice Basic → Organizer
That would delete the folder.
2) Change the warning. Let it have a look at the library if there is any module inside.
I prefer 1) - what must there be a folder we don't need?

> I don't think that we should have to use a separate packing program to remove
> unwanted error messages!

Yes. It's a problem not only with macro-folders. See this bug:
https://bugs.freedesktop.org/show_bug.cgi?id=50816
If you import pictures for a form design, and the delete the pictures, the pictures are not removed in the *.odb-file. And everybody wonders, why the file is so big ...