Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
hierarchical tree structure
ricardok
Hi!
At first, let me explain my database structure:
id|parent|name
1|null|a
2|1|b1
3|1|b2
4|2|c1
5|3|c2
6|5|d3 ...
Now, I need 2 ways, to show the data in a report:
1 - normal)
a
|-b1
| |-c1
|-b2
|-c2
|-d3
2 - reverse (starts with non-parents)
. |-c1
|-b1
| |-d3
| |-c2
|-b2
a
Is there in some way a solution to order the structure?
I also use this structure with php, and there I don't have such problems, but now, I need to dislpay the data in Birt.
Thanks for help!
Find more posts tagged with
Comments
bhanley
How many levels deep does the hierarchy go? Is that known at design time? If it is you can get the effect you need with groups and sub-groups. I will wait to know more about your data before I take the time to lay out the whole solution.
ricardok
Hi!<br />
<br />
The sturcture is dynamically, edited by users. <br />
In PHP I work with Array, just like this way: <a class='bbc_url' href='
http://www.phpbar.de/w/Baumstruktur_aus_DB_in_Array_abbilden'>Baumstruktur
aus DB in Array abbilden - php bar</a><br />
<br />
And for analysis we want to use birt. As long as I do not have a solution, i will add 2 fields in the database with deepth and order, and before user clicks a report, i will update the 2 new field so I can use them. But this is a bad way ...