Print Page | Close Window

Supress Detail section if Group is Suppressed

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=9046
Printed Date: 29 Apr 2024 at 2:14pm


Topic: Supress Detail section if Group is Suppressed
Posted By: Jesse
Subject: Supress Detail section if Group is Suppressed
Date Posted: 05 Feb 2010 at 12:10pm
Hello,

I am trying to write a report that has conditional suppression based on whether a group header is suppressed. Here is the situation.

The report I am writing has multiple detail sections. If one of the fields (for dollars sold per fiscal period) in any of the detail sections are below $100 I want all the details to show, even if one of the fields in the detail sections is above $100.

Here is what I have tried so far. I have grouped by a customer name and done a conditional suppression in the group header to say if the field for dollars sold > $100 then suppress. This seems to work for suppressing only if all of the fields are over $100.

If there is a way to write a suppression formula in the detail saying if group header suppressed then suppress details I think this will work for what I need. Otherwise I am open to other suggestions for how to re-structure the report to get the same results.

Thanks so much for any help!



Replies:
Posted By: DBlank
Date Posted: 05 Feb 2010 at 12:29pm
Create a formula field called 'Suppress' as:
if table.field<100 then 1 else 0
Now insert a Summary as a SUM of this fomrula field in your Customer Name group level.
Now in you Section Expert you can condionally suppress the header and detail sections using the summary:
SUM( mailto:%7b@Suppress%7d,%7bTable.CustomerNameField%7d%29=0 - {@Suppress},{Table.CustomerNameField})=0


Posted By: Jesse
Date Posted: 09 Feb 2010 at 8:22am
Thanks so much this worked perfectly!



Print Page | Close Window