I would like to create a report with a custom class as follows:
public class Class1 {
String cl1_f1;
String cl1_f2;
}
public class Class2 {
String cl2_f1;
String cl2_f2;
Class1 cl1_ob1;
}
Now I pass Class2 in the report through fields and JRBeanCollectionDataSource.
<subDataset name="myitems">
<field name="cl2_f1" class="java.lang.String"/>
<field name="cl2_f2" class="java.lang.String"/>
**<field name="cl1_ob1" class="Class2"/>**
</subDataset>
For the third parameter, I would like to mention one of its fields. For example: cl1_ob1.cl1_f1
.
How can I accomplish this?