Hi everybody.
recently I was working in a project where the requirement was save "trdx" files into a DB and show them in a asp.net web form application. As additional information, the data to populate the reports were in XML files.
so I realized to late that "Telerik reporting" doesn't accept xml as datasource or at least I couldn't find a direct way to achieve that. I read that you can transform the xml into objectdatasource but it was little complicated due the dynamism in the project.
at the end I decided to work with a user function that basically accept two parameters
- XPathExpression => the xpath query to find the data in the xml string
- xmlDocument => the xml string, I pass it to my report by a parameter.
The function :
[Function(Category = "XPath", Namespace = "XmlTelerikReporting", Description = "Find the information from the default report parameter XmlDataSource using XPath expressions ")] public static object XmlValue(string XPathExpression, string xmlDocument) { #region XmlValue try { XmlDocument xmlDoc = new XmlDocument(); xmlDoc.LoadXml(xmlDocument); xmlDoc.DocumentElement.RemoveAttribute("xmlns"); XmlDocument newDom = new XmlDocument(); newDom.LoadXml(System.Text.RegularExpressions.Regex.Replace( xmlDoc.OuterXml , @"(xmlns:?[^=]*=[""][^""]*[""])", "", System.Text.RegularExpressions.RegexOptions.IgnoreCase | System.Text.RegularExpressions.RegexOptions.Multiline)); object xmlXPathValue = newDom.SelectSingleNode(XPathExpression) != null ? newDom.SelectSingleNode(XPathExpression).Value : null; return xmlXPathValue; } catch (Exception ex) { //a pretty ans secret way to catch exceptions } #endregion }
How to use in expression:
= XmlTelerikReporting.XmlValue( "//@parametertofind" , Parameters.xmlDocument.Value )
I will really appreciate any feedback regarding to my code display above.
and it will be awesome if you implement something in telerik reporting in order to accept XML files as Datasource
Regards!
Hi,
I have a Asp.Net MVC web application. Using Telerik html report viewer. I am using Visualstudio 2015 to open the solution. When I open ReportDesigner file, see Telerik report controls like , table, crossbar, list are missing in VS toolbox.
I tried exporting controls from Telerik.Reporting dll in toolbox but no luck.
Do I have to install any plugin to get all these controls listed in the toolbox of VS 2015?
Hi, is there a way to retreive the old and good query designer like the one in visual studio? Honestly, the fact that we can type the query while in the designer or, lost what we put outside of it, is a pain in the ass and is not usefull at all. The one in Visual Studio is perfect. Why it is gone?
thanks,
Thanks you,
Scott
How to add the graph in table cell ?? ..( like Tablelayout panel )
i want to add a more than 10 graph programmatically in row and column manner.so tried to add the graph into table cell , but it not accept the graph control.
please give any idea .....

I am very green with reporting in general.
I am using VS2013 to design a simple report.
- I created a report and a data source.
- I added a report parameter and a data source to show a list of available values.
My question:
1) How do I take the report parameter and tie it to my data source?
For example the data source is simple "SELECT * FROM BOOKS"
I would like to set up as "SELECT * FROM BOOKS WHERE BOOK_TYPE = [MY PARAMETER]"
I manually added the following to my SelectCommand for the data source
SELECT * FROM BOOKS WHERE BOOK_TYPE == Parameters.ReportCodeParam.Value
However that didn't work.
On the data source I also see a Parameters property. When I go to that property I don't see the parameter that I created on the report.
Please advise.
