Margins on varaibles

Stimulsoft Reports.WPF discussion
Post Reply
Niqu
Posts: 81
Joined: Wed Aug 08, 2012 9:08 am

Margins on varaibles

Post by Niqu »

Is it possible to have page/report margins on variables?
If yes, can you tell me how?

Thanks in advance.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Margins on varaibles

Post by HighAley »

Hello.
Niqu wrote:Is it possible to have page/report margins on variables?
If yes, can you tell me how?
Sorry, maybe we did not exactly understand your question. Could you explain your issue in more details?

Thank you.
Niqu
Posts: 81
Joined: Wed Aug 08, 2012 9:08 am

Re: Margins on varaibles

Post by Niqu »

Sure, i can try.
Page in properties has fields like "Margins". Default is it: (1, 1, 1, 1). I wanted to know, that is it possible to has it on variables? For example:
In code it look like this:
this.Page1.Margins = new Stimulsoft.Report.Components.StiMargins(1, 1, 1, 1);
I want something like this:
this.Page1.Margins = new Stimulsoft.Report.Components.StiMargins(leftMargin, rightMargin, topMargin, bottomMargin);
where leftMargin, rightMargin, topMargin, bottomMargin are double variables.

Maybe it is obviously, then sorry, for stupid question. I couldn't just find how to do it.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Margins on varaibles

Post by HighAley »

Hello.

You could do such code in the Begin Render event of the report or in the Before Print event of the Page.

Thank you.
Niqu
Posts: 81
Joined: Wed Aug 08, 2012 9:08 am

Re: Margins on varaibles

Post by Niqu »

This is what I wanted. Thank you for help once again.
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

Re: Margins on varaibles

Post by Ivan »

Hello,

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

Thank you.
Post Reply