Produce useful reports
Separate the report definition, the data being reported and the chosen output action.
Define the document first#
A report is a document with page size, sections and content, not a screenshot of a grid. Decide what belongs in headings, repeated detail, totals and page context. Keep the report JSON resource declared in the project so the build can include it.
Choose preview, PDF or print#
| Action | Result | What to check |
|---|---|---|
| Reports.Preview | An interactive preview | Page breaks, clipping, repeated headings and the final page. |
| Reports.ExportPdf | A file at the specified destination | Writable output path and a PDF that can be reopened. |
| Reports.Print | A print interaction with a completion result | Cancellation is normal; do not report it as a completed print. |
The report lab includes both a customer report and a section-based report, plus the complete export, preview and print handlers.
Freeze the meaning of the output#
Decide whether a report means the loaded view, the current filter or a fresh full query. A paged grid contains only loaded data; exporting it does not automatically export every database record. The user should know which set is being reported.
Check the document, not just the call#
- Preview one record and enough records to require another page.
- Check a very long field and a missing optional field.
- Export, reopen the PDF and inspect the first and last page.
- Cancel a print interaction and verify the application remains usable.
- Repeat from the built app to verify packaged report resources.
Source baseline
20f4bfed6b · Build manifest