CR 2008, Pervasive SQL on Windows 7
I have an inventory report that displays the inventory items by vendor.
I created two groups: Group#1 – Vendor, Group#2-Item
I need to get the Inventory Contribution % per Item and per Vendor.
Inventory Contribution % per Item =
({@OnHand$$per Item}/{@Total ReportOnHand$$}) * 100
{@OnHand$$perItem} is placed in GroupFooter#2-Item and the formula is:
{@QOH} * (GetPeachLastCostv2 (Filename, {LineItem.ItemRecordNumber} ))
{@QOH} is placed in GroupFooter#2 and the formula is a special function:
GetPeachQtyOnHandv2 (Filename, {LineItem.ItemRecordNumber} )
The InventoryContribution% per Item is not correct.
An item that has $930 as the OnHand$$perItem, shows 0% when it should show 4.12%
(930/22647 * 100 where 22647 is the OnHand$$perReport)
Further down the report, an item that has $111 as the OnHand$$perItem, shows .51% when it should show .49%
(111/22647 * 100 = .49%)
Here is an example of how my report should look:
Vendor/Item QOH OnHand$ Inv Contrib %
ABC Group Header#1
AVRY 50 250 7.69% Group Footer#2
EQWT 100 1000 30.77% Group Footer#2
NURS 200 400 12.31% Group Footer#2
TOTAL ABC 350 1650 50.77% Group Footer#1
DEF Group Header#1
SOIL 10 100 3.08% Group Footer#2
EQLW 5 500 15.38% Group Footer#2
TOOL 100 1000 30.77% Group Footer#2
TOTAL DEF 115 1600 49.23% Group Footer#1
Total 465 3250 Report Footer
There seems to be a problem in obtaining the OnHand$$perReport amount.
Any help is greatly appreciated.
I have an inventory report that displays the inventory items by vendor.
I created two groups: Group#1 – Vendor, Group#2-Item
I need to get the Inventory Contribution % per Item and per Vendor.
Inventory Contribution % per Item =
({@OnHand$$per Item}/{@Total ReportOnHand$$}) * 100
{@OnHand$$perItem} is placed in GroupFooter#2-Item and the formula is:
{@QOH} * (GetPeachLastCostv2 (Filename, {LineItem.ItemRecordNumber} ))
{@QOH} is placed in GroupFooter#2 and the formula is a special function:
GetPeachQtyOnHandv2 (Filename, {LineItem.ItemRecordNumber} )
The InventoryContribution% per Item is not correct.
An item that has $930 as the OnHand$$perItem, shows 0% when it should show 4.12%
(930/22647 * 100 where 22647 is the OnHand$$perReport)
Further down the report, an item that has $111 as the OnHand$$perItem, shows .51% when it should show .49%
(111/22647 * 100 = .49%)
Here is an example of how my report should look:
Vendor/Item QOH OnHand$ Inv Contrib %
ABC Group Header#1
AVRY 50 250 7.69% Group Footer#2
EQWT 100 1000 30.77% Group Footer#2
NURS 200 400 12.31% Group Footer#2
TOTAL ABC 350 1650 50.77% Group Footer#1
DEF Group Header#1
SOIL 10 100 3.08% Group Footer#2
EQLW 5 500 15.38% Group Footer#2
TOOL 100 1000 30.77% Group Footer#2
TOTAL DEF 115 1600 49.23% Group Footer#1
Total 465 3250 Report Footer
There seems to be a problem in obtaining the OnHand$$perReport amount.
Any help is greatly appreciated.