Page 1 of 1

Passing XML to the Report with Flex

Posted: Fri Mar 30, 2012 7:12 am
by rjmdfogo
I'm receiving a XML of back-end like this:

[Bindable]
private var myResult:XML;

[Bindable]
private var scores:XMLList = new XMLList();

myResult = new XML(event.result);

for each(var s:XML in myResult.Row){
scores.addItem(s);
}

How send this list to the Report?

Passing XML to the Report with Flex

Posted: Mon Apr 02, 2012 10:27 am
by Vladimir
Hello,

Please try the following code:

Code: Select all

var report: StiReport = new StiReport();
...
report.regData("ReportData", "ReportData", myResult);
report.dictionary.synchronize();  // For designer's data dictionary
Thank you.


Passing XML to the Report with Flex

Posted: Thu Apr 05, 2012 2:13 pm
by rjmdfogo
thank you,

with this procedure can call the report!

Passing XML to the Report with Flex

Posted: Fri Apr 06, 2012 1:09 am
by Andrew
Hello,

Thank you for letting us know.

Passing XML to the Report with Flex

Posted: Mon Apr 09, 2012 5:13 pm
by rjmdfogo
I'm with other problem.

if i send the xml like this:

xmldata = new XML(event.result);

_report.regDataXML('Row', 'Row', xmldata);
_report.dictionary.synchronize();
_report.showDialog();

the report show only one register.


Passing XML to the Report with Flex

Posted: Wed Apr 11, 2012 7:51 am
by Vladimir
Hello,

Please add the following line to clear the previously registered data:

_report.dataStore.clear();
_report.regDataXML('Row', 'Row', xmldata);

Thank you.

Passing XML to the Report with Flex

Posted: Wed Apr 11, 2012 9:07 am
by rjmdfogo
Andrew,

Thanks for help!

But,
I continue with problem, i'm starting believe that this problem occurs when i get the XML because when i define this XML like dataprovider of some component this also shows only one register.

To resolved this have that convert the XMl to XMLList but this method :

_report.regDataXML('Row', 'Row', xmldata);

No accept XMLList.

How I will resolve this?

Passing XML to the Report with Flex

Posted: Thu Apr 12, 2012 5:39 am
by Vladimir
Hello,

Please explain the problem in more detail. The report.regData() method registers the entire table, but not row by one. If you register another table with the same name, it will not work correctly.

Thank you.