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!

Counting rows - but ignoring supresses rows

Status
Not open for further replies.

matpj

Technical User
Mar 28, 2001
687
GB
I am adding a grand total count field to the Report footer in Crystal 10.
I have 2 groups and the details are being displayed in Group Header 2.

The count includes all of the supressed rows, and not just the ones that are visible.
Is there a way around this?


Matt
London (UK)
 
Create a running total field on the value being summed.
In the EvaluateWhen section choose formula.
The formula should be the opposite of the suppression rule that you have used.
 
thanks for the good tip - but the supression formula conatins a formula field, which I don't get the option of using in the running total dialog box...


Matt
London (UK)
 
If the formula field is record based then I can't see why it would not be available in the running totals formula editor.
 
the formula field uses fields from the main report and a shared variable from a sub report.



Matt
London (UK)
 
I can't say whether this matters in general, but my observation would be that since you can create a suppression formula using these elements then you should be able to build a formula which totals values based on the same rules, even if this cannot be done in the Running Total dialog.
 
Create a formula using the suppression logic tto set a valu of 0 if suppressed and 1 if shown then simply total this formula.

HTH

Gary Parker
MIS Data Analyst
Manchester, England
 
Rather than suppressing the rows, can you not exclude them from your report entirely with a record selection formula?

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
askdon@srhconsulting.com
 
I am excluding them based on a perticular text string in the formula field.
The field is not available to pick when I chose selection fields.

Matt
London (UK)
 
You should be able to create a variable that makes use of your suppression criteria. Something like:

whileprintingrecords;
shared numbervar x;
numbervar grtot;

if x * {table.amt} < 500 then grtot := grtot + 1;

Substitute your own criteria (the opposite of your suppression criteria). Place the formula in the header where your displayed fields are (as long as the subreport where the shared numbervar is created is in a higher section).

Create a display formula and place it in the report footer:

whileprintingrecords;
numbervar grtot;

If you need more help, you will need to share the contents of your suppression formula and provide more information in general.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top