📄 实现累计的合计金额的方法.txt
字号:
目的是实现在分组的情况下,在每页可实现页小计,并在每页实现到此页的累计金额,
寻找了2天,终于找到了解决的方法,很简单,只需要使用一下函数
cumulativeSum( t_cp_ls_hsje for all ),就可实现
详细帮助如下:
Description
Calculates the total value of the rows up to and including the current row in the specified column (a running total).
Syntax
CumulativeSum ( column { FOR range } )
Argument Description
column The column for which you want the cumulative total value of the rows up to and including the current row for group. Column can be the column name or the column number preceded by a pound sign (#). Column can also be an expression that includes a reference to the column. The data type of column must be numeric.
FOR range (optional) The data that will be included in the cumulative sum. For most presentation styles, values for range are:?ALL ?(Default) The cumulative sum of all values in column.?GROUP n ?The cumulative sum of values in column in the specified group. Specify the keyword GROUP followed by the group number: for example, GROUP 1.?PAGE ?The cumulative sum of the values in column on a page.For Crosstabs, specify CROSSTAB for range:?CROSSTAB ?(Crosstabs only) The cumulative sum of all values in column in the crosstab.For Graph and OLE o b j e c ts, specify one of the following:?GRAPH ?(Graphs only) The cumulative sum of values in column in the range specified for the Rows option.?OBJECT ?(OLE o b j e c ts only) The cumulative sum of values in column in the range specified for the Rows option.
Return value
Long. Returns the cumulative total value of the rows.
Usage
If you specify range, CumulativeSum restarts the accumulation at the start of the range.
For graphs and OLE o b j e c ts, you do not select the range when you call the function. The range has already been determined by the Rows setting on the Data property page (the Range property), and the aggregation function uses that range. Settings for Rows include:
?For the Graph or OLE presentation style, Rows is always All.
?For Graph controls, Rows can be All, Page, or Group.
?For OLE controls, Rows can be All, Current Row, Page, or Group. The available choices depend on the layer the control occupies.
In calculating the sum, NULL values are ignored.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -