The Compute At property specifies the group over which a % of Total summary column is computed. Compute At is used only for columns with a Function of % of Total. When you calculate a percentage, you divide a value by a total (for example, SMITH's salary/total department salaries). Compute At defines the total for a percentage calculation. Using this field, Reports Builder determines the total of which each source column value is a percentage. For matrix reports, Compute At can be multiple groups.
Applies to |
Summary columns | ||||||
Values |
| ||||||
Default |
The parent group of the summary column's group | ||||||
Required/Optional |
Required, for summary columns with a Function of % of Total. |
Compute At is only editable when the column is a summary and the Function is % of Total.
The Compute At group of a summary column may be any group above the summary column's group, including Report and Page, if the summary column's group is not Report.
Summary columns that are owned by a cross-product group cannot have a Compute At of Page.
If a summary has a Compute At of Page, then the sizing of the field or boilerplate object that displays it must be fixed.
Suppose that you have a report that looks like the one below:
Deptno 10 Dname ACCOUNTING
Ename Sal %Dept %Total
------ ------- ------ ------
MILLER 1300.00 14.86% 6.62%
CLARK 2450.00 28.00% 12.48%
KING 5000.00 57.14% 25.48%
Deptno 20 Dname RESEARCH
Ename Sal %Dept %Total
------ ------- ------ ------
SMITH 800.00 7.36% 4.08%
ADAMS 1100.00 10.11% 5.61%
JONES 2975.00 27.36% 15.16%
SCOTT 3000.00 27.59% 15.29%
FORD 3000.00 27.59% 15.29%
The parent group, G_DEPT, contains the DEPTNO and DNAME columns. The child group, G_EMP, contains the ENAME and SAL columns.
To get a summary that calculates each employee's salary as a percentage of total department salaries (Pct_Dept), you create a summary column in G_EMP with the following settings:
Function |
Reset At |
Compute
At |
% of Total |
G_EMP |
G_DEPT |
In this case, Reset At indicates that the summary should be reset to null for each employee. This is because you want a separate percentage for each individual employee. Compute At indicates that the total of salaries for the department is the whole (100%) across which to compute the percentages. It should also be noted that this summary is placed in the G_EMP group because you want the percentage to appear for each employee.
To get a summary that calculates each employee's salary as a percentage of total salaries for the entire report (Pct_Total), you create a summary column in G_EMP with the following settings:
Function |
Reset At |
Compute
At |
% of Total |
G_EMP |
Report |
In this case, Compute At indicates that the total of salaries for the entire report is the whole (100%) across which to compute the percentages. As with the Pct_Dept summary above, Reset At indicates that the summary should be reset to null for each employee and the summary is placed in the G_EMP group because you want the percentage to appear for each employee.
Suppose that you have a matrix report that looks something like the one below and you want to add some percentage summaries to it.
Dept Analyst Clerk Manager Total
10 1300 2450 3750
20 6000 1900 2975 10875
30 950 2850 3800
Total 6000 4150 8275 18425
Group G_JOB contains the column JOB, G_DEPT contains DEPTNO, G_SAL contains SUMSAL, and G_CROSS is the cross-product group. (G_CROSS contains all of the summaries for the matrix.)
To get a summary that calculates each job category's total salaries per department as a percentage of total salaries for that job in all departments, you would enter the following settings for a summary column in G_CROSS:
Function |
Reset At |
Compute
At |
Product
Order |
% of Total |
G_DEPT |
G_JOB |
G_JOB, G_DEPT |
In this case, Reset At indicates that the summary should be reset to null for each department. This is because you want a separate percentage for each individual department. Compute At indicates that the total of salaries for the job category is the whole (100%) across which to compute the percentages. It should also be noted that this summary is placed in G_CROSS because all summaries that apply to the matrix itself must belong to the cross-product group.
Note: Because this is a matrix report, you need to use Product Order for the summary.
Dept Analyst Pct_Job Clerk Pct_Job Manager Pct_Job Total
---- ------- ------- ----- ------- ------- ------- -----
10 1300 31.33% 2450 29.61% 3750
20 6000 100.00% 1900 45.78% 2975 35.95% 10875
30 950 22.89% 2850 34.44% 3800
Total 6000 4150 8275 1842
(100%) (100%) (100%)
Copyright © 1984, 2005, Oracle. All rights reserved.