Report Design
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Report Design
Message Icon Topic: how to limit records per page Post Reply Post New Topic
Author Message
rajendran
Newbie
Newbie


Joined: 03 Oct 2012
Online Status: Offline
Posts: 5
Quote rajendran Replybullet Topic: how to limit records per page
    Posted: 05 Oct 2012 at 6:55pm
I am using crystal report 8

i extracted 50 records from database to my report.
i want to display
15 records in page1,
10 records in page2,
20 records in page3 and
remaining in last page

i know to display equal number of records in every page. But if i want different number of records in different page then how do i do it. kindly help me.

rajendran
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 08 Oct 2012 at 4:04am
Try this:
 
1.  Create a formula that will count the number of records as they print.  I'll call this {@RowCount}.
2.  Go to the Section Expert, click on the formula button to the right of New Page After (DO NOT check the checbox!)
3.  Add something like the following formula:
 
 {@RowCount} in (15, 25, 45)
 
This should give you the page breaks you're looking for.
 
-Dell
IP IP Logged
rajendran
Newbie
Newbie


Joined: 03 Oct 2012
Online Status: Offline
Posts: 5
Quote rajendran Replybullet Posted: 09 Oct 2012 at 8:36pm
{@RowCount} in (15, 25, 45) this code got an error message saying the string need to be closed

so i tried like the below one

{@@RowCount} in "15,10,5"     this code got accepted, but i did not get the desired output.

Can you help me. it is very urgent for me.
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 11 Oct 2012 at 3:40am
Try {@RowCount} in [15, 25, 45]
 
-Dell
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.014 seconds.