Page 1 of 1

Changing Layout on second page if necessary.

Posted: Mon Nov 30, 2009 6:45 am
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.




Changing Layout on second page if necessary.

Posted: Mon Nov 30, 2009 10:12 am
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.

Changing Layout on second page if necessary.

Posted: Mon Nov 30, 2009 10:45 am
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

Changing Layout on second page if necessary.

Posted: Mon Nov 30, 2009 5:00 pm
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.