Now i solved this problem.
Here is an example how you can open a report and generate a PDF. The function ExportPDF is from german forum (link from to function is in the post above).
I have changed a little thing. Now I don't open the report as pdf.
Code: Select all
' FROM: http://www.oooforum.org/forum/viewtopic.phtml?t=65111
sub OpenBerichtsabfrage2()
OpenReport("berichtabfrage-de" )
ExportPDF
end sub
sub OpenReport(sReportName as string)
Dim aProp(1) As New com.sun.star.beans.PropertyValue
aProp(0).Name = "ActiveConnection"
aProp(0).Value = connection 'GetConnection
aProp(1).Name = "OpenMode"
aProp(1).Value = "open" 'http://www.openoffice.org/api/docs/common/ref/com/sun/star/sdb/DocumentDefinition.html
thisComponent.Parent.getReportDocuments.loadComponentFromURL(sReportName,"_blank",6,aProp()) '_blank,6
end sub
OpenOffice 4.1.1 and Libreo. 4.4.x on Windows 7