|
![](/images/resource/spacer.gif) |
|
iReport Export PDF แบบ next page หลายๆๆหน้า ต้องเพิ่ม code อย่างไรครับ |
|
![](/images/resource/viewboard_01.gif?v=1001) |
|
|
![](/images/resource/viewboard_03.gif?v=1001) |
![](/images/resource/viewboard_04.gif?v=1001) |
|
Code (Java)
try {
JRResultSetDataSource resultSetDataSource = new JRResultSetDataSource(
rs);
// HashMap<String, Object> pm = new HashMap<String, Object>();
ClassLoader classLoader = getClass().getClassLoader();
File file = new File(classLoader.getResource(rpt).getFile());
log.info(file.getAbsolutePath().replace("%20", " "));
JasperReport jr = JasperCompileManager.compileReport(file
.getAbsolutePath().replace("%20", " "));
// JasperReport jr = JasperCompileManager.compileReport(cf
// .getString("jasperPath") + "\\" + rpt);
JasperPrint jp = JasperFillManager.fillReport(jr, null,
resultSetDataSource);
JasperExportManager.exportReportToPdfFile(jp,
cf.getString("outPath") + "\\" + licenseno + ".pdf");
log.info("success : " + cf.getString("outPath") + "\\"
+ licenseno + ".pdf");
} catch (Exception e) {
log.error(e.toString());
e.printStackTrace();
}
Tag : Java, PDF, iReport, JAVA
![](/images/adv.jpg?v=1001)
|
|
![](/images/resource/blockviewtopic_01.gif?v=1001) |
![](/images/resource/blockviewtopic_02.gif?v=1001) |
![](/images/resource/blockviewtopic_03.gif?v=1001) |
![](/images/resource/blockviewtopic_04.gif?v=1001) |
Date :
2018-02-19 10:22:55 |
By :
jakkrit01 |
View :
2177 |
Reply :
1 |
|
![](/images/resource/blockviewtopic_06.gif?v=1001) |
![](/images/resource/blockviewtopic_07.gif?v=1001) |
![](/images/resource/blockviewtopic_08.gif?v=1001) |
![](/images/resource/blockviewtopic_09.gif?v=1001) |
|
|
|
![](/images/resource/viewboard_06.gif?v=1001) |
![](/images/resource/viewboard_07.gif?v=1001) |
|
![](/images/resource/viewboard_08.jpg?v=1001) |
![](/images/resource/viewboard_09.gif?v=1001) |
![](/images/resource/viewboard_01.gif?v=1001) |
|
|
![](/images/resource/viewboard_03.gif?v=1001) |
![](/images/resource/viewboard_04.gif?v=1001) |
|
เข้าใจว่าหลังจาก Export เป็น PDF แล้ว จะเป็น Feature ความสามารถของตัว iReport ว่าจะแสดงผลได้แบบไหนครับ
|
![](/images/resource/blockviewtopic_01.gif?v=1001) |
![](/images/resource/blockviewtopic_02.gif?v=1001) |
![](/images/resource/blockviewtopic_03.gif?v=1001) |
![](/images/resource/blockviewtopic_04.gif?v=1001) |
Date :
2018-02-23 18:05:14 |
By :
mr.win |
|
![](/images/resource/blockviewtopic_06.gif?v=1001) |
![](/images/resource/blockviewtopic_07.gif?v=1001) |
![](/images/resource/blockviewtopic_08.gif?v=1001) |
![](/images/resource/blockviewtopic_09.gif?v=1001) |
|
|
![](/images/resource/viewboard_06.gif?v=1001) |
![](/images/resource/viewboard_07.gif?v=1001) |
|
![](/images/resource/viewboard_08.jpg?v=1001) |
![](/images/resource/viewboard_09.gif?v=1001) |
|
|
|
![](/images/digitalocean-banner.jpg)
|
Load balance : Server 00
|