I trie to make a macro who load and runs a SRB report, but changing the filter with data from the macro

i got to the com.sun.star.comp.report.OReportDefinition wher i can change the filter string but how can i "load" en "run " the report. Do i hav to "store the Definition back to the storage and reopen the reportDoc ?

ok i got so far:

Sub Main
   dim Arguments(2) as New com.sun.star.beans.PropertyValue
context = createUnoService("com.sun.star.sdb.DatabaseContext")
   oDataBase = context.getByName("mysql_native")
   oDBDoc = oDataBase.DatabaseDocument
   oReports = oDBDoc.getReportDocuments()


   Arguments(0).Name = "OpenMode"
   Arguments(0).Value = "open"
   Arguments(1).Name = "ActiveConnection"
   Arguments(1).Value = oDatabase.getConnection("user","password")
   Arguments(2).Name = "Hidden"
   Arguments(2).Value = false
oreport = oreports.getbyname("Myreport")
oreportComponent = oreport.component


   oreportComponent.Filter = "pmgdbase.mag_jobs.JOBNR LIKE 'MMTbe%'"
Arguments(0).Name = "Hidden"
   Arguments(0).Value = false
>>>>>>> oreportComponent.load("Jobbons1",,,Arguments()) >>> 'here i fails to laod the report

'   here I can store the Definition
' and reload ?
' oReport = oReports.loadComponentFromURL("Jobbons1","_blank",0,Arguments()) >> is that te right way ??

End Sub

Thanks for any hint

Fernand


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@dba.openoffice.org
For additional commands, e-mail: dev-h...@dba.openoffice.org

Reply via email to