2005 IR Help Posted August 26, 2006 Share Posted August 26, 2006 By: quiq - quiq Problem with subreport 2004-05-19 03:29 Hello all! I have aproblem with subreports. My masterreport have a dataSource (snap): ..... private Object[] Data={"21.10.2003","22.10.2003","23.10.2003","24.10.2003"}; public boolean next() throws JRException { index++; return (index < Data.length); } public Object getFieldValue(JRField field) throws JRException { Object value = null; String fieldName = field.getName(); ... if ("DATE".equals(fieldName)) { value = Data[index]; } return value; } This is a SubReportDataSourse (snap): private Object[][] subData={ {"21.10.2003","xxx"}, {"21.10.2003","yyy"}, {"22.10.2003","sss"}, {"24.10.2003","ddd"} }; public boolean next() throws JRException { index++; return (index < subData.length); } public Object getFieldValue(JRField field) throws JRException { Object value = null; String fieldName = field.getName(); if ("SUBDATE".equals(fieldName)){ value = subData[index][0]; } else if ("CAUSE".equals(fieldName)) { value = subData[index][1]; } return value; } The SubReport has a parameter $P{DATE} and <printWhenExpression><![CDATA[new Boolean(($F{SUBDATE}).equals($P{DATE}))]]></printWhenExpression>. But i can only display the masterreport with subreports for DATE = 21.10.2003. Why? How can i display my subreport and master report for all "DATE"-values ? Please, help me. 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