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

Page and page footer behavior for two-sided printing

Status
Not open for further replies.

makeitwork09

Technical User
Sep 28, 2009
170
US
thread149-1447597

User of Crystal XI

Overview
- I have a report that is constructed so that, when printed, it is printed
using the two-sided printing function
- The report has 3 groups
- Group 1 are categories
- Group 2 contain the identifiers for the categories and it displays all
the data as well as a identifier title
- Group 3 further breaks down group 1 so it can be used to summarize the data elements of group 2
- I have 2 page footers
- PF1 contains the same title info as GH2 since I could not get repeat on
header page to work. The GF contains several sections as building blocks
for the report and two of the sections contain subreports.

What was done
To construct the report to print as desired, I used the information
provided by lbass in thread149-1447597 (very helpful)

As a result I have the following section setup:
GH1: checked off New Page After
GH1a: Contains the category title; no section formatting
GH1b: is a blank section, but checked off New Page After

GF2s: This is where I applied lbass’ suggestion from thread149-1447597. As a result, at New Page Before AND New Page After at x->2 I have
remainder(pagenumber,2) <> 0

PFa: From thread149-1447597 I applied lbass’ suggestion of
remainder(pagenumber,2) = 0 and {table.group1field} <>
next({table.group1field}) to the suppress section. However, I changed my to {table.group2field}

The latter works great, except for instances where the data (combination of data and subreports) flows over to the second page. The PFa conditional formatting causes the title to not appear on this page. Thus what is happening is, when the group 2 category results in 2 pages of data, the PF title does not display. However, it is correctly suppressed when the 2nd page is blank to provide for two sided printing.

Additional Issues
(1) The GH1 cover page does not have a blank page (at some point I had this working), therefore, when it prints, the G2 info is going to be on the back of it and cause a domino effect in regards to printing
(2) The last page occurs twice, meaning I have two blank pages instead of one. I suspect this is related to how I set up G1
 
I got my first additional issue working by removing the new page after from GH1, buy instead checking off New Page Aftee in GH1a. I kept GH1b as check of New Page After.

I forgot, however, to mention the issue of the PF displaying the title on the cover page (GH1a).

Thanks

 
Apologies for my memory lapses.

For my additional issues #2, I forgot to mention the second page with data is an overflow from one or more subreports. I'm wondering if I need to create a shared variable and add that to the conditional formatting of PFa?
 
This is confusing. I'm guessing you are really talking about Page HEADERS, not Page Footers, and I also think you are not distinguishing "New Page Before" from "New Page After".

Are you saying that a subreport in some cases must cross pages? What would you expect to happen in terms of the duplex copying? You can't split up a subreport except by suppressing later rows on the first page, and then on the second page adding another version of the sub in another report section with earlier rows suppressed. Very complex.

-LB
 
Rats, here I was thinking the details would be helpful.

I will try again.

First, no, I meant page footer.

Let’s say

G1 = Departments
G2 = Department Heads which I have on their own pages and not flowing one
after the other on a page

GH1 is the cover page showing the Department – I have them on their own
page using New Page After
GH2 is the department heads

GH2 is set as repeat on header page is the name of each dept head

GF2a contains summary information
GF2b is a subreport
GF2c is a subreport

Because GH2 is not repeating on the next page (the page with the subreports
when they flow over to another page) I decided to get around that by
putting the same title in the header of GH2 in the PF.

The above works fine expect
(1) I do not want the PF title to display on the GH1 page (Department cover
page)
(2) I do not want the PF title to display on the last page of the G2 group
if there is no data on the page. Meaning, if the subreport data did not
flow over to the last page.

The other thing that is working successfully with this report is the pages
being set up correctly for two-sided printing purposes.
 
For the first issue, you could reset the page numbers on after the group #1 footer, which would then mean you could suppress the PF with: pagenumber <> 1. If this isn't feasible, you could place a formula like this in the GH#1 and GH#2:

whileprintingrecords;
numbervar cnt := cnt + 1;

With a reset formula in GF#1:
whileprintingrecords;
numbervar cnt := 0;

Then use a suppression formula of:

whileprintingrecords;
numbervar cnt;
cnt = 1

For the second issue, you could create a formula like this in the subreport footer:

whileprintingrecords;
shared booleanvar flag := false;

Then in the page header of the main report, use a formula like this:

whileprintingrecords;
shared booleanvar flag := true;

Then use a suppression formula like this:

whileprintingrecords;
shared booleanvar flag;
flag = true

Combining the two into one suppression formula:

whileprintingrecords;
numbervar cnt;
shared booleanvar flag;
cnt = 1 or
flag = true

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top