Print Page | Close Window

"New Page After" except for last page in GF2

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=13910
Printed Date: 18 May 2024 at 9:10pm


Topic: "New Page After" except for last page in GF2
Posted By: ajmufic
Subject: "New Page After" except for last page in GF2
Date Posted: 28 Jul 2011 at 9:38pm
Hi All,
 
I have a report showing information grouped by Month, Week and Day. Like this:
GH1: Month
  GH2: Week
    GH3: Day
      Details...
    GF3: ---
  GH2: Summary of Week (THIS IS WHERE I WANT THE PAGE BREAK)
GH1: Summary of Month
 
I want to have a new page after each week, except after the last week (page) of a period, because I have a summary in the GF1 and it ends up on an empty page if there is a page break before it.
 
I tried to use "NOT OnLastRecord" but it only works for the last record, in the last week of the last month.
Is there some kind of "OnLastRecordOfGroup"?



Replies:
Posted By: lockwelle
Date Posted: 29 Jul 2011 at 3:04am
not knowing more than what you have mentioned, I would check if the next record matches the grouping criteria for GH1.  If the next record does not match, then I would suppress the New Page Before.
 
Something like this in the New Page Before x-2 button
Next({table.group1Field}) = {table.group1Field}
 
 
this will return true for all members of the same group, and so you will get the page break.  On a new group (or last record of the current group), it will return false and suppress the page break.
 
HTH
 
 


Posted By: ajmufic
Date Posted: 29 Jul 2011 at 4:50am

Thanks for your reply lockwelle.

It guided me to the solution. Thanks a lot!



Print Page | Close Window