Filtering JRDataset in Jasper report

Hi All

Might be off topic for Servoy forum, but I need help. :)

I have a List in iReport with JRDatasource and dataset to fill data.
This list is present inside the Group_footer of a Group. (The Group is used to show some other related records, which is fine. )
Problem is the list shows all the records for all the repetition of the Group.

Can we filter the dataset which is used to populate the list, by using the key/id used to create the Group with one field in the Dataset? SO that I can only see the related records in the list according to each repetition of the group.

Thanks in advance for the help.

Finally I have found the solution.

Writing the steps, which might help others.

  1. I have created a parameter in the Dataset of the List.

  2. In the “Edit list Parameter” added that parameter of the dataset. Set the Expression with the Field from the main field list. (according to which the list needed to te filtered.)
    Now my parameter is ready and taking value from the main field.

  3. There was a property “Filter Expression” for the Dataset which need to return a boolean value. There I have added

$P{my_dataset_parameter} == $F{my_dataset_field}

Now it is filtering the dataset perfectly. :)