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

how to make last page of group empty ...

Status
Not open for further replies.

mberni

IS-IT--Management
Jul 25, 2001
197
DE
Hi!

I want to print doublesided on paper with our company-logo on the frontside but not on the back. so i have to make every groups pagecount even, so the first side of every new group is always on the frontside of my paper.

to accomplish that i had the idea to place an empty additional group1-footer which is suppressed by the following formula:

iif(next({group1keyfield})<>{group1keyfield} and (PageNumber/2)=round(pagenumber/2),false,true)

this wont work, since i reset the pagecounter on the last page of a group (in the footer before the even-maker).

furthermore i have a pageheader, which is only printed on pages 2 ff. of each group1. but i dont want it to be printed on the blank last page created by my even-maker.

last problem is that i still want to print "page n of m" on each real page, but i don't want the last (blank) page to be counted because its empty.

i guess i am thinking far to complicated but i am pulling out my hair on this one.

please save me ... :)

example-output:

first group has 3 pages. output should be:

page 1: ph1, gh1, page 1 of 3
page 2: ph2, page 2 of 3
page 3: ph2, gf1a, gf1b, gf1c, page 3 of 3
page 4: empty page added by gf4, reset page count

second group has 2 pages:
page 1: ph1, gh1, page 1 of 2
page 2: ph2, gf1a, gf1b, gf1c, page 2 of 2, reset pagecount

third group has 3 pages. output should be:

page 1: ph1, gh1, page 1 of 3
page 2: ph2, page 2 of 3
page 3: ph2, gf1a, gf1b, gf1c, page 3 of 3
page 4: empty page added by gf4, reset page count

 
Please see thread149-1150686. I think this addresses all your issues.

-LB
 
Hi lbass,
thanks again for your answer. sorry for my late response, but i was out of office.

i did as you suggested, but it seems it won't work.

we are using Crystal Reports 9 Developer Edition.

I have two different pageheader, PH1 for the first page of each group and PH2 for pages 2ff.

Furthermore i already have 4 Group1-Footers (a-d) so the "even-maker" goes into GF1e for me with formula to suppress:
Code:
whileprintingrecords;
numbervar pagecnt;
remainder(pagecnt,2)=0 and {mytable.renr}<>next({mytable.renr})

now i placed in the suppress-formula for PHa:
Code:
whileprintingrecords;
numbervar pagecnt;
pagecnt<>pagenumber

for suppress-formula for PHb i thought this would make sense then:
Code:
whileprintingrecords;
numbervar pagecnt;
pagecnt=pagenumber

Furthermore i wrote a formula to print me pagecnt, pagenumber and totalpagecount in my PH1 for debugging purpose.

Now this what i get:

PH1 (pagecnt 1, pagenumber 1, totalpagecount 4)
PH1 (pagecnt 2, pagenumber 2, totalpagecount 4)
PH1 (pagecnt 3, pagenumber 3, totalpagecount 4)
PH1 (pagecnt 4, pagenumber 4, totalpagecount 4)
--- groupchange ---
PH1 (pagecnt 1, pagenumber 1, totalpagecount 1)
PH1,GF1e (pagecnt 1, pagenumber 1, totalpagecount 1)
--- groupchange ---
PH1 (pagecnt 1, pagenumber 1, totalpagecount 3)
PH2 (pagecnt 2, pagenumber 1, totalpagecount 3)
PH2 (pagecnt 3, pagenumber 2, totalpagecount 3)
--- groupchange ---

so what's going on here? i think i made some mistake, since i cannot believe that your ideas won't work at last :)
 
I can't really tell exactly what you've done. For me to figure out what's gone wrong, I would have to see what you did, step by step, and what formulas (contents) you used where, including your test formula.

Also, your example of results is confusing. I guess you mean PH_a and PH_b? I also can't tell what is a blank page versus a page containing data.

I tested the solution I gave in the other thread, so know it works in that case.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top