OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

export all forms with content to pdf, not only one

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base
View previous topic :: View next topic  
Author Message
Plipp
General User
General User


Joined: 27 Sep 2008
Posts: 13
Location: Germany

PostPosted: Mon Oct 19, 2009 8:19 am    Post subject: export all forms with content to pdf, not only one Reply with quote

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 Shocked

Thanks!
Plipp
_________________
OOo 3.0 Ubuntu 9.04
Back to top
View user's profile Send private message Visit poster's website
QuazzieEvil
Super User
Super User


Joined: 17 Jan 2007
Posts: 599
Location: Houston, TX

PostPosted: Tue Oct 20, 2009 6:13 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Plipp
General User
General User


Joined: 27 Sep 2008
Posts: 13
Location: Germany

PostPosted: Tue Oct 20, 2009 7:41 am    Post subject: ok, i'll try Reply with quote

thank you very much for this!

i'll try and then post how it worked. Very Happy
_________________
OOo 3.0 Ubuntu 9.04
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
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