如何在数据库中创建报表中的族树。 [英] how to create Family tree in report from database.
本文介绍了如何在数据库中创建报表中的族树。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一张包含以下数据的表
ID名称ParentID
1 Siang null
2 jiang 1
3 sinkiong 1
4 shuinlee 1
5 Kao 3
6 mao 5
现在我要创建一个报告中的家谱喜欢这个
我正在使用c#windows表单应用程序..
http://www.yangfamilytaichi.com/yang/tree/images/familytree.jpg [ ^ ]
任何人都可以帮助我....
解决方案
您没有指定要使用的技术,因此这个答案是一般答案(请参阅我对该问题的评论)。但之前,一点小提示:我建议你使用 SearchBox [ ^ ](在本网站的右上角)。请阅读质量保证规则 [ ^ ],特别是 - 规则号。 4.
Crystal报表不支持图表形式的数据表示。 Crystal报表支持分组显示分层数据的方式与显示树控件的方式类似。
分层数据分组 [ ^ ]
此外,您还可以在TreeView控件中显示分层数据。 br />
演练:在TreeView控件中显示分层数据 [ ^ ]
如何打印treeview? [ ^ ]
但我建议您创建自定义图表,例如:在图形应用程序中构建面向图 [ ^ ]
如需了解更多信息,请参阅:
Cyclomatic复杂性 [ ^ ]
< a href =http://msdn.microsoft.com/en-us/library/ms379574%28v=vs.80%29.aspx>第5部分:从树到图 - 使用C#2.0对数据结构进行广泛的检查 [ ^ ]
i have a Table with following data
ID Name ParentID
1 Siang null
2 jiang 1
3 sinkiong 1
4 shuinlee 1
5 Kao 3
6 mao 5
Now i want to create a family tree in report likes this
I am using c# windows form application..
http://www.yangfamilytaichi.com/yang/tree/images/familytree.jpg[^]
Can any one help me....
解决方案
You did not specify a technology you want to use, so this answer is a general answer (see my comment to the question). But before, one little tip: i would suggest you to use SearchBox[^] (on the right-top corner of this site) before you ask a question. Please, read QA rules[^], especially - rule no. 4.
Crystal report does not supports data presentation in a graph form. Crystal report supports grouping to display hierarchical data in a similar way how it displays a tree control.
Grouping Data Hierarchically[^]
Also, you can display hierarchical data in a TreeView control too.
Walkthrough: Displaying Hierarchical Data in a TreeView Control[^]
How to print treeview?[^]
But i would suggest you to create custom graph, for example: Building an oriented graph in a graphical application[^]
For further information, please, see:
Cyclomatic complexity[^]
Part 5: From Trees To Graphs - An Extensive Examination of Data Structures Using C# 2.0[^]
这篇关于如何在数据库中创建报表中的族树。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文