Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional supression based on subreport results

Status
Not open for further replies.

tbear6602

Programmer
Jul 26, 2005
24
US
Hi! Running Crystal 10 and Oracle 9i.

I've created a subreport that pulls a record selection based on parameters from the main. Basically, what I'm doing is pulling a system name from the main and passing it to the subreport. The subreport then pulls other records for a different period of time from the main.

I'm grouping the records by system, then counting them. If the count is 5 or less, I want to supress the subreport and the appearance of the record in the main report as well. What I've done is create a shared variable SUPRESS.

Here is the code:
shared stringVar Supress;
if (Count(SystemID,SystemID) <5 then
Supress := 'Y'
Else Supress :='N'

I have placed this in my subreport, then created the same variable in the main that just checks the value of SUPRESS.

I then created a conditional supression of the section based on the value of SUPRESS. However, the variable is not being updated.

Did I miss something?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top