Page 1 of 1
Get Textbox value from AS3
Posted: Mon Mar 23, 2015 9:40 am
by hugo
Hello,
I have a very complex report that does a lot of calculations and not I want to be able to grab a value from a textbox from outside of the report AS3 side.
Something like:
var total:Number = Number(reportView....txtTotal.text);
This is possible ?
Re: Get Textbox value from AS3
Posted: Mon Mar 23, 2015 10:57 am
by HighAley
Hello.
Could you describe your task more detailed?
Do you need to get value from report template or from rendered report?
Thank you.
Re: Get Textbox value from AS3
Posted: Tue Mar 24, 2015 9:17 am
by hugo
Hello,
From a rendered report.
For example: Something like as event that is fired and I can then iterate thru the pages and get the rendered texbox values.
Re: Get Textbox value from AS3
Posted: Tue Mar 24, 2015 12:15 pm
by HighAley
Hello, Hugo.
As a way you could go through all components of rendered report and find necessary by name. Here is a code sample:
Code: Select all
for each (var page: StiPage in rep.renderedPages)
{
for each (var comp: StiComponent in page.components)
{
if (comp.name == "Table1_Cell38")
{
var text: String = (comp as StiText).text;
//here you could get text value
}
}
}
Thank you.
Re: Get Textbox value from AS3
Posted: Wed Mar 25, 2015 9:23 pm
by hugo
Thank you.
Seems that is what I need. I'll try that.
Re: Get Textbox value from AS3
Posted: Thu Mar 26, 2015 6:40 am
by HighAley
Hello.
We are always glad to help you.
Let us know if you need any additional help.
Thank you.