Page 1 of 1

Recursive Databands

Posted: Mon Jan 22, 2007 11:59 am
by Dave Canto
I want to create a report on a recursive table. I defined a relation between the table and itself.

My datastructure is as follows:
- ID
- MasterID
- Value

The relation is defined from Table1 to Table1.
The ParentColumn is ID, the ChildColumn is MasterID.
I want to create 2 bands.
The 1st band is filtered on ID.
The 2nd band is linked to the 1st band by the relation.

I end up in an endless loop.
Is it possible to have a report on recursive data with StimulReport?

Recursive Databands

Posted: Tue Jan 23, 2007 7:03 am
by Edward
Please take the build from January, 23. In that build we've realized the first version of the HierarhicalBand. This band allows to build the tree-based reports.

Thank you.

Recursive Databands

Posted: Fri Jan 26, 2007 6:24 am
by Mark Smith
This looks very promising, but I cannot get it to work.

My Data looks like this, same as Daves'.

ItemCode: String
_RecordID : Number
_ParentID: Number

an example being

Code: Select all

CODE            _RecordID  _ParentID
"ASSEM01",           1232,        -1 
"PART001.A",          488,      1232 
"PART001.A.1",      78332,       488
"ASSEM02",           5621,      1232 
What are the specific steps to get this data to display hierarchically? I mean, from a blank report, what do I add, what sorts do I need?

Regards
Mark

Recursive Databands

Posted: Fri Jan 26, 2007 6:44 am
by Vital
Place HierarhicalBand to page. Set property KeyDataColumn of band to _RecordID, property MasterKeyDataColumn to _ParentID. In property ParentValue type -1.
Report engine automatically sort data in right direction.

Thank you.

Recursive Databands

Posted: Fri Jan 26, 2007 8:11 am
by Mark Smith
Hi Vital -

Thanks for the clue about the role of ParentValue. The report has stopped repeating data, but there's no clear pattern to the row ordering.

It looks similar to the below:

Code: Select all

CODE            _RecordID  _ParentID
"ASSEM02",           5621,      1232 
"PART001.A",          488,      1232
"ASSEM01",           1232,        -1
"PART001.A.1",      78332,       488
Where I'm aiming for the earlier example with the -1 row at the top.

Recursive Databands

Posted: Fri Jan 26, 2007 8:17 am
by Edward
Strange result. We will check it now. It is still the very new feature...

Thank you.

Recursive Databands

Posted: Fri Jan 26, 2007 3:36 pm
by Mark Smith
Thinking about the record order, it will also be necessary to allow the user to specify a record order. eg by the CODE field in my example otherwise the records would appear in random (natural table order) in the report.

Recursive Databands

Posted: Tue Jan 30, 2007 2:11 am
by Edward
Fixed. Will be available in the build from the January, 30.

Thank you.