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

EXEC function; can I show only current row and column group?

3 Answers 263 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Derek
Top achievements
Rank 1
Derek asked on 07 Aug 2014, 06:16 PM
We are working on a crosstab report where there is a row group (Category) and two column groups (Location and Gender),  and we are showing total hours as the value. What we'd like to do is to show the hours as a percentage of the total for that Category and Location. The attached screenshot shows what we want, and also what the report designer gives us.

Basically if we have Category 1 and Location 1, we'd like to show the percentage of females for that category and location only. We are using an expression like

= Sum(Fields.TotalHours)/ exec("Gender1",Sum(Fields.TotalHours))

However this EXEC statement returns the total for the whole Gender group. We've tried the other groups, with similar results.

Is there a way to sum only across the current range of values?

3 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 12 Aug 2014, 03:52 PM
Hello Derek,

The described functionality can be achieved and the needed data can be displayed in the crosstab by changing the crosstab item layout. Please check the attached report for a demonstration of the solution.

Regards,
Nasko
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Derek
Top achievements
Rank 1
answered on 13 Aug 2014, 10:30 PM
Just so I understand; you suggest moving the parent column group over to a row group?

Is there no way to do this with multiple column and row groups, as per my original post?
0
Nasko
Telerik team
answered on 18 Aug 2014, 12:38 PM
Hello Derek,

Yes, I suggest using a row group instead of a column group for the location. This will allow you to use a single scope in the Exec function and show the desired data.
With multiple column and row groups there is no way to specify the scope that you need in order to show the same data.

Regards,
Nasko
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Guido
Top achievements
Rank 1
commented on 28 Nov 2023, 04:45 PM

"With multiple column and row groups there is no way to specify the scope that you need in order to show the same data."  Is there a way to get this working now or is it still not possible?
Todor
Telerik team
commented on 01 Dec 2023, 10:21 AM

You may try with the data function Exec(scopeByColumns, scopeByRows, expression). It lets you specify a more detailed scope.
Tags
General Discussions
Asked by
Derek
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Derek
Top achievements
Rank 1
Share this question
or