|
-
Mar 24th, 2005, 04:55 AM
#1
Thread Starter
Fanatic Member
SUM per GROUP
i have this problem
i have
Trans table
@TransID | Date | DiscountPercent | DiscountCurrency
tr-1 | 1/1/2005 | 0 | 1000
Trans Details table
@TransID | ProductID | QtyBuy | SellPrice |
tr-1 | prod1 | 10 | 100
tr-1 | prod2 | 10 | 10
tr-1 | prod3 | 15 | 100
if DiscountCurrency is > 0 then
TotalDiscount = DiscountCurrency
else
TotalDiscount = (qty * SellPrice for tr-1) * DiscountPercent/100
endif
question :
the report want to show per GROUP TransID
TransID | TotalDiscount | Total (TotalDiscount - (qtyBuy*SellPrice for Each TransID)) -> how to do something like this??????
thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|