ltannous
3rd March 2003, 05:51
How can I create a formula for a chart to display the top 10 inventory items/values
I can get the stock levels, but not sure on how to get the values.
The values should be tiitm001.copr * tiitm001.stoc
This is what I have for the current chart
select sum(tiitm001.stoc), tiitm001.item
from tiitm001
where tiitm001.item = tiitm001.item
group by tiitm001.item
order by tiitm001.stoc desc
selectdo
CHART_CATEGORY_IN(cat.in, tiitm001.item)
CHART_DATA_IN(1, cat.in, tiitm001.stoc)
cat.in = cat.in + 1
endselect
CHART_DEF_DATA("INVENTORY VALUES", "",1, 0.0)
CHART_DEF_CATEGORIES(1, 10, "", "", 1)
CHART_DRAW()
CHART_DISCONNECT()
I can get the stock levels, but not sure on how to get the values.
The values should be tiitm001.copr * tiitm001.stoc
This is what I have for the current chart
select sum(tiitm001.stoc), tiitm001.item
from tiitm001
where tiitm001.item = tiitm001.item
group by tiitm001.item
order by tiitm001.stoc desc
selectdo
CHART_CATEGORY_IN(cat.in, tiitm001.item)
CHART_DATA_IN(1, cat.in, tiitm001.stoc)
cat.in = cat.in + 1
endselect
CHART_DEF_DATA("INVENTORY VALUES", "",1, 0.0)
CHART_DEF_CATEGORIES(1, 10, "", "", 1)
CHART_DRAW()
CHART_DISCONNECT()