Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to use OData (WCF Data Services) to provide data for a report

$
0
0
At the moment, XtraReports cannot connect to an OData data source directly. 

Our reporting tools, however, are data source agnostic and support data sources of different types including .NET data providers, lists (implementing the System.Collections.IList, System.ComponentModel.ITypedList, or System.ComponentModel.IBindingList interface), and XML data sources. To learn more, refer to Data Binding Approaches.

So, to provide report data through the OData service, get IList data from the OData Service and then pass it to a report. Here are implementation details.

1. Add the OData Service Reference to your project. Now, the OData service context is registered in the application. See the Calling an OData Service From a .NET Client (C#) article for details.
2. Create a data model from the OData Service context. This data model will retrieve data from the OData service and return IList data.

Please note that OData defines query options that can be used to filter, sort, page data, and so forth. For more details, see the LINQ Considerations (WCF Data Services) topic on MSDN.

3. Bind a report to this data model through the ObjectDataSource component. Please note that it is necessary to retrieve actual data from a custom object data source. Please refer to Retrieve the Actual Data.

See also: Using the Web Service as an XtraReport.DataSource

Question Comments

Added By: MichaelG at: 8/16/2016 11:55:27 PM    Will this feature be possible in the future ?
Will it be possible to get report data via an odata service directly in report designer with the query builder anytime?


Added By: Jannet (DevExpress Support) at: 8/17/2016 12:20:33 AM    

Hello,

I've created a separate ticket on your behalf (T415788: Will it be possible to get report data via an odata service directly in report designer with the query builder anytime). It has been placed in our processing queue and will be answered shortly.


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>