Fix number of record per page.

Stimulsoft Reports.NET discussion
fkmfkm
Posts: 181
Joined: Thu Jul 05, 2007 11:26 pm
Location: Kuala Lumpur

Fix number of record per page.

Post by fkmfkm »

ok let me explain again..

I got DataBand1, HeaderBand2, DataBand2,

If data1 got 14 records and data2 got 13 records...page one will have 10 records for Databand1, 10 records for dataBand2. Page 2 will contain the rest of the 4 records for DataBand1 and 3 records for DataBand2. Its fix 10 records perband perpage.

So should I put DataBand1, Headerband2, and DataBand2 in one panel or how ?
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Fix number of record per page.

Post by Edward »

Hi,
fkmfkm wrote:How do i fix the number of record perpage ? lets say 10 records per page ?
There are plenty of ideas and possible solutions as well. Let me add another one, please.

You can set up CountData parameter of each DataBand in 10. Then in the BeforePrintEvent of each DataBand increase position of the appropriate DataSource 'by hand':

MyDataSource.Next();

When the datasource is over:

MyDataSource.IsEof == true

you have to set DataBand's height and heights of all components on it in zero (also in BeforePrintEvent):

DataBand.Height = 0;
MyComponent.Height = 0;

I hope this helps :)

Thank you.
fkmfkm
Posts: 181
Joined: Thu Jul 05, 2007 11:26 pm
Location: Kuala Lumpur

Fix number of record per page.

Post by fkmfkm »

I did like this..

BRANCH.Next()

If BRANCH.IsEof Then
Data1.Height = 0

Text9.Height = 0
Text1.Height = 0
Text3.Height = 0
Text7.Height = 0
Text5.Height = 0
End If

I set the countData to 5...(cause i just got 6 records)..some how it just prints the first 5 record...the 6th record does not print...whats wrong ?
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Fix number of record per page.

Post by Edward »

Hi

Please move that code:

BRANCH.Next()

in the AfterPrintEvent of the DataBand.

Thank you.
fkmfkm
Posts: 181
Joined: Thu Jul 05, 2007 11:26 pm
Location: Kuala Lumpur

Fix number of record per page.

Post by fkmfkm »

Edward wrote:Hi

Please move that code:

BRANCH.Next()

in the AfterPrintEvent of the DataBand.

Thank you.
Sorry I was away for a few weeks.

I moved the BRANCH.Next() to AfterPrintEvent.

The problem is still there..it just prints 5 record.
fkmfkm
Posts: 181
Joined: Thu Jul 05, 2007 11:26 pm
Location: Kuala Lumpur

Fix number of record per page.

Post by fkmfkm »

Hello,

Anyone can help ?
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Fix number of record per page.

Post by Edward »

Hi

Please see the following video which will explain you all the required steps:

Video


Thank you.
fkmfkm
Posts: 181
Joined: Thu Jul 05, 2007 11:26 pm
Location: Kuala Lumpur

Fix number of record per page.

Post by fkmfkm »

Edward wrote:Hi

Please see the following video which will explain you all the required steps:

Video


Thank you.
Fantastic..its working..

but one question...where do I learn about things like ...Engine.NewPage() ??
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Fix number of record per page.

Post by Jan »

Hello,

Sorry this method is not present in report dictionary.

Thank you.
fkmfkm
Posts: 181
Joined: Thu Jul 05, 2007 11:26 pm
Location: Kuala Lumpur

Fix number of record per page.

Post by fkmfkm »

Edward wrote:Hi

Please see the following video which will explain you all the required steps:

Video


Thank you.
Sorry,for bring this up after few months..

The solutions in the video got a problem... All the items after the Data band got pushed to the new page .I have another header band that only appear on the last page(instead of every page)

I want the all the bands on every page.
Post Reply