### ReplicateString (str, #copies)

Basic and Crystal syntax.

##### 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

The following examples are applicable to Crystal syntax:

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).

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 | *****************************

Seagate Software, Inc. http://www.seagatesoftware.com Please send comments to: techpubs@seagatesoftware.com