Page 1 of 1

Using scripts in designer

Posted: Wed Mar 14, 2012 6:52 pm
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

Using scripts in designer

Posted: Thu Mar 15, 2012 9:41 am
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.

Using scripts in designer

Posted: Mon Mar 19, 2012 8:14 am
by André
Thanks!

Can I refer in such code to a global variable like 'page number'?

Using scripts in designer

Posted: Tue Mar 20, 2012 1:53 am
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.