Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Getting Total Count of Group Post Reply Post New Topic
Author Message
sn1p3r
Newbie
Newbie


Joined: 24 Mar 2009
Online Status: Offline
Posts: 2
Quote sn1p3r Replybullet Topic: Getting Total Count of Group
     Posted: 24 Mar 2009 at 2:32am
Hi,
I am using CR9 and I have following problem:

I have a table like this:

Type | SomeText
------------------
1      | Text1
1      | Text2
2      | Text3
2      | Text4

In CR9 table is displayed in Details section grouped by "Type". According to above examble I would have 2 groups.

In GroupHeader I have a field displaying Type-Number.

Now I want to suppress this field if every record is from the same Type (e.g. "1"). 

How can I do this? Is there a formula giving TotalGroupCount?


thx


IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 24 Mar 2009 at 6:45am
in your formula, get a distinctcount({field}) if it is 1, then all of the records are the same type.  Actually you could put this in the suppression formula and it could be as simple as:
distinctcount({field}) = 1
 
When this is true(all records same type) the field will be suppressed.
 
Hope this helped
IP IP Logged
sn1p3r
Newbie
Newbie


Joined: 24 Mar 2009
Online Status: Offline
Posts: 2
Quote sn1p3r Replybullet Posted: 24 Mar 2009 at 7:38am
It works!

I just put "DistinctCount ({Table.Type}) = 1" in suppression formula.

Thanks!

Thumbs%20Up
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum