Crystal Reports - Convert parameter to text
Crystal Version: Crystal Reports 2008
I have a string parameter that has multiple options:
Team 1 Team 2 Team 3... Team 16
I want to show which team(s) the user selects on the report.
User selected: Team 1, Team 5, Team 6, Team 13
The logic I want to use is:
if {?SelectTeam}="All" then "All"
else totext({?SelectTeam})
开发者_StackOverflow中文版
but obviously, that doesn't work. I have added the parameter to the report and it only shows the first item that is selected. Any suggestions?
Something like this would work since {?SelectTeam}
should be an array.
Local StringVar StrTeams := "";
Local NumberVar i; /FTFY
if {?SelectTeam}="All" then "All"
else (
For i := 1 To UBound({?SelectTeam}) Do
(
StrTeams := StrTeams + {?SelectTeam}[i] + " ";
);
StrTeams;
)
IIf ({?SelectTeam}="All", "All", Join({?SelectTeam}, " ") )
精彩评论