Skip to Content
0
Former Member
Oct 10, 2014 at 10:29 AM

command level parameters

19 Views

Hi All,

I have a report having 2 parameters carton and location.

Suppose if I didn't gave any value among those then it should give all values.

So created 2 command level parameters.Its showing all values whenever I didnt gave any values in parameters.

But even If I gave some value in either carton or location but still its showing all values.

Please suggest what is the problem

SELECT

crt.carton_no, crtd.part_no, SUM(crtd.quantity) AS quantity,

crtd.barcode, crtd.item_description

, crt.put_away_location AS putAway

FROM

carton crt, carton_details crtd

WHERE

crt.carton_id = crtd.carton_id

AND crt.status = 'N' AND

( crt.carton_no like '{?cartonno}' or '{?cartonno}' like '%' ) and (crt.put_away_location LIKE '{?location}' or '{?location}' like '%')

GROUP BY

crt.carton_no, crtd.carton_id, crtd.part_no

ORDER BY

crt.put_away_location, crt.carton_no