wnOOO General User

Joined: 14 Aug 2004 Posts: 5
|
Posted: Mon Aug 23, 2004 11:53 am Post subject: Apply a new filter to databasebrowser |
|
|
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 |
|