Print Page | Close Window

Repeat Headers

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=21092
Printed Date: 27 Apr 2024 at 5:05pm


Topic: Repeat Headers
Posted By: Dr4ke
Subject: Repeat Headers
Date Posted: 02 Oct 2014 at 4:33am
Good afternoon,

I currently have a report with multiple groups (Type A, Type B, Type C, Type D, Type E) but have manually created groups by having the 'heading' in a Detail section and then conditionally suppressing the information to suit... For example:

Detail A: Headings (suppress if {table.Field}<>Type A)

Detail B: Detail (suppress if {table.Field}<>Type A)

What I am then trying to do is to repeat the headings on following pages using the following formula's :

In the details section:
WhilePrintingRecords;
Global NumberVar RecordCount:= RecordCount+1


In the Page Header section
WhilePrintingRecords;
Global NumberVar RecordCount:= 0


This works apart from on the second page there is one record before it repeats the header which is not what I want.

Is there a way to get around this??






Replies:
Posted By: lockwelle
Date Posted: 03 Oct 2014 at 5:07am
I am guessing that you have a formula for suppressing detail A when RecordCount > 1...or zero, depending on where exactly the incrementing is taking place.

if a detail B is printing before Detail A, I would try modifying the suppression formula and adjusting the value.

it's only a guess...hope it helps


Posted By: Dr4ke
Date Posted: 03 Oct 2014 at 5:54am
The report works but it shows an extra row on the next page before the header. I've read up on this and apparently it's due to the way the details section writes first.


Posted By: z9962
Date Posted: 05 Oct 2014 at 9:49pm
check your page format settings? margins page size etc?
 
Are you also using the report header section? try and suppress this section just to see if it does fix the problem?


Posted By: Dr4ke
Date Posted: 05 Oct 2014 at 10:22pm
That is all ok - everything works as expected apart from the one record just appears at the top of the next page before the 'header' repeats.

Report header is also suppressed; I managed to get around the problem by having 3 sub-reports (instead of 1), applying a 'repeat headings' on a group and having the dynamic text fields in report header and report footer (2 per sub-report) which works as hoped.



Print Page | Close Window