Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Printing Parameter Fields Post Reply Post New Topic
Author Message
dkalsow
Groupie
Groupie
Avatar

Joined: 10 Jan 2011
Location: United States
Online Status: Offline
Posts: 65
Quote dkalsow Replybullet Topic: Printing Parameter Fields
     Posted: 03 Oct 2011 at 6:52am
Good Morning Everyone,
 
I have a Parameter Field that is a number but can have muliple values selected.  I would like to build a local variable that has the values of all the items selected.
 
Does anyone know how to do this?
 
 
Thanks :)
dkalsow
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 03 Oct 2011 at 8:56am
you would loop through the array that holds the values.
 
Say the parameter is x, you could loop something like:
local numbervar xindex;
local stringvar allValues:="";
for i:=1 to UBound Do(
  allValues := allValues + ToText(x[xindex],0,"") + ", ";
);
 
allValues
 
HTH
 
IP IP Logged
dkalsow
Groupie
Groupie
Avatar

Joined: 10 Jan 2011
Location: United States
Online Status: Offline
Posts: 65
Quote dkalsow Replybullet Posted: 03 Oct 2011 at 9:12am
I get the error "Not Enough arguments have been given to this function." on the UBound key word.
 
 
Thanks :)
dkalsow
IP IP Logged
dkalsow
Groupie
Groupie
Avatar

Joined: 10 Jan 2011
Location: United States
Online Status: Offline
Posts: 65
Quote dkalsow Replybullet Posted: 03 Oct 2011 at 9:13am
I think it needs to be like this:
 
local numbervar xindex;
local stringvar allValues:="";
for xindex:=1 to UBound({?Case Status}) Do(
  allValues := allValues + ToText({?Case Status}[xindex],0,"") + ", ";
);
 
allValues
 
 
Thanks :)
dkalsow
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 04 Oct 2011 at 7:18am
oops...sorry.  Yes you would supply the parameter with the multiple values as an argument to the Ubound fucntion.
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum