Crystal Reports for Eclipse Designer Guide

Filter

Description
Filter searches an array of strings for a specified string, and returns the strings in an array.
Overloads
  • Filter (inputStrings, searchString)
  • Filter (inputStrings, searchString, include)
  • Filter (inputStrings, searchString, include, compare)
  • Arguments
  • InputStrings is an array of strings to be searched.
  • searchString is a string to search for.
  • include is an optional Boolean value indicating whether to return substrings that include or exclude searchString. If include is True, Filter returns the subset of the array that contains searchString as a substring. If include is False, Filter returns the subset of the array that does not contain searchString as a substring. If omitted, the value True is assumed.
  • compare is an optional Number value indicating the kind of string comparison to use:
    • 0 performs a comparison that is case-sensitive
    • 1 performs a comparison that is case-insensitive
    If omitted, a case-sensitive comparison is performed.
  • Returns
    Array of String values.
    Action
    Filter searches an array of strings for a specified string, and returns the strings in an array.
    Examples
    The examples assume that inputStrings is a String array consisting of the 5 elements: "pineapple", "Apple", "APPLE", "grape", and "orange".
    Filter (inputStrings, "ap")
    Returns an array containing the 2 strings "pineapple" and "grape".
    Filter (inputStrings, "Ap", True)
    Returns an array containing the 1 string "Apple".
    Filter (inputStrings, "ap", True, 1)
    Returns an array containing the 4 strings "pineapple", "Apple", "APPLE" and "grape". Matching to the search string uses case-insensitive comparison.
    Filter (inputStrings, "ap", False)
    Returns an array containing the 3 strings "Apple", "APPLE" and "orange".
    Filter (inputStrings, "cd")
    Returns an array containing 1 string, the empty string "". The returned array does not contain any matching strings but contains 1 element since the formula language does not support empty arrays.



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