This is a migrated thread and some comments may be shown as answers.

XML Datasources?

5 Answers 151 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Fooberichu
Top achievements
Rank 2
Fooberichu asked on 31 Jul 2008, 08:58 PM
I'll admit that I have been lazy and haven't really researched this, but one thing that would be really great is if the Telerik Reporting supported binding reports to an XML datasource.  I currently use ComponentOne (haven't subscribed to them for over a year though) for my reporting component but would love to switch everything I do over to Telerik and use only a single source.  Again, I haven't actually researched this so there *may* already be support for XML Datasources.

Would love to hear if I can do that or not.

5 Answers, 1 is accepted

Sort by
0
Svetoslav
Telerik team
answered on 01 Aug 2008, 10:00 AM
Hi Fooberichu,

If I understood you correctly the question is about the XmlDataSource ASP.NET control. The answer is Yes and No.

Since it implements the IListSource interface you can use it as a Report data source. For more information about the data sources that you can connect the Telerik Reports to please see Connecting Data to a Report.

On the other side XmlDataSource is a web control which requires to be hosted in a web page to operate. Telerik Reporting is neither an ASP.NET nor Windows Forms control/form/page so it cannot host or manage any control of any kind. For more information please see Designing Reports.

Greetings,
Svetoslav
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Fooberichu
Top achievements
Rank 2
answered on 01 Aug 2008, 01:26 PM
Sorry about that, I wasn't very clear with my question.  After posting I decided to look around a little and found that the answer to my question is a "yes", in the same fashion that it was a "yes" for the ComponentOne reporting.

I actually don't want to use the XmlDataSource control, so much as XML data.  I like to store the results of a report in the database so I can pull them out at any time and display them again, so binding a report against an XML document is rather handy.

With ComponentOne, it doesn't actually directly support this but they had provided an example where you could create your own "datasource" object that iterates through each row in the xml data and formats it to something their reporting could work with.

I have seen, now that I was less lazy, that I should populate a DataSet/DataTable with the data from an XML document and I can assign that as my datasource to a Telerik Report -- works for me.

So all that is left for me to do now is take a couple of my nastier reports, rebuild them using the Telerik reporting, build a helper class that I can reuse everywhere when I want to use XML data, and then see how it compares.

I'd *love* to get rid of my other control suites and just sit with Telerik.

Thanks for the reply!
0
Steve
Telerik team
answered on 04 Aug 2008, 03:09 PM
Hello Fooberichu,

We're glad that you've figured out what you're trying to achieve. Give it a spin and if you have any questions - we would gladly help.

Best wishes,
Steve
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Fooberichu
Top achievements
Rank 2
answered on 11 Aug 2008, 03:17 PM
I just wanted to follow up that I've gone ahead and tried this out and, after a couple bumps in the road, got it to work.  Looks like I have a replacement for my previous reporting toolkit now, yay!

As a side note -- suggestions were (in the documentation) to load the XML into a DataTable and pass that as the datasource to the report.  However this only works if your XML includes full schema information.  As a workaround, you can create a dataset and then read the xml into the dataset (even pass it to a specific datatable, if you want), but the beauty is on the DataSet you can "IGNORE" or "INFER" the schema so it works that way.

I plan on writing an intermediary class to use that will take the XML and create a datasource which, in turn, can be passed to a report as a datasource.  That will make it more usable in the future for me.

Thanks!
0
Rossen Hristov
Telerik team
answered on 12 Aug 2008, 09:36 AM
Hi Fooberichu,

We are glad that you managed to make it work and chose Telerik Reporting.

Thank you for the great feedback you are providing and feel free to contact us anytime if you bump into another problem.

Greetings,
Ross
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
Fooberichu
Top achievements
Rank 2
Answers by
Svetoslav
Telerik team
Fooberichu
Top achievements
Rank 2
Steve
Telerik team
Rossen Hristov
Telerik team
Share this question
or