Page 1 of 2

getting the page number for the printed component

Posted: Thu Oct 18, 2012 10:45 am
by Jozef Balga
Hello!

I created a report, which contains several report title bands and report summary bands, the last summary band is a band for signatures printed on the bottom of the page. The band for signatures is always printed, but the other summary bands are printed conditionally - based on a value from the input xml. My problem is: if the report is printed on 2 pages or more, I need to make sure that the signature band is not alone on the last page - there must be another summary band printed together with the signature band. The summary bands (except the signature band) must be printed on the top of the page. I am able to get the band which is the last one before the signature band, but I have no idea how to check if it is printed on a same page as the signature and then force the print on a new page if the summary band is going to be printed on the next page. Is there a way to solve my problem?
Thank you for the response.

Re: getting the page number for the printed component

Posted: Thu Oct 18, 2012 2:23 pm
by HighAley
Hello.

Please, check if the Keep Report Summary Together property is set to true.
If it is then, please, send us your report template with data.

Thank you.

Re: getting the page number for the printed component

Posted: Thu Oct 18, 2012 5:31 pm
by Jozef Balga
I've attached a file with a sample report which demonstrates my problem. Thank You for Your time.

Re: getting the page number for the printed component

Posted: Fri Oct 19, 2012 8:18 am
by HighAley
Hello.

The Report summary bend pulls over the data band to not print alone on the page.
Please, use put the Data Band on a page and set its' Count Data property to 1.
Look at the attached report template.

Thank you.

Re: getting the page number for the printed component

Posted: Tue Oct 23, 2012 6:55 am
by Jozef Balga
Thank you for your suggestion, but this solution does not solve my problem :(. There could be situations, where all summary bands are displayed and they fit to one page together with the signature band. In this case, because all summary bands are kept together, there could be a huge empty space after the data band and all summary bands are printed on a new page. I would like to keep the first few summary bands on the first page and the rest to be displayed on a new page together with the signature band. Is there a way to do that?
I almost forgot, I use Reports.Net 2012.1.1300 from 3 April 2012.
Thank you for your time.

Re: getting the page number for the printed component

Posted: Tue Oct 23, 2012 12:48 pm
by HighAley
Hello.

We have added some code to the Before Print event of the Report Summary bands.
Please, look at the attached report template.

Thank you.

Re: getting the page number for the printed component

Posted: Wed Oct 24, 2012 7:46 am
by Jozef Balga
Thank you for the solution, it works really well.

Re: getting the page number for the printed component

Posted: Wed Oct 24, 2012 7:51 am
by HighAley
Hello.

We are always glad to help you.
Let us know if you need any additional help.

Thank you.

Re: getting the page number for the printed component

Posted: Wed Oct 24, 2012 4:16 pm
by Jozef Balga
I am also interested in situations where the 'CanGrow' and 'CanShrink' properties of the component are set to true. Is it possible to get the actual size of the component and make decisions based on those values? Thank you for the response.

Re: getting the page number for the printed component

Posted: Thu Oct 25, 2012 12:19 pm
by HighAley
Hello.

You could do it in the After Print event of the container. Please, look at the attached report template.

Thank you.