PARTNER

Selasa, 25 Mei 2010

Limiting the number of record which displayed on each page

Sometimes we need to limit the number of record which is displayed on each page. For example, we only need to display 20 records on each page. So, if we have 50 records, the report will print it in 3 pages. The report prints 20 records in the first two pages, and the remaining data will be printed in the last page. Limiting the number of record will only work if we set the number of record equal to or less than the maximum number of record can be displayed within the paper we have.

Okay, let's start this simple project through the following steps :

1. Create a simple report. In this article i use the item table as the datasource for the report



2. Create a formula named "NumberOfRecord" to determine the number of record to be displayed by the following syntax :

Global NumOfRec as Number
whileprintingrecords
NumOfRec = NumOfRec + 1
'we want to display only 20 records per page
if NumOfRec = 21 then NumOfRec = 1
Formula = NumOfRec

3. Place the above formula in detail section of the report and make it invisible.

4. Then Right click on Detail section name and choose "section expert" from the pop-up menu. Fill the checkbox labeled "New Page After" and click on the button labeled "X+1" to insert the condition using the above formula :

{@NumberOfRecord} = 20

Source : http://yudio.net/post/Limiting-the-number-of-record-which-displayed-on-each-page.aspx
Share:

0 komentar:

Posting Komentar

Blog Archive

Blogger templates