We need to send a letter by mail with an adhesive emblem for the citizen’s car.
Our intention was creating a report, filtering recipients by a query, with a doc template, but only first record is correctly merged and next pages are empty. We tried all kind of horitzontal and vertical band orientation.
When we changed the doc template with a xls template, all records are correctly merged in the spreadsheet.
Is there any restriction to do this mass mailing with reporting add-on?.
Dataset ‘Lot’ in ‘Principal’ band groups records by citizen’s name, address, city and postal code filtered by a shipping batch.
Dataset ‘Matricules’ in Detall band obtains all license plates registered by the citizen in this address, city and postal code.
When the report is executed with an excel template, bands are copied downwards and all citizens selected with their license plates are in the same excel worksheet.
On the other hand, if the report is executed with a word template (doc), only first combinated document contains data from first selected citizen and for the rest of people the combinated document are empty.
Unfortunately, nested bands are not supported for DOC and DOCX templates.
I think you can create a DOCX report that prints an information about a single principal and a collection of their details.
Then you can create a service which accepts a “lot” as a parameter. The service will perform a query, load all principals by a lot. Then the service will execute a DOCX report several times for each principal. As a result you’ll get a collection of PDF files. After that just merge these PDF files into a single PDF file using any java library, e.g. PDFBox.