Bug 146643 - reload method applied to a subform with subforms fails to reload all when called from a macro
Summary: reload method applied to a subform with subforms fails to reload all when cal...
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
7.2.4.1 release
Hardware: Other macOS (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-07 16:36 UTC by Walter Werner
Modified: 2022-01-08 20:01 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
sample Libreoffice odb that allows to see the missing functionality (186.98 KB, application/vnd.oasis.opendocument.database)
2022-01-07 16:36 UTC, Walter Werner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Walter Werner 2022-01-07 16:36:25 UTC
Created attachment 177380 [details]
sample Libreoffice odb that allows to see the missing functionality

A (sub)form with a table and additional sub forms with text fields reloads nice when reloaded through a button attached to the form. 
However, when calling the reload method of this form through the .reload() method of the macro the text fields are not reloaded.
See testdb.odb attached, activate the macro embedded, and load the "Einzahlungen" form. Select n2, v2 (or another entry) in the dropdown list below "Übersicht". Note the table changing content (done by by calling the reload() method of the "Anzeigetafel" form (a subform to "Main Form"), and note the content of the sum fields right to the "Laden" button change the content only when tis button is pressed (button calls reload form of the Anzeigetafel form)

Expected behaviour: reload() by macro and by button act identically.
Comment 1 Stang 2022-01-08 00:41:59 UTC
The problem is in your macro. You commit the data but do not update the record. After this line:

oAusgabeAuswahl.Commit

add this line:

oAusgabeAuswahl.Parent.updateRow()
Comment 2 Robert Großkopf 2022-01-08 16:12:07 UTC
Look at table "selector". Value for "SearchString" will be set to '0' the whole time.

oAusgabeAuswahl.Commit
will say to the form: "I have a new value."
oAusgabe.updateRow
will write the form to the existing row. Won't work on new rows, but will woirk for your example.

oAusgabeAuswahl.Parent.updateRow() 
is just the same, only seen from the position of the listbox up to the form, which contains the listbox.

If this will solve your problem please set this bug to RESOLVED and NOTABUG.