I have a sql query
Code: Select all
SELECT si.stockcode, si.stockgroup, sg.groupname, si.latestcost, si.description, si.bincode, si.sellprice1 as sellprice, si.x_prev_sellprice, si.x_sellprice_changed, sl.qty as quantity, si.STOCKCODE as barcode FROM stock_items si LEFT OUTER JOIN stock_groups sg ON si.stockgroup = sg.groupno LEFT OUTER JOIN stock_loc_info sl ON si.stockcode = sl.stockcode WHERE sl.location = 6 AND si.stockcode IN ( @stockCode) ORDER BY si.description
I set the default value of "StockCode" to be @,UTP.5 as they are 2 valid stock codes - this doesn't work in the preview. If I set the default value of "StockCode" to @ (just 1 stock code), the report looks fine in the preview.
So, I guess I would like to know how to pass in parameter values when the parameter represents a string of different stock codes ?
thanks