Recursive Databands

Stimulsoft Reports.NET discussion
Post Reply
Dave Canto
Posts: 18
Joined: Mon Jan 22, 2007 11:51 am
Location: Belgium

Recursive Databands

Post 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?
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Recursive Databands

Post 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.
Mark Smith
Posts: 37
Joined: Tue Jun 13, 2006 8:59 am
Location: Yorkshire, UK

Recursive Databands

Post 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
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Recursive Databands

Post 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.
Mark Smith
Posts: 37
Joined: Tue Jun 13, 2006 8:59 am
Location: Yorkshire, UK

Recursive Databands

Post 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.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Recursive Databands

Post by Edward »

Strange result. We will check it now. It is still the very new feature...

Thank you.
Mark Smith
Posts: 37
Joined: Tue Jun 13, 2006 8:59 am
Location: Yorkshire, UK

Recursive Databands

Post 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.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Recursive Databands

Post by Edward »

Fixed. Will be available in the build from the January, 30.

Thank you.
Post Reply