Skip to main content

Rendering from the frontend

Every report configuration in JasperWho? has a built-in Generate PDF function — a dedicated page that lets you render the report directly from the browser, without writing a single line of code or touching the API. It is the fastest way to produce a PDF, test a configuration, or trigger a print job on demand.

[SCREENSHOT: JasperWho? — the ReportConfig overview list, highlighting the Generate PDF button on a report card.]

[SCREENSHOT: JasperWho? — the Generate PDF page for a report with parameters and a data adapter shown. Show the full page before rendering, with the parameter input table visible.]


Opening the Generate PDF Page

There are two ways to reach the Generate PDF page. From the report configuration list, each report card has a dedicated Generate PDF button — clicking it takes you directly to the render page without having to open the report first. Alternatively, open any report configuration and navigate to Generate PDF from within the report view.

The page shows two read-only fields at the top — the report name and the active data adapter — so you always know at a glance which report you are working with and where its data comes from.

The data adapter field displays either the name of the assigned ReportConnectionConfig (including driver and database) or dyn. Array if no SQL connection is configured. This directly influences what input sections appear further down the page.


Report Parameters

If the report defines parameters, a parameter input table is shown. Each parameter gets its own typed input field — the input type is derived automatically from the Java class declared in the .jrxml:

  • A java.lang.String parameter becomes a text field.
  • A java.sql.Date parameter becomes a date picker.
  • A java.lang.Integer parameter becomes a number input with integer constraints.
  • A java.lang.Boolean parameter becomes a toggle switch.
  • And so on for all supported types.

Parameters marked as required in the report configuration must be filled in before the form can be submitted. Optional parameters can be left empty — JasperWho? silently drops empty parameter values and does not include them in the render request.

[SCREENSHOT: JasperWho? — the Report Parameters table on the Generate PDF page, showing a mix of input types: a text field, a date picker, and a number input. At least one should be marked as required.]


Report Lines — Manual Data Entry

The Report Lines section only appears when the report has no SQL connection assigned — i.e. when the data adapter is dyn. Array. In this case, JasperWho? has no database to query, so the detail band data must be entered manually in the browser.

The section shows a table with one column per field defined in the report. Each cell contains a typed input matching the field's data type. You fill in one row of values per data record you want to appear in the report.

To add more rows, use the Add Row button — it clones the input row and appends a new empty one. Individual rows (except the first) can be removed with the delete button on the right. Empty fields are not transferred to the render request.

ℹ️ When a SQL connection is assigned, the Report Lines section is hidden. JasperWho? fetches the data automatically from the database using the configured query — no manual input needed.

[SCREENSHOT: JasperWho? — the Report Lines section with two rows of data entered, showing the Add Row button and delete buttons on the right side of each row.]


Resources

If the report has image resources, a collapsible Resources section is available on the page. It shows a preview thumbnail of each resource file, its parameter name, and its file name. Resources are handled automatically at render time — you do not interact with them during rendering. The section is informational only, confirming which image files are currently assigned.


Generating the PDF

Once parameters and fields are filled in, click Generate PDF. A confirmation modal opens with the rendering options:

Option Default Description
Create History Record On Saves a full record of this rendering — request, response, PDF, and thumbnail — to the report history.
Create Print Task Off Dispatches the rendered PDF to the print service after rendering. Requires a printer name.
Printer Name The target printer. Required when Create Print Task is enabled.
Copies 1 Number of copies passed to the print service. Does not trigger multiple renders.
Broadcast ID Optional WebSocket channel ID. If provided, the print service is notified in real time when the print task is created. Leave empty to rely on polling instead.

Confirm with Generate to start the render. The request is processed synchronously — the page waits for the result and displays it immediately.

[SCREENSHOT: JasperWho? — the Generate PDF modal, showing the toggles, printer name input, copies input, and Broadcast ID field.]


The Result

Success

On a successful render, the page shows a green confirmation banner and embeds the generated PDF as an inline preview directly in the browser — sized to the report's actual page dimensions. No download required; the document is immediately visible.

If a history record was created, a View History button appears — linking directly to the new ReportHistoryRecord. If a print task was dispatched, a View Print Task button appears as well, linking to the ReportPrintTask record where you can monitor its status.

[SCREENSHOT: JasperWho? — the Generate PDF page after a successful render, showing the green banner, the View History and View PrintTask buttons, and the inline PDF preview embedded below.]

Errors

If the render fails, the page shows a red error banner listing all error messages returned by JasperWho?. Common causes are missing required parameters, a SQL query that returns no data for a report that expects some, or a resource file that was removed after the configuration was last saved.

If a history record was created before the error occurred, the View History button still appears — the failed attempt is recorded, including the error details, which is useful for diagnosing what went wrong.