Overview
Versions
Report Server Version | Functional Change |
11.0.4 | / |
11.0.7 | Optimized the ACCSUM function, which is compatible with the chart module. |
Application Scenarios
Sometimes you need to calculate the accumulated values of data based on different groups.
For example, you may need to calculate the accumulated output of different types of energy.
You may also need to calculate the accumulated output of all energy sources.
Function
V 11.0.4 supports using the ACCSUM function to calculate accumulated values.
Note: The function only supports cell calculation and does not support sheet, watermark, JavaScript reference, and default parameter values.
Function Explanation
Overview
Syntax | ACCSUM(number,range) | Calculate accumulated values of data based on different groups. |
Parameter 1 | number | The range of data that needs to be calculated. |
Parameter 2 | range | The rule of grouping. It can be empty. |
Examples
Cell A2 is the year, cell B2 is the month, and cell C2 is the amount due. Cell A2 and cell B2 are vertical expansion and their parent cells are default.
ACCSUM(C2) is the accumulation of all data of amount due.
ACCSUM(C2,A2) is the accumulation by year of amount due. It calculates the accumulated value of amount due for each year.
Procedures
Designing a Report
Calculating the Accumulated Value of All Energy Types
Open the built-in template ACCSUM Calculating Accumulated Value.cpt under the directory %FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc\Advanced\Coordinate. Enter the formula ACCSUM(C2) in cell D2.
Set the Expansion Direction of cell A2, cell B2, and cell C2 to H, and cell D2 to No Expansion.
Calculating the Accumulated Value of Different Energy Types
Enter the formula ACCSUM(C2,A2)in cell E2.
Demonstration
On PC
Save the report, and click Pagination Preview.
Mobile Platform
The effects on App are the same as HTML5.
Downloading the Template
You can see the completed template in %FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc\Advanced\Coordinate\ACCSUM Accumulated Value.cpt.
Click to download the template: ACCSUM Calculating Accumulated Value.cpt