Project

General

Profile

Defect #353

relationships for subreports not evaluating properly

Added by Scott Butler over 12 years ago. Updated over 12 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
Start date:
08/01/2011
Due date:
% Done:

0%

Estimated time:
Browser (if web client):

Description

Not sure if you consider this a bug, or unintended result, but here is the problem. Lets say you have a report with groups on it, and in the group, you have a subreport. Then you define a parameter, and have the parameter hold the foundset/relation. Then you define the datasource of the subreport to be the parameter. Then you pass that in from Servoy. What happens is that only for first record in the group works. It seems as through the foundset/relation is evaluated once when it is passed into the report, and not during each loop (ie the relation doesn't increment with the group). The only work around now seems to be to make a calculation and have the calculation return back the foundset/relation. Then it evaluates for each group and shows the proper record.

Seems to only be a problem when you want to pass in the foundset/relation dynamically through a parameter.

History

#1

Updated by Scott Butler over 12 years ago

Also, another work around seems to be to have the parameter be something else, like a string. And then on the datasource of the subreport, you set the express to dynamically change based on the parameter, and pass in the foundset/relation that you want. Then it can still be dynamic, and changes as the grouping changes. So, that works, but it would be nice if there was a better way to do it.

#2

Updated by Rob Gansevles over 12 years ago

  • Status changed from New to Rejected
  • Assignee set to Rob Gansevles

Scott,

If you have a parameter for your main report that is a related foundset, then this will only be evaluated once, when you put the value in the map.
But when you have a field defined on your main (foundset) datasource that is a related foundset, then that fs is evaluated for each record in the main foundset iteration and will return a different related fs each time.

So if the name of the related foundset for your subreport is not fixed you have to pass in the name and not the actual foundset, as you described in your update.

Rob

Also available in: Atom PDF