Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: records limit Post Reply Post New Topic
Author Message
monkey123
Newbie
Newbie


Joined: 22 Sep 2008
Online Status: Offline
Posts: 2
Quote monkey123 Replybullet Topic: records limit
     Posted: 22 Sep 2008 at 8:04pm
i am using crystal report 7:
 
Now i wanan set a page limit to print only 40 records.
means if the total records = 50, first page will print 40 records, the 2nd oage will print 10 records.
please help..
thx...
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 23 Sep 2008 at 1:36pm
It's been a long time since I used Crystal 7.  Do you have the option to create a Running Total?  If so, here's what you do:
 
Create a running total that will count your records.  I'll call it {#RecordCount}.  Open the Section Expert.  On the details section (or whereever you need to have the page break) click on the formula button next to "New Page After" and add the following formula:
 
{#RecordCount} mod 40 = 0
 
This will tell Crystal to create a new page if there is no remainder when the record count is divided by 40 (meaning 40 records have been printed on this page.)
 
You may have to play with whether there is a check-mark in the box after "New Page After" to get this to work right.
 
-Dell
IP IP Logged
monkey123
Newbie
Newbie


Joined: 22 Sep 2008
Online Status: Offline
Posts: 2
Quote monkey123 Replybullet Posted: 25 Sep 2008 at 6:44am
thx for reply.
 
I have create a running total. at the Type of Summary field, i choose :count.
 
When I paste the formula
 ({#RecordCount} mod 40 = 0) at the formula editor, i hit this error:
The remaining text does not appear to be part of the formula.
 
please help..
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 25 Sep 2008 at 7:21am
Where are you pasting this in the formula editor?  For the section where you want the page break or someplace else?  Where is the cursor when you get the error? 
 
I haven't worked in Crystal 7 in a long time, so this may not work there. You may need to search in the Help for "modulus" to see if the syntax is the same.
 
-Dell
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