0

"PrintAllRecord" --- Button for printing several records in one pdf

Hi, 

I'm looking for the formula to print several records of a child table in one pdf .   "PrintAllRecord" doesn't work. Example : 

for i in select ChildTableName do
printAllRecord(i, "FormName")
end

Thanks for your help 

6replies
{{batchActionsCtrl.state.selectedCount}} {{batchActionsCtrl.state.selectedCount==1?'reply':'replies'}} selected Move Cancel
Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • have you tried printRecord(i,"formname")

    Reply Like
  • Thanks for you answer. PrintRecord only print one record :-( 

    Reply Like
    • rqe3bc
    • rqe3bc
    • 1 yr ago
    • Reported - view

    I'm still having this problem as well (since 2020 lol).  I've also tried other solutions in the forum that also only show one record instead of all records.  Is this a bug on the iPad Ninox?  It's been driving me crazy....

    Reply Like
    • Sebastian
    • FES Minden
    • Sebastian.1
    • 1 yr ago
    • Reported - view

    As far as I know there is no option for this :( Hope I'm wrong though!

    Reply Like
  • So the following button script works - cos I already use it!

    I've renamed parts to make it clearer for you

    ChildTableName - needs to be the name of your child table

    PrintName needs to be the name of your print layout

     

    I use MyPrint (which is a yes/no flag so when set to 1 (it is yes) - you don't have to have this, but i have it to stop me issuing the same invoice twice!)

    let a := (select ChildTableName where myPrint = 1); 
    for myVar in slice(a, 0, 20) do
    printRecord(myVar, "PrintName");
    myVar.(myPrint := 0)
    end

    Note the 20 in the slice arguments is a batch control ie - I print out 20 off at a time then issue them.

    The beauty here is that if you use the control flag (myPrint) and set your table view to sort the view on this flag then the table will show you where you got to and then the next press of the button will resume from that point.

    This will produce separate download pdf's for each record (ie invoices)

    You could also use it in conjunction with sendEmail and a template letter to auto send via Email (works great for me with over 1500 documents to get out in a batch)

    Mel

    Reply Like
    • Sebastian
    • FES Minden
    • Sebastian.1
    • 1 yr ago
    • Reported - view

    Thank you Mel, it does work! However, the solution is not ideal. Do you know if there is a way...

    1) to first select a folder where all the PDFs are stored? Preview opens me a bunch of PDFs which I have to manually save somewhere.
    2) to give each PDF a specific name (not just table+Id, but for example the name of the client).

    Reply Like
  • Spam
    • Remove post
    • Remove and block user
  • Edit
  • Publish
  • Unschedule
  • Cancel event
  • Uncancel event
  • Set status
    • Clear status
  • Pin
  • Unpin
  • Bump
  • Open replies
  • Close replies
  • Clear flags
  • Move
    • Move to category:
    • Learn & Share
    • Get help
    • Webinars
  • Copy
    • Copy to category:
    • Current category
    • Learn & Share
    • Get help
    • Webinars
  • Change type
    • Change topic type to:
    • Discussion
    • Question
    • Idea
    • Issue
    • Article
    • Event
  • Restore post
    • Spam
    • Offensive
    • Inappropriate
    • Duplicate
    • Other
  • Remove post
    • Spam
    • Offensive
    • Inappropriate
    • Duplicate
    • Other
  • Publish
  • Spam
    • Remove post
    • Remove and block user
  • Edit
  • Pin
  • Unpin
  • Open replies
  • Close replies
  • Label
    • Clear label
  • Move
  • Clear flags
  • Restore post
    • Spam
    • Offensive
    • Inappropriate
    • Duplicate
    • Other
  • Remove
    • Spam
    • Offensive
    • Inappropriate
    • Duplicate
    • Other
Like Follow
  • 1 yr agoLast active
  • 6Replies
  • 536Views