在Jasper报表中列出对象

时间:2018-11-08 13:12:41

标签: jasper-reports

我有一个字段:

<field name="reps" class="java.util.List">
    <fieldDescription><![CDATA[reps]]></fieldDescription>
</field>

此字段中的对象类型:

public class TrainingExerciseRepetitionDTO{

    private String name;

    private Integer reps;

我如何列出每个对象,它包含名称和代表?

更新: 我发现了这个:

<subDataset name="repetitions" uuid="4110a5c1-78b4-4fcd-b755-fcc2cb35427c">
    <field name="repetition" class="mock.entity.TrainingExerciseRepetitionDTO">
      <fieldDescription><![CDATA[_THIS]]></fieldDescription>
        </field>
    <field name="repName" class="java.lang.String">
      <fieldDescription><![CDATA[repetition.name]]></fieldDescription>
    </field>
</subDataset>

但是我得到了错误:

  

原因:java.lang.NoSuchMethodException:未知属性   在班级上重复   模拟.entity.TrainingExerciseRepetitionDTO'

0 个答案:

没有答案