Print Page | Close Window

Counting on UnSuppressed Records

Printed From: Crystal Reports Book
Category: Crystal Reports .NET 2003
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=7876
Printed Date: 03 May 2024 at 5:29am


Topic: Counting on UnSuppressed Records
Posted By: NCR1
Subject: Counting on UnSuppressed Records
Date Posted: 01 Oct 2009 at 1:32am
Hi,
I had placed all the Database Fields in Group header in order to suppress some records ,
But when am trying to do distinctcount on the records in group footer its also counting the suppressed records .
I need only the count of those records which are displayed in my report.
 
Any ideas please

Thanks in Advance



Replies:
Posted By: lockwelle
Date Posted: 05 Oct 2009 at 2:28pm
need to use a shared variable and formulas...maybe running totals, but my preference is shared variables.
 
3 formulas
in group header reset:
shared numbervar aVar:=0;
 
in group footer display
Shared numbervar aVar
 
in Details increment:
shared numbervar aVar;
if not suppressed then //suppressed is your criteria
 aVar := aVar + {table.field};  //the amount to increment.
 
HTH



Print Page | Close Window