cancel
Showing results for 
Search instead for 
Did you mean: 

Capture parameter multi value with trim in Crystal Report

former_member195446
Participant
0 Kudos

Hi Experts,

i have one parameter which is having multiselection in my report and need to capture the selected values

my paramters list of values are like below

Access Level1

Access Level2

Access Level3

Access Level4

if I selet Access Level1 and Access Level2,Access Level3 i need to show in the report header like Access Level1,2,3


i have used join condition to capture the selecetd value


Join({?Paramtername},",")


it showing like Access Level1,Access Level2,Access Level2 so i need to trim the numbers dynamically


Thank You,

Prasad



Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Prasad,

If the word 'Access Level' is common for each value in the list, this should work:

"Access Level " & Replace(Join({?Parametername}, ', '), 'Access Level', '')

-Abhilash

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Prasad,

Please use below code

stringVar array x := split(Join({?Paramtername},","),",");

Local numberVar i;

Local stringVar outputString := "";

For i:=1 to Count(x) do

(

outputString := outputString + mid(x[i],13,1)+","

);

"Access Level"+outputString;

regards

Niraj