[Libreoffice-bugs] [Bug 112165] Trying to open a report from form button crashing Base

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sun Dec 31 15:52:03 UTC 2017


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

--- Comment #11 from robert at familiegrosskopf.de ---
(In reply to c18florentino from comment #10)
> As I've said, originally report WAS connected to DB (as today and it worked).
> LO crashed.
> So, a LO Report cannot have only labels on it?
> A "recordset" ou "recordsource" is a REQUIRED parameter for these objects to
> open?

Indeed, the first you are asked for when creating a report is a datasource. You
could create a query, which doesn't ever show any content > the report would
open without any content. Have tested this with your example-database.

The macro you added in the database produces a crash here:
Sub AbrirRelatorio (e As Object)
On Error Goto Erro
ThisDatabaseDocument.ReportDocuments.getByIndex(0).open
On Error Goto 0 
Exit Sub
Erro: MsgBox "ERRO " + Err + Chr$(13) + Error$  + " (linha: " & Erl & ")"
On Error Goto 0         
End Sub

This macro won't be executed, if the report won't open. But if the report will
open it is looking for '0' - where should it be? '0' is a number, not text
where the macro could jump to.

Sub AbrirRelatorio
ThisDatabaseDocument.ReportDocuments.getByIndex(0).open
End Sub

will open the report, if connected to a datasource. No problem if the table or
query is empty ...

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20171231/0919f447/attachment.html>


More information about the Libreoffice-bugs mailing list