Report Data - revisited

Stimulsoft Reports.Flex discussion
Locked
ksukat
Posts: 25
Joined: Mon Aug 13, 2012 7:05 pm

Report Data - revisited

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

Re: Report Data - revisited

Post 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
img1.png (14.7 KiB) Viewed 7019 times
img2.png
img2.png (217.83 KiB) Viewed 7017 times
img3.png
img3.png (169.61 KiB) Viewed 7017 times
ksukat
Posts: 25
Joined: Mon Aug 13, 2012 7:05 pm

Re: Report Data - revisited

Post by ksukat »

OK. What steps did you do to define the Datasource once the designer opened?
Maybe I am not doing that correctly.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Report Data - revisited

Post by Alex K. »

Hello,

All steps on image in previous post.
img1.png
img1.png (14.7 KiB) Viewed 7006 times
Thank you.
ksukat
Posts: 25
Joined: Mon Aug 13, 2012 7:05 pm

Re: Report Data - revisited

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

Re: Report Data - revisited

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

Code: Select all

report.dictionary.synchronize();
We added a call of this function to the designer, it will be on the dictionary tab, menu Actions:
img.png
img.png (82.99 KiB) Viewed 6997 times
The update will be available in the next prerelease build tomorrow.

Thank you.
ksukat
Posts: 25
Joined: Mon Aug 13, 2012 7:05 pm

Re: Report Data - revisited

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

Re: Report Data - revisited

Post by HighAley »

Hello.

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

Thank you.
gambop
Posts: 2
Joined: Mon Oct 22, 2012 1:41 pm

Re: Report Data - revisited

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

Re: Report Data - revisited

Post by Vladimir »

Hello,

Please see the answer in this forum topic: http://forum.stimulsoft.com/viewtopic.php?f=17&t=35204

Thank you.
Locked