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

Crosstab report ordering of rows

3 Answers 90 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
rtw
Top achievements
Rank 1
rtw asked on 30 Jun 2009, 12:01 AM
Hi Telerik Team,

We are currenlty working on integrating the evaluation version of telerik reports into our web application, we currenlty use the asp.net ajax ui controls.

There is a strict requirement of the report we are building: to list the row groups in a particular order, I have structured the t-sql to return the data with the row groups in the order I need but the cross tab report messes the order up.  

How can i determin the order of the rows in a cross tab report ?


Regards,

Russell Wilson

3 Answers, 1 is accepted

Sort by
0
Svetoslav
Telerik team
answered on 02 Jul 2009, 05:28 PM
Hello Russell,

The order of the rows in a Table (Crosstab/List) is defined by the order of the TableGroups in the RowGroups hierarchy. For example if you have 2 row groups defined at the 1st level of the RowGroups hierarchy to, say, group by City and group by Year, you will have all cities at the first place, followed by all years.

To order the members in a group (ex. to order the cities in the City group in alphabetic order) you have to specify some sorting criteria the TableGroup.Sorting collection.

If you want to order the data at the database level you should use exactly the same criteria, as you use for the grouping. Otherwise the reporting engine will scramble the data according to the groups it will calculate.
 

All the best,
Svetoslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Nad Lewis
Top achievements
Rank 1
answered on 10 Aug 2009, 09:42 AM
Hi;
I'm trying to do the following with crosstab:

Class A                        Subject A        Subject B        Subject C        Total
            Student A        85                85                90                260
            Student B        70                75                85                230

Where students for each class are sorted against their total score (Descending) i.e. Top performer First.

Can you please guide me on how to do this.
PS. My database is that complex that this cannot be done without crosstab (like with normal table with groups).

Thanks



0
Milen
Telerik team
answered on 11 Aug 2009, 12:58 PM
Hi Nad Lewis,

Yes, you may sort on a total expression in the appropriate group ( In this case: =Sum(Fields.Score) )

Please find attached two predefined solutions for achieving your task.

Best wishes,
Milen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
General Discussions
Asked by
rtw
Top achievements
Rank 1
Answers by
Svetoslav
Telerik team
Nad Lewis
Top achievements
Rank 1
Milen
Telerik team
Share this question
or