Xbasic

*collect Function

Syntax

C result *collect(A subexpr[,G over[,G each])

Arguments

result

Collected CR-LF delimited list, limited to 1,024 characters. Any type

subexpr

Expression to evaluate. Any type

over

(Optional) Group over which to collect values; use GRAND for all (or omit)

each

(Optional) Sub-group over which to collect values; use GRAND for all (or omit)

Description

Collect strings for group (in cr-lf list).

Discussion

Collect strings for group (in cr-lf list). This new function is a special summary function for use in Reports. It creates a CRLF list of the unique values in the specified report group. The purpose of this function is to allow creation of reports that collect and flow detail data in a single character field.

 Example

Add the following calculated field to the sample Invoice report in Alphasports:

items = strtran(*collect(INVOICE_ITEMS->product_id,grp->Invoice_number),crlf(),",")

Put this calculated field in the Group Footer section. You will see a comma delimited list of unique product_id values in each invoice.

See Also