Page 2 of 2

Stimulsoft for dummies

Posted: Tue Jan 04, 2011 12:37 pm
by Pete
jorool wrote:Hello

How to add and set values to a variable on source code?
Can you show me an example?

Thank you.
This is something I'm curious about too.

Stimulsoft for dummies

Posted: Wed Jan 05, 2011 1:25 am
by Vladimir
Hello,

To create and add a variable you can use this code:

Code: Select all

var variable: StiVariable = new StiVariable("", "Variable1", "Variable1");
report.dictionary.variables.add(variable);
To change the value of a variable you can use this code:

Code: Select all

var variable: StiVariable = report.dictionary.variables.getByName("Variable1");
variable.value = "some value";
Thank you.