Crystal Reports for Eclipse Designer Guide

PercentOfSum

Description
Returns the percentage of this record in the sum of all records for this field matching the condition.
Overloads
  • PercentOfSum (fld, condFld)
  • PercentOfSum (fld, condFld, cond)
  • PercentOfSum (fld, innerCondFld, outerCondFld)
  • PercentOfSum (fld, innerCondFld, innerCond, outerCondFld)
  • PercentOfSum (fld, innerCondFld, outerCondFld, outerCond)
  • PercentOfSum (fld, innerCondFld, innerCond, outerCondFld, outerCond)
  • Arguments
  • fld is a Number or Currency field that can be evaluated by the function.
  • condFld is a field used to group the values in fld by.
  • innerCondFld is a field used to group the values in fld by.
  • innerCond is a String indicating the type of grouping for innerCondFld. You only specify this argument when innerCondFld is a Date, Time, DateTime or Boolean field.
  • outerCondFld is a field used to group the values in fld by.
  • outerCond is a String indicating the type of grouping for outerCondFld. You only specify this argument when outerCondFld is a Date, Time, DateTime or Boolean field.
    For more information on the valid strings for this argument, see Conditions for summary functions.
  • Returns
    Number value
    Action
    PercentOfSum (fld, condFld) has the same effect as: 100 * Sum (fld, condFld) / Sum (fld). It expresses the sum of the values of the field fld for the group determined by condFld as a percentage of the grand total sum.
    PercentOfSum (fld, condFld, cond) has the same effect as: 100 * Sum (fld, condFld, cond) / Sum (fld). The String argument cond expresses some additional information to precisely specify the grouping. For example, if condFld is a Date field, is the grouping "daily" or "weekly" or "monthly" and so on.
    PercentOfSum (fld, innerCondFld, outerCondFld) has the same effect as: 100 * Sum (fld, innerCondFld) / Sum (fld, outerCondFld). It expresses the sum of the values of the field fld for the group determined by innerCondFld as a percentage of the sum for the group determined by outerCondFld.
    PercentOfSum (fld, innerCondFld, innerCond, outerCondFld) has the same effect as: 100 * Sum (fld, innerCondFld, innerCond) / Sum (fld, outerCondFld).
    PercentOfSum (fld, innerCondFld, outerCondFld, outerCond) has the same effect as: 100 * Sum (fld, innerCondFld) / Sum (fld, outerCondFld, outerCond).
    PercentOfSum (fld, innerCondFld, innerCond, outerCondFld, outerCond) has the same effect as: 100 * Sum (fld, innerCondFld, innerCond) / Sum (fld, outerCondFld, outerCond).
    Examples
    PercentOfSum ({Orders.Order Amount}, {Orders.Order Date}, "annually")
    Returns the total value of the orders that were ordered in a given year expressed as a percent of the total value of all orders.
    PercentOfSum ({Orders.Order Amount}, {Orders.Ship Via})
    Returns the total value of the orders shipped via a given shipping company expressed as a percent of the total value of all orders.
    PercentOfSum ({Product.Price (SRP)}, {Product.Size}, {Product.Product Class})
    Returns the total price of the products of a given size and class expressed as a percent of the total price of the products of the same given class.
    Comments
    This function and other percentage functions are intended to support Percentage Summary fields. The groupings supplied as arguments must actually exist in the report for the summary function call to succeed.



    SAP BusinessObjects
    http://www.sap.com/sapbusinessobjects/
    Support services
    http://service.sap.com/bosap-support/
    Product Documentation on the Web
    http://help.sap.com/