XML Data Source

Stimulsoft Reports.WEB discussion
Post Reply
Mixxxa
Posts: 12
Joined: Fri Dec 02, 2011 10:09 am

XML Data Source

Post by Mixxxa »

Hello! Thank you again for the outstanding piece of software!

I have a question - there is an XML file I got from SQL request:

Code: Select all

DataTable dt = GetSomeDataTable();

foreach (DataRow dr in dt.Rows)
     {
          doc = new XmlDocument();
          doc.LoadXml((string)dr["resxml"]);
          ds = new DataSet();
          ds.ReadXml(new XmlNodeReader(doc));
     }
So here I have a DataSet with XML inside. How can I attach this XML to my report as DataSource?

I tried something like:

Code: Select all

 ds.Tables[0].TableName = "DataSource1";
 report.DataSources.Clear();
 report.RegData("DataSource1", ds.Tables[0]);
 report.Dictionary.Synchronize();
but it does not seem to work.

Any Ideas?

Thank you.
Mixxxa
Posts: 12
Joined: Fri Dec 02, 2011 10:09 am

XML Data Source

Post by Mixxxa »

Sorry, I just solved that ))) was my fault. Thank you!
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

XML Data Source

Post by Andrew »

Hello,

That's great!
Thank you.
Post Reply