Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Filter Main Report Based on Sub Report Post Reply Post New Topic
Author Message
pcdoc2010
Newbie
Newbie


Joined: 15 Apr 2015
Online Status: Offline
Posts: 6
Quote pcdoc2010 Replybullet Topic: Filter Main Report Based on Sub Report
     Posted: 26 May 2015 at 8:42am
I have a pre-built report from our vendor.  Any vendor modifications will cost.

It is a listing of member accounts.  The sub report shows if they have any loans with us.

I have filtered the main report to only show members with only 1 account.  The sub report still shows any loan data.  I want to suppress the main report if they have any loans.

My goal is to only show members with 1 account and no loans.

I am not sure where/how to proceed.
Thanks,
Dan
IP IP Logged
pcdoc2010
Newbie
Newbie


Joined: 15 Apr 2015
Online Status: Offline
Posts: 6
Quote pcdoc2010 Replybullet Posted: 26 May 2015 at 8:49am
I am looking for something like this:

if subreport loan count is greater than 0, then exclude from main report.
Thanks,
Dan
IP IP Logged
pcdoc2010
Newbie
Newbie


Joined: 15 Apr 2015
Online Status: Offline
Posts: 6
Quote pcdoc2010 Replybullet Posted: 26 May 2015 at 10:31am
I've done a shared value, which gives me the subreport data on the main report (loan number).  I'm struggling on how to filter by this formula filed.  
Thanks,
Dan
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 01 Jun 2015 at 7:29am
you will not be able to filter your main report on this result.
the best you can do is to supress.
IP IP Logged
Erik
Groupie
Groupie
Avatar

Joined: 05 Dec 2013
Online Status: Offline
Posts: 50
Quote Erik Replybullet Posted: 05 Jun 2015 at 1:43pm
Originally posted by pcdoc2010

I am looking for something like this:

if subreport loan count is greater than 0, then exclude from main report.

The way I would go about this is to do a Group By member account, and then create a Formula to do a count of the number of loan instances per member grouping.

Although I'm not sure how this would work with a subreport since I usually do Formula calculations.

Formula 1 (Counter): if not(isnull({table.loan_instance})) then 1 else 0.

Then go into Section Expert > Details > Common tab > Suppress (do not check the box) > [x-2]:

if sum({@CounterFormula1}, {@member_rouping}) > 0 then TRUE else FALSE
IP IP Logged
pcdoc2010
Newbie
Newbie


Joined: 15 Apr 2015
Online Status: Offline
Posts: 6
Quote pcdoc2010 Replybullet Posted: 08 Jun 2015 at 3:19am
Thanks.  I think I was able to get something useful.

Appreciate the help!
Thanks,
Dan
IP IP Logged
Printable version Printable version

Forum Jump
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