0
如何设置Jasper报告中来自不同不同表格的页脚部分的值?我的意思是说,在页脚部分有三行,并且我从视图中获取数据。现在我的要求是在不同的页脚行中的不同的表中显示页脚部分的数据(例如,我用三行表示三行)?如何设置Jasper报告中的值
如何设置Jasper报告中来自不同不同表格的页脚部分的值?我的意思是说,在页脚部分有三行,并且我从视图中获取数据。现在我的要求是在不同的页脚行中的不同的表中显示页脚部分的数据(例如,我用三行表示三行)?如何设置Jasper报告中的值
如何将值作为参数传递?
Java方面
// Call SQL here.
// select value1, value2, value3 from footer_table where ....
Map paramMap = new HashMap();
paramMap.put("value1", "the footer value1");
paramMap.put("value2", "the footer value2");
paramMap.put("value3", "the footer value3");
JasperPrint print = JasperFillManager.fillReport(jasper, paramMap, connection);
// Export to PDF
JasperExportManager.exportReportToPdfFile(print, PdfPath);
碧玉方
1.新增参数。
name: value1
Parameter Class: java.lang.String
2.将TextFields设置为页脚并设置文本字段表达式。
$P{value1}
$P{value2}
$P{value3}
如果您更清楚地发布您的问题并附上您期望的小图像 – Viki888