Ive been building a report with four subreports. The parent report only contains header fields and each subreport is a different view of the same data. All subreports are built over a flat table and have logic to execute the insert. I’ve been seeing a behaviour I wouldn’t expect where the records displaying at run time aren’t being filtered for the current execution ID. For example, I gave a date criteria that should have returned no data and was able to confirm that in my flat table no records inserted for the execution ID. However when running the report, it returns all records. Is this an issue of execution ID between the parent and subreports? Any suggestions on a fix?
The report logic block to populate flat data and report execution id filtering behavior is solely based off of the main report. If the main reports uses a flat logic block, all sub reports should inherit the report execution id filter for free. Note that logic blocks on subreports are not actually run, only the logic block on the main report is run.
Great thank you Ian, this points me in the right direction. Should you be able to add report logic to a subreport if it doesn’t run?
We do not specify if a report record is a subreport or not. It can act as a subreport if called by another report, but it is still able to be directly referenced from an application as a main report and have its configured logic run. Since we do not check that a report is only ever a subreport, we do not apply a validation against adding a report logic block to it.