Print fixed rows per page in datawindow
Step 1: Add a calculation column, which must be placed in the detail segment. Input in expression:
Ceiling (getrow ()/20) <-- here 20 can also be replaced by a global function, which allows you to set the number of rows printed on each page at will.
Step 2: define the group and select rows> Create group...
Group by calculated column fields and select Check box --> new page on group break.
Step 3: set this calculation column as invisible.
In addition, if the last page is not enough to fill in blank lines. It is also very simple, as follows:
Long ll_pagerow = 6 // number of lines printed per page
Long ll_count, ll_row
Ll_count = dw_report.retrieve (...) // obtain the total number of rows in an existing report
Ll_count = ll_pagerow-Mod (ll_count, ll_pagerow)
If ll_count <ll_pagerow then
For ll_row = 1 to ll_count
Dw_print.insertrow (0) // fill in blank lines
Next
End if