Dla tych, jak ja, którzy nie korzystają z JasperSoft lub starszą iReport i bezpośrednio pracować z XML, wykonaj następujące czynności:
<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"
whenNoDataType="NoDataSection"
name="freport" pageWidth="595" pageHeight="842"
columnWidth="555" leftMargin="20" rightMargin="20"
topMargin="20" bottomMargin="20">
Dodaj whenNoDataType="NoDataSection"
do elementu <jasperReport>
.
<noData>
<band height="15">
<staticText>
<reportElement x="0" y="0" width="200" height="15"/>
<box>
<bottomPen lineWidth="1.0" lineColor="#CCCCCC"/>
</box>
<textElement />
<text><![CDATA[The report has no data]]> </text>
</staticText>
</band>
</noData>
Dodaj element <noData>
poniżej paska szczegółów.
to wydaje się mieć zastosowanie tylko do iReport? – mmcrae