Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Suppress Details via GH Post Reply Post New Topic
Author Message
ChrisG
Newbie
Newbie


Joined: 12 Mar 2013
Online Status: Offline
Posts: 20
Quote ChrisG Replybullet Topic: Suppress Details via GH
     Posted: 18 Sep 2013 at 1:17am
Hi,
I have a report in which I have placed product details into the Group Header. I have then placed certain fields in the detail section below it.

These details can come up with 2 or more records per group. I want to be able to suppress the details section when there is only 1 record in the group and be able to show all the details when there is 2 returned records per group.

Cheers
IP IP Logged
kostya1122
Senior Member
Senior Member
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Quote kostya1122 Replybullet Posted: 18 Sep 2013 at 6:26am
you could try
group selection expert
place something like
count(recors,group)>1
IP IP Logged
ChrisG
Newbie
Newbie


Joined: 12 Mar 2013
Online Status: Offline
Posts: 20
Quote ChrisG Replybullet Posted: 18 Sep 2013 at 6:35am
Hi Kostya,
Thanks for the reply. Tried that but no luck. Any other suggestions?
IP IP Logged
kostya1122
Senior Member
Senior Member
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Quote kostya1122 Replybullet Posted: 18 Sep 2013 at 6:47am
maybe
distinctcount(recors,group)>1
IP IP Logged
ChrisG
Newbie
Newbie


Joined: 12 Mar 2013
Online Status: Offline
Posts: 20
Quote ChrisG Replybullet Posted: 18 Sep 2013 at 10:42pm
I tried that but was getting an error message with the group. I have created a group count instead that counts the records instead. What would be the suppression formula to suppress it if the group =1 but show all the details in the next group if it was >= 1.

Example:
Group Header: Product 1
Details: Cost $200 ------------------Suppress.

Group Header: Product 2
Details: Cost $50
Details: Cost $75 --------------------Don't suppress both lines.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 19 Sep 2013 at 5:21am
Kostya is giving you sound advice and a sound process.
Are you conditinally showing the records in the detail section beyond the "count" you want to do? Is this only a row based count or are there columns inside one row involved in your 'count'?


Edited by DBlank - 19 Sep 2013 at 5:21am
IP IP Logged
ChrisG
Newbie
Newbie


Joined: 12 Mar 2013
Online Status: Offline
Posts: 20
Quote ChrisG Replybullet Posted: 19 Sep 2013 at 10:13am
I'm not doubting the process that Kostya is giving me, i'm doubting my application of it and do appreciate the help. As I said, i tried what was advised and got an error message of 'This field cannot be used as a group condition field'. The formula i used was: count({PORel.JobNum}, GroupName ({PODetail.POLine})) > 1.

Basically, its a row based count that I did based on a field. I can suppress the 1st record but when it if there is one record returned per group, I want to suppress it but if there is more than 1 I don't want to suppress it.
IP IP Logged
kostya1122
Senior Member
Senior Member
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Quote kostya1122 Replybullet Posted: 19 Sep 2013 at 11:10am
first make sure you grouped on {PODetail.POLine}
then try this instead
count({PORel.JobNum}, {PODetail.POLine}) > 1
IP IP Logged
ChrisG
Newbie
Newbie


Joined: 12 Mar 2013
Online Status: Offline
Posts: 20
Quote ChrisG Replybullet Posted: 19 Sep 2013 at 10:59pm
Hi Kostya,
Had to tweak the code slightly but it works a treat now. Good suggestion about the Group Expert. Thanks for the help.
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