2006 IR Open Dicussion Posted August 26, 2006 Share Posted August 26, 2006 By: del-piero - del-piero problem with subreports and JRBeanArrayDataSo  2006-01-12 02:51 hi,ÂÂi have one master report and two subreport when i where using regular connection the subreports where working fine. ÂBut when i changed the connection using JRBeanArrayDataSource the subreport stop working at all and i see only the master report...Âthe questions can i use JRBeanArrayDataSource for the report and regular connection to subreports?ÂÂif the problem is known to you please answer me.ÂÂthanks a lot. By: Daniel R - doctor_jay RE: problem with subreports and JRBeanArrayDa  2006-01-12 06:39 Hi.ÂÂYes, this is possible. One solution might be to pass your Connection object to the report parameters map.ÂÂ//code snipÂHashMap map = new HashMap();ÂConnection myConnection = getConnection();Âmap.put("myConn", myConnection);ÂÂJasperFillManager.fillReport(report, map, new JRBeanArrayDataSource(MyFactory.getBeanArray()));ÂÂIn the subreport elements, you are now able to get the Connection object with <dataSourceExpression><![CDATA[((HashMap)$P{REPORT_PARAMETERS_MAP}).get("myConn")]]></dataSourceExpression>ÂÂGreetz Daniel Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now