Composite element example in Jaspersoft Reports

Sadakar Pochampalli
JasperSoft BI Suite Tutorials - Sadakar Pochampalli )


Composite element allow to create a new element in the palette starting from one or more basic elements, and reuse them whenever you want in any report.

As shown in below image you can take basic elements like Text Field and Ellipse from palette. Right click on the selection of these two to create composite element and give required details(name, description and an icon with position to keep it on the palette).

(NOTE : Click on image to get the best view of content placed)

(NOTE : Click on image to get the best view of content placed)

Composite element allows below actions(Edit, Export and Import)  in studio.

This way you can create a custom element in palette and use in a project if you have to re-use the code/design. i.e., this will give the flexibility of re-usability of design across reports. kinda a components based templates.


- Sadakar Pochampalli

JRXML:(Supports in 6.4.2 professional or later).
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version using JasperReports Library version 6.4.1  -->
<jasperReport xmlns="" xmlns:xsi="" xsi:schemaLocation="" name="CompositeElementExample" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="ab08f6fe-e37c-42b7-8721-c46a41536ae3">
<property name="" value="One Empty Record"/>
<band splitType="Stretch"/>
<band height="133" splitType="Stretch">
<reportElement x="138" y="40" width="100" height="30" uuid="0035655a-100c-4dac-a8b8-a91e6a916b0d"/>
<textFieldExpression><![CDATA["Text Field"]]></textFieldExpression>
<reportElement x="240" y="10" width="100" height="79" uuid="3207973b-e49e-43cc-9611-6ed03ce5b3cd"/>
<band height="35" splitType="Stretch"/>
<band height="61" splitType="Stretch"/>
<band height="125" splitType="Stretch"/>
<band height="45" splitType="Stretch"/>
<band height="54" splitType="Stretch"/>
<band height="42" splitType="Stretch"/>