Skip to content

How to create a hierarchical tree-like report based on data stored in a flat table

License

Notifications You must be signed in to change notification settings

DevExpress-Examples/reporting-winforms-create-hierarchical-report-from-flat-table

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reporting for WinForms - How to create a hierarchical report based on data stored in a flat table

This example illustrates how to create a hierarchical tree-like report based on data stored in a flat table. Data must meet certain requirements. Two additional fields are necessary to build a tree structure. The first field must contain unique values. The second field must contain values that indicate parent nodes for the current node. Here is a sample image illustrating the required structure.

The example's main report has the Level parameter to store the quantity of levels of hierarchical data. A value of this parameter is used to generate the initial data table. When the data table has been generated, it is converted to a hierarchical list of custom objects that is used as a report data source. The main report contains an XRSubreport instance that refers to the detail report. The detail report in its turn contains an XRSubreport instance that recursively refers to itself.

Files to Review

Documentation

More Examples