OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Apply a new filter to databasebrowser

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
wnOOO
General User
General User


Joined: 14 Aug 2004
Posts: 5

PostPosted: Mon Aug 23, 2004 11:53 am    Post subject: Apply a new filter to databasebrowser Reply with quote

To show the databsebrowser is down with:

sub ShowDatabasebrowser2
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "ViewDataSourceBrowser"
args1(0).Value = true
dispatcher.executeDispatch(document, ".uno:ViewDataSourceBrowser", "", 0, args1())
end sub

To change the filter for the table in the DataSourceBrowser you can do:
sub testFilter
dim wnDatabaseTabelle
wnDatabaseTabelle=createUnoService("com.sun.star.sdb.DatabaseContext").getByName("Adressen").getConnection("","").getTables().getByName("Adressen")
wnDatabaseTabelle.filter = "FIRMA LIKE'a*'"
wnDatabaseTabelle.order = "FIRMA ASC, NAME ASC"
wnDatabaseTabelle.ApplyFilter=true
end sub

But the filter isn't applyed until you close and reopen the DatabaseBrowser.
In a Form it is don with the reload method.
Is their a possiblity to reload the DatabaseBrowser to apply the filter?

Thank you for your help.

Wolfgang
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group