我无法在 JasperReports 表中显示数据,视图变空。
但是在 iReport 中我可以显示相同的jrxml文件
Spring Controller中的代码:
@RequestMapping(value = "displayTradeList")
public ModelAndView displayTradeListHtml(ModelAndView modelAndView) {
tradeList = service.getTradeList();
JRDataSource JRdataSource = new JRBeanCollectionDataSource(tradeList);
Map<String, Object> parameterMap = new HashMap<String, Object>();
parameterMap.put("datasource", JRdataSource);
//xlsReport bean has ben declared in the jasper-views.xml file
modelAndView = new ModelAndView("htmlReport", parameterMap);
return modelAndView;
} please find below jrxml file:http://community.jaspersoft.com/questions/826043/display-data-jasperreportss-table-view