在報表呈現的內容,每筆資料之間,需要有間隔的虛線如下
Problem
原本iReport designer中的作法,是將line放在detail band中的fields下方,screenshot如下:
但是此舉,在最後一筆資料,也會出現分隔線,此結果不合理。
Solution
step1. 將分隔線放到detail band的fields上方,如此一來,列印順序是line-->data-->line-->date-->line-->data,以此類推
params.put(JRParameter.IS_IGNORE_PAGINATION, Boolean.TRUE);
JasperFillManager.fillReport(jasperReport, params, dataSource);
1: SELECT .....(ignore)
2: CASE
3: WHEN NIGT001.TAX_CD='15'
4: THEN (SELECT NIGT007.ADTR_NM
5: FROM NIGT007
6: WHERE NIGT001.PRST_ADTR_CD = NIGT007.ADTR_STAFF_CD(+) )
7: ELSE ''
8: END AS ADTR_NM
9: FROM NIGT001,NIGT013,NIGT007, ......(ignore)
10: WHERE ......(ignore)
11: ORDER BY .....(ignore)
1: SELECT .....(ignore)
2: CASE
3: WHEN NIGT001.TAX_CD='15'
4: THEN (SELECT NIGT007.ADTR_NM
5: FROM NIGT007
6: WHERE NIGT001.PRST_ADTR_CD = NIGT007.ADTR_STAFF_CD(+) )
7: ELSE CAST('' as NVARCHAR2(10)) --do cast here
8: END AS ADTR_NM
9: FROM NIGT001,NIGT013,NIGT007,, ......(ignore)
10: WHERE ......(ignore)
11: ORDER BY .....(ignore)