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

Count records per page in Crystal report 1

Status
Not open for further replies.

lana123

Programmer
Aug 20, 2003
79
US
Hi, people.
I'm using Crystal XI with Oracle 9 and really appreciate if anybody will help me with this:
I have to count the number of records on each page(records are in Details section).
The formula has to be placed in Page Footer.

For example, I have three payees on the first page -> so the number is 3.
I have four payees on the second page -> so the number will be 4.
Running total doesn't work because it's totaling the number on the second page to 7.
Thanks everybody in advance!
Lana
 
In the detail section:

whileprintingrecords;
numbervar x;
x := x +1;

In the page footer:

whileprintingrecords;
numbervar x;
x


In the page header:

whileprintingrecords;
numbervar x;
x := 0;


You could just put the first formula in both the details and page footer and not create the second formula, but I usually use the second formula and call it "Display" so it's more obvious what's going on.

 
Brian,

Well, no you can't do that. You need the display formula. If you put the accumulation formula in both the detail and the page footer, it will execute again in the page footer, and the result will be off by one.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top