0

Print from Page NOT Table

Is there any way to access a dynamic print layout and save to file on the Page? This is available on the table view.

Any ideas please?

8 replies

null
    • red_kite
    • 9 days ago
    • Reported - view

    Did you mean to print and save values that are created on the page, or to print values of an other table on the page and save them pdf on the page. As far as I know, the first is not possible, the second is possible.

      • Michael_Riley
      • 5 days ago
      • Reported - view

        The second option. Could you assist please?

    • red_kite
    • 5 days ago
    • Reported - view

    Hi Michael, here is a little db with an example. You absolutly need ninox public or private cloud. On the page is the button to run the script to print. In the table is a dynamic print layout as an very simple example and in "JSON data input" there is the script for filling the print pattern. This print pattern must be made with word or OpenOffice. It contains the placeholders, or keys of JSON. I hope, it helps. 

      • Michael_Riley
      • 3 days ago
      • Reported - view

       Thanks  this is great.

      Thanks for the code, obvious now that you have provided that.

      Can the list be filtered?

      I have tried this: 

      let xRec := text(Choice);
      printRecord(first(select Flights where Departureairport = xRec), "PrintFromPage")

      But can't get it to work.

      Could you kindly assist one more time please?

    • red_kite
    • 3 days ago
    • Reported - view

    Sure, that's possible. But for this you have to change the script in the JSON in the print template. Here is an example. I used a dynamic selection field, because the data can extend it.

      • Michael_Riley
      • 10 hrs ago
      • Reported - view

        Thank you so very much.

      So good to have a forum where we feel free to share knowledge so freely.

      Is there so 'rule of thum' as to when to use the JSON with the print template and when to simply use {d.datafield}  holders on it?

      • red_kite
      • 3 hrs ago
      • Reported - view

       I'm not sure what you mean. The old print engine works with normal field identifiers. The dynamic print layout with JSON. Depending on what you need, this concerns a simple field {d.field} or an array{d.array[i]}. I myself use printouts on paper very rarely. That's why my experiences are not too abundant. It's easier for me to solve concrete tasks than to write about them abstractly, because English is not my mother tongue.

    • Fred
    • 1 hr ago
    • Reported - view
     said:
    Is there so 'rule of thum' as to when to use the JSON with the print template and when to simply use {d.datafield}  holders on it?

    Here are some reasons why you might need to JSON. If your fieldnames don’t follow Carbone’s limitations. Or you need to create summaries of datasets that don’t already exist. Or you need access to tables that are not linked.

    For me another reason is you can use Carbone Studio to do your template work. It is a much faster way to develop templates.

Content aside

  • 1 hr agoLast active
  • 8Replies
  • 74Views
  • 3 Following