Print Page | Close Window

Create Group based on Details

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=22690
Printed Date: 20 Apr 2024 at 3:44am


Topic: Create Group based on Details
Posted By: jamboy40
Subject: Create Group based on Details
Date Posted: 01 Nov 2018 at 7:51am
I have an order that lists sold items. Some of these items require additional forms. I have a Y/N box already populated to note which items need the form. On my sales order, I created a group with a suppress for when the item is checked N. However, if there are Y items, it's still suppresses. I've narrowed it down, so if the first item is a Y, it prints the group saying "Need XXX Form", but if the first item is a N item, it suppresses. Even if item 2 is Y, it still does not print the Group area. It's like the Group will not look past the first line. What can I change to get the Group formula to look at all items to see if even one of them is checked as Y?



Replies:
Posted By: DBlank
Date Posted: 05 Nov 2018 at 2:28am
use a min/max value for the group on that Y/N field.
make sure there are no NULLS to be dealt with.
Then suppress based on the group group MIN or MAX result.


Posted By: jamboy40
Date Posted: 05 Nov 2018 at 4:07am
I'm sorry. Not sure I follow. It makes sense, I'm just not sure you to set that up. Do you have a quick example of the formula to set up a min max? The Y/N field I'm using is dot_flag. It would never be NULL.


Posted By: DBlank
Date Posted: 05 Nov 2018 at 4:51am
insert a summary on the dot_flag field as a MAX for the group.
It should create a summary field in the group footer that will have a formula like
Maximum({table.dot_flag}, {table.groupfieldhere})

No you can use a suppression formula for the whole group as
Maximum({table.dot_flag}, {table.groupfieldhere})='N'


Posted By: jamboy40
Date Posted: 05 Nov 2018 at 12:00pm
That worked perfectly. Thanks so much for the guidance. Learned a new trick today.



Print Page | Close Window