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!

Suppress Page Header & Page Footer 1

Status
Not open for further replies.

ksbigfoot

Programmer
Apr 15, 2002
856
CA
I am using Crystal Reports Developer Edition V10.
I would like to Suppress the page header & footer only on the first page, but have it show up on any pages after that.
Could someone point me in the right direction.
Thanks
 
It would help if you provided more specifics.

If you want a blank first page, then right click on the report header and click on New page after

If you have data on the first page but don't want the page header to show, then right click on the page header section->format Section and check suppress. Go into X-2 and enter

PageNumber = 1


Cheers,
-LW
 
Howdy kskid,
Thanks for the reply.
I will try and make my post clearer.
I have the following pieces:
Page Header
Detail a
Detail b
Page Footer
Detail a has data on it and I don't want to display the header and footer.
Every page after that, I want to display the header and footer.

My main problem is that on Detail b, I want to start numbering to start at 1.

I hope this is clearer.
Thanks
 
Go to the format window for your page header and footer. Click the X-2 button across from the "Suppress (no drill down)" box and enter
PageNumber = 1

That should suppress these section for the 1st page only.
MrBill
 
Hi MrBill,
I did what you suggested and it suppressed the pages that started with a 1.

On Detail a, I clicked the box that says 'Reset page number after', because I want Detail b to start the page numbering at 1.

Thanks for checking into this for me.
 
My misunderstanding, sorry.
You could create your own page number using a variable in three formulas.

// Formula MyPageNumRH - goes in report header section.
WhilePrintingRecords;
NumberVar MyPageNum:= 0

// Formula MyPageNumRF - goes in report footer section.
WhilePrintingRecords;
NumberVar MyPageNum:= MyPageNum + 1

// Formula MyPageNumDisplay - goes in page header section.
WhilePrintingRecords;
NumberVar MyPageNum;
MyPageNum

Place the formulas in their correct sections.

In the page header and footer format sections conditionally suppress if:
{@MyPageNumberDisplay} = 0
MrBill
 
Hi MrBill,
I tried what you suggested and it is still suppressing the header and footer on the second page.
Here is the code I have in each section:
Report Header: Suppress (No Drill-Down) is not checked.
In the x-2 button beside Suppress, I put this code:
WhilePrintingRecords;
NumberVar MyPageNum = 0

Page Header & Page Footer: Suppress (No Drill-Down) is not checked.
In the x-2 button beside Suppress, I put this code:
{@MyPagenumDisplay} = 0

Report Footer: Suppress (No Drill-Down) is not checked.
In the x-2 button beside Suppress, I put this code:
WhilePrintingRecords;
NumberVar MyPageNum = MyPageNum + 1

My Formula "MyPagenumDisplay" has the following code:
WhilePrintingRecords;
NumberVar MyPageNum;
MyPageNum

When I put the : in the formula, I received an error that said the remaining text does not appear to be part of the formula (and it highlighted the : and everthing after it).

Thanks
 
Hi MrBill,
Thanks for your suggestion, I gave you a star, it worked!
I am new at this, so after I created formulas like you said, instead of putting the code right in the x-2 area, and after I actually dragged the formulas into the areas where you said it goes, it all worked great.
At first I didn't realize what "goes in report header" meant, but after thinking about it, it was very clear.
Thanks again.
ksbigfoot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top