2004 IR Help Posted August 31, 2006 Share Posted August 31, 2006 By: flux - fluxz Iterating Data with custom DataSource 2004-03-25 07:18 Hi I've made some (basic) reports using iReports. Now i need to iterate data in the detail section of my report ( this means i' m looping data in a loop(detail) . Like This : ______ Data1 | _____ | Data2 | Data2 | Data2 | ------- Data1 | _____ | Data2 | Data2 | ------- Now at this point i am able to fill Data1 one with this code (using Custom JRDataSource ) : if("Data1".equals(fieldname)) value = customerDTO.getName() ; I've tried to make a subreport where i've put Data2 in the Detail section. (This Data2 uses its own Custom JRDataSource. ) I can call the subreport using the tab "SubReport(other)" and locate my subreport with a String. (I see my static text but i don't see my variables ). But asigning my Custom DataSource doesnt work. this is what i've got in my .xml <parameter name="MyDataSource" isForPrompting="true" class="datasource.SubReportDataSource"/> <parameter name="SubReportParam" isForPrompting="true" class="java.lang.String"> <defaultValueExpression ><![CDATA["C:\Backup\workspace\PoleConseil\WebContent\reports\SubReport.jasper"]]></defaultValueExpression> </parameter> Does anyone know how to solve this problem? Do i need to work with subreport or do i need to work with groups? ( if so would you mind sharing some code snippets? ) help appriciated. 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