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.ori gnumb,a.do cid,a.docd ate,a.pymt rmid,a.prc level,a.lo cncode,a.c ustnmbr,a. custname,a .cstponbr, a.city,a.s tate,
a.zipcode,a.slprsnid,b.ite mnmbr,b.it emdesc,b.q uantity,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}'
select a.soptype,a.sopnumbe,a.ori
a.zipcode,a.slprsnid,b.ite
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}'
ASKER
Hi dK, yes it is an array, I guess I can loop through the array using the whileprintingrecords ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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