Complex Master-Detail Report

21 January 2011
Visual Report Hierarchy Display One of the most interesting things about our reporting suite is the object model. Everything in a report is an XRControl, the report, the bands, and even the controls! Because of this, reports can be as simple or as complex as you wish since each control can also contain a list of XRControls! Whenever using the reporting system, there is a Report Explorer which visually depicts the current hierarchy of your report making it easier to keep track of this complex model (see left).

Because of this particular capability, there are a myriad of reports that can be created. A customer sent an email and asked about a specific type of report: Master Detail.

Their particular use case was a bit different however. We are often used to a master detail hierarchy like this:

- Master
         - Detail
         - Detail
- Master
         - Detail
and so on…

What if we had something like this:

Complex Data Hierarchy

where the hierarchy is a bit more complex? In this case, each user has potentially 3 detail tables: Items they own, items the created, and assigned tasks. Since each report can contain an infinite (memory limited) amount of child XRControl’s, and each band (since it is also an XRControl) can also have as many children as needed, this scenario is simple to do.

Master Detail Report Example

In an effort to make this transparent, you can view the video:

Master Detail Report Video

Or alternatively, you can download the sample and run it on your machine. Just take a look at sample E20018.

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

DXperience? What's That?

DXperience is the .NET developer's secret weapon. Get full access to a complete suite of professional components that let you instantly drop in new features, designer styles and fast performance for your applications. Try a fully-functional version of DXperience for free now: http://www.devexpress.com/Downloads/NET/

3 comment(s)
James Zhong

Good example! :)

21 January, 2011
Mark Harby

Seth

I am really impressed with the series of videos, webinars and articles you have been posting. So often the reports in our applications get left right until the very end of a project (which is usually late also) leaving them drab and unprofessional.

Some of the techniques you have shared cost very little in terms of time to setup but pay back in bucket loads.

Thanks again and keep them coming.

Mark Harby

Nottingham. UK

22 January, 2011
Seth Juarez (DevExpress)

Thanks guys! I've been spending the last little bit polishing up my XPO understanding! I want to get some videos out with XPO as the primary provider. Will keep you posted :)

22 January, 2011

Please login or register to post comments.