Import
Ways out for named elements
What to do by hand for each element that brevier import names and leaves out, with the template, CSS and schema changes for each.
On this page
When the import prints Not converted: line 41: crosstab, the element is left
out of the template. This page says what you do for each kind. The table on the
JasperReports
page links each element to a section below.
Nested list
A subreport, a crosstab and a subDataset show rows inside rows. Your code
builds the inner list and puts it in each row, for example under details. In
the template, a second loop reads it: {{#each details}} ... {{/each}} inside
{{#each rows}}. Add details to the rows items of the schema. The engine
rejects a field that the schema does not list.
Group by hand
For a group on an expression, your code puts the value of the expression in each
row as a new field, such as monat. The template groups by that field:
{{#group rows.monat}}
<tr class="brevier-group-header"><td colspan="5">{{@key}}</td></tr>
{{#each rows}}
<tr><td>{{buchungstag}}</td><td>{{betrag | money}}</td></tr>
{{/each}}
{{/group}}Add the field to the rows items of the schema. For keepTogether, write
break-inside: avoid for the rows of the group in the CSS. A field other than
the group field has one value for each row, not for each group, so print it in
the rows.
Image from the application
A chart, a barcode, a genericElement and an image without a source are images
that your application makes. Pass the image as a data URI (text that holds the
image) in a root such as chart, add chart as a string to the schema, and
write <img src="{{chart}}"> in the template. For onErrorType="Blank", pass
an empty value when the image is missing, and write
{{#if chart}}<img src="{{chart}}">{{/if}}.
Value from the application
A variable with another calculation, a pattern that no formatter writes, a
method, arithmetic, a minus sign, !, a text from a resource bundle ($R{...})
and a condition with &&, || or a comparison of two fields have no template
syntax. Your code computes the value and passes it. The template prints
{{summe}} or tests {{#if zeigeHinweis}}. Add each new root to the schema.
Other ways out
| Element | What you do |
|---|---|
ellipse |
A div with border: 1pt solid #000; border-radius: 50% in the CSS. |
break |
An empty div with break-before: page in the CSS. |
elementGroup |
Remove the group in the .jrxml and import the report again. |
noData |
Write its text as the {{else}} of the loop: {{#each rows}} ... {{else}} ... {{/each}}. |
line or rectangle in the detail band |
A CSS border on the cells: tbody td { border-bottom: 0.5pt solid #000; }. |
lastPageFooter |
Write its text after the table. It prints after the last row, not at the bottom of the page. |
background |
@page { background: url("hintergrund.png") no-repeat center; } in the CSS. |
Next: Replace the call.