Home > Asp.net > Limiting the number of records to be displayed in Crystal Report

Limiting the number of records to be displayed in Crystal Report


You might be working with crystal reports, and so must have a noticed that number of records displayed in crystal report are variable, sometimes, it displays 8, sometimes 10.. and so on according to the data, it sets it accordingly.

But we can handle this scenario i.e we can specify how many records we want the crystal report to display. For this you need to follow the below instructions:

To make it show 10 records per page do the following

1. Open the report in Design View

2. Right click on the Details section and select Section Expert

3. Make sure the Details section is selected in the Section Expert dialog box. Check the box that says “New Page After”

4. Click the formula editor button to the right of the checkbox.

5. Enter the following formula

if Remainder (RecordNumber, 10) = 0 then true else false

6. Click Save and Close and then click OK.

If you run the report it should break after each 10 rows.

About these ads
  1. leykap
    April 8, 2010 at 3:39 pm

    Yes this works but when you print ten records an extra page is printed.How do i solve this for ten,twenty or thirty records.

    • pankajlalwani
      April 9, 2010 at 7:39 am

      For removing extra page you getting, you can add a formula for the New Page After option instead of simply checking it. Click on the formula button and add the following:

      Not OnLastRecord

  2. Sam
    September 26, 2010 at 3:38 pm

    Thanks for the post. It was really helpful.

  3. December 31, 2011 at 2:56 pm

    Thanks man that help a lot
    thanx again :)

  4. Nicole
    February 7, 2013 at 2:08 am

    thank you.. it is very useful post.

  1. May 8, 2012 at 9:38 am
  2. May 8, 2012 at 10:33 am
  3. May 8, 2012 at 6:03 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: