Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to print group footer at a specific location on a page?

Status
Not open for further replies.

bcmayer

IS-IT--Management
Dec 12, 2002
1
0
0
US
Does anyone know how to print group footer at a specific location on a page? I want to print checks from a database. I suppressed the report, page and group headers so that the detail is the first section to print; the number detail lines are naturally variable depending on the number of transactions in the database for that customer. When the detail is finished printing I need to skip the appropriate number of lines to get past the check stub area and into the check and print the group footer. Anybody have any suggestions? (I'm using Crystal Reports 5.0 Professional)

 
I'm not sure about CR 5, that's very old (current is 9, with significant releases at the .5 levels).

The simplest might be to create several group footer sections before the displayed one, with 1 line height before the stub and suppress these conditionally.

This means knowing how many lines were printed in the detail, which means using a formula and a variable to keep count, and then by not suppresing the blank sections, you would get appropriate spacing.

A formula might be:

Group Header formula
whileprintingrecords;
global numbervar LineCount :=0;

Detail section formula:
whileprintingrecords;
global numbervar LineCount;
LineCount:=LineCount+1

Group Header Extra Section 1 Suppression Formula
whileprintingrecords;
global numbervar LineCount :=0;
LineCount > 6

Group Header Extra Section 2 Suppression Formula
whileprintingrecords;
global numbervar LineCount :=0;
LineCount > 5

etc.

Otherwise nothing comes to mind.

-k kai@informeddatadecisions.com
 
Hi all,

This suggestion by synapsevampire is great, but there is one small flaw.

In the extra Group Header suppression formulas, the second line should read:

global numbervar LineCount;

_not_

global numbervar LineCount:=0;

The second version resets the count and the section is not suppressed. Otherwise, this works beautifully and is the perfect solution for check printing, which is a project I'm working on currently.

Kristen
 
I suppose this feature might not have been available in early versions, but in CR 8.0 at least, you can go to format section->group footer and select "Print at bottom of the page." The group footer will then always print at the bottom of the page, assuming there is room enough for the details for that group on that page--otherwise it would print at the bottom of the next page, after details were complete.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top