Print Page | Close Window

Suppress Details based off Group Formula

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
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=22717
Printed Date: 28 Apr 2024 at 11:06pm


Topic: Suppress Details based off Group Formula
Posted By: FECSII
Subject: Suppress Details based off Group Formula
Date Posted: 11 Jan 2019 at 4:12am
I am trying to suppress the details section based off a formula in the group footer.

I am using the three-formula trick in my report; if the 3rd formula (placed in the group footer) equals 1, I would like the details within that group to be suppressed.

I tried entering {@3rd formula} = 1 into the section expert, suppress X+2 but doesn't evaluate correctly.

Any ideas how this can be done?



Replies:
Posted By: kevlray
Date Posted: 11 Jan 2019 at 7:54am
Not sure what you mean when you say it does not evaluate correctly.  Is the formula not returning a  1 when you expect it, or it is and the suppress is not working?


Posted By: FECSII
Date Posted: 11 Jan 2019 at 7:56am
Sorry. The suppress does not work.



Posted By: DBlank
Date Posted: 11 Jan 2019 at 10:50am
usually this is because the group suppression happens in an earlier pass then the value being generated by the formulas.
The usual process for group suppression needs to use a group summary.
What is the data and what is the suppression criteria?


Posted By: FECSII
Date Posted: 14 Jan 2019 at 4:22am
Hello - thank you for the response.

So, I created a formula (@first nine) that looks at the first nine numbers in field X. Field X contains a total of 11 numbers.

I grouped the report by the formula (@first nine).

Any records that may fall under the group that match the nine numbers displays, showing all 11 numbers.

Example:

111111119 Item XYZ


111111118 Item ABC
             11111111801 Item A
             11111111808 Item B
             11111111816 Item C

111111113 Item GHI


In this case, I would like to suppress 111111119 and 111111113 as there are no items that match the first nine digits.

Any suggestions on how to get this accomplished?



Posted By: DBlank
Date Posted: 14 Jan 2019 at 6:40am
a little confused b your request.
the fact that the row exists to create the group implies that each group has at least one row so how are their groups without details?...are you doing some sort of suppression process


Posted By: FECSII
Date Posted: 14 Jan 2019 at 8:11am
You are correct; I did not add any suppression - it looks like this:

111111119 Item XYZ
             11111111910 Item P

111111118 Item ABC
             11111111801 Item A
             11111111808 Item B
             11111111816 Item C

111111113 Item GHI
              11111111355 Item Z

Any group that has more than 1 record, I would like displayed, otherwise suppress.

Hope that makes sense.


Posted By: DBlank
Date Posted: 14 Jan 2019 at 10:31am
just do a straight up count at the group level of the formula field and suppress where the group count is >1

COUNT(@first nine,@first nine)>1


Posted By: DBlank
Date Posted: 14 Jan 2019 at 10:33am
you can also do a group select to exclude the group from the report on that same condition.
Just be aware for either that the hidden or group excluded data is still part of your data set for sums or counts or whatever.


Posted By: FECSII
Date Posted: 15 Jan 2019 at 4:01am
I was making it way more complicated then it needed to be. Thank you so much for the clarity. That worked as expected.



Print Page | Close Window