[Libreoffice-bugs] [Bug 51807] New: No method to open a report from a macro with a filter

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Jul 6 17:50:40 CEST 2012


https://bugs.freedesktop.org/show_bug.cgi?id=51807

             Bug #: 51807
           Summary: No method to open a report from a macro with a filter
    Classification: Unclassified
           Product: LibreOffice
           Version: 3.4.5 release
          Platform: All
        OS/Version: Windows (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Database
        AssignedTo: libreoffice-bugs at lists.freedesktop.org
        ReportedBy: skiani at alum.mit.edu


There does not appear to be anyway to open a report from a macro (e.g. button
on a form) and apply a filter to that report. Similar to how you can open a
form from a macro using a filter. Something like this should work:

oReport = ThisDatabaseDocument.ReportDocuments.getByName("MyReport")
oReport.open
oReport.filter="( ""tbProjects"".""ProjID"" = " & ProjectID & " )"
oReport.ApplyFilter=True
oReport.Reload()

The only solutions I have been able to find require either generating a
temporary table on the fly and opening a report against that. This solution
only works in a single user environment.

The other solution is to open the report in design mode modify the filter then
generated a report. This also is problematic in that user must have write
access to the LO file, also an non-starter in multi-user environment.

Ideally we can open reports just like forms with externally applied filter.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Libreoffice-bugs mailing list