Using scripts in designer

Stimulsoft Reports.WEB discussion
Post Reply
André
Posts: 4
Joined: Fri Feb 03, 2012 6:43 am

Using scripts in designer

Post by André »

Hi

I thought it wouldn't be possible to write code other than expressions inside a report via designer. But I just discovered it is possible, then I would like to know if you could point me to some documentation.

Some questions I have: can I modify components position in code? What expressions/statements can I write?

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

Using scripts in designer

Post by HighAley »

Hello.
André wrote:I thought it wouldn't be possible to write code other than expressions inside a report via designer. But I just discovered it is possible, then I would like to know if you could point me to some documentation.

Some questions I have: can I modify components position in code? What expressions/statements can I write?
You could use any C# or VB statement. It's depends on what language do you use.
For example, you could move text component in the Before print event with next code:

Code: Select all

this.Text1.Left = 8
Thank you.
André
Posts: 4
Joined: Fri Feb 03, 2012 6:43 am

Using scripts in designer

Post by André »

Thanks!

Can I refer in such code to a global variable like 'page number'?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Using scripts in designer

Post by HighAley »

Hello.
André wrote:Can I refer in such code to a global variable like 'page number'?
You could refer to a report variables. If you need to pass variable value from your project you should use next code:

Code: Select all

rep.Dictionary.Variables["Variable1"].ValueObject = dateTimePicker1.Value;
Thank you.
Post Reply