How to convert Databand as Recursive Band????
-
- Posts: 85
- Joined: Sat Jan 20, 2007 4:21 am
How to convert Databand as Recursive Band????
Hi,
i have a table called category.it contains following columns category_id,parent_category.
sample data's are
category_id parent_category
1 ------------------ 0
2 ------------------ 1
3 ------------------ 1
4 ------------------ 2
5 ------------------ 2
6 ------------------ 4
7 ------------------ 4
how i generate a report like,
1----category_id
category-details
2-------sub_category1
sub_category1-details
4-----------sub_category2
sub_category2-details
6-------------- sub_category3
sub_category3-details
Please,Any One give me the guidelines......!
thanks in advance...!
i have a table called category.it contains following columns category_id,parent_category.
sample data's are
category_id parent_category
1 ------------------ 0
2 ------------------ 1
3 ------------------ 1
4 ------------------ 2
5 ------------------ 2
6 ------------------ 4
7 ------------------ 4
how i generate a report like,
1----category_id
category-details
2-------sub_category1
sub_category1-details
4-----------sub_category2
sub_category2-details
6-------------- sub_category3
sub_category3-details
Please,Any One give me the guidelines......!
thanks in advance...!
How to convert Databand as Recursive Band????
Please use for this goal a new Hierarchical band.
You have to set the following properties of the Hierarchical band according your example:
DataSource = your DataSource
ParentValue = 0
KeyDataColumn = category_id
MasterKeyDataColumn = parent_category
But the result differs from yours. You will get the following:

Thank you.
You have to set the following properties of the Hierarchical band according your example:
DataSource = your DataSource
ParentValue = 0
KeyDataColumn = category_id
MasterKeyDataColumn = parent_category
But the result differs from yours. You will get the following:

Thank you.
-
- Posts: 85
- Joined: Sat Jan 20, 2007 4:21 am
How to convert Databand as Recursive Band????
Hi Edward,
thanks for your reply. but i use stimulreport version 2006.4. i didn't get that hierarchical band. please provide any other solution....
thanks.
thanks for your reply. but i use stimulreport version 2006.4. i didn't get that hierarchical band. please provide any other solution....
thanks.
How to convert Databand as Recursive Band????
Can you specify amount of level data in your table or table can contain unlimited level of data?
-
- Posts: 85
- Joined: Sat Jan 20, 2007 4:21 am
How to convert Databand as Recursive Band????
Hi Vital,
sorry for the late reply. My table contains unlimited level of data. that is subcategory contains many levels of subcategory. please provide the solution......(i am using stireport 2006.4 version)
thanks in advance......
sorry for the late reply. My table contains unlimited level of data. that is subcategory contains many levels of subcategory. please provide the solution......(i am using stireport 2006.4 version)
thanks in advance......
How to convert Databand as Recursive Band????
You can sort your data in right direction befoore report rendering?
Thank you.
Thank you.
-
- Posts: 85
- Joined: Sat Jan 20, 2007 4:21 am
How to convert Databand as Recursive Band????
Hi vital,
i sort category_id in ascending order. category_id datatype is vary from database to database. that is int to varchar.
thanks.
i sort category_id in ascending order. category_id datatype is vary from database to database. that is int to varchar.
thanks.
How to convert Databand as Recursive Band????
Place all components on Databand to container. Container place on databand. After then add following code in BeforePrintEvent of Databand:
Thank you.
Code: Select all
Container1.Left = MyDataSource.level * 20; //20 depends from report units
-
- Posts: 85
- Joined: Sat Jan 20, 2007 4:21 am
How to convert Databand as Recursive Band????
Hi vital,
Container1.Left = MyDataSource.level * 20;
I tried this code. but it shows an error ("The Name MyDataSource does not exist in the current context")
In the above line MyDataSource specifies what ?
Please Provide the solution with example....
thanks.
Container1.Left = MyDataSource.level * 20;
I tried this code. but it shows an error ("The Name MyDataSource does not exist in the current context")
In the above line MyDataSource specifies what ?
Please Provide the solution with example....
thanks.
How to convert Databand as Recursive Band????
MyDataSource - the DataSource in the report which is contains your data.
level - it is a field in the MyDataSource which contains an integer value which sets a level of the nesting that field in your tree. So you need additional field to build the report.
Example data:
Category_id parent_category level
1 ------------------ 0 -------------------0
2 ------------------ 1 -------------------1
3 ------------------ 1 -------------------1
4 ------------------ 2 -------------------2
5 ------------------ 2 -------------------2
6 ------------------ 4 -------------------3
7 ------------------ 4 -------------------3
Thank you.
level - it is a field in the MyDataSource which contains an integer value which sets a level of the nesting that field in your tree. So you need additional field to build the report.
Example data:
Category_id parent_category level
1 ------------------ 0 -------------------0
2 ------------------ 1 -------------------1
3 ------------------ 1 -------------------1
4 ------------------ 2 -------------------2
5 ------------------ 2 -------------------2
6 ------------------ 4 -------------------3
7 ------------------ 4 -------------------3
Thank you.