You can configure a multi-column report. If you are using iReport, right click in the Report Inspector on the report name and select Page Format. In the Columns Section increase Columns from 1
to 4
, if desired configure Space to define a distance between the columns. If you click on the report you can also choose the Print order in the Properties panel.
In the report designer you drag the field in the first column in the detail band.
the added properties in the JRXML are in the <jasperreports ...
tag:
columnCount="4"
: 4 columns
printOrder="Horizontal"
: fill order is horizontal.
Attached the JRXML for further reference:
<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="report8" language="groovy" columnCount="4" printOrder="Horizontal" pageWidth="595" pageHeight="842" columnWidth="138" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="5e2835cc-bc36-4f77-8631-08a8deaa28d7">
<property name="ireport.zoom" value="1.0"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<queryString>
<![CDATA[select 'A' as field]]>
</queryString>
<field name="field" class="java.lang.String"/>
<detail>
<band height="20" splitType="Stretch">
<textField>
<reportElement uuid="76707cdd-7dbe-477e-b3a4-38f9ba3bd003" x="0" y="0" width="136" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$F{field}]]></textFieldExpression>
</textField>
</band>
</detail>
</jasperReport>