Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Repeat Headers Post Reply Post New Topic
Author Message
Dr4ke
Senior Member
Senior Member


Joined: 09 May 2014
Online Status: Offline
Posts: 209
Quote Dr4ke Replybullet Topic: Repeat Headers
    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??





Edited by Dr4ke - 02 Oct 2014 at 4:33am
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet 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
IP IP Logged
Dr4ke
Senior Member
Senior Member


Joined: 09 May 2014
Online Status: Offline
Posts: 209
Quote Dr4ke Replybullet 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.
IP IP Logged
z9962
Senior Member
Senior Member
Avatar

Joined: 04 Jul 2012
Online Status: Offline
Posts: 161
Quote z9962 Replybullet 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?
IP IP Logged
Dr4ke
Senior Member
Senior Member


Joined: 09 May 2014
Online Status: Offline
Posts: 209
Quote Dr4ke Replybullet 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.
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.