在主報表的SQL串類式下面的SQL出來
select 1 report_num,'第一聯' report_name,'會計留存' report_belong from dual
union
select 2 report_num,'第二聯' report_name,'出納留存' report_belong from dual
union
select 3 report_num,'第三聯' report_name,'單位自存' report_belong from dual
order by report_num
SQL查詢結果如圖

主表在Detail Band放入SubReport Element
真正資料要呈現的SQL是放在SubReport的<querystring>中
加在一起的執行結果就會跑出一式X份了!
![]() | ![]() | ![]() |
附加贈送,簽核欄位放在頁面最下方的寫法
要在jrxml手動加入一個自訂的Group Band
重點是在這個setting:footerposition="ForceAtBottom"
<group footerposition="ForceAtBottom" name="Bottom">
<groupfooter>
<band height="40">
<statictext>
....
</statictext>
</band>
</groupfooter>
</group>
<groupfooter>
<band height="40">
<statictext>
....
</statictext>
</band>
</groupfooter>
</group>