Page 1 of 1
Report Data - revisited
Posted: Mon Oct 08, 2012 1:38 pm
by ksukat
Sorry,
I have the following in my flex code:
xml =
<ActSum>
<reportOptions>
<sparity>0</sparity>
<eparity>5</eparity>
<sdate>05/01/2007</sdate>
<edate>05/30/2007</edate>
</reportOptions>
<asrec>
<ID>A105</ID>
<parity>0</parity>
<evdate>05/07/2007</evdate>
<event>ai</event>
<comment>FH</comment>
</asrec>
</ActSum>;
report.regData("ActSum","ActSum",xml);
report.dictionary.synchronize();
report.design;
When the report designer opens, I can't figure out how to bind to the data. I have tried to do a new data Source, but it doesn't "see" the columns (or any) of my xml.
what step am I missing ?
thanks.
Re: Report Data - revisited
Posted: Tue Oct 09, 2012 12:29 pm
by Vladimir
Hello,
We could not reproduce the problem, please see the attached image. For testing, we used 2012.2 version.
Thank you.

- img1.png (14.7 KiB) Viewed 7020 times

- img2.png (217.83 KiB) Viewed 7018 times

- img3.png (169.61 KiB) Viewed 7018 times
Re: Report Data - revisited
Posted: Tue Oct 09, 2012 1:37 pm
by ksukat
OK. What steps did you do to define the Datasource once the designer opened?
Maybe I am not doing that correctly.
Re: Report Data - revisited
Posted: Wed Oct 10, 2012 6:39 am
by Alex K.
Hello,
All steps on image in previous post.

- img1.png (14.7 KiB) Viewed 7007 times
Thank you.
Re: Report Data - revisited
Posted: Wed Oct 10, 2012 3:40 pm
by ksukat
Sorry but no.
the problem I am experiencing is with the creation of the datasource in the report designer. Evidently I am missing something.
What are the click steps to create the data source ?
For example:
click the dictionary tab.
click the new item drop down and select new datasource.
Since we are providing xml data programatically to the report, select "Data from DataSet, Data Tables".
In new data source popup, in the name in Source box type: What goes here?
in Name box type: what goes here?
I have tried ActSum.asrec in the Name in source box with asrec in the Name box, but it will not retrieve columns.
So, any help greatly appreciated.
Re: Report Data - revisited
Posted: Thu Oct 11, 2012 2:06 pm
by Vladimir
Hello,
If you want to add data sources as you described above, you need to create the xml database connection, for example:
Code: Select all
var database: StiXmlDatabase = new StiXmlDatabase("ActSum", "reports/data/ActSum.xsd", "reports/data/ActSum.xml");
report.dictionary.databases.clear();
report.dictionary.databases.add(database);
In your case you need a synchronize() method for synchronize the registered data with designer data dictionary:
We added a call of this function to the designer, it will be on the dictionary tab, menu Actions:

- img.png (82.99 KiB) Viewed 6998 times
The update will be available in the next prerelease build tomorrow.
Thank you.
Re: Report Data - revisited
Posted: Thu Oct 11, 2012 9:27 pm
by ksukat
My apologies, the problem I was experiencing was due to flex coding errors on my part. Once I corrected those errors, the designer functioned as expected.
Thanks for the assistance you provided.
Re: Report Data - revisited
Posted: Fri Oct 12, 2012 6:09 am
by HighAley
Hello.
We are always glad to help you.
Let us know if you need any additional help.
Thank you.
Re: Report Data - revisited
Posted: Mon Oct 22, 2012 2:27 pm
by gambop
I have the same problem.
This is my code:
var xml:XML=
<Demo>
<Customers>
<ID>1</ID>
<CustomerName>John Smith</CustomerName>
<City>Dallas</City>
</Customers>
<Customers>
<ID>2</ID>
<CustomerName>Antonio Moreno</CustomerName>
<City>Dallas</City>
</Customers>
<Customers>
<ID>3</ID>
<CustomerName>Elizabeth Brown</CustomerName>
<City>Houston</City>
</Customers>
</Demo>;
var report: StiReport = new StiReport();
report.loadReportFromString(reportString);
report.dictionary.databases.clear();
report.regData("Demo","Demo",xml);
report.dictionary.synchronize();
report.design();
But in the designer i see :
Data Source: not assigned.
And in the preview page Data band is empty
Re: Report Data - revisited
Posted: Tue Oct 23, 2012 10:27 am
by Vladimir
Hello,
Please see the answer in this forum topic:
http://forum.stimulsoft.com/viewtopic.php?f=17&t=35204
Thank you.