Passing XML to the Report with Flex

Stimulsoft Reports.Flex discussion
Locked
rjmdfogo
Posts: 6
Joined: Fri Mar 30, 2012 7:00 am

Passing XML to the Report with Flex

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

Passing XML to the Report with Flex

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

rjmdfogo
Posts: 6
Joined: Fri Mar 30, 2012 7:00 am

Passing XML to the Report with Flex

Post by rjmdfogo »

thank you,

with this procedure can call the report!
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

Passing XML to the Report with Flex

Post by Andrew »

Hello,

Thank you for letting us know.
rjmdfogo
Posts: 6
Joined: Fri Mar 30, 2012 7:00 am

Passing XML to the Report with Flex

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

Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Passing XML to the Report with Flex

Post by Vladimir »

Hello,

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

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

Thank you.
rjmdfogo
Posts: 6
Joined: Fri Mar 30, 2012 7:00 am

Passing XML to the Report with Flex

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

Passing XML to the Report with Flex

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