Share via


Sum Function (Visual Studio Report Designer)

Returns a sum of the values of the specified expression.

Sum(Expression, Scope)

パラメータ

  • 式を指定
    (Integer or Float) The expression on which to perform the aggregation.The expression cannot contain aggregate functions.
  • スコープ
    (String) The name of a data table, object, grouping, or data region that contains the report items to which to apply the aggregate function.If スコープ is specified, the aggregate function applies to all data in the dataset, grouping, or data region.For more information about the スコープ parameter, seeレポート (Visual Studio レポート デザイナ) の組み込み関数.

戻り値の型

Returns a Float.Returns a Decimal for decimal expressions and a Double for all other expressions.

次の使用例

The following code example provides a sum of line item totals in the Order grouping or data region.

Sum(Fields!LineTotal.Value, "Order")

項目を参照してください。

概念

レポート (Visual Studio レポート デザイナ) で式を使用してください。
Report (Visual Studio レポート デザイナ) にユーザー設定の [コードの追加
ReportViewer コントロール (Visual Studio)
レポート (Visual Studio レポート デザイナ) の組み込み関数