Report Extensions

Documentation •
Dans cet article

Report extensions are java-script programs that are used to customize printouts like invoice documents.

The program:

  1. Will call the main function printDocument() with the json object (for example the invoice) and the other parameters.
  2. It create a print document and shows the result in a print preview window.

Copies of some report apps that you can use as starting point are available at the following address:

Important notes

  • Banana Accounting uses Qt script engine to execute report extension.
  • Mandatory and optional functions:
    • printDocument(jsonContent, repDocObj, repStyleObj [, prefSelected])
      the main function that is called by the program
    • settingsDialog() (optional)
      called from user to set up parameters like colour or additional text.
    • getPrintPreferences() (optional)
      returns a JSON object with the available print options.
  • Available jsonContent formats:
  • The extension of custom report apps should be ".js" and the script must contains the main attributes, see Apps Attributes.
  • The attribute @id of the script should correspond to the file name.
  • System report apps are downloaded to the folder /User/.../AppData/Local/
    (Mac Users: /Users/.../Library/Application Support/
  • Do not overwrite system report apps because updates will overwrite your changes.
  • You can save your report app anywhere, Banana Accounting saves the path to your app in the configuration file /AppData/Local/


Dites-nous comment nous pouvons mieux vous aider
Si les informations contenues dans cette page ne correspondent pas à ce que vous recherchez, ne sont pas suffisamment claires ou ne sont pas à jour, faites-nous savoir.

Partager cet article: Twitter | Facebook | LinkedIn | Email