1
我想創建一個碧玉報告。我傳遞以下數據源。使用地圖數據源創建碧玉報告spring mvc
Collection<Map<String, String>> listCollection = new ArrayList<Map<String, String>>();
//value insertion in listCollection
JRDataSource ds= new JRMapCollectionDataSource(listCollection);
Map<String,Object> parameterMap = new HashMap<String,Object>();
parameterMap.put("datasource", ds);
ModelAndView modelAndView = new ModelAndView("xlsReport", parameterMap);
現在,我想通過鍵從jrxml文件中獲取此地圖中的值。我正在使用彈簧模型和視圖。
想用類似的東西在JRXML
<![CDATA[$P{datasource}.get("key")]]
內部文本框文件。