---
name: author
description: Create or edit JasperReports JRXML reports from a specification, or clarify missing engine, data, and business rules before authoring. Use when asked what information a report needs or whether its requirements are sufficient; do not invent tax, rounding, null, or no-data behavior. Detect 6.x versus 7.x syntax before editing and do not treat migration as ordinary authoring. For a change limited to one concern such as data sources, groups and totals, layout, styles, subreports, tables, charts, localization or images, prefer the dedicated JasperReports skill.
---
# Author a JasperReports report
## Before editing
Identify the exact engine and Java versions, the existing JRXML dialect, data-source schema, parameter types, required locale and timezone, page size and output formats. Use existing reports and build tests as prior art. Ask for missing business rules, totals, no-data behavior or layout requirements; do not invent them. If tools are unavailable, request a manifest and a representative template.
## Workflow
1. Use the project's dialect throughout. In 7.x, text fields use `element kind="textField"` with `expression`; do not paste 6.x `reportElement` and `textFieldExpression` syntax into it. Legacy 6.x JRXML needs a supported conversion, not hand editing; see [migrate](../migrate/SKILL.md). Use exact-version examples for components.
2. Define fields and parameters with actual Java types. Use `BigDecimal` for monetary arithmetic when the input contract requires decimal precision. Handle nulls explicitly and distinguish a null field from an absent field. Field mapping, query binding with `$P{}`, `$P!{}` and `$X{}`, and data-source lifecycle are covered in [data-sources](../data-sources/SKILL.md); never pass user-controlled SQL text to `$P!{}` and never open a production connection.
3. Choose bands, group sort order, variable calculations, reset types and evaluation times deliberately. Group headers and footers depend on ordered input, and totals evaluated too early can look plausible but be wrong; see [expressions-groups](../expressions-groups/SKILL.md).
4. Keep elements within the printable column width and band boundaries: for one column, `columnWidth` must fit `pageWidth` minus the left and right margins. Account for stretch, float and split behavior, repeated headers, long strings, null or empty input and page boundaries; see [layout-pagination](../layout-pagination/SKILL.md). Do not disable pagination globally to fix one export if the application also relies on paged output.
5. Reuse styles, packaged resources and font extensions; see [styles-fonts](../styles-fonts/SKILL.md). Do not hardcode a local absolute path or rely on a developer-only font. Do not change unrelated UUIDs, data contracts or report geometry.
6. Use the dedicated skills for components: [subreports-datasets](../subreports-datasets/SKILL.md), [tables-crosstabs](../tables-crosstabs/SKILL.md), [charts](../charts/SKILL.md), [localization](../localization/SKILL.md) and [images-barcodes](../images-barcodes/SKILL.md).
7. Compile with the project's engine and expression classpath, then fill with synthetic data and export the required format, as in [compile-test](../compile-test/SKILL.md). A well-formed XML file is not proof of a compilable or correctly rendered report.
## Validate and deliver
Provide the edited template, its data and parameter contract, and the exact validation commands and results. Check normal, empty, null and long-text cases; assert business values and inspect output for clipping, overlap and page breaks. In the tested 7.1.1 runtime, an authored invoice with `whenNoDataType="AllSectionsNoDetail"` keeps an exact `BigDecimal` total across fresh fills, prints `0.00` for empty input and leaves a null amount out of its total. Where execution or visual inspection is unavailable, label those checks unverified and give the next executable step rather than claiming a finished rendering.
## Sources
- [Official samples](https://jasperreports.sourceforge.net/sample.reference/README.html)
- [API](https://jasperreports.sourceforge.net/api/index.html)
- [Release format changes](https://github.com/Jaspersoft/jasperreports/blob/master/changes.txt)
Use examples from the detected version, not necessarily the current online API.
— ‹guest · 2026-11-29› —
این نسخه با نشانهگذاری اختصاصی حساب شما نمایش داده میشود. برای نصب سریع، به تب نصب و راهاندازی بروید.