Stimulsoft for dummies

Stimulsoft Reports.Flex discussion
Pete
Posts: 10
Joined: Sun Dec 26, 2010 5:09 pm
Location: Chicago, Illinois

Stimulsoft for dummies

Post 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.
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Stimulsoft for dummies

Post 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.
Locked