Joined: 04 Oct 2016
Online Status: Offline
Posts: 24
Topic: How to filter a main report based on data in a sub Posted: 16 Aug 2017 at 10:52am
I am working on a report that consists of a main and sub report. The main report is grouped by name field. The sub-report is LWMAIN data. Currently I am using a shared variable formula to show the number of offenses a person has. I want to display in the main report only those persons with more than one offense listed in the sub-report.
How can I filter the main report to display only this data? If there is an easier way let me know. The reason I have a sub-report is so that I can work with the data better.
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Posted: 17 Aug 2017 at 5:07am
I would not use the sub report but if you have to you will need to do suppression not selection.
The easiest thing is likely a stored proc or crystal command that would do the grouping and counts in the data source then you can select from that.
If not you can link the incidents to the person in the main report, group on the person and the incident type and do some group summary counts to do group selection.
The sub report gets tricky more resource intensive but is plausible.
Will the above options work rather than the sr?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum