Crystal Reports for Eclipse Designer Guide

ReplicateString (str, #copies)

Description
Replicates the string in str the number of times specified by #copies.
Arguments
  • str is the text string to be replicated.
  • #copies is a whole number indicating the number of times str is to be replicated.
  • Returns
    Text String
    Action
    Replicates the string in str the number of times specified by #copies.
    Typical uses
    You can use this function to insert a line of characters any time they are needed. Some typical uses are:
  • To flag critical data on your report.
  • To build simple bar graphs.
  • To split your report into visible sections.
  • To highlight totals, subtotals, and other summary data.
  • Examples
    If {file.SALES} < {file.QUOTA} Then
         ReplicateString("*",10)
    Else
         ""
    Prints the character * ten times as a flag.
    {file.NAME}+ "  " + ReplicateString("*", {file.SCORE})
    Prints a simple bar graph showing test results. The formula prints an asterisk for each point in a test score (the value in the file.SCORE field).
    For example, given the following data:
    Name
    Score
    Smith
    23
    Jones
    17
    Brown
    21
    Johnson
    13
    Reynolds
    25
    The formula will produce the following results:
    Name
    Score
    Smith
    ***********************
    Jones
    ******************
    Brown
    **********************
    Johnson
    ***************
    Reynolds
    *****************************



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