Hi Juraj,

> How can I run queries

What do you mean with "run" here? Where should the results appear? In a
single "data entry" window? If so, load a DataSourceBrowser ([1] tells
you how) into a "_blank" frame, and initialize it so it displays the
your query (also explained in [1]).

> and reports from my .odb file from forms?

  oDatabase.Reports.loadComponentFromURL( "report", "", 0, aArgs() )

should do, where aArgs() is an array of PropertyValues, containing one
element with Name = "OpenMode" and Value = "Open".

Ciao
Frank

PS: If the explanations were to sparse, tell me and I will try a more
elaborate macro, but this may take a while :)
PPS: If you're finished with the macro, it would fit perfectly into the
Code Snippets Base [2] :)

[1]http://api.openoffice.org/docs/common/ref/com/sun/star/sdb/DataSourceBrowser.html

[2]http://codesnippets.services.openoffice.org/
-- 
- Frank Schönheit, Software Engineer         [EMAIL PROTECTED] -
- Sun Microsystems                      http://www.sun.com/staroffice -
- OpenOffice.org Database                   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to