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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Count Suppressed Groups

Status
Not open for further replies.

random621

Technical User
Jul 16, 2003
54
0
0
US
I'm using crystal reports XI to report on a SQL & Access database within the same report.

We have a service at our company where we help farmers manage & sell their entire crop production for a year. Throughout the year we maintain what we call a "Model Farm" that shows for X crop this year at this point you should be X percent sold.

I've created a report several years ago to show which clients are NOT current with the model farm at any given time. In my select expert I select all the farms who we are managing "corn" or whatever for.

I use parameters to say we are looking for farms that are not 20% sold in Corn.

The report pulls in all the corn guys and then suppresses those that are equal to or over 20% sold.

The report has 3 groups. Group 1 = Servicing Broker, Group 2 = Farm, Group 3 = Crop (corn).

I suppress group 3 footer where the person IS current with the model farm and display where they are not.

I have a new request today to basically count the rows that ARE suppressed. I'm struggling with this because I did use running total fields in Crystal to come up with my total percent sold value.

I realize my report probably is in need of complete rebuilding but I'm trying to get some numbers out to a manager before the weekend.

SO after all that explanation, my question is this. Is there some easy way to simply count suppressed groups or non/suppressed groups regardless of other conditions in the database?
 
Hi,

Could you try using shared variables in formulae and increment (count) the value of the variable everytime the supress condition is met? Something like:

//variable initialization. Place formula where the variable
// can be initialized/reset.
shared NumberVar x;
x:= 0;

//group header 3
shared NumberVar x;
IF <supress condition is met> THEN
x:= x+1;

//at a point beyong GF3, for display
shared NumberVar x;
x;

You could place the increment formula in the group header and just supress the display so its not visible in the report output. This way you can display this variable's value at a position beyond the GF3.

Hope this works.
 
Thanks, that is exactly what I ended up doing.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top