1

Button to print all records in a table (to pdf)

I have a table with 2 subtables, and I would like to have a button so the entire table is printed (on an iPad so this would be a pdf.)

I've tried a for loop as suggested in this thread:

https://ninoxdb.de/en/forum/technical-help-5ab8fe445fe2b42b7dd39ee7/pdf-name-with-a-field-value-5cbd956e709ca5269ddfece9

but it will only show one record.

My button code is:

for i in select TableName do
     printRecord(this, "FormName")
end

This will give me the first record with the correct print form, but just the first record as a pdf.

I don't need a filter just all the records.

Thanks

7replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
    • Birger H
    • Birger_H
    • 3 yrs ago
    • Reported - view

    Try it like this:
    –––
    for i in select TableName do
         printRecord(i, "FormName")
    end
    –––

    Birger

    Like
    • rqe3bc
    • rqe3bc
    • 3 yrs ago
    • Reported - view

    This still only shows one record - is there something else I'm missing?

    Thanks

    Like
  • Hi, 

    It should print you out one PDF for each record of the table.

    How many PDF's do you get?

    Best, Jörg

    Like
    • rqe3bc
    • rqe3bc
    • 3 yrs ago
    • Reported - view

    I get one PDF.  I don't actually want to print them to a printer, but I would like to have all the records in a PDF like when using the "All" option.

    I get the first record in a PDF with the correct form, but there is just an Export icon that only saves the one record and not even the "All" option.

    Thanks

    Like
    • Agus
    • Agus
    • 2 yrs ago
    • Reported - view

    bump. Has anyone figured this out yet?

    Like
  • If you make a child table of the table you want to print. Go in the parent table to the printeditor to print all the records.

    Like
  • The code  by Jörg works,   the button need to be at the parent table and make sure you are referring to the table name and not the nick name. In my example the code for the button is :

    for i in select PROOF do.                                            for i in select TableName do
        printRecord(i, "PRODUCTION")                                   printRecord(i, "FormName")
    end                                                                                 end 

    The table name is PROOF not DESIGN.  See attached pictures 

    Like
Like1 Follow
  • 1 Likes
  • 7 mths agoLast active
  • 7Replies
  • 2308Views
  • 1 Following