postmanplod
Programmer
Hello,
I have a report whereby it lists parts with a stock valuation. I have been asked if this figure can be placed under a 'bucket' on the report depending on the last transaction date. There are 4 buckets - 0-6 months, 6-12 months, 12-18 months and 18+ months. Also, if data existed for 6-12, 12-18 and 18 +, it would only be displayed in the most recent bucket, which would be 6-12 in this example. Ok, now the code I am using to work out the stk value for each bucket is (for the 6-12 month bucket):
if {BAQReportResult.PartTran.TranDate} in dateadd("m",-12,currentdate) to dateadd("m",-6,currentdate) then maximum({BAQReportResult.StkValue},{BAQReportResult.Part.PartNum})
This works fine, as do all the other buckets. The problem is when I try to sum it. Each part belongs to a class, so the report is grouped by part class. I require totals for each bucket for both the part class and grand total figures. I have tried a basic sum function but keep receiving the message 'A Group Condition is not allowed here'. Also for some reason, the formula's used for each bucket don't appear as an option to select when using running totals.
Is anyone able to help?????
Michael
I have a report whereby it lists parts with a stock valuation. I have been asked if this figure can be placed under a 'bucket' on the report depending on the last transaction date. There are 4 buckets - 0-6 months, 6-12 months, 12-18 months and 18+ months. Also, if data existed for 6-12, 12-18 and 18 +, it would only be displayed in the most recent bucket, which would be 6-12 in this example. Ok, now the code I am using to work out the stk value for each bucket is (for the 6-12 month bucket):
if {BAQReportResult.PartTran.TranDate} in dateadd("m",-12,currentdate) to dateadd("m",-6,currentdate) then maximum({BAQReportResult.StkValue},{BAQReportResult.Part.PartNum})
This works fine, as do all the other buckets. The problem is when I try to sum it. Each part belongs to a class, so the report is grouped by part class. I require totals for each bucket for both the part class and grand total figures. I have tried a basic sum function but keep receiving the message 'A Group Condition is not allowed here'. Also for some reason, the formula's used for each bucket don't appear as an option to select when using running totals.
Is anyone able to help?????
Michael