Crystal Reports for Eclipse Designer Guide

Remainder (num, denom)

Description
Remainder returns the remainder after the numerator (dividend) has been divided by the denominator (divisor).
Arguments
  • Numerator is a fractional value.
  • Denominator is a fractional value.
  • Returns
    Fractional Value
    Action
    In a typical division situation, the program expresses a quotient as a whole number (if any) and up to six decimal places. When using Remainder, however, the program performs the division internally, determines the whole number quotient and the remainder, and returns only the remainder.
    Typical uses
    You can use this function in making conversions (feet to miles, units to grosses, and so on). You can also use it to select every nth item out of an array.
    Examples
    Remainder(12,5)
    Returns 2.
    Remainder(16,5)
    Returns 1.
    If Remainder({file.EXAM#}, 7) = 0 Then
         "*****" 
    Else
         "" 
    This flags every 7th exam for grading by a second party.
    ToText(Truncate({file.DAYS}/7)) + " week(s), " + ToText(Remainder({file.DAYS},7)) + " day(s)"
    Returns "9 week(s), 1 day(s)". Converts days to weeks and days. For example, if the field had a value of 64 days, the formula would return the value of "9 week(s), 1 day(s)."



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