Print in the last page using event

Stimulsoft Reports.NET discussion
Post Reply
Jorge Henrique
Posts: 6
Joined: Wed Feb 04, 2015 6:09 pm
Location: Brazil

Print in the last page using event

Post by Jorge Henrique »

Dear, Good afternoon!

I am using the following expression at the event before printing, so that the Panel component will appear only on the last page:

Code: Select all

if ( PageNumber != TotalPageCount )
{
this.Panel5.Enabled = false;
}
But validation is not going perfectly, the component is printed on all pages of the report. (File 1)
I'm not using the functionality to print only on the last page, because the component fills the page with an empty space. (File 2)

Please find attached the quoted report layout.

Thank you for your attention!
Attachments
DANFE.mrt
(256.75 KiB) Downloaded 199 times
File 2.pdf
(259.16 KiB) Downloaded 273 times
File 1.pdf
(271.07 KiB) Downloaded 260 times
---

Jorge Henrique
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Print in the last page using event

Post by HighAley »

Hello, Jorge.

You don't need to use any additional code.
Just set the Print on All Pages property of the Footer band to False.

Thank you.
Jorge Henrique
Posts: 6
Joined: Wed Feb 04, 2015 6:09 pm
Location: Brazil

Re: Print in the last page using event

Post by Jorge Henrique »

Hello Aleksey,

I set false for the property Print on All Pages of the Footer Band.
Also set to Print Only the Last Page to Print On property of Panel 3.
However, the result is unexpected. The page is still with an empty space. (File 1)
The codes were discussed, not to affect the process.

The following attached file with the changes.
Attachments
DANFE.mrt
(256.75 KiB) Downloaded 191 times
File 1.pdf
(259.14 KiB) Downloaded 307 times
---

Jorge Henrique
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Print in the last page using event

Post by HighAley »

Hello, Jorge.

All components that are placed exactly on a page are static.
Please, put the Panel3 on a Report Summary band or any other band.

Thank you.
Post Reply