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

7 replies

null
    • Birger_H
    • 5 yrs ago
    • Reported - view

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

    Birger

    • rqe3bc
    • 5 yrs ago
    • Reported - view

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

    Thanks

    • Jorg
    • 5 yrs ago
    • Reported - view

    Hi, 

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

    How many PDF's do you get?

    Best, Jörg

    • rqe3bc
    • 5 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

    • Agus
    • 4 yrs ago
    • Reported - view

    bump. Has anyone figured this out yet?

    • Ninox partner
    • RoSoft_Steven.1
    • 4 yrs ago
    • Reported - view

    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.

    • forzacreativa
    • 2 yrs ago
    • Reported - view

    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 

Content aside

  • 1 Likes
  • 2 yrs agoLast active
  • 7Replies
  • 2501Views
  • 1 Following