Changing Layout on second page if necessary.

Stimulsoft Reports.NET discussion
Post Reply
alejandro
Posts: 19
Joined: Tue Dec 04, 2007 11:36 am
Location: Brazil

Changing Layout on second page if necessary.

Post by alejandro »

Hello, i need to do a report with a second and subsequent pages are different from the first page, all pages uses three differente containers componnent with one detail band each.

Until here i can resolve myself, using 2 pages, and setting the components of the first page to show only in first page and the components of the second page to show all except first... and the detail band linked to the same data set.

Its working fine, when a i have a report with more than 1 page, but this is the problem, when i have a report with only 1 one page, the second always appears too.

At first momment i setted the second page as enabled false, and counting the lines from the details i knew if had a need to setting its to true, like this:

Code: Select all

public void Data3_BeforePrint(object sender, System.EventArgs e)
{
    if (Line > 21)
        Page2.Enabled = true;
}
Because i knew it how many lines can be displayed on each container.

But one of the detail bands can assume various height sizes... and then my approuch its going down...

I want to control the appear of the second page, only if one of the detais has data to show, how i do this.

Can anyone help me?

Tanks.



Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Changing Layout on second page if necessary.

Post by Edward »

Hi,

You can check the amount of lines in detail band in the first page if you place a copy of all your bands with appropriate master-detail connections between them in a very beginning of the report but set all band sizes to zero.

Thank you.
alejandro
Posts: 19
Joined: Tue Dec 04, 2007 11:36 am
Location: Brazil

Changing Layout on second page if necessary.

Post by alejandro »

Hi Edward, tanks for your time and help....

There is no other way?

Because, in one of the detail bands, one text has "Can Grow" setted to true... so i dont know what amount of vertical space it (each line) will take...

best regards
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Changing Layout on second page if necessary.

Post by Edward »

Hi

Please send your report to support[at]stimulsoft.com for analysis, we will try to find a solution for you.

Thank you.
Post Reply