I am using Version 8.5 Crystal Reports with an Access Database. Due to database design I am using a Not Equal Join on 2 tables. The Contact History table UserId to the AllUser table UserID.
ContactHistory.UserId -> ALLUser>UserId.
The -> link is the Not Equal Join.
The ALLUser table is larger.
I am grouping by ALLUser.UserID in the Main report and calling 2 subreports that calculate the amount of calls, emails, appointments that the Contact History table has in it.
Of course, I am getting many records with no data in either subreport (all zeroes for the amount of calls, emails, appointments). I want to suppress the subroutines when this happens.
I created 2 shared variables, 1 per subreport to tell me when either subreport returns zero records.
#RT_Vs_Down are running total counts.
WhilePrintingRecords;
shared NumberVar flag1;
if {#RT_Vs_Down} <> 0 then
flag1 := 1
else
flag1 := 0
WhilePrintingRecords;
shared NumberVar flag2;
if {#RT_Vs_Down} <> 0 then
flag2 := 1
else
flag2 := 0
Then I created 2 formulas in the Insert section Below of the footer to get GetFlag1 and GetFlag2
WhilePrintingRecords;
shared NumberVar flag1;
WhilePrintingRecords;
shared NumberVar flag2;
How can I use this to suppress both subreports when both are empty?
ContactHistory.UserId -> ALLUser>UserId.
The -> link is the Not Equal Join.
The ALLUser table is larger.
I am grouping by ALLUser.UserID in the Main report and calling 2 subreports that calculate the amount of calls, emails, appointments that the Contact History table has in it.
Of course, I am getting many records with no data in either subreport (all zeroes for the amount of calls, emails, appointments). I want to suppress the subroutines when this happens.
I created 2 shared variables, 1 per subreport to tell me when either subreport returns zero records.
#RT_Vs_Down are running total counts.
WhilePrintingRecords;
shared NumberVar flag1;
if {#RT_Vs_Down} <> 0 then
flag1 := 1
else
flag1 := 0
WhilePrintingRecords;
shared NumberVar flag2;
if {#RT_Vs_Down} <> 0 then
flag2 := 1
else
flag2 := 0
Then I created 2 formulas in the Insert section Below of the footer to get GetFlag1 and GetFlag2
WhilePrintingRecords;
shared NumberVar flag1;
WhilePrintingRecords;
shared NumberVar flag2;
How can I use this to suppress both subreports when both are empty?