A multi-select parameter is an array when you get right down to it. The code below was tested in Crystal XI, basically it loops through each value in the parameter array and does a select/case statement to get the value. As far as I know, you can't use the description in the code, only on screen during the parameter selection.
I put a newline carriage return between each description (+ chr(13) + chr(10)
), you may want to treat them differently.
Local NumberVar i;
Local StringVar output := "";
Local StringVar paramDesc; //the current parameter's description
for i := 1 to UBound({?MyParameter}) do (
paramDesc := "";
select {?MyParameter}[i]
case 1 : paramDesc := "Option 1" + chr(13) + chr(10)
case 2 : paramDesc := "Option 2" + chr(13) + chr(10)
case 3 : paramDesc := "Option 3" + chr(13) + chr(10)
case 4 : paramDesc := "Option 4" + chr(13) + chr(10)
default: paramDesc := "";
output := output + paramDesc;
);
output