how to design master-detail report from self relation datasource?

Stimulsoft Reports.NET discussion
Post Reply
progame
Posts: 46
Joined: Sat Nov 25, 2006 9:12 am
Location: china

how to design master-detail report from self relation datasource?

Post by progame »

table
id name root
1 A null
2 A1 1
3 A2 1
4 B null
5 B1 4

report:
A
. A1
. A2
B
. B1
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

how to design master-detail report from self relation datasource?

Post by Edward »

Please add 'Data from other DataSource' which refer to the same data, but will be used as a Master. Then please create a Master - Detail relationship between these DataSources.

Thank you.
progame
Posts: 46
Joined: Sat Nov 25, 2006 9:12 am
Location: china

how to design master-detail report from self relation datasource?

Post by progame »

no connection, only use regdata to pass dataset.
progame
Posts: 46
Joined: Sat Nov 25, 2006 9:12 am
Location: china

how to design master-detail report from self relation datasource?

Post by progame »

you means must add new datasource?
i find hierachicalband is almost what i want. but it can't make two area for master/detail, because controls in master and detail is differnt maker like this:
master
..........name
detail
.................name description


i have only two level in table, so i need show master/detail.

the table already has self relation,
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

how to design master-detail report from self relation datasource?

Post by Edward »

In case of two levels of hierarchy you can use of course the Hierarchical band. And made some modifications or show/hide some text boxes on different levels.

Here a list of properties, which can be useful for you:

- In the BeforePrintEvent you can find out the current level of hierarchy:
(sender as StiHierarchicalBand).DataSource.GetLevel()
HierarchicalBand.Indent - controls shift of components of new level in hierarchical band.

Also you can use additional DataSource to the same data and with using a filters achieve the desired result. Please see the report in the attachment.

Thank you.
Attachments
61.TwoLevelsHierarchy.mrt
(24.49 KiB) Downloaded 251 times
Post Reply