Link to home
Start Free TrialLog in
Avatar of mwalsh2000
mwalsh2000

asked on

Command Parameter

Using CR XI Developer edition, I have created a report that uses the below command.  The problem that I am experiencing is with the {?item} parameter.  When the user selects 1 item the report runs fine and returns data, when a user selects multiple items the report comes back blank.  Does anyone know if multiple values can be returned inside a command object parameter?  Can anyone see an error in the code?  Any assistance would be greatly appreciated....

select a.soptype,a.sopnumbe,a.orignumb,a.docid,a.docdate,a.pymtrmid,a.prclevel,a.locncode,a.custnmbr,a.custname,a.cstponbr,a.city,a.state,
a.zipcode,a.slprsnid,b.itemnmbr,b.itemdesc,b.quantity,b.unitprce,b.xtndprce from sop30200 a inner join sop30300 b on a.soptype = b.soptype and a.sopnumbe = b.sopnumbe
where orignumb in(select sopnumbe from sop30200 where docdate >= {?Date1} and docdate <{?Date2} and soptype = 2
and voidstts <> 1 and orignumb = '')
and docdate >= {?Date1} and docdate < {?Date2} and a.soptype = 3 and b.itemnmbr in( '{?item}') and a.locncode ='{?Location}'
Avatar of dkDeveloper
dkDeveloper

Hi mwalsh2000,

I'm pretty sure that when Crystal returns multiple selections from a parameter it does so in an array (unfortunately even for commands).  You might want to consider testing this by creating a command or stored proc that would just return the value passed in by {?item}.  I'd be suprised if it was a comma seperated list.

Let us know what you find out -- if it is an array I think we can still work around it using a couple of different methods depending upon your development freedom.

Cheers!
dK
Avatar of mwalsh2000

ASKER

Hi dK, yes it is an array, I guess I can loop through the array using the whileprintingrecords ?
ASKER CERTIFIED SOLUTION
Avatar of bdreed35
bdreed35
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of James0628
James0628

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial