Looking at your video, that behavior seems correct. When you use FoundSet reporting, you need to be very careful with which fields/relations you use in your report. When Servoy passes the data to jasper, it creates the equivalent of a cartesian product between all of the related record. Its also always in the context of the foundset you pass. So if your foundset has 2 records in it, and you use a related foundset, your going to get 2 times however many records in your related foundset.
I think you should take a step back and see exactly what you are trying to accomplish. If your end goal is a report based on the tbl_people table, then you should be passing a foundset based on tbl_people. Then use a relation to go from people to company.
Looking at the sample code you posted, you don’t seem to be using any columns from the base foundset there either. All of your field names are relationname.columnname. So why not just pass in the relation as the base foundset? I do see your using several relations:
filt_adpp_1
filt_adpp_1.adpp_pdp
filt_lspm
So your going to end up with 1 record for each tuple from the base foundset you pass in, plus all those relations.
If your goal here is dynamic foundset, do you realize you can pass in foundsets as parameters in your report, and use subreports for displaying the data from those different foundsets?
Some additional thoughts after I downloaded your sample…
stefanoni:
You can see, that depending on the Record-Count of the passed (but unused ) Dummy-
Foundset, the detail records are printed multiple time.
Why do you think its unused? The data from the report is always in the context of the foundset you pass in! so if you pass in myDummyFoundset in the jaser plugin call and that foundset has 2 records, your going to get at least 2 records in your jasper report. Just because you use the global relation in your report (test_relation_as_filter) doesn’t mean that’s all jasper will use. If your myDummyFoundset has 2 records, and your test_relation_as_filter has 2 records, your going to end up with a report of 4 records. Generally using an unrelated/global relation in a Jasper report isn’t advised because of this.
From your sample, the better approach would be to pass in the relation into the report…
plugins.jasperPluginRMI.runReport(test_relation_as_filter, ...)
Then in your Jasper report your fields that you add are the columns in test_relation_as_filter (ixtenant, name_full, etc) without the relation name prefix (so they come from the foundset you pass in)