{"id":496134,"date":"2026-09-25T18:24:29","date_gmt":"2026-09-25T18:24:29","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=496134"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=496134","title":{"rendered":"\u041c\u043e\u0434\u0443\u043b\u044c\u043d\u0430\u044f \u043d\u0430\u0434\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0434\u043b\u044f JasperReports: \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0438 \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435. \u0427\u0430\u0441\u0442\u044c 3"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u042d\u0442\u043e \u0442\u0440\u0435\u0442\u044c\u044f \u0447\u0430\u0441\u0442\u044c. \u0412 <a href=\"https:\/\/habr.com\/ru\/articles\/1086756\/\" rel=\"noopener nofollow\">\u043f\u0435\u0440\u0432\u043e\u0439<\/a> \u2014 \u043e\u0442\u043a\u0443\u0434\u0430 \u0432\u0437\u044f\u043b\u0441\u044f JasperReports \u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u0435\u043c\u0443 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u043b\u043e \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0432\u043e <a href=\"https:\/\/habr.com\/ru\/articles\/1086768\/\" rel=\"noopener nofollow\">\u0432\u0442\u043e\u0440\u043e\u0439<\/a> \u2014 \u043e\u0434\u0438\u043d \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u0438 \u0442\u0440\u0438 \u0438\u0434\u0435\u0438, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430. \u0414\u0430\u043b\u044c\u0448\u0435 \u0438\u0434\u0451\u0442 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430, \u043f\u043e \u043e\u0434\u043d\u043e\u0439 \u0442\u0435\u043c\u0435 \u043d\u0430 \u0447\u0430\u0441\u0442\u044c. \u0417\u0434\u0435\u0441\u044c \u2014 \u043a\u0430\u043a \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443, \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0435\u0440\u0432\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0439 \u043e\u0442\u0447\u0451\u0442 \u0438 \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435.<\/p>\n<p>\u0412\u0441\u0451 \u043d\u0438\u0436\u0435 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043a \u0432\u0435\u0440\u0441\u0438\u0438 3.0.0. \u041f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 2.0.x \u0432 \u043d\u0435\u0439 \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0435\u0441\u044f \u0441\u0443\u0431\u0440\u0435\u043f\u043e\u0440\u0442\u044b \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u043e\u0432 \u043c\u043e\u0434\u0443\u043b\u0435\u0439, \u043f\u0440\u043e\u043f\u0443\u0441\u043a \u043f\u0443\u0441\u0442\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439, \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u044b \u0434\u043b\u044f \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0439 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438 \u0441\u0432\u0435\u0440\u043a\u0430 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0441 \u043a\u043b\u0430\u0441\u0441\u043e\u043c \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435, \u0430 \u0438\u043c\u0435\u043d\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0442\u0435\u043f\u0435\u0440\u044c \u0431\u0435\u0440\u0443\u0442\u0441\u044f \u0438\u0437 \u043f\u043e\u043b\u0435\u0439. \u041f\u0440\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u0441 2.0.x \u2014 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0435\u0440\u0438\u0438.<\/p>\n<p>\u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f: Java 17+ \u0438 JasperReports 6.x \u0438\u043b\u0438 7.x \u2014 \u0432\u0435\u0440\u0441\u0438\u044e \u0434\u0432\u0438\u0436\u043a\u0430 \u0437\u0430\u0434\u0430\u0451\u0442\u0435 \u0432\u044b. \u0410\u0432\u0442\u043e\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0438 \u043f\u0440\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u043f\u0440\u0438\u0435\u0437\u0436\u0430\u044e\u0442 \u0441\u043e \u0441\u0442\u0430\u0440\u0442\u0435\u0440\u043e\u043c, \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u043c \u043f\u043e\u0434 Spring Boot 3.3; \u044f\u0434\u0440\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043e\u0442 Spring \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u0432\u043e\u0432\u0441\u0435 \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u0431\u0435\u0437 \u043d\u0435\u0433\u043e.<\/p>\n<h3>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0421\u0442\u0430\u0440\u0442\u0435\u0440 \u043f\u0440\u0438\u043d\u043e\u0441\u0438\u0442 \u044f\u0434\u0440\u043e, \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u0438 \u0430\u0432\u0442\u043e\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e, \u0430 \u0437\u0430\u043e\u0434\u043d\u043e \u0438 \u0441\u0430\u043c JasperReports: \u0432 \u0432\u0435\u0440\u0441\u0438\u0438 3.0.0 \u0434\u0432\u0438\u0436\u043e\u043a \u043f\u0440\u0438\u0435\u0437\u0436\u0430\u0435\u0442 \u0442\u0440\u0430\u043d\u0437\u0438\u0442\u0438\u0432\u043d\u043e, \u0432\u0435\u0440\u0441\u0438\u0438 7.0.6. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0439\u0442\u0435 \u0435\u0433\u043e \u044f\u0432\u043d\u043e \u0438 \u0442\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0443\u0436\u043d\u0430 \u0432\u0430\u043c \u2014 \u043f\u0440\u044f\u043c\u0430\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0431\u0438\u0432\u0430\u0435\u0442 \u0442\u0440\u0430\u043d\u0437\u0438\u0442\u0438\u0432\u043d\u0443\u044e. \u042d\u0442\u043e \u043d\u0435 \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c: \u0434\u0438\u0430\u043b\u0435\u043a\u0442\u044b JRXML \u0443 \u0448\u0435\u0441\u0442\u043e\u0439 \u0438 \u0441\u0435\u0434\u044c\u043c\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0439 \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b, \u0438 \u0432\u0435\u0440\u0441\u0438\u044f \u0434\u0432\u0438\u0436\u043a\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u0432 \u043a\u0430\u043a\u043e\u043c \u0438\u0437 \u043d\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u043d\u0430\u043f\u0438\u0448\u0435\u0442 \u0432\u0430\u0448 \u0448\u0430\u0431\u043b\u043e\u043d.<\/p>\n<pre><code class=\"xml\">&lt;dependency&gt;    &lt;groupId&gt;io.github.hhdevr&lt;\/groupId&gt;    &lt;artifactId&gt;jasper-modular-starter&lt;\/artifactId&gt;    &lt;version&gt;3.0.0&lt;\/version&gt;&lt;\/dependency&gt;&lt;dependency&gt;    &lt;groupId&gt;net.sf.jasperreports&lt;\/groupId&gt;    &lt;artifactId&gt;jasperreports&lt;\/artifactId&gt;    &lt;version&gt;${jasperreports.version}&lt;\/version&gt;&lt;\/dependency&gt;<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:87px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0442\u043e\u0439 \u0436\u0435 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 JasperReports \u2014 \u043e\u043d \u0447\u0438\u0442\u0430\u0435\u0442 \u0438 \u043f\u0438\u0448\u0435\u0442 \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0435\u0451 API:<\/p>\n<pre><code class=\"xml\">&lt;plugin&gt;    &lt;groupId&gt;org.apache.maven.plugins&lt;\/groupId&gt;    &lt;artifactId&gt;maven-compiler-plugin&lt;\/artifactId&gt;    &lt;configuration&gt;        &lt;annotationProcessorPaths&gt;            &lt;path&gt;                &lt;groupId&gt;io.github.hhdevr&lt;\/groupId&gt;                &lt;artifactId&gt;jasper-modular-processor&lt;\/artifactId&gt;                &lt;version&gt;3.0.0&lt;\/version&gt;            &lt;\/path&gt;            &lt;path&gt;                &lt;groupId&gt;net.sf.jasperreports&lt;\/groupId&gt;                &lt;artifactId&gt;jasperreports&lt;\/artifactId&gt;                &lt;version&gt;${jasperreports.version}&lt;\/version&gt;            &lt;\/path&gt;        &lt;\/annotationProcessorPaths&gt;    &lt;\/configuration&gt;&lt;\/plugin&gt;<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0412 \u0441\u0435\u0434\u044c\u043c\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0434\u0432\u0438\u0436\u043a\u0430 \u044d\u043a\u0441\u043f\u043e\u0440\u0442 \u0432 PDF \u0432\u044b\u043d\u0435\u0441\u0435\u043d \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442 <code>jasperreports-pdf<\/code> \u2014 \u0432 \u0441\u0442\u0430\u0440\u0442\u0435\u0440 \u043e\u043d \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u043d\u043e \u043d\u0435 \u0432\u043a\u043b\u044e\u0447\u0451\u043d, \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0435\u0433\u043e \u0441\u0430\u043c\u0438. \u0418 \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u043f\u0430\u043a\u0435\u0442 \u0441 \u043e\u0442\u0447\u0451\u0442\u0430\u043c\u0438 \u0434\u043b\u044f \u043f\u0440\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043d\u0430 \u0441\u0442\u0430\u0440\u0442\u0435:<\/p>\n<pre><code class=\"yaml\">jasper:  modular:    base-package: com.example.reports<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h3>\u041c\u043e\u0434\u0443\u043b\u044c \u0438 \u043e\u0442\u0447\u0451\u0442<\/h3>\n<p>\u0421\u0443\u0431\u0440\u0435\u043f\u043e\u0440\u0442 \u2014 \u043a\u043b\u0430\u0441\u0441, \u0443\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043e\u0442 <code>SubreportModule<\/code> \u0438 \u043f\u043e\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u0439 <code>@JasperSubreport<\/code>:<\/p>\n<pre><code class=\"java\">@Getter@Setter@AllArgsConstructor@JasperSubreport(templatePath = \"\/reports\/sub_items.jrxml\")public class ItemsModule extends SubreportModule {    private List&lt;LineItem&gt; items;    private BigDecimal subtotal;    @Override    public boolean isEmpty() {        return items == null || items.isEmpty();    }}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><code>isEmpty()<\/code> \u0433\u043e\u0432\u043e\u0440\u0438\u0442, \u0447\u0442\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u0442\u044c \u043d\u0435\u0447\u0435\u0433\u043e: \u0442\u0430\u043a\u043e\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u2014 \u0432 \u043e\u0442\u0447\u0451\u0442 \u043d\u0435 \u0443\u0445\u043e\u0434\u044f\u0442 \u043d\u0438 \u0435\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d, \u043d\u0438 \u0435\u0433\u043e \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<p>\u041a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u043e\u0442\u0447\u0451\u0442 \u2014 \u043a\u043b\u0430\u0441\u0441 \u043e\u0442 <code>ModularReport<\/code> \u0441 <code>@JasperModularReport<\/code>. \u0415\u0433\u043e \u043f\u043e\u043b\u044f \u0438 \u0435\u0441\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043e\u0442\u0447\u0451\u0442\u0430:<\/p>\n<pre><code class=\"java\">@Getter@Setter@JasperModularReport(templatePath = \"\/reports\/invoice.jrxml\")public class InvoiceReport extends ModularReport {    private String customerName;    private String invoiceNumber;    private BigDecimal total;    private ItemsModule items;}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0413\u0435\u0442\u0442\u0435\u0440\u044b \u0438 \u0441\u0435\u0442\u0442\u0435\u0440\u044b \u0437\u0434\u0435\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430: \u043f\u043e\u043b\u044f \u043e\u0442\u0447\u0451\u0442\u043e\u0432 \u0438 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0440\u0430\u043d\u0442\u0430\u0439\u043c \u0447\u0438\u0442\u0430\u0435\u0442 \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u0435\u0439 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e. \u0413\u0435\u0442\u0442\u0435\u0440\u044b \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u2014 \u0443 \u043a\u043b\u0430\u0441\u0441\u043e\u0432-\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0439, \u043e\u0431 \u044d\u0442\u043e\u043c \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438.<\/p>\n<h3>\u0418\u043c\u0435\u043d\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u2014 \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u043f\u043e\u043b\u044f<\/h3>\n<p>\u0421\u043a\u0430\u043b\u044f\u0440\u044b \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0441 \u0442\u0435\u043c\u0438 \u0436\u0435 \u0438\u043c\u0435\u043d\u0430\u043c\u0438: <code>customerName<\/code>, <code>invoiceNumber<\/code>, <code>total<\/code>. \u0414\u043b\u044f \u043f\u043e\u043b\u044f <code>items<\/code> \u0442\u0438\u043f\u0430 <code>ItemsModule<\/code> \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u043e\u0442\u0447\u0451\u0442\u0430 \u043f\u043e\u044f\u0432\u044f\u0442\u0441\u044f \u0434\u0432\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430: <code>itemsReport<\/code> \u2014 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d \u043c\u043e\u0434\u0443\u043b\u044f \u0438 <code>itemsMapParameter<\/code> \u2014 \u043a\u0430\u0440\u0442\u0430 \u0435\u0433\u043e \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u0418\u043c\u044f \u0431\u0435\u0440\u0451\u0442\u0441\u044f \u0438\u0437 \u043f\u043e\u043b\u044f, \u0430 \u043d\u0435 \u0438\u0437 \u043a\u043b\u0430\u0441\u0441\u0430 \u043c\u043e\u0434\u0443\u043b\u044f. \u042d\u0442\u043e \u0432\u0430\u0436\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u043e\u0434\u0438\u043d \u043c\u043e\u0434\u0443\u043b\u044c \u0441\u0442\u043e\u0438\u0442 \u0432 \u043e\u0442\u0447\u0451\u0442\u0435 \u0434\u0432\u0430\u0436\u0434\u044b:<\/p>\n<pre><code class=\"java\">private AddressModule billTo;   \/\/ billToReport, billToMapParameterprivate AddressModule shipTo;   \/\/ shipToReport, shipToMapParameter<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0414\u0432\u0430 \u043f\u043e\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u2014 \u0434\u0432\u0430 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0445 \u0441\u0443\u0431\u0440\u0435\u043f\u043e\u0440\u0442\u0430 \u0441\u043e \u0441\u0432\u043e\u0438\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438. \u0415\u0441\u043b\u0438 \u0434\u0432\u0443\u043c \u043f\u043e\u043b\u044f\u043c \u0432\u0441\u0451-\u0442\u0430\u043a\u0438 \u0434\u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u043e \u0438\u043c\u044f \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u043b\u0435 \u0441 \u0442\u0435\u043c \u0436\u0435 \u0438\u043c\u0435\u043d\u0435\u043c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043e \u0438 \u0432 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435, \u2014 \u0441\u0431\u043e\u0440\u043a\u0430 \u0443\u043f\u0430\u0434\u0451\u0442 \u0438 \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u0442 \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u043e \u0438\u0437 \u043d\u0438\u0445.<\/p>\n<h3>\u0420\u0435\u043d\u0434\u0435\u0440<\/h3>\n<pre><code class=\"java\">InvoiceReport report = new InvoiceReport();report.setCustomerName(\"Acme Corp\");report.setInvoiceNumber(\"INV-001\");report.setTotal(new BigDecimal(\"1500.00\"));report.setItems(new ItemsModule(lineItems, subtotal));JasperPrint print = new JasperModularRenderer().render(report);byte[] pdf = JasperExportManager.exportReportToPdf(print);<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><code>render()<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 <code>JasperPrint<\/code>, \u0434\u0430\u043b\u044c\u0448\u0435 \u2014 \u043b\u044e\u0431\u043e\u0439 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0451\u0440 JasperReports: PDF, XLSX, HTML.<\/p>\n<h3>\u0427\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435<\/h3>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 <code>INJECT<\/code>:<\/p>\n<ol>\n<li>\n<p>\u041d\u0430\u0445\u043e\u0434\u0438\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0448\u0430\u0431\u043b\u043e\u043d \u2014 \u0432 <code>target\/classes<\/code>, \u043a\u0443\u0434\u0430 Maven \u043a\u043b\u0430\u0434\u0451\u0442 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0434\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438, \u0438\u043b\u0438 \u043d\u0430 \u0441\u0432\u043e\u0451\u043c classpath.<\/p>\n<\/li>\n<li>\n<p>\u0421\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u0435\u0433\u043e \u0441 \u043a\u043b\u0430\u0441\u0441\u043e\u043c \u0438 \u0434\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0442\u043e, \u0447\u0435\u0433\u043e \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442: \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u044b, \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0439, \u0431\u0430\u043d\u0434\u044b \u0441\u0443\u0431\u0440\u0435\u043f\u043e\u0440\u0442\u043e\u0432. \u0412\u0441\u0451, \u0447\u0442\u043e \u0443\u0436\u0435 \u0435\u0441\u0442\u044c, \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e \u0438\u043c\u0435\u043d\u0438 \u0438 \u043d\u0435 \u0442\u0440\u043e\u0433\u0430\u0435\u0442\u0441\u044f.<\/p>\n<\/li>\n<li>\n<p>\u0421\u0432\u0435\u0440\u044f\u0435\u0442 \u0448\u0430\u0431\u043b\u043e\u043d \u0441 \u043a\u043b\u0430\u0441\u0441\u043e\u043c \u2014 \u043e\u0431 \u044d\u0442\u043e\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u0435\u0440\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041a\u043b\u0430\u0434\u0451\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 <code>target\/generated-sources\/annotations<\/code> \u043f\u043e \u0442\u043e\u043c\u0443 \u0436\u0435 \u043f\u0443\u0442\u0438. \u0428\u0430\u0431\u043b\u043e\u043d \u0432 <code>src<\/code> \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442 \u043d\u0438\u043a\u043e\u0433\u0434\u0430.<\/p>\n<\/li>\n<\/ol>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u0432\u044b \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0435 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0432 Jaspersoft Studio, \u0440\u0430\u0441\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u043d\u043e\u0432\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0438 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442\u0435 \u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0432 <code>src\/main\/resources<\/code>. \u0415\u0441\u043b\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0435\u0449\u0451 \u043d\u0435\u0442, \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0438\u0442 \u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0437\u0430\u0433\u043e\u0442\u043e\u0432\u043a\u0443 \u0441 \u043d\u0443\u043b\u044f.<\/p>\n<p>\u0414\u043b\u044f \u043f\u043e\u043b\u044f <code>items<\/code> \u0432 \u0448\u0430\u0431\u043b\u043e\u043d \u043e\u0442\u0447\u0451\u0442\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u0441\u044f \u0432\u043e\u0442 \u0447\u0442\u043e (\u0441\u043e\u043a\u0440\u0430\u0449\u0451\u043d\u043d\u043e, \u0431\u0435\u0437 uuid):<\/p>\n<pre><code class=\"xml\">&lt;parameter name=\"itemsReport\" class=\"net.sf.jasperreports.engine.JasperReport\"\/&gt;&lt;parameter name=\"itemsMapParameter\" class=\"java.util.Map\"\/&gt;&lt;band height=\"100\" splitType=\"Stretch\"&gt;    &lt;subreport&gt;        &lt;reportElement positionType=\"Float\" x=\"0\" y=\"0\" width=\"555\" height=\"100\" isRemoveLineWhenBlank=\"true\"\/&gt;        &lt;parametersMapExpression&gt;&lt;![CDATA[$P{itemsMapParameter}]]&gt;&lt;\/parametersMapExpression&gt;        &lt;dataSourceExpression&gt;&lt;![CDATA[new net.sf.jasperreports.engine.JREmptyDataSource()]]&gt;&lt;\/dataSourceExpression&gt;        &lt;subreportExpression&gt;&lt;![CDATA[$P{itemsReport}]]&gt;&lt;\/subreportExpression&gt;    &lt;\/subreport&gt;&lt;\/band&gt;<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c, \u0440\u0430\u0434\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u0441\u0451 \u0437\u0430\u0442\u0435\u0432\u0430\u043b\u043e\u0441\u044c. \u0421\u0443\u0431\u0440\u0435\u043f\u043e\u0440\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0440\u043e\u0432\u043d\u043e \u0434\u0432\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u2014 \u0441\u0432\u043e\u0439 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d \u0438 \u043e\u0434\u043d\u0443 \u043a\u0430\u0440\u0442\u0443, \u0430 JasperReports \u0441\u0430\u043c \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u043a\u0430\u0440\u0442\u0443 \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0443\u0431\u0440\u0435\u043f\u043e\u0440\u0442\u0430: \u044d\u0442\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c <code>REPORT_PARAMETERS_MAP<\/code>, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u0430\u043b\u043e \u043a\u0442\u043e \u0437\u043d\u0430\u0435\u0442. \u0412 <code>sub_items.jrxml<\/code> \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u044b \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b <code>items<\/code> \u0438 <code>subtotal<\/code> \u2014 \u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u0442\u043e\u0436\u0435 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b, \u0438\u0437 \u043f\u043e\u043b\u0435\u0439 <code>ItemsModule<\/code>. \u041d\u0438\u043a\u0430\u043a\u0438\u0445 <code>&lt;subreportParameter&gt;<\/code> \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0435 \u043f\u043e\u043b\u0435.<\/p>\n<p>\u0420\u0435\u0436\u0438\u043c \u0437\u0430\u0434\u0430\u0451\u0442\u0441\u044f \u0432 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438: <code>INJECT<\/code> \u2014 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u043a\u0430\u043a \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432\u044b\u0448\u0435; <code>CREATE<\/code> \u2014 \u043d\u043e\u0432\u0430\u044f \u0437\u0430\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0441 \u0447\u0438\u0441\u0442\u043e\u0433\u043e \u043b\u0438\u0441\u0442\u0430, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0448\u0430\u0431\u043b\u043e\u043d \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u043e\u0440\u0438\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0431\u0435\u0440\u0451\u0442\u0441\u044f \u0438\u0437 <code>orientation<\/code>; <code>NONE<\/code> \u2014 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u043a\u043b\u0430\u0441\u0441 \u043d\u0435 \u0442\u0440\u043e\u0433\u0430\u0435\u0442 \u0438 \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442.<\/p>\n<h3>\u041a\u0442\u043e \u0432\u043b\u0430\u0434\u0435\u0435\u0442 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u043f\u0438\u0448\u0435\u0442 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d, \u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u043f\u0440\u0430\u0432\u0438\u0442 \u0442\u043e\u0442 \u0436\u0435 \u0448\u0430\u0431\u043b\u043e\u043d \u0432 Studio, \u0447\u0435\u0439 \u044d\u0442\u043e \u0444\u0430\u0439\u043b? \u042d\u0442\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0432 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u044e\u0442 \u0440\u0443\u043a\u0430\u043c\u0438, \u0442\u0430\u043a \u0447\u0442\u043e \u0441\u0442\u043e\u0438\u0442 \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u0435\u043b\u0438\u0442 \u0440\u0430\u0431\u043e\u0442\u0443.<\/p>\n<p>\u0428\u0430\u0431\u043b\u043e\u043d \u0432 <code>src\/main\/resources<\/code> \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0438\u0442 \u043b\u044e\u0434\u044f\u043c: \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0443 \u0438 \u0442\u043e\u043c\u0443, \u043a\u0442\u043e \u0432\u0435\u0440\u0441\u0442\u0430\u0435\u0442 \u043e\u0442\u0447\u0451\u0442. \u041f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u0442\u0443\u0434\u0430 \u043d\u0435 \u043f\u0438\u0448\u0435\u0442 \u043d\u0438\u043a\u043e\u0433\u0434\u0430. \u041f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u043e\u043d \u0431\u0435\u0440\u0451\u0442 \u0448\u0430\u0431\u043b\u043e\u043d, \u0434\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u044e\u0449\u0438\u0439 \u0432\u0430\u0439\u0440\u0438\u043d\u0433 \u0438 \u043a\u043b\u0430\u0434\u0451\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 <code>target\/generated-sources<\/code>. \u0412\u0441\u0451, \u0447\u0442\u043e \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c, \u043e\u043d \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u043f\u043e \u0438\u043c\u0435\u043d\u0438 \u0438 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u0430\u043a \u0431\u044b\u043b\u043e, \u0442\u0430\u043a \u0447\u0442\u043e \u0432\u0451\u0440\u0441\u0442\u043a\u0430, \u0441\u0442\u0438\u043b\u0438 \u0438 \u0440\u0430\u0441\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0440\u0443\u043a\u0430\u043c\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043d\u0435 \u0442\u0440\u043e\u0433\u0430\u044e\u0442\u0441\u044f. \u041a\u043b\u0430\u0441\u0441 \u0432\u043b\u0430\u0434\u0435\u0435\u0442 \u0438\u043c\u0435\u043d\u0430\u043c\u0438 \u0438 \u0432\u0430\u0439\u0440\u0438\u043d\u0433\u043e\u043c, \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0432 Studio \u2014 \u0432\u0451\u0440\u0441\u0442\u043a\u043e\u0439.<\/p>\n<p>\u0421\u043b\u0430\u0431\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u2014 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0439 \u043f\u0443\u0442\u044c. \u0421\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d \u0432 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043d\u0443\u0436\u043d\u043e \u0440\u0443\u043a\u0430\u043c\u0438, \u0438 \u0441\u0431\u043e\u0440\u043a\u0430 \u044d\u0442\u043e\u0442 \u0448\u0430\u0433 \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442: \u0437\u0430\u0431\u044b\u043b\u0438 \u2014 \u043d\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0432 \u043e\u0442\u0447\u0451\u0442\u0435. \u041f\u043b\u044e\u0441 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0444\u0430\u0439\u043b \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u0432 \u0441\u0432\u043e\u0451\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u0438\u0444 \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u0441\u0430\u043c\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435, \u0447\u0442\u043e \u044f \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u044e \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435, \u2014 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u043e\u043d\u044f\u0435\u0442 \u0441\u0431\u043e\u0440\u043a\u0443, \u0435\u0441\u043b\u0438 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u0438\u0437 <code>src<\/code> \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0432\u0430\u0439\u0440\u0438\u043d\u0433\u0430 \u0434\u043b\u044f \u043f\u043e\u043b\u044f.<\/p>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u2014 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438, \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0435\u0441\u044f \u0441\u0443\u0431\u0440\u0435\u043f\u043e\u0440\u0442\u044b, \u0447\u0442\u043e \u0440\u043e\u043d\u044f\u0435\u0442 \u0441\u0431\u043e\u0440\u043a\u0443 \u0438 \u043a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d \u0440\u0430\u043d\u0442\u0430\u0439\u043c.<\/p>\n<p>\u041a\u043e\u0434 \u2014 <a href=\"https:\/\/github.com\/hhdevr\/jasper-modular-library\" rel=\"noopener nofollow\">github.com\/hhdevr\/jasper-modular-library<\/a>, \u043f\u0440\u0438\u043c\u0435\u0440 \u2014 <a href=\"https:\/\/github.com\/hhdevr\/jasper-modular-sample\" rel=\"noopener nofollow\">github.com\/hhdevr\/jasper-modular-sample<\/a>.<\/p>\n<\/div>\n<p>\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/1086826\/\">https:\/\/habr.com\/ru\/articles\/1086826\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u042d\u0442\u043e \u0442\u0440\u0435\u0442\u044c\u044f \u0447\u0430\u0441\u0442\u044c. \u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u2014 \u043e\u0442\u043a\u0443\u0434\u0430 \u0432\u0437\u044f\u043b\u0441\u044f JasperReports \u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u0435\u043c\u0443 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u043b\u043e \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u2014 \u043e\u0434\u0438\u043d \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u0438 \u0442\u0440\u0438 \u0438\u0434\u0435\u0438, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430. \u0414\u0430\u043b\u044c\u0448\u0435 \u0438\u0434\u0451\u0442 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430, \u043f\u043e \u043e\u0434\u043d\u043e\u0439 \u0442\u0435\u043c\u0435 \u043d\u0430 \u0447\u0430\u0441\u0442\u044c. \u0417\u0434\u0435\u0441\u044c \u2014 \u043a\u0430\u043a \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443, \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0435\u0440\u0432\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0439 \u043e\u0442\u0447\u0451\u0442 \u0438 \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435.\u0412\u0441\u0451 \u043d\u0438\u0436\u0435 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043a \u0432\u0435\u0440\u0441\u0438\u0438 3.0.0. \u041f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 2.0.x \u0432 \u043d\u0435\u0439 \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0435\u0441\u044f \u0441\u0443\u0431\u0440\u0435\u043f\u043e\u0440\u0442\u044b \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u043e\u0432 \u043c\u043e\u0434\u0443\u043b\u0435\u0439, \u043f\u0440\u043e\u043f\u0443\u0441\u043a \u043f\u0443\u0441\u0442\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439, \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u044b \u0434\u043b\u044f \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0439 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438 \u0441\u0432\u0435\u0440\u043a\u0430 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0441 \u043a\u043b\u0430\u0441\u0441\u043e\u043c \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435, \u0430 \u0438\u043c\u0435\u043d\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0442\u0435\u043f\u0435\u0440\u044c \u0431\u0435\u0440\u0443\u0442\u0441\u044f \u0438\u0437 \u043f\u043e\u043b\u0435\u0439. \u041f\u0440\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u0441 2.0.x \u2014 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0435\u0440\u0438\u0438.\u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f: Java 17+ \u0438 JasperReports 6.x \u0438\u043b\u0438 7.x \u2014 \u0432\u0435\u0440\u0441\u0438\u044e \u0434\u0432\u0438\u0436\u043a\u0430 \u0437\u0430\u0434\u0430\u0451\u0442\u0435 \u0432\u044b. \u0410\u0432\u0442\u043e\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0438 \u043f\u0440\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u043f\u0440\u0438\u0435\u0437\u0436\u0430\u044e\u0442 \u0441\u043e \u0441\u0442\u0430\u0440\u0442\u0435\u0440\u043e\u043c, \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u043c \u043f\u043e\u0434 Spring Boot 3.3; \u044f\u0434\u0440\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043e\u0442 Spring \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u0432\u043e\u0432\u0441\u0435 \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u0431\u0435\u0437 \u043d\u0435\u0433\u043e.\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u0421\u0442\u0430\u0440\u0442\u0435\u0440 \u043f\u0440\u0438\u043d\u043e\u0441\u0438\u0442 \u044f\u0434\u0440\u043e, \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u0438 \u0430\u0432\u0442\u043e\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e, \u0430 \u0437\u0430\u043e\u0434\u043d\u043e \u0438 \u0441\u0430\u043c JasperReports: \u0432 \u0432\u0435\u0440\u0441\u0438\u0438 3.0.0 \u0434\u0432\u0438\u0436\u043e\u043a \u043f\u0440\u0438\u0435\u0437\u0436\u0430\u0435\u0442 \u0442\u0440\u0430\u043d\u0437\u0438\u0442\u0438\u0432\u043d\u043e, \u0432\u0435\u0440\u0441\u0438\u0438 7.0.6. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0439\u0442\u0435 \u0435\u0433\u043e \u044f\u0432\u043d\u043e \u0438 \u0442\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0443\u0436\u043d\u0430 \u0432\u0430\u043c \u2014 \u043f\u0440\u044f\u043c\u0430\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0431\u0438\u0432\u0430\u0435\u0442 \u0442\u0440\u0430\u043d\u0437\u0438\u0442\u0438\u0432\u043d\u0443\u044e. \u042d\u0442\u043e \u043d\u0435 \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c: \u0434\u0438\u0430\u043b\u0435\u043a\u0442\u044b JRXML \u0443 \u0448\u0435\u0441\u0442\u043e\u0439 \u0438 \u0441\u0435\u0434\u044c\u043c\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0439 \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b, \u0438 \u0432\u0435\u0440\u0441\u0438\u044f \u0434\u0432\u0438\u0436\u043a\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u0432 \u043a\u0430\u043a\u043e\u043c \u0438\u0437 \u043d\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u043d\u0430\u043f\u0438\u0448\u0435\u0442 \u0432\u0430\u0448 \u0448\u0430\u0431\u043b\u043e\u043d.&lt;dependency&gt;    &lt;groupId&gt;io.github.hhdevr&lt;\/groupId&gt;    &lt;artifactId&gt;jasper-modular-starter&lt;\/artifactId&gt;    &lt;version&gt;3.0.0&lt;\/version&gt;&lt;\/dependency&gt;&lt;dependency&gt;    &lt;groupId&gt;net.sf.jasperreports&lt;\/groupId&gt;    &lt;artifactId&gt;jasperreports&lt;\/artifactId&gt;    &lt;version&gt;${jasperreports.version}&lt;\/version&gt;&lt;\/dependency&gt;\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0442\u043e\u0439 \u0436\u0435 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 JasperReports \u2014 \u043e\u043d \u0447\u0438\u0442\u0430\u0435\u0442 \u0438 \u043f\u0438\u0448\u0435\u0442 \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0435\u0451 API:&lt;plugin&gt;    &lt;groupId&gt;org.apache.maven.plugins&lt;\/groupId&gt;    &lt;artifactId&gt;maven-compiler-plugin&lt;\/artifactId&gt;    &lt;configuration&gt;        &lt;annotationProcessorPaths&gt;            &lt;path&gt;                &lt;groupId&gt;io.github.hhdevr&lt;\/groupId&gt;                &lt;artifactId&gt;jasper-modular-processor&lt;\/artifactId&gt;                &lt;version&gt;3.0.0&lt;\/version&gt;            &lt;\/path&gt;            &lt;path&gt;                &lt;groupId&gt;net.sf.jasperreports&lt;\/groupId&gt;                &lt;artifactId&gt;jasperreports&lt;\/artifactId&gt;                &lt;version&gt;${jasperreports.version}&lt;\/version&gt;            &lt;\/path&gt;        &lt;\/annotationProcessorPaths&gt;    &lt;\/configuration&gt;&lt;\/plugin&gt;\u0412 \u0441\u0435\u0434\u044c\u043c\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0434\u0432\u0438\u0436\u043a\u0430 \u044d\u043a\u0441\u043f\u043e\u0440\u0442 \u0432 PDF \u0432\u044b\u043d\u0435\u0441\u0435\u043d \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442 jasperreports-pdf \u2014 \u0432 \u0441\u0442\u0430\u0440\u0442\u0435\u0440 \u043e\u043d \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u043d\u043e \u043d\u0435 \u0432\u043a\u043b\u044e\u0447\u0451\u043d, \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0435\u0433\u043e \u0441\u0430\u043c\u0438. \u0418 \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u043f\u0430\u043a\u0435\u0442 \u0441 \u043e\u0442\u0447\u0451\u0442\u0430\u043c\u0438 \u0434\u043b\u044f \u043f\u0440\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043d\u0430 \u0441\u0442\u0430\u0440\u0442\u0435:jasper:  modular:    base-package: com.example.reports\u041c\u043e\u0434\u0443\u043b\u044c \u0438 \u043e\u0442\u0447\u0451\u0442\u0421\u0443\u0431\u0440\u0435\u043f\u043e\u0440\u0442 \u2014 \u043a\u043b\u0430\u0441\u0441, \u0443\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043e\u0442 SubreportModule \u0438 \u043f\u043e\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u0439 @JasperSubreport:@Getter@Setter@AllArgsConstructor@JasperSubreport(templatePath = &#171;\/reports\/sub_items.jrxml&#187;)public class ItemsModule extends SubreportModule {    private List&lt;LineItem&gt; items;    private BigDecimal subtotal;    @Override    public boolean isEmpty() {        return items == null || items.isEmpty();    }}isEmpty() \u0433\u043e\u0432\u043e\u0440\u0438\u0442, \u0447\u0442\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u0442\u044c \u043d\u0435\u0447\u0435\u0433\u043e: \u0442\u0430\u043a\u043e\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u2014 \u0432 \u043e\u0442\u0447\u0451\u0442 \u043d\u0435 \u0443\u0445\u043e\u0434\u044f\u0442 \u043d\u0438 \u0435\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d, \u043d\u0438 \u0435\u0433\u043e \u0434\u0430\u043d\u043d\u044b\u0435.\u041a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u043e\u0442\u0447\u0451\u0442 \u2014 \u043a\u043b\u0430\u0441\u0441 \u043e\u0442 ModularReport \u0441 @JasperModularReport. \u0415\u0433\u043e \u043f\u043e\u043b\u044f \u0438 \u0435\u0441\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043e\u0442\u0447\u0451\u0442\u0430:@Getter@Setter@JasperModularReport(templatePath = &#171;\/reports\/invoice.jrxml&#187;)public class InvoiceReport extends ModularReport {    private String customerName;    private String invoiceNumber;    private BigDecimal total;    private ItemsModule items;}\u0413\u0435\u0442\u0442\u0435\u0440\u044b \u0438 \u0441\u0435\u0442\u0442\u0435\u0440\u044b \u0437\u0434\u0435\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430: \u043f\u043e\u043b\u044f \u043e\u0442\u0447\u0451\u0442\u043e\u0432 \u0438 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0440\u0430\u043d\u0442\u0430\u0439\u043c \u0447\u0438\u0442\u0430\u0435\u0442 \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u0435\u0439 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e. \u0413\u0435\u0442\u0442\u0435\u0440\u044b \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u2014 \u0443 \u043a\u043b\u0430\u0441\u0441\u043e\u0432-\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0439, \u043e\u0431 \u044d\u0442\u043e\u043c \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438.\u0418\u043c\u0435\u043d\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u2014 \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u043f\u043e\u043b\u044f\u0421\u043a\u0430\u043b\u044f\u0440\u044b \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0441 \u0442\u0435\u043c\u0438 \u0436\u0435 \u0438\u043c\u0435\u043d\u0430\u043c\u0438: customerName, invoiceNumber, total. \u0414\u043b\u044f \u043f\u043e\u043b\u044f items \u0442\u0438\u043f\u0430 ItemsModule \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u043e\u0442\u0447\u0451\u0442\u0430 \u043f\u043e\u044f\u0432\u044f\u0442\u0441\u044f \u0434\u0432\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430: itemsReport \u2014 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d \u043c\u043e\u0434\u0443\u043b\u044f \u0438 itemsMapParameter \u2014 \u043a\u0430\u0440\u0442\u0430 \u0435\u0433\u043e \u0434\u0430\u043d\u043d\u044b\u0445.\u0418\u043c\u044f \u0431\u0435\u0440\u0451\u0442\u0441\u044f \u0438\u0437 \u043f\u043e\u043b\u044f, \u0430 \u043d\u0435 \u0438\u0437 \u043a\u043b\u0430\u0441\u0441\u0430 \u043c\u043e\u0434\u0443\u043b\u044f. \u042d\u0442\u043e \u0432\u0430\u0436\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u043e\u0434\u0438\u043d \u043c\u043e\u0434\u0443\u043b\u044c \u0441\u0442\u043e\u0438\u0442 \u0432 \u043e\u0442\u0447\u0451\u0442\u0435 \u0434\u0432\u0430\u0436\u0434\u044b:private AddressModule billTo;   \/\/ billToReport, billToMapParameterprivate AddressModule shipTo;   \/\/ shipToReport, shipToMapParameter\u0414\u0432\u0430 \u043f\u043e\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u2014 \u0434\u0432\u0430 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0445 \u0441\u0443\u0431\u0440\u0435\u043f\u043e\u0440\u0442\u0430 \u0441\u043e \u0441\u0432\u043e\u0438\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438. \u0415\u0441\u043b\u0438 \u0434\u0432\u0443\u043c \u043f\u043e\u043b\u044f\u043c \u0432\u0441\u0451-\u0442\u0430\u043a\u0438 \u0434\u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u043e \u0438\u043c\u044f \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u043b\u0435 \u0441 \u0442\u0435\u043c \u0436\u0435 \u0438\u043c\u0435\u043d\u0435\u043c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043e \u0438 \u0432 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435, \u2014 \u0441\u0431\u043e\u0440\u043a\u0430 \u0443\u043f\u0430\u0434\u0451\u0442 \u0438 \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u0442 \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u043e \u0438\u0437 \u043d\u0438\u0445.\u0420\u0435\u043d\u0434\u0435\u0440InvoiceReport report = new InvoiceReport();report.setCustomerName(&#171;Acme Corp&#187;);report.setInvoiceNumber(&#171;INV-001&#187;);report.setTotal(new BigDecimal(&#171;1500.00&#8243;));report.setItems(new ItemsModule(lineItems, subtotal));JasperPrint print = new JasperModularRenderer().render(report);byte[] pdf = JasperExportManager.exportReportToPdf(print);render() \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 JasperPrint, \u0434\u0430\u043b\u044c\u0448\u0435 \u2014 \u043b\u044e\u0431\u043e\u0439 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0451\u0440 JasperReports: PDF, XLSX, HTML.\u0427\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 INJECT:\u041d\u0430\u0445\u043e\u0434\u0438\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0448\u0430\u0431\u043b\u043e\u043d \u2014 \u0432 target\/classes, \u043a\u0443\u0434\u0430 Maven \u043a\u043b\u0430\u0434\u0451\u0442 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0434\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438, \u0438\u043b\u0438 \u043d\u0430 \u0441\u0432\u043e\u0451\u043c classpath.\u0421\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u0435\u0433\u043e \u0441 \u043a\u043b\u0430\u0441\u0441\u043e\u043c \u0438 \u0434\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0442\u043e, \u0447\u0435\u0433\u043e \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442: \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u044b, \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0439, \u0431\u0430\u043d\u0434\u044b \u0441\u0443\u0431\u0440\u0435\u043f\u043e\u0440\u0442\u043e\u0432. \u0412\u0441\u0451, \u0447\u0442\u043e \u0443\u0436\u0435 \u0435\u0441\u0442\u044c, \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e \u0438\u043c\u0435\u043d\u0438 \u0438 \u043d\u0435 \u0442\u0440\u043e\u0433\u0430\u0435\u0442\u0441\u044f.\u0421\u0432\u0435\u0440\u044f\u0435\u0442 \u0448\u0430\u0431\u043b\u043e\u043d \u0441 \u043a\u043b\u0430\u0441\u0441\u043e\u043c \u2014 \u043e\u0431 \u044d\u0442\u043e\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u0435\u0440\u0438\u0438.\u041a\u043b\u0430\u0434\u0451\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 target\/generated-sources\/annotations \u043f\u043e \u0442\u043e\u043c\u0443 \u0436\u0435 \u043f\u0443\u0442\u0438. \u0428\u0430\u0431\u043b\u043e\u043d \u0432 src \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442 \u043d\u0438\u043a\u043e\u0433\u0434\u0430.\u0414\u0430\u043b\u044c\u0448\u0435 \u0432\u044b \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0435 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0432 Jaspersoft Studio, \u0440\u0430\u0441\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u043d\u043e\u0432\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0438 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442\u0435 \u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0432 src\/main\/resources. \u0415\u0441\u043b\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0435\u0449\u0451 \u043d\u0435\u0442, \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0438\u0442 \u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0437\u0430\u0433\u043e\u0442\u043e\u0432\u043a\u0443 \u0441 \u043d\u0443\u043b\u044f.\u0414\u043b\u044f \u043f\u043e\u043b\u044f items \u0432 \u0448\u0430\u0431\u043b\u043e\u043d \u043e\u0442\u0447\u0451\u0442\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u0441\u044f \u0432\u043e\u0442 \u0447\u0442\u043e (\u0441\u043e\u043a\u0440\u0430\u0449\u0451\u043d\u043d\u043e, \u0431\u0435\u0437 uuid):&lt;parameter name=&#187;itemsReport&#187; class=&#187;net.sf.jasperreports.engine.JasperReport&#187;\/&gt;&lt;parameter name=&#187;itemsMapParameter&#187; class=&#187;java.util.Map&#187;\/&gt;&lt;band height=&#187;100&#8243; splitType=&#187;Stretch&#187;&gt;    &lt;subreport&gt;        &lt;reportElement positionType=&#187;Float&#187; x=&#187;0&#8243; y=&#187;0&#8243; width=&#187;555&#8243; height=&#187;100&#8243; isRemoveLineWhenBlank=&#187;true&#187;\/&gt;        &lt;parametersMapExpression&gt;&lt;![CDATA[$P{itemsMapParameter}]]&gt;&lt;\/parametersMapExpression&gt;        &lt;dataSourceExpression&gt;&lt;![CDATA[new net.sf.jasperreports.engine.JREmptyDataSource()]]&gt;&lt;\/dataSourceExpression&gt;        &lt;subreportExpression&gt;&lt;![CDATA[$P{itemsReport}]]&gt;&lt;\/subreportExpression&gt;    &lt;\/subreport&gt;&lt;\/band&gt;\u0417\u0434\u0435\u0441\u044c \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c, \u0440\u0430\u0434\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u0441\u0451 \u0437\u0430\u0442\u0435\u0432\u0430\u043b\u043e\u0441\u044c. \u0421\u0443\u0431\u0440\u0435\u043f\u043e\u0440\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0440\u043e\u0432\u043d\u043e \u0434\u0432\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u2014 \u0441\u0432\u043e\u0439 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d \u0438 \u043e\u0434\u043d\u0443 \u043a\u0430\u0440\u0442\u0443, \u0430 JasperReports \u0441\u0430\u043c \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u043a\u0430\u0440\u0442\u0443 \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0443\u0431\u0440\u0435\u043f\u043e\u0440\u0442\u0430: \u044d\u0442\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c REPORT_PARAMETERS_MAP, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u0430\u043b\u043e \u043a\u0442\u043e \u0437\u043d\u0430\u0435\u0442. \u0412 sub_items.jrxml \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u044b \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b items \u0438 subtotal \u2014 \u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u0442\u043e\u0436\u0435 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b, \u0438\u0437 \u043f\u043e\u043b\u0435\u0439 ItemsModule. \u041d\u0438\u043a\u0430\u043a\u0438\u0445 &lt;subreportParameter&gt; \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0435 \u043f\u043e\u043b\u0435.\u0420\u0435\u0436\u0438\u043c \u0437\u0430\u0434\u0430\u0451\u0442\u0441\u044f \u0432 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438: INJECT \u2014 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u043a\u0430\u043a \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432\u044b\u0448\u0435; CREATE \u2014 \u043d\u043e\u0432\u0430\u044f \u0437\u0430\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0441 \u0447\u0438\u0441\u0442\u043e\u0433\u043e \u043b\u0438\u0441\u0442\u0430, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0448\u0430\u0431\u043b\u043e\u043d \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u043e\u0440\u0438\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0431\u0435\u0440\u0451\u0442\u0441\u044f \u0438\u0437 orientation; NONE \u2014 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u043a\u043b\u0430\u0441\u0441 \u043d\u0435 \u0442\u0440\u043e\u0433\u0430\u0435\u0442 \u0438 \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442.\u041a\u0442\u043e \u0432\u043b\u0430\u0434\u0435\u0435\u0442 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c\u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u043f\u0438\u0448\u0435\u0442 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d, \u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u043f\u0440\u0430\u0432\u0438\u0442 \u0442\u043e\u0442 \u0436\u0435 \u0448\u0430\u0431\u043b\u043e\u043d \u0432 Studio, \u0447\u0435\u0439 \u044d\u0442\u043e \u0444\u0430\u0439\u043b? \u042d\u0442\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0432 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u044e\u0442 \u0440\u0443\u043a\u0430\u043c\u0438, \u0442\u0430\u043a \u0447\u0442\u043e \u0441\u0442\u043e\u0438\u0442 \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u0435\u043b\u0438\u0442 \u0440\u0430\u0431\u043e\u0442\u0443.\u0428\u0430\u0431\u043b\u043e\u043d \u0432 src\/main\/resources \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0438\u0442 \u043b\u044e\u0434\u044f\u043c: \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0443 \u0438 \u0442\u043e\u043c\u0443, \u043a\u0442\u043e \u0432\u0435\u0440\u0441\u0442\u0430\u0435\u0442 \u043e\u0442\u0447\u0451\u0442. \u041f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u0442\u0443\u0434\u0430 \u043d\u0435 \u043f\u0438\u0448\u0435\u0442 \u043d\u0438\u043a\u043e\u0433\u0434\u0430. \u041f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u043e\u043d \u0431\u0435\u0440\u0451\u0442 \u0448\u0430\u0431\u043b\u043e\u043d, \u0434\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u044e\u0449\u0438\u0439 \u0432\u0430\u0439\u0440\u0438\u043d\u0433 \u0438 \u043a\u043b\u0430\u0434\u0451\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 target\/generated-sources. \u0412\u0441\u0451, \u0447\u0442\u043e \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c, \u043e\u043d \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u043f\u043e \u0438\u043c\u0435\u043d\u0438 \u0438 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u0430\u043a \u0431\u044b\u043b\u043e, \u0442\u0430\u043a \u0447\u0442\u043e \u0432\u0451\u0440\u0441\u0442\u043a\u0430, \u0441\u0442\u0438\u043b\u0438 \u0438 \u0440\u0430\u0441\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0440\u0443\u043a\u0430\u043c\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043d\u0435 \u0442\u0440\u043e\u0433\u0430\u044e\u0442\u0441\u044f. \u041a\u043b\u0430\u0441\u0441 \u0432\u043b\u0430\u0434\u0435\u0435\u0442 \u0438\u043c\u0435\u043d\u0430\u043c\u0438 \u0438 \u0432\u0430\u0439\u0440\u0438\u043d\u0433\u043e\u043c, \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0432 Studio \u2014 \u0432\u0451\u0440\u0441\u0442\u043a\u043e\u0439.\u0421\u043b\u0430\u0431\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u2014 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0439 \u043f\u0443\u0442\u044c. \u0421\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d \u0432 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043d\u0443\u0436\u043d\u043e \u0440\u0443\u043a\u0430\u043c\u0438, \u0438 \u0441\u0431\u043e\u0440\u043a\u0430 \u044d\u0442\u043e\u0442 \u0448\u0430\u0433 \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442: \u0437\u0430\u0431\u044b\u043b\u0438 \u2014 \u043d\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0432 \u043e\u0442\u0447\u0451\u0442\u0435. \u041f\u043b\u044e\u0441 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0444\u0430\u0439\u043b \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u0432 \u0441\u0432\u043e\u0451\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u0438\u0444 \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u0441\u0430\u043c\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435, \u0447\u0442\u043e \u044f \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u044e \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435, \u2014 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u043e\u043d\u044f\u0435\u0442 \u0441\u0431\u043e\u0440\u043a\u0443, \u0435\u0441\u043b\u0438 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u0438\u0437 src \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0432\u0430\u0439\u0440\u0438\u043d\u0433\u0430 \u0434\u043b\u044f \u043f\u043e\u043b\u044f.\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u2014 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438, \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0435\u0441\u044f \u0441\u0443\u0431\u0440\u0435\u043f\u043e\u0440\u0442\u044b, \u0447\u0442\u043e \u0440\u043e\u043d\u044f\u0435\u0442 \u0441\u0431\u043e\u0440\u043a\u0443 \u0438 \u043a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d \u0440\u0430\u043d\u0442\u0430\u0439\u043c.\u041a\u043e\u0434 \u2014 github.com\/hhdevr\/jasper-modular-library, \u043f\u0440\u0438\u043c\u0435\u0440 \u2014 github.com\/hhdevr\/jasper-modular-sample.\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 https:\/\/habr.com\/ru\/articles\/1086826\/<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-496134","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/496134","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=496134"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/496134\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=496134"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=496134"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=496134"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}