getting the page number for the printed component

Stimulsoft Reports.NET discussion
Jozef Balga
Posts: 56
Joined: Fri May 27, 2011 8:33 am
Location: Bratislava, Slovakia

getting the page number for the printed component

Post 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.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: getting the page number for the printed component

Post 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.
Jozef Balga
Posts: 56
Joined: Fri May 27, 2011 8:33 am
Location: Bratislava, Slovakia

Re: getting the page number for the printed component

Post by Jozef Balga »

I've attached a file with a sample report which demonstrates my problem. Thank You for Your time.
Attachments
dynamicDisplay.zip
sample report
(3.37 KiB) Downloaded 350 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: getting the page number for the printed component

Post 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.
Attachments
dynamicDisplay.mrt
(15.35 KiB) Downloaded 565 times
Jozef Balga
Posts: 56
Joined: Fri May 27, 2011 8:33 am
Location: Bratislava, Slovakia

Re: getting the page number for the printed component

Post 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.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: getting the page number for the printed component

Post 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.
Attachments
dynamicDisplay.mrt
(15.25 KiB) Downloaded 664 times
Jozef Balga
Posts: 56
Joined: Fri May 27, 2011 8:33 am
Location: Bratislava, Slovakia

Re: getting the page number for the printed component

Post by Jozef Balga »

Thank you for the solution, it works really well.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: getting the page number for the printed component

Post by HighAley »

Hello.

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

Thank you.
Jozef Balga
Posts: 56
Joined: Fri May 27, 2011 8:33 am
Location: Bratislava, Slovakia

Re: getting the page number for the printed component

Post 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.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: getting the page number for the printed component

Post by HighAley »

Hello.

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

Thank you.
Attachments
GetHieghtAfterCanGrow.mrt
(4.72 KiB) Downloaded 548 times
Post Reply