I want to sort by the following formula but need an sql expression. any help will be great
if {@OriginalQty} = 0 then
0.00 else (Sum ({Items_Sold.Quantity}, {Items_Sold.ItemNumber})%{@OriginalQty})
The code for @OriginalQty is
{Items_Sold.QtyOnHand}+(Sum ({Items_Sold.Quantity}, {Items_Sold.ItemNumber}))
if {@OriginalQty} = 0 then
0.00 else (Sum ({Items_Sold.Quantity}, {Items_Sold.ItemNumber})%{@OriginalQty})
The code for @OriginalQty is
{Items_Sold.QtyOnHand}+(Sum ({Items_Sold.Quantity}, {Items_Sold.ItemNumber}))