Reports
A report is a document the application prints or exports: an invoice, a customer list, labels. The Reports tab lays it out on a page drawn to scale, in bands repeated for each record.
Report settings
With no element selected, the inspector sets up the report:
| Setting | Purpose |
|---|---|
| Name, Title | ETAT_Clients, "Customer list" (the title is translatable) |
| Source | the entity whose records are printed |
| Filter | an optional Argile condition: Client.Actif |
| Sort | the sort fields, separated by commas; - for descending order: Ville, -Age |
| Format | A4, A3, A5 or Letter |
| Orientation | Portrait or Landscape |
| Margins | in millimeters (15 by default) |
The ▶ button produces the report's PDF preview, with sample values in place of the data.
Bands
| Band | Printed |
|---|---|
| Report header | once, at the top of the first page |
| Page header | at the top of each page |
| Group header | each time the value of the group field changes |
| Body | once per record |
| Group footer | at the end of each group |
| Page footer | at the bottom of each page |
| Report footer | once, after the last record |
"Add a band" adds one; each band has its own height, in millimeters. A group breaks the list each time a field's value changes (for example, a subtitle per city, with a subtotal).
Elements
The palette places elements on the bands:
| Element | Shows |
|---|---|
| Text | a fixed text (translatable) |
| Field | the value of a field of the record |
| Formula | the result of an Argile expression: Commande.Montant * 1.2 |
| Total | the sum, average, count, minimum or maximum of a field, per group or for the whole report |
| Image | a PNG or JPEG image |
| Line, Rectangle | lines and frames |
| Page no. | the page number |
| Date | the print date |
| Barcode | EAN-13 for 12 or 13 digits, Code 128 for any other text |
| QR code | a QR code, for example the address of a record |
Each element has its position and size (in millimeters), its font (size, bold, italic), its alignment, a border, a text color and a background color. The format shapes numbers and dates: #,##0.00 €, DD/MM/YYYY.
Barcodes and QR codes can show a field or a formula: an item's code, an invoice number, the address of a page.
Printing and exporting
In the produced application, a report is printed or exported by the "Print a report" and "Export a report" actions (see Interactions), or in Argile:
ETAT_Clients.preview() // preview, then print
ETAT_Clients.print()
ETAT_Clients.export("customers.xlsx") // the format follows the extension
| Format | Extension | Content |
|---|---|---|
.pdf | the exact layout, fonts embedded | |
| OpenDocument text | .odt | the layout, editable in LibreOffice Writer |
| OpenDocument spreadsheet | .ods | the data as a table, with numbers you can calculate with |
| OpenDocument presentation | .odp | one slide per page |
| OpenDocument drawing | .odg | the layout, as a drawing |
| Word | .docx | the layout, editable in Word |
| Excel | .xlsx | the data as a table, with numbers you can calculate with |
| PowerPoint | .pptx | one slide per page |
All these formats are open and standardised (OpenDocument ISO/IEC 26300, Office Open XML ISO/IEC 29500): LibreOffice, Microsoft Office and most office suites open them. Images, barcodes and QR codes appear in every layout format; spreadsheets (ODS, XLSX) keep only the data.