Print Page | Close Window

Suppress Footer for the last record of a group

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=8766
Printed Date: 05 May 2024 at 12:11am


Topic: Suppress Footer for the last record of a group
Posted By: kjoguth
Subject: Suppress Footer for the last record of a group
Date Posted: 30 Dec 2009 at 11:22am
I feel like this should be a fairly simple thing, but I can't seem to figure it out or find documentation anywhere.
 
I have created a report with several groups.  I have placed a line in the footer of one of the groups that I would like to suppress on the last record of each group.  Can this be done?  Any assistance is greatly appreciated!



Replies:
Posted By: DBlank
Date Posted: 30 Dec 2009 at 11:34am
move it to its own section and conditionally suppress the section with :
onlastrecord or next(table.groupfield)<>table.groupfield


Posted By: kjoguth
Date Posted: 30 Dec 2009 at 11:41am
onlastrecord only suppresses the footer for the last record on the report.  I need to suppress it for the last record of each group.   Sorry, I'm not following your reference to table.groupfield. 


Posted By: DBlank
Date Posted: 30 Dec 2009 at 11:51am

whatever field your are grouped (that you want to suppress on the last record for this group level) on use the next() function. This evaluates to see if the next rows value = the current rows value.

onlastrecord or next({table.field})<>{table.field}
 
e.g.
GH1 (using Customer.ID as group)
GH2(using Sales.No as group)
Details
GF2 - has line drawn on it
        conditional suppression using the formula 
        onlastrecord or next({customer.ID})<>{customer.ID}
GF1


Posted By: kjoguth
Date Posted: 30 Dec 2009 at 1:15pm
Got it!  That worked perfectly!  Thank you very much!



Print Page | Close Window