This is a migrated thread and some comments may be shown as answers.

custom sorting and grouping

2 Answers 414 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 12 Jan 2016, 10:43 PM

Just started out with the reporting tool and have a few questions I can't seem to find.

 1. Is it possible to group by a field's values? Ex. I have a field Fields.Products, and I want to sum the cost of the products that fall under fruits.\

2. Is it possible to specify the order the column group appears in? Ex. meats | fruits | vegetables. I realize I can do ascending/descending but neither of those is what I want.

2 Answers, 1 is accepted

Sort by
0
Michael
Top achievements
Rank 1
answered on 13 Jan 2016, 03:05 PM
Update, for 1. I ended up adding a calculated field with a custom function. Will see what I can do with the sorting next
0
Stef
Telerik team
answered on 15 Jan 2016, 03:55 PM
Hello Michael,

Depending on how data is visualized in the report (what data items are used), you can add a group and then use aggregate functions in expression of items in the GroupHeader/FooterSection. These aggregate functions will be calculated based on the group's data scope - Expression scope. You can also use the built-in Data functions to execute and expression within a parent data scope.

To specify the sort direction, you can use the data item's Sorting or the group's Sorting (check the Group Explorer in Extended mode). In case data cannot be sorted by standard criteria like alphabetical order or number order, you can add other field in the data next to each record, which specifies the order. Then use that field for sorting in the report.


Let us know if you have any further questions.

Regards,
Stef
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Michael
Top achievements
Rank 1
Answers by
Michael
Top achievements
Rank 1
Stef
Telerik team
Share this question
or