Hello every one
Im new in Ireport and ,I want to create a master detail report ,I used sub report ,it works fine ... but I want to show each master record in a new page
I tried the break Element in Ireport Palette but it does not work for me
My xml code is as following ,I would be grateful if someone help me to show each master record in a new page
thank you in advance for your answers
<?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="Sample_Subreport" language="groovy" pageWidth="595" pageHeight="842" whenNoDataType="BlankPage" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" whenResourceMissingType="Empty" uuid="e7fc035c-d77a-4c7b-a786-c912cec6c89c">
<property name="ireport.zoom" value="1.5"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<style name="table">
<box>
<pen lineWidth="1.0" lineColor="#000000"/>
</box>
</style>
<style name="table_TH" mode="Opaque" backcolor="#F0F8FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table_CH" mode="Opaque" backcolor="#BFE1FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false">
<defaultValueExpression><![CDATA["E:\program\my reports\"]]></defaultValueExpression>
</parameter>
<queryString>
<![CDATA[select * from uusrs]]>
</queryString>
<field name="UUSR_USR" class="java.math.BigDecimal"/>
<field name="UUSR_INS_USR" class="java.lang.String"/>
<field name="UUSR_INS_DTE" class="java.sql.Timestamp"/>
<field name="UUSR_USR_NAM" class="java.lang.String"/>
<field name="UUSR_FST_NAM" class="java.lang.String"/>
<field name="UUSR_LST_NAM" class="java.lang.String"/>
<field name="UUSR_NAT_COD" class="java.lang.String"/>
<field name="UUSR_TEL" class="java.lang.String"/>
<field name="UUSR_MBL" class="java.lang.String"/>
<field name="UUSR_STS" class="java.lang.String"/>
<field name="UUSR_DEL_FLG" class="java.lang.String"/>
<field name="UUSR_UPD_DTE" class="java.sql.Timestamp"/>
<field name="UUSR_UPD_USR" class="java.lang.String"/>
<columnHeader>
<band height="93" splitType="Stretch">
<rectangle>
<reportElement x="0" y="0" width="555" height="72" uuid="3935645c-794d-4088-bf22-0ddd2b7fcdd9"/>
</rectangle>
<staticText>
<reportElement x="189" y="0" width="209" height="32" uuid="2b803419-7c59-426a-9d43-b97b9c3cafe5"/>
<textElement textAlignment="Center">
<font size="24"/>
</textElement>
<text><![CDATA[گزارش کارکرد کاربران]]></text>
</staticText>
<textField>
<reportElement x="483" y="12" width="17" height="20" uuid="6d0c8784-6ed0-49d3-9f34-0240a0e44828"/>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
<textField evaluationTime="Report">
<reportElement x="458" y="12" width="21" height="20" uuid="68defd4d-b543-4628-8f85-99e9c443c930"/>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="479" y="12" width="4" height="20" uuid="0d9488e8-4673-47aa-8497-ce7af69314f7"/>
<text><![CDATA[/]]></text>
</staticText>
<staticText>
<reportElement x="500" y="12" width="44" height="20" uuid="e57f5e43-dad2-447b-983c-1dde069bf747"/>
<textElement textAlignment="Right"/>
<text><![CDATA[صفحه :]]></text>
</staticText>
<staticText>
<reportElement x="483" y="32" width="61" height="20" uuid="f9b8ecd8-b4f6-42a6-92cf-940051b7f4f2"/>
<textElement textAlignment="Right"/>
<text><![CDATA[تاریخ گزارش:]]></text>
</staticText>
<staticText>
<reportElement x="87" y="32" width="65" height="20" uuid="220b406e-e9b7-4f45-94d5-65ff5070f7ef"/>
<textElement textAlignment="Right"/>
<text><![CDATA[کاربر اجرا کننده:]]></text>
</staticText>
<staticText>
<reportElement x="483" y="52" width="61" height="20" uuid="c0b6e78d-3732-4bb4-b2a5-358731695630"/>
<textElement textAlignment="Right"/>
<text><![CDATA[ساعت:]]></text>
</staticText>
<staticText>
<reportElement x="87" y="12" width="65" height="20" uuid="b1dd8531-87fe-4337-86ee-c9f9ae3a8d4d"/>
<textElement textAlignment="Right"/>
<text><![CDATA[کد گزارش:]]></text>
</staticText>
<staticText>
<reportElement x="0" y="12" width="87" height="20" uuid="8d7ea552-a980-4468-97ff-79a5bedd5d7b"/>
<textElement textAlignment="Right"/>
<text><![CDATA[uMGHIS001]]></text>
</staticText>
<rectangle>
<reportElement x="0" y="72" width="555" height="20" uuid="538d31bd-a535-4890-b320-8d3e90a21bfd"/>
</rectangle>
<line>
<reportElement x="458" y="72" width="1" height="20" uuid="67cc421d-0841-4f2a-9fcc-5a0b668d6a70"/>
</line>
<line>
<reportElement x="361" y="72" width="1" height="20" uuid="ae2e84df-d904-49ef-93a6-d8bb61ad4392"/>
</line>
<line>
<reportElement x="259" y="72" width="1" height="20" uuid="6d0082a4-fe86-4cc9-9653-f35e7274d86d"/>
</line>
<line>
<reportElement x="167" y="72" width="1" height="20" uuid="a2af312b-38a0-4531-9411-38eb6dba9ed3"/>
</line>
<line>
<reportElement x="73" y="72" width="1" height="20" uuid="5ea09782-1c3b-4006-b117-65dc05ff797e"/>
</line>
<staticText>
<reportElement x="11" y="72" width="52" height="20" uuid="f53e4178-edf0-45ec-a90d-4c7aa17b5392"/>
<textElement textAlignment="Center"/>
<text><![CDATA[شناسه]]></text>
</staticText>
<staticText>
<reportElement x="98" y="73" width="42" height="19" uuid="797333bf-3f6c-497a-abf8-6fe68d0cbebe"/>
<text><![CDATA[نام کاربری]]></text>
</staticText>
<staticText>
<reportElement x="202" y="72" width="20" height="20" uuid="7dc57193-7d7d-410f-9ecd-637a981aeb72"/>
<text><![CDATA[نام ]]></text>
</staticText>
<staticText>
<reportElement x="287" y="72" width="53" height="20" uuid="e2d1f53e-d585-4b83-9e12-87226d7a78c1"/>
<text><![CDATA[نام خانوادگی]]></text>
</staticText>
<staticText>
<reportElement x="398" y="72" width="38" height="20" uuid="f06715b5-d0a2-4168-9d27-dc41d56c17f1"/>
<text><![CDATA[شماره ملی]]></text>
</staticText>
<staticText>
<reportElement x="483" y="72" width="45" height="20" uuid="226f02bf-fbbe-46cb-b963-81e3aaef9708"/>
<text><![CDATA[تلفن تماس]]></text>
</staticText>
</band>
</columnHeader>
<detail>
<band height="78">
<frame>
<reportElement x="0" y="1" width="555" height="22" isPrintWhenDetailOverflows="true" uuid="51c2d2ca-2d01-4cae-b38b-35faa2437b97"/>
<box>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<line>
<reportElement x="361" y="0" width="1" height="22" isPrintWhenDetailOverflows="true" uuid="239af63e-44ce-48dd-9578-f037642e0eb0"/>
</line>
<line>
<reportElement x="458" y="0" width="1" height="22" isPrintWhenDetailOverflows="true" uuid="8b26f9de-8ccf-488a-8934-6d46a7f883e6"/>
</line>
<line>
<reportElement x="259" y="0" width="1" height="22" isPrintWhenDetailOverflows="true" uuid="d047e1ca-84f1-494a-818c-ccd0d2d05c0e"/>
</line>
<line>
<reportElement x="167" y="0" width="1" height="22" isPrintWhenDetailOverflows="true" uuid="3162e5b4-52d5-43b3-85f4-65779b635eb7"/>
</line>
<line>
<reportElement x="73" y="0" width="1" height="22" isPrintWhenDetailOverflows="true" uuid="5ed7a3eb-fa22-48d4-9acf-b391cb0f084e"/>
</line>
<textField>
<reportElement x="0" y="2" width="73" height="20" isPrintWhenDetailOverflows="true" uuid="0fea545e-21bb-474a-8b63-4780e493dc15"/>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$F{UUSR_USR}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="74" y="2" width="93" height="20" isPrintWhenDetailOverflows="true" uuid="51f32be5-0a0b-450a-aad3-b916cc8204f3"/>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$F{UUSR_USR_NAM}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="168" y="2" width="91" height="20" isPrintWhenDetailOverflows="true" uuid="76d5a75e-0bce-4ae3-9a17-d356e5d11a99"/>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$F{UUSR_FST_NAM}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="262" y="2" width="99" height="20" isPrintWhenDetailOverflows="true" uuid="dafee228-1522-48be-a06a-3f1215944038"/>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$F{UUSR_LST_NAM}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="362" y="2" width="96" height="20" isPrintWhenDetailOverflows="true" uuid="ce34dfb8-a486-4813-931c-e6e67ac27f1f"/>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$F{UUSR_NAT_COD}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="459" y="2" width="96" height="20" isPrintWhenDetailOverflows="true" uuid="23979475-30b9-4dfe-9938-472cb2464fe8"/>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$F{UUSR_MBL}]]></textFieldExpression>
</textField>
</frame>
<subreport>
<reportElement x="0" y="23" width="361" height="55" uuid="e1ad8699-a7a6-4e3e-92a8-45cabed4861b"/>
<subreportParameter name="V_PAR_USER">
<subreportParameterExpression><![CDATA[$F{UUSR_USR_NAM}]]></subreportParameterExpression>
</subreportParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "Sample_subreport_subreport1.jasper"]]></subreportExpression>
</subreport>
</band>
</detail>
</jasperReport>
[/code]