Is it possible to change marings while rendering?

Stimulsoft Reports.NET discussion
Post Reply
munich
Posts: 82
Joined: Wed May 06, 2009 7:57 am

Is it possible to change marings while rendering?

Post by munich »

Hello,

I would like to have rendered the first (rendered) page with different margins as the following pages and use only one (template) page in the report.

Is this possible via code or in any other way?

Thanks for any help.
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Is it possible to change marings while rendering?

Post by Jan »

Hello,

You can use following script in BeforePrintEvent of page:

Code: Select all

if (PageNumber == 1)Page1.Margins = new StiMargins(1, 1, 1, 1);
else Page1.Margins = new StiMargins(3, 3, 3, 3);
Thank you.
munich
Posts: 82
Joined: Wed May 06, 2009 7:57 am

Is it possible to change marings while rendering?

Post by munich »

Hello Jan,

your advice gave me the hint for doing the same in the Stimulsoft.Report.StiOptions.Engine.GlobalEvents.ReportRendering-Event. And it works great!

:biggrin:

I thank you very much for your help!

Have a nice day.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Is it possible to change marings while rendering?

Post by Edward »

Hi

You are very welcome, please let us know if any help is required.

Thank you.
Post Reply