Configuration and data models
Configuration and Data Models
JasperWho is built around a small set of interconnected models. Understanding them is the key to understanding everything else — from how reports are set up, to how renderings are stored, to how print jobs are dispatched.
The Model Hierarchy
Every piece of data in JasperWho fits into a clear hierarchy. At the top sits the ReportConfig — the central entity. Everything else either belongs to it, describes it, or records what happened when it was used.
ReportContext ← Organisational label for grouping reports
ReportConnectionConfig ← Optional live database connection
ReportConfig ← The report template + all its metadata
├── ReportParameter ← Input values passed at render time
├── ReportField ← Output columns from the SQL query or data payload
└── ReportResource ← Graphic file asset (image, logo)
└── (links to) CommonReportResource ← Shared asset reused across reports
ReportHistoryRecord ← Record of a past rendering (optional)
└── ReportPrintTask ← A print job dispatched from a history record
ReportContext
A context is a visual label you assign to report configurations to group and identify them at a glance. It carries no functional logic — it is purely organisational.
| Field | Description |
|---|---|
context_name |
Display name of the context |
context_description |
Short description |
context_text_color |
Hex color for the label text |
context_badge_color |
Hex color for the badge background |
context_border_color |
Hex color for the badge border |
Every ReportConfig requires a context. A single context can be shared across any number of report configurations.
ReportConnectionConfig
A connection config represents a live database connection that JasperWho can use as a data source when rendering a report. When aassigned report config hasto a connection config assigned,ReportConfig, JasperWho executes the report's SQL query against this connection at render time and feeds the result rows into the report as field data.
| Field | Description |
|---|---|
connection_name |
Friendly name for this connection |
connection_driver |
Database driver (see table below) |
connection_host |
IP address of the database server |
connection_port |
Port — required |
connection_database |
Database / schema name |
connection_username |
Username (stored encrypted) |
connection_password |
Password (stored encrypted) |
connection_test_query |
SQL query used to verify the connection |
connection_tested |
Whether the connection has been successfully tested |
Supported drivers:
| Driver | Database |
|---|---|
mysql |
MySQL |
mariadb |
MariaDB |
pgsql |
PostgreSQL |
sqlsrv |
Microsoft SQL Server |
Connection status is derived from connection_tested:
| Status | Meaning |
|---|---|
approved |
Connection has been tested successfully |
unapproved |
Never tested or last test failed |
⚠️ A report can only be rendered with a live connection if its status is
approved. JasperWho will reject render requests for reports whose connection has not been successfully tested.When is a ReportConnectionConfig needed?
A
ReportConnectionConfigis optional perReportConfig. Whether you need one depends on how your report gets its data:
Noconnectionconfig,Scenario Connection needed? Report has no detail band —the report consists entirely ofpurely staticcontentlayout(e.g.No Report has afixed-layoutdetaillabel). Noband, dataneeded,deliverednoviaconnection needed.No connection config, with detail band— the report has repeating rows, but no SQL query. The row data must bedeliveredAPI at render time No Report has a detail band and fetches data viatheSQLAPIYesasadataarray.With connection config— JasperWho executes the SQL query stored in theReportConfigagainst this connection automatically at render time. No manual data delivery needed.
ReportConfig
The
ReportConfigis the core entity of JasperWho. It represents a single JasperReports template — the.jrxmlfile — together with all the metadata JasperWho maintains about it.
Field Description report_nameDisplay name of the report report_descriptionOptional description report_file_nameInternal filename of the stored .jrxmlreport_widthPage width in mm (extracted from the .jrxmlon upload)report_heightPage height in mm (extracted from the .jrxmlon upload)report_querySQL query — defined in JasperWho and stored in the database report_has_detail_bandWhether the template contains a detail band (extracted on upload) report_context_idFK → ReportContextreport_connection_config_idFK → ReportConnectionConfig(nullable)report_preview_base64Base64-encoded preview image report_thumbnail_base64Base64-encoded thumbnail image ℹ️ The SQL query is not defined in the
.jrxmlfile. It is written and managed directly in JasperWho and stored in the database as part of theReportConfig. The.jrxmlonly defines which fields the query result maps to.When a
.jrxmlfile is uploaded, JasperWho automatically analyses it and creates the associatedReportParameter,ReportField, andReportResourcerecords. You then review and complete the auto-generated data — forexample,example setting example values or uploading resource files.ReportParameter
Parameters are the inputs passed into a report at render time — dates, IDs, filter values, flags, and so on.
Field Description parameter_nameParameter name as defined in the .jrxmlparameter_data_typeJava class name (e.g. java.lang.String,java.lang.Integer)parameter_requiredExtractedRead from therequiredcustom property in the.jrxmlparameter_evaluationEvaluation time, extracted from the .jrxmlparameter_example_valueExtractedRead from theexampleValuecustom property in the.jrxmlBoth
parameter_requiredandparameter_example_valuearereadsourced from custom properties embedded in the.jrxmlparameter definition. They can also be set manually in JasperWho after upload.ReportField
Fields represent the data columns
of datathat populate the report's detail band — either from an SQL query result or from a data array delivered at render time.
Field Description field_nameField name as defined in the .jrxmlfield_data_typeJava class name (e.g. java.lang.String,java.math.BigDecimal)field_example_valueExtractedRead from theexampleValuecustom property in the.jrxml
field_example_valueisread from acustom propertyin the.jrxmlfield definition. It isused when rendering a preview without a live database connection.ReportResource
Resources are graphic file assets —
images,images and logos —that areembedded in the report template. They are referenced in the.jrxmlvia parameters following theP_RESOURCE_naming convention.
Field Description parameter_nameThe P_RESOURCE_parameter name as referenced in the.jrxmlresource_file_nameInternal filenameFilename of the directly uploaded file (nullable)common_report_resource_idFK → CommonReportResource(nullable)A
ReportResourceeither holds its own uploaded file(resource_file_name)or it is linked to aCommonReportResource.The—twoneverarebothmutuallyatexclusive:thewhensameyoutime.linkWhena resourcelinking to a common resource,itsthe resource's own file is deleted and the common file is used in its place.
CommonReportResource
A
CommonReportResourceis a shared graphic asset — a company logo, a standard header image — that multiple report configurations can reference. Instead of uploading the same file to eachreport,report individually, you upload it once and link individualReportResourcerecords to it.
Field Description resource_nameDisplay name resource_descriptionOptional description resource_file_nameInternal filename of the stored file ℹ️ Linking
upload it.andisunlinking:a one-way action. When aReportResourceis linked to aCommonReportResource, its own file is permanently deleted.The resource slot now uses the common file.Unlinking removes the reference but does not restore the file — you will need to re-upload.
ReportHistoryRecord
A
ReportHistoryRecordcaptures the full context of a rendering:— what was requested, what was returned, and whether it succeeded. Creating a history record is optional— it isand controlled by thecreateHistoryRecordflag in the render request.
Field Description report_config_idFK → ReportConfigtrace_idUnique identifier for this rendering run output_typeHow the PDF was returned (see below) report_api_payloadThe exact request payload sent to the render call report_api_responseThe full API response, stored for traceability report_pdf_base64Base64-encoded PDF content report_pdf_file_nameFilename on disk report_thumbnail_base64Base64-encoded thumbnail of the first page (generated asynchronously) statusOutcome of the rendering (see below) Output types (
output_type):
Value Description base64PDF returned inline as a Base64 string urlPDF stored as a file, a URL is returned previewRendered for preview; file is not persisted noneNo PDF output — used for print-only flows Status values (
status):
Value Description okRendering succeeded, PDF received render_failNo errors reported, but no PDF received errorJasperReports returned one or more errors unknownStatus cannot be determined History records are retained for a configurable number of days
(— see Environment Configurationbelow).below. Thumbnails are generated asynchronously after rendering completes.
ReportPrintTask
A
ReportPrintTaskrepresents a print job dispatched to a physical printer. It is always linked to aReportHistoryRecord— you always print a specific past rendering, not a report config directly.
Field Description report_config_idFK → ReportConfigreport_history_record_idFK → ReportHistoryRecordtrace_idUnique identifier for this print run broadcast_idWebSocket channel ID for real-time status updates (nullable) printer_nameTarget printer name copiesNumber of copies to print output_file_nameFilename of the PDF sent to the printer output_base64_stringBase64-encoded PDF (consumed by the print service) error_messageError detail if printing failed statusCurrent print status (see below) Status values (
status):
Value Description pendingTask created,Created, waiting for the print serviceto pick it upprintedSuccessfully printed and confirmed errorPrinting failed unknownStatus cannot be determined ℹ️ Real-time updates via
new tasks.WebSocket:WebSocketWhenonly apply whenbroadcastIdis provided in the renderrequest, the print task's ID is broadcast over WebSocket (via Laravel Reverb) upon creation.request. The C# print servicecan subscribesubscribes tothisthat channel,pickpicks up the task,executeexecutes the print job, andreport thereports status back.IfWithoutnoabroadcastIdis provided,, the task is created silently — the print service must poll forit.
Audit Trail
Every model in JasperWho tracks who created and last updated a record, and which API token was used. This information is available on all records via the
withAudit=truequery parameter in the API.
Field Description created_atTimestamp of creation created_byUser ID of the creator created_by_token_idAPI token ID used (if created via API) updated_atTimestamp of last update updated_byUser ID of the last updater updated_by_token_idAPI token ID used (if updated via API) The
creationMethodandupdateMethodfields in the API response ("Frontend"vs."API") are derived automaticallyfrom— based on whether a token waspresent.present on the request.
Environment Configuration
JasperWho's runtime behaviour is controlled via environment variables in
.envor as container environment variables.
Variable Default Description APP_SCHEMEhttpURL scheme for generated links ( httporhttps)API_RATE_LIMIT_PER_MINUTE10Max API requests per minute per token PURGE_HISTORY_DAYS30Age in days after which history records are purged PURGE_PRINTTASKS_DAYS30Age in days after which print tasks are purged PURGE_ORPHANED_FILES_DAYS30Age in days after which orphaned files on disk are purged PAGINATION_DEFAULT_COUNT25Default number of results per API response