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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

page footer

Status
Not open for further replies.

mperera

Technical User
Sep 7, 2001
20
0
0
US
I have a report with two groups and two details sections. The second details section contains a subreport that is actually an index of the accounts in the report. That second details section is suppressed 'not OnLastRecord', so that it will only print out once, at the end of the report, after the last record in details section 1. That all works fine.

The problem is, I want a page footer that displays group name 1, but while it is printing the index, the footer should just say "Index" (or something like that). If I try to use the same suppression logic as with the subreport (not OnLastRecord), the footer does not print on the page containing the last record from details section 1.

Any ideas? TIA.
 
Just create 2 GF1 sections (a & b) by Inserting Section Below.

Suppress one & Show the other based on the same logic.

Alternatively, use a single section but 2 text boxes that are suppressed (or not) using the same logic.

Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Right click the Report Footer (not page footer) and select insert section below. Place the subreport in this new section.

You can use variables to control what is displayed in the page footer, such as:

In the Report header place:

whileprintingrecords;
stringvar PgFoot:={table.groupfield}

Place the following formula in the page footer:

whileprintingrecords;
stringvar PgFoot:="Details section"
"Now Printing "+PgFoot

Now in the first Report Footer section place a formula with:
whileprintingrecords;
stringvar PgFoot:="Index"

Now you'll get the group field or the word index.

Hopefully this helps.

Try to avoid text descriptions of data and requirements, post technical information:

Crystal version
database/connectivity
Example data
Expected output

Ido's method will work too, but there a few gotchas in there I fear.

-k
 
Thanks for the suggestions. I don't think either of these solutions will work. I didn't mention that the details sections of both the main report and the subreport have two columns. It seems that pulling the subreport into the Report Footer will not work, since multiple columns are not allowed there (or, if they are are, I have not figured out a way to make them work).

The problem is specifically the last page that displays records in the details section of the main report, which has information grouped by organization. There are two columns, each containing:

Name
Address/Phone Info
Organization

The subreport (index) contains two columns of:
Name, Organization

so a person can easily be found within their organization.

The subreport is suppressed when Not onLastRecord, so it will only print once, at the end of the report. However, it is truly tied to the last detail record of the main report. If I use the same logic to control what goes in the page footer - the group (Org.) name, or "Index" - by having it print group name when not onLast Record and Index when onLastRecord, then, "Index" is showing up a page early - it shows up on the last page of the first part of the report, instead of the group name showing up there. So, the footer on that page will say "Index" instead of "ABC".

Hopefully this makes a bit more sense. Any other ideas? Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top