I just started creating reports in Visual Studio 2012 with SQL data, now I am getting the error message, "An expression of non-boolean type specified in a context where a condition is expected, near ',' ". I have created 2 parameters (one for status and one for the DeliveryTimeStamp). This message occurs when choosing several status options (range is from 1 - 6), like 4 and 6 for a date. (The option 'all' works which is linked to the 99 Status).
The sql embedded in the dataset is:
SELECTdel.DeliveryID, del.Source, del.SourceType, del.Delivery, del.DeliveryTimeStamp, del.Status, sta.StatusDescription,del.RecordsRead, del.RecordsProcessedFROMgloDelivery AS G LEFT OUTER JOIN
Delivery AS del ON G.FileName = del.SourceType LEFT OUTER JOIN
DeliveryStatus AS sta ON del.Status = sta.Status
WHERE (G.Source = 'Osiris') AND (@Status = 99) AND (del.Status IN (1, 2, 3, 4, 5, 6)) AND (del.DeliveryTimeStamp IN(@DeliveryTime)) OR (@Status <> 99) AND (del.Status IN (@Status)) AND (del.DeliveryTimeStamp IN(@DeliveryTime))
ORDER BY del.DeliveryID
Thanks for any advice!