Page 1 of 1

Breaking the page after printing certain number of lines

Posted: Mon Sep 13, 2010 1:15 am
by Aidin Gharibnavaz
Hi!

I have a report with one page and a single Data Band in it.

I want the data band to break the page after printing certain number of lines. For example, after printing 30 lines of data, it should print the others in the next page.

The problem is, number of lines in the page (30 in the example above) sets from outside the report, and It's not a fix number. Also I don't know how many rows I've got in the data source. Thus pages have to be create at the run time.

Is it possible? Any ideas?

Breaking the page after printing certain number of lines

Posted: Mon Sep 13, 2010 1:46 am
by Alex K.
Hello,

You can add the following code in metod "After Print" on DataBand component:

Code: Select all

if (Line % Variable1 == 0) Engine.NewPage();
Please see the sample report in attachment.


Thank you.

Breaking the page after printing certain number of lines

Posted: Mon Sep 13, 2010 2:22 am
by Aidin Gharibnavaz
Thanks a lot for the quick answer! That's solved my problem.

Breaking the page after printing certain number of lines

Posted: Mon Sep 13, 2010 2:44 am
by Alex K.
Hello,

We are always glad to help you!
Let us know if you need any additional help.

Thank you.