Link to home
Start Free TrialLog in
Avatar of eeyo
eeyo

asked on

How do I add a Row Count in the Page Footer Section that counts the number of rows on the current page?

How do I add a Row Count in the Page Footer Section that counts the number of rows on the current page?  I can create a total report count in the Report Footer, but what I need is to have it summarized per page.  I am using Crystal XI (and also 2008) stand alone.
ASKER CERTIFIED SOLUTION
Avatar of Ido Millet
Ido Millet
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of eeyo
eeyo

ASKER

Use a variable. Reset it to 0 in a Page Header formula. Increment it in a detail section or group section formula, and display it in a page footer formula.
Newbie question:  I have created formulas, but where do I put the formula in the page header?  Do I use Section Expert and click one of the X-2 buttons?
You simply place the formula in the Group Header.  Anywhere in that section.  You can suppress the formula, so it's not visible.
Avatar of eeyo

ASKER

I am one step closer but the math doesn't seem to work.  I get 0 for the header, 1 for each of the rows in the detail section (instead of incrementing), and I get a page footer total of 1 (instead of actual number of rows on the page).  Any thoughts?

Formula for the Page Header
Global RowCount as Number
RowCount = 0
formula = RowCount

Open in new window


Formula for the details
Global RowCount as number
RowCount = Rowcount + 1
formula = RowCount

Open in new window


Formula for the Page Footer
Global RowCount as number
formula = RowCount

Open in new window

The assignment operator is ':='
You are using '=' instead.
Avatar of eeyo

ASKER

Sorry, I forget to specify that I am using Basic Syntax instead of Crystal Syntax.  I guess I could try with Crystal Syntax, but I think it is something else.  All three formulas verify OK when I using the formula verification button.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yes, as James suggested, use WhilePrintingRecords.
Avatar of eeyo

ASKER

Using a mulit-section global variable and WhilePrintingRecords solved this problem.  Thanks!