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

suppress page header on the next page when detail finished 2

Status
Not open for further replies.

ghelfer

Programmer
Apr 1, 2011
7
BR
When I have a lot of data showed on detail page and this detail "area" goes to the end of the page I have a problem with de page header that appear in the next page.
In this case page header is visible but without any detail data bellow.... I tryed to suppressing blank, fit sections and some formulas like:

if pagenumber = 1 then false else
if NextIsNull ({Table.Descr}) or OnLastRecord then true

but NO deal!
 
Is there nothing else on the second page? In the gray area to the left, what report section is identified? Can you confirm that this extra page is in Crystal and not in another application that you have exported to.

-LB
 
In this second page (or the last, depending of the detail size demand) I have Report Footer A, Report Footer B end PageFooter.
 
You can either use a suppression formula on the page header:

onlastrecord

...which would work in all cases except when there is only one detail row on the last page--when it would inappropriately suppress the page header.

Or you could create these formulas:

//{@false} to be placed in the report header and suppressed:
whileprintingrecords;
booleanvar flag := false;

//{@true} to be placed in the report footer_a section and suppressed:
whileprintingrecords;
booleanvar flag := true;

Then in the section expert->page header->suppress->x+2, add this formula:

whileprintingrecords;
booleanvar flag;
flag = true; //note no colon

-LB
 
Before your post I was trying some solutions based in other threads:

Section expert->detail->keep together->x+2:
booleanvar flag := false;

Section expert->report footer->keep together->x+2:
booleanvar flag := true;

Section expert->page header->suppress->x+2:
booleanvar flag;
if pagenumber <> 1 then
if flag = true then true;

I have 2 questions:
1. This formula above works, but I don´t know if is the correct way to used it! What you think?
2. When you mentioned "{@true} to be placed in the report footer_a section and suppressed:" I´m guessing to put the {@true} formula in Section expert->report footer->suppress->x+2.. ok?

Thank you for your support!
 
No, I meant create{@true} annd {@false} and then physically place them in the indicated sections and suppress them. You need to add "whileprintingrecords" to your formulas. Only the last formula belongs in the section expert, and this one picks up the current value of the flag and suppresses if it is true--and it will only be true if the RH_a is the first section on the page.

whileprintingrecords;
booleanvar flag;
if pagenumber <> 1 then //this is unnecessary
if //this is unnecessary
flag = true
then true;//this is unnecessary

-LB
 
Ahhhh I got it now, thanks a lot lbass works perfect, you're the best .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top