| View previous topic :: View next topic |
| Author |
Message |
Plipp General User


Joined: 27 Sep 2008 Posts: 13 Location: Germany
|
Posted: Mon Oct 19, 2009 8:19 am Post subject: export all forms with content to pdf, not only one |
|
|
Hi,
i use an ooo base database for scientific research.
i am obligated to print all my data once the work is completed for juridical reasons.
i wanted to store my 900 filled forms as pdf and print it afterwards.
at the moment, i am able to export one form to pdf, then click the next form, export it ..... and so on .....
Maybe there is a possibility to create one .pdf consisting of ALL my forms with content.
is there maybe a neat trick i missed?
the alternative is exporting all 900 one by one, then merging them
Thanks!
Plipp _________________ OOo 3.0 Ubuntu 9.04 |
|
| Back to top |
|
 |
QuazzieEvil Super User

Joined: 17 Jan 2007 Posts: 599 Location: Houston, TX
|
Posted: Tue Oct 20, 2009 6:13 am Post subject: |
|
|
How complex is your form? If it is simple (no grids) you can do something like this:
| Code: |
Sub printForm1(Event As Object)
Dim Doc As Object
Dim Form As Object
Dim url as String
Dim Args(0) As New com.sun.star.beans.PropertyValue
Form=Event.Source.Model.Parent
Doc=Form.Parent.Parent
Args(0).Name="FilterName" : Args(0).Value="writer_pdf_Export"
Form.beforeFirst() 'move before first record (for top guarded while)
While Form.next()
'generate unique file name (concat pk)
url="C:\formprint_" & Form.getByName("fmtID").BoundField.getString() & ".pdf"
url=convertToURL(url)
Doc.storeToURL(url,Args())
Wend
End Sub
|
The problem with this appraoch is that it does not print the data in grids.
Alternatively, you can create a report with the Sun Report builder (just make sure to set a page break after each record). printing 900 records at a time may be a problem, so you may want to do a few at a time (just change constraints).
Also, you can try mail merge.
If you are familier with Python, you can also use multi-threads (theorerically) and it should print faster. If you are only printing the 900 once, and then each record as you go along, then probably printing them in batches is sufficient.
--hope this helps. _________________ Free Docs @ http://www.baseprogramming.com/resources.html
Book @ lulu.com http://www.lulu.com/content/2455551 |
|
| Back to top |
|
 |
Plipp General User


Joined: 27 Sep 2008 Posts: 13 Location: Germany
|
Posted: Tue Oct 20, 2009 7:41 am Post subject: ok, i'll try |
|
|
thank you very much for this!
i'll try and then post how it worked.  _________________ OOo 3.0 Ubuntu 9.04 |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|