Get Textbox value from AS3

Stimulsoft Reports.Flex discussion
Locked
hugo
Posts: 359
Joined: Fri Mar 08, 2013 10:46 am

Get Textbox value from AS3

Post 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 ?
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Get Textbox value from AS3

Post 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.
hugo
Posts: 359
Joined: Fri Mar 08, 2013 10:46 am

Re: Get Textbox value from AS3

Post 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.
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Get Textbox value from AS3

Post 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.
hugo
Posts: 359
Joined: Fri Mar 08, 2013 10:46 am

Re: Get Textbox value from AS3

Post by hugo »

Thank you.
Seems that is what I need. I'll try that.
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Get Textbox value from AS3

Post by HighAley »

Hello.

We are always glad to help you.
Let us know if you need any additional help.

Thank you.
Locked