The BASIC code below selects ISSUE and PICK transaction quantities that occur in 2010 and displays the actual qtys if true, or 0:
FORMULA NAME: YR2010-issues
dim YR2010issue as number
if ({ITEMH.TYPES}= "ISSUE" or {ITEMH.TYPES}= "PICK") AND Year({ITEMH.DAT_})= 2010 then
formula = {ITEMH.QTY}
else
formula = 0
end if
This works fine, but when I enter a range of part numbers (in my parameter field), instead of just one part number, the SUM statement below adds up ALL part numbers’ 2010 values:
FORMULA NAME: Total2010
Sum({@YR2010-issues})
I need it to SUM just the ISSUES and PICKS for 2010, for one part number at a time. Then the next, etc. What do I need to do to get sub-totals by part number?
FORMULA NAME: YR2010-issues
dim YR2010issue as number
if ({ITEMH.TYPES}= "ISSUE" or {ITEMH.TYPES}= "PICK") AND Year({ITEMH.DAT_})= 2010 then
formula = {ITEMH.QTY}
else
formula = 0
end if
This works fine, but when I enter a range of part numbers (in my parameter field), instead of just one part number, the SUM statement below adds up ALL part numbers’ 2010 values:
FORMULA NAME: Total2010
Sum({@YR2010-issues})
I need it to SUM just the ISSUES and PICKS for 2010, for one part number at a time. Then the next, etc. What do I need to do to get sub-totals by part number?