Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

list multiple values from a parameter onto Report Header

Status
Not open for further replies.

abhi900

IS-IT--Management
Jul 1, 2010
117
AU
Hi,

I have 2 or more values selected in the parameter {?Testphase} but when i try to display all the selected values on to the REPort Header its just shows the 1st value selected rather than all the values,
Tried using the following :-

local stringvar i ;
local stringvar Str;

For i := 0 to count({?TestPhase})

Str := str + “ “ + {?TestPhase}

next

please advise,

regards

 
SOrry for the above post... the code is incorrect; it should be as follows:-

local numbervar i;
local stringvar Str;

For i := 0 to count({?TestPhase})

Do Str := Str + " " + {?TestPhase}

error that i am getting now is :-

"A subscript must in between 1 and the size of the array"

please advise
 
What version of CR are you using? If CR 2008, where parameters can be optional, use:

local numbervar i;
local stringvar Str;
if not hasvalue({?TestPhase}) then
Str := "No Value Selected";
if hasvalue({?TestPhase}) then
(
For i := 0 to count({?TestPhase})Do (
Str := Str + " " + {?TestPhase}
));
Str

-LB
 
Hi LB,

I am using Crystal 2008 and still getting the same error on the line :-

Str := Str + " " + {?TestPhase}.

The error is :- "A subscript must in between 1 and the size of the array"

regards
 
Sorry I forgot to change the 0 to 1:

local numbervar i;
local stringvar Str;
if not hasvalue({?TestPhase}) then
Str := "No Value Selected";
if hasvalue({?TestPhase}) then
(
For i := 1 to count({?TestPhase})Do (
Str := Str + " " + {?TestPhase}
));
Str

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top