Thursday, August 20, 2009

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.

0 comments: