Open Report macro works perfectly in Ubuntu but not in Windows 10

Dear Sir/Madam,

I’m using Libreoffice base 7.3.0.3 with Firebird 3.0.

I wonder why the following open report macro (executed with a command button in a Form) works perfectly fine in Ubuntu 20.04 but not in Windows 10 (= libreoffice base hangs):

thisdatabasedocument.reportdocuments.getbyname(“PrintInvoice”).open

Moreover, if the macro is executed from macro-editor, it works perfectly fine (even in Windows 10). But if the macro is executed from a button in a form, Libreoffice base crashes.

Thank you in advance.

Hello,
Tested in Ubuntu with LO v7.3.x and used same file with:

Version: 7.2.5.2 (x64) / LibreOffice Community
Build ID: 499f9727c189e6ef3471021d6132d4c694f357e5
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: default; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

and each ran the report without incident or modification.
.
Can you post a sample of your problem (scrubbed)? Also, you state Firebird 3.0 but not if this is embedded or server.

Dear Ratslinger,

thank you for your prompt reply. I put the odb file in my google drive:
Dummy File

The problem occurs when I use “Invoice Bisnis” button in “Invoice Daftar” Form to open “InvoiceBisnis” report.

Thanks in advance.

This is a bug (deadlock). Please file a bug report.

Hello,
Can’t say I agree it is a bug.
No issue in Ubuntu 20
In Win 10 did produce a blank form.
Did not see any code or form problem. Report ran directly.
Did create a blank form with a button and report ran.
Went to original form, added a new button, pointed at macro, deleted old button and all worked without issue.

Which likely means a regression in 7.3 on Windows.

(And I debugged the problem to see the deadlock before asking to file the bug :wink: )

1 Like

@mikekaganski
Thank you as I was using 7.2.x on Windows. Jumping between systems I get mixed up on who’s on first.

Thank you for the advices. I have reported the bug as suggested.

https://bugs.documentfoundation.org/show_bug.cgi?id=148156

1 Like

The deadlock is a bug. However, your use of the button’s Approve action is misuse: Approve is to decide if the action should be allowed or denied, so it must return True or False to proceed or not. You use it to show a report. Loading the report is complex, and our code shows the bug here - which we need to fix. But you better just use Execute action to have it done.

Could you pleas explain this a little bit more? Is there anything wrong with

ThisDatabaseDocument.ReportDocuments.getByName("Report").open

and what should be the different way to open a report from a form?

Not with the code that you quote, but with the action of the pushbutton that the macro is assigned to.

I hadn’t downloaded the file. Never seen somebody will execute opening a report with the event Approve Action.

Thanks for feedback.