Sort order in HierarchicalBand

Stimulsoft Ultimate discussion
Post Reply
csbrogi
Posts: 89
Joined: Thu May 03, 2012 11:47 am
Location: Germany

Sort order in HierarchicalBand

Post by csbrogi »

Hello,
I am wondering about the sort order of child elements in hierarchical data bands:
is there a way to show child elements in the order they are in the XML-input file?
For me it looks as if they are displayed in random order?!
Thank you
Clemens
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Sort order in HierarchicalBand

Post by Alex K. »

Hello,

Sorry, maybe we did not exactly understand your question.
As a way, you can add the additional column for the necessary order sorting.

Thank you.
csbrogi
Posts: 89
Joined: Thu May 03, 2012 11:47 am
Location: Germany

Sort order in HierarchicalBand

Post by csbrogi »

Hello,
Sorry, maybe we did not exactly understand your question.
For example in the DokuDemo.xml
the Elements in the XML-file are ordered as

Code: Select all

Package
UseCase
UseCase 2
UseCase 3
so I expected,that they are displayed in this order, but instead they are ordered as

Code: Select all

Package
UseCase 3
UseCase
UseCase 2
As a way, you can add the additional column for the necessary order sorting.
that's not nice , but ok for me :-(
Clemens
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Sort order in HierarchicalBand

Post by Alex K. »

Hello,

Please try to set the Sort property for HierarchicalBand1 component.

Thank you.
Attachments
1936.Screen.PNG
1936.Screen.PNG (23.76 KiB) Viewed 5315 times
csbrogi
Posts: 89
Joined: Thu May 03, 2012 11:47 am
Location: Germany

Sort order in HierarchicalBand

Post by csbrogi »

Hello

and how can I set the sort order "Sort by order", if it is not allreadyset?

Thank you
csbrogi
Posts: 89
Joined: Thu May 03, 2012 11:47 am
Location: Germany

Sort order in HierarchicalBand

Post by csbrogi »

Hello all
I used the Id field to sort the entries, but encountered the problem. that the entires are ordered in alpabetical order (i.e. 12 is in front of 2)
I got around this by using the following sort statement
Sort by Order, {"000000000".Substring(0, 5-System.Convert.ToString(ModellElement.ModellElement_Id).Length)+ModellElement.ModellElement_Id}
(only for the case, that somebody else is interesseted in this topic.)

Thank you
Clemens
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Sort order in HierarchicalBand

Post by Alex K. »

Hello,

Most probably, the Id field is string type and because 12 is in front of 2.
Please send us yor report with test data for analysis.

Thank you.
csbrogi
Posts: 89
Joined: Thu May 03, 2012 11:47 am
Location: Germany

Sort order in HierarchicalBand

Post by csbrogi »

Hello
yes the Id field is of type string. (it is the auto-generated key from stimulsoft).
My solution is good enough for me, I only posted it to help anybody having the same problem.

Regards,
Clemens
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Sort order in HierarchicalBand

Post by Alex K. »

Hello,

Ok.
Let us know if you need any additional help.

Thank you.
Post Reply