.NET Reporting: Data Access Enhancements (Coming soon in v14.2)

24 November 2014

This is huge. I usually don’t start blog posts this way but something about our reporting suite nagged at me: I don’t like binding reports directly to database. In fact, I’ve always advocated a multi-tiered approach for accessing data – I’ve long said binding to an IEnumerable<T> was the way to go. While our reporting suite can certainly handle this scenario, it tended to be a bit kludgy. In fact, using the BindingSource in an ASP.NET application with XtraReports required taking a dependency on System.Windows.Forms (eww).

In our upcoming 14.2 release we swung for the fence when cleaning up this area and have hit a home run.

Object Binding Source

Since a picture is worth a thousand words, I thought I would take you through the process of creating an object bound report.

Bind to Object

After choosing an assembly you can choose the appropriate data type (still the same as before – kind of).

Select Object

Usually one would pick the Student class in this case given that it is that type to which we wish to bind. But since we’re swinging for the fence, I will choose the StudentService class.

Select Method

Yes, soak that previous screenshot in – we are binding to methods for this report. WAT?! How does it know what to bind to?? What will it pass in to the method??

The answer to the first question is not too hard: we look at the return type. The second question is not as easy.

Manage Method Parameters

Just kidding, it is easy. You can either specify a value, use an expression, or tell the report to use parameters (the kind already available in XtraReports).

Object Bound Report

All that can be said is this:


Now reports can form part of your application in a natural way – not as an afterthought. All of the ingenuity you use to create service classes and overall application logic can now be easily leveraged across all of your reports.

Final Thoughts

I am really excited about the way we are both enlarging and yet simplifying the way you access, present, and analyze data.

As always, if there are any comments and/or questions, feel free to get a hold of me!

Seth Juarez
Email: sethj@devexpress.com
Twitter: @SethJuarez

8 comment(s)
Kendall Miller

Brilliant! In Loupe this is a big deal for us because we have everything as nice objects in memory and have struggled to provide a good designer experience in the reporting system.  This looks tailor made for us!

24 November, 2014
Edhy Rijo

Wow, impressive, even the guy with the applause!!!!

I use a custom framework with their own Business Object classes and the only way I was able to create my reports was using a custom Business Binding Source, I hope this can make it easier for me to bind to my classes without the need of the binding source.

24 November, 2014


Up until now I always ended up doing my "binding" using BeforePrint event on everything: labels, table cells, etc. I can't wait to use this!

25 November, 2014
Renaud Bompuis

Fantastic. I've always had misgivings about the traditional binding methods. While flexible, they tend to be cumbersome and brittle. This is a nice way to expose only what is necessary to a report.

Should make some things much easier.

25 November, 2014
Peter Thorpe

Truly excellent addition, I always ended up setting up the data in the code behind. This will cut a lot of code out.

25 November, 2014
Cesar Augusto

Big shining eyes here!

clap clap

25 November, 2014
Vamanan Jayakumar

Was expecting this !!

5 December, 2014
John Taylor_2

Seth,  Do you have  working example of this that you can share?

3 April, 2015

Please login or register to post comments.