0

Example: invoice PDF

Use the sample data below to understand how to get from a document (= template, here: DOCX in Microsoft Word) to a rendered report (= result, PDF in Ninox).

Understand the example

  1. Create a database from the NINOX backup file from the sample data below.
  2. Once the database is created, open the Invoice table, click any record, then click the print icon.
  3. View the 2 layouts:
    1. en_invoice_template ➡️ refer to Option A: without a custom script
    2. en_invoice_template_without_JSON ➡️ refer to Option B: with a custom script
  4. Open Microsoft Word or another text editor to view the MS Word template A (Option A) and B (Option B).
    1. Depending on which template is used, you either work with or without a custom script.
  5. In Ninox, select a layout, then click the print icon. Select This record to download the final result, a rendered PDF report.
    1. Both MS Word templates A and B result in the same report.
ℹ️ For both layouts, we use a global function to correctly display currency.

Sample data

What File format EN DE Notes
MS Word template A DOCX Link Link No custom script needed, refer to Option A: without a custom script
MS Word template B DOCX Link Link Requires custom script, refer to Option B: with a custom script
Rendered report PDF Link Link Watermark on PDF only appears in this demo
Database NINOX Link Link  
Custom script JSON Link Link  
Global function JSON Link Link  

Reply

null