Crystal Reports:
Display array
values better with
"Join" and "Split" functions
Consider this formula:
Join
({?Country}, ", ") // array, delimiter
If the {?Country} parameter contains the values
["Australia", "New Zealand", "Hong Kong"]
the result of this function will be "Australia, New Zealand, Hong
Kong".
The split function can be used to perform the
opposite result: taking "Australia, New Zealand, Hong Kong"
and returning an array. This would be used to pass a multi value parameter
to a subreport.
1) Create a formula to join the list together (as
described earlier)
2) Link that formula to a single value string
parameter in the subreport
3) Modify the record selection formula in the
subreport (with the split function) to:
{Customer.Country} = split({?Pm-@Country List},
", ")
This article is copyrighted by Crystalkeen, Mindconnection, and Chelsea Technologies Ltd.
It may be freely copied and distributed as long as the
original copyright is displayed and no modifications are made to this
material. Extracts are permitted. The names Crystal Reports and Seagate
Info are trademarks owned by Business Objects. |