Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: parameters Post Reply Post New Topic
<< Prev  Page  of 2
Author Message
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 15 Dec 2011 at 10:46am
if pContract_ID is formatted as x|x|x|x|, then splitting should work.
if PContract_ID is a multiselect parameter, it is already an array (it's how CR handles multiselects), in which case, splitting is necessary...but the IN {?} syntax should work then.
 
it all depends (I think) on the value of the parameter...it doesn't make sense that it would highlight the parameter in a split...
IP IP Logged
bgovindhan
Newbie
Newbie


Joined: 14 Dec 2011
Location: United States
Online Status: Offline
Posts: 14
Quote bgovindhan Replybullet Posted: 15 Dec 2011 at 12:50pm
Thanks again. The pCONTRACT_ID is not formatted. It is a String parameter and allows multiple values. I just placed the pCONTRACT_ID on the report to see what is the value it is returning and that's how I know it is returning 12|15|18 as a value when the user selects multiple values. I tried using the pCONTRACT_ID in the record selection as you suggested with the IN clause and the syntax as follows.
 
(ISNULL({?pCONTRACT_ID}) OR
(CStr (TRIM({?pCONTRACT_ID})) = '') OR
 (if(NumericText ({?pCONTRACT_ID}))then
  {CONTRACT_MASTER.CONTRACT_ID} = ToNumber({?pCONTRACT_ID})
  else false))
 
It's complaining about the same error that I mentioned earlier. "This array must be subscripted" and it is pointing to the parameter pCONTRACT_ID. This is really killing me.
IP IP Logged
<< Prev  Page  of 2
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