Changing Layout on second page if necessary.
Posted: Mon Nov 30, 2009 6:45 am
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:
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.
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;
}
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.