Page 3 of 5

Fix number of record per page.

Posted: Thu Sep 10, 2009 7:55 pm
by Edward
Hi

Please show the result you would like to achieve.

Thank you.

Fix number of record per page.

Posted: Thu Sep 10, 2009 8:09 pm
by fkmfkm
Edward wrote:Hi

Please show the result you would like to achieve.

Thank you.
I have

DataBand1 (max 5 records)
HeaderBand2
DataBand2 (max 5 records)
HeaderBand3
DataBand3 (max 5 records)

I would like to limit the number of records for each databand to 5 for each page. If its more than 5 then then it will move to the next page and so on. I want all the bands to be on every page.

Fix number of record per page.

Posted: Tue Sep 15, 2009 9:31 am
by fkmfkm
Do you understand what I mean ?

Fix number of record per page.

Posted: Thu Sep 17, 2009 4:36 am
by Jan
Hello,

Add following code to AfterPrintEvent of each databand:

Code: Select all

if (mydatasource.Position > 5)mydatasource.Last();
Thank you.

Fix number of record per page.

Posted: Tue Sep 22, 2009 10:31 am
by fkmfkm
Jan wrote:Hello,

Add following code to AfterPrintEvent of each databand:

Code: Select all

if (mydatasource.Position > 5)mydatasource.Last();
Thank you.
but this way...it stops printing immediately. I wants it to continue to the next page...5 each page till no more records...

Fix number of record per page.

Posted: Wed Sep 23, 2009 7:26 am
by Jan
Hello,

Try following:

1. Create integer variable in report dictionary;
2. In DataBand Rendering event add following script:

Code: Select all

myvariable++;
if (myvariable > 5)
{
  myvariable = 0;
  this.Engine.NewPage();
}
Thank you.

Fix number of record per page.

Posted: Thu Sep 24, 2009 11:23 am
by fkmfkm
Jan wrote:Hello,

Try following:

1. Create integer variable in report dictionary;
2. In DataBand Rendering event add following script:

Code: Select all

myvariable++;
if (myvariable > 5)
{
  myvariable = 0;
  this.Engine.NewPage();
}
Thank you.
I have tested this method before....Edward has shown me this method before.

This method got problem..It will cause my subsequent Bands (Band2 and Band3) to be pushed away..

I want all my band1 band2 and band3 to be one every pages.....


Fix number of record per page.

Posted: Fri Sep 25, 2009 1:40 am
by Jan
Hello,

Band2 and Band3 have any joins to Band1?

Thank you.

Fix number of record per page.

Posted: Sun Oct 04, 2009 6:20 am
by fkmfkm
Jan wrote:Hello,

Band2 and Band3 have any joins to Band1?

Thank you.
No there is no join to Band1.


I even tried without band2 and band3, the header2 and header2 also got pushed to next page.

Actually what does Engine.NewPage() actually do ? From the name of the method its doing exactly what my report does. ..Moves to New page...

Fix number of record per page.

Posted: Mon Oct 05, 2009 5:16 pm
by Edward
Hi

Engine.NewPage() starts a new page, so after calling of that command next element of the report will be rendering on the new page.

Thank you.