I try to use the "com.sun.star.frame.FrameControl" in a dialog acting as a "subforms'.

So i have 2 Framecontrol's loaded with a dataSource browser based on a SQL-statement

When selecting a row in the first FrameControl the data in the second must been refreshed (passing a new SQL-statementto the second Framecontrol).

I found no way to do that because the activeCommand off the Resultset is "readonly".

now i use  this workaround:
' delete the FrameControl we want to refresh
 odlg.getcontrol("Grid2").dispose
' make  a new FrameControl
   oFrameControl2 = createUnoService("com.sun.star.frame.FrameControl")
   aLoaderArguments2(0).Name = "DataSourceName"
    aLoaderArguments2(0).Value = "mysql_native_PMG_reports"
    aLoaderArguments2(1).Name = "CommandType"
    aLoaderArguments2(1).Value = 2 'com.sun.star.sdb.CommandType.TABLE
    aLoaderArguments2(2).Name = "Command"
aLoaderArguments2(2).Value = "SELECT distinct * FROM pmgdbase.adv_reden_tbvips WHERE pmgdbase.adv_reden_tbvips.REDENID = '" & sid &"'"
    aLoaderArguments2(3).Name = "ShowTreeView"
    aLoaderArguments2(3).Value = FALSE
    aLoaderArguments2(4).Name = "ShowTreeViewButton"
    aLoaderArguments2(4).Value = FALSE
    aLoaderArguments2(5).Name = "ShowMenu"
    aLoaderArguments2(5).Value = FALSE
' load the new FrameControl
  oFrameControl2.LoaderArguments = aLoaderArguments2
  oFrameControl2.ComponentUrl = ".component:DB/DataSourceBrowser"

Is there a better way to do that ?

Thanks

Fernand
--
-----------------------------------------------------------------
To unsubscribe send email to dev-unsubscr...@dba.openoffice.org
For additional commands send email to sy...@dba.openoffice.org
with Subject: help

Reply via email to