Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Records per page Post Reply Post New Topic
Author Message
mist83
Newbie
Newbie


Joined: 20 Sep 2008
Online Status: Offline
Posts: 4
Quote mist83 Replybullet Topic: Records per page
     Posted: 20 Sep 2008 at 2:05pm
How do I determine (get, not set) the number of records that are being displayed on a page? As an example, I may have two full pages of data, or I may only have one and a half. I want to be able to somehow tell that the first example has 20 records (if 10 per page) with 10 on the last page and the second example has 15 records with only 5 on the last page.

Is there any formula field that will allow me to do this by perhaps placing a total at the bottom of the page that counts the records on the current page? I want to avoid marking up my report as much as possible with extra text, so I would like to do this by adding as few fields as possible.
IP IP Logged
DaveOnline
Newbie
Newbie
Avatar

Joined: 22 Sep 2008
Location: United States
Online Status: Offline
Posts: 5
Quote DaveOnline Replybullet Posted: 22 Sep 2008 at 12:49pm

If none of your rows can grow then you could try this, create a function and put it at the page footer.

if PageNumber < TotalPageCount then A else if recordnumber > A then recordnumber  - ( A * (TotalPageCount - 1))
else recordnumber
 
A = Number of rows on a full page
 
Example
So if maximum 10 rows fit on a page then it would look like this.
 
if PageNumber < TotalPageCount then 10 else if recordnumber > 10 then recordnumber  - ( 10 * (TotalPageCount - 1))
else recordnumber
 
Hope this helps
Dave
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum