0

Button to print

Hello! I would like to create a button to print the current record in a template that I have created. How can I do it? What would the code look like? Thank you.

8 replies

null
    • Nick
    • 6 yrs ago
    • Reported - view

    printRecord(recordId, layoutName)

    from Ninox Manual > Calculations > Reference of Functions and Language

    • Antonio
    • 6 yrs ago
    • Reported - view

    Thank you, I had already read it but today I have clarified. At the end the function that gives like this:

    printRecord ('_ id', "layoutName")

    In this way, print the record in which you are.

    • jfordpico
    • 6 yrs ago
    • Reported - view

    I am also try to add a button to print the current record I am on.

    What does "layoutName" refer to?

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

    I think you can also use printRecord(this,"layoutName")

    "layoutName" refers to the layout TAB in the print layout editor where you can add several layouts puching the + button next to the Tabs.

    • jfordpico
    • 6 yrs ago
    • Reported - view

    Using this instead of _id worked.

    Do you know of any way to have it print to the default printer instead of a PDF?

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

    I don’t think that is possible, always create a pdf to print because with ipad or iphone we have no printer drivers.

    Anyone on this forum another solution for this? 

    • jfordpico
    • 6 yrs ago
    • Reported - view

    Is it possible to limit print to PDF for just ipad or iphone.  Let desktop print to printer?

    Iphone and Ipad can use generic print drivers to network printer when one is on the network.

    • Support
    • 6 yrs ago
    • Reported - view

    You may limit it with if - then condition and the function

     

    ninoxApp()

     

    - returns one of "mac" | "ipad" | "iphone" | "web", identifying the type of app

Content aside

  • 6 yrs agoLast active
  • 8Replies
  • 5121Views