Hello
CR 10 , SQL database.
I have a manual cross tab that was created to track pricing errors due to inaccurate data entry.
Two tables, Item and ItemPric, left inner join from item.itemid to itemPric.itemid
For every itemid there can be four price matrix. Walkin, Small, Medium and Large. There should only be one of each, for example Walkin, Small, Small and Large is a data entry error.
The amounts that are in the matrix fields are based on a calculation in the application that looks at the average price of the item and applies a defined multiplier.
My report at the moment looks like this: (I’ll use field names for the column headers)
The first line is GH1and are sums of the following, the second is the detail made up of these individual formulas.
I have this placed in Report/selection formulas/group. And it works great, I am just missing one thing, how to test for Walkin/Small/Small/Large. In the above example if someone had accidentally set up the matrix this way there would be two detail lines for small greater than 0.00 and Medium would be all 0. I’ve tried doing a count of the detail lines >0 and if it is 2 or greater kibosh it, but I run into evaluation issues. Is there another approach?
Before I forget, this is my record selection formula:
Thanks for any assistance,
Julie
CR 9,10 CE10 Sql DB
CR 10 , SQL database.
I have a manual cross tab that was created to track pricing errors due to inaccurate data entry.
Two tables, Item and ItemPric, left inner join from item.itemid to itemPric.itemid
For every itemid there can be four price matrix. Walkin, Small, Medium and Large. There should only be one of each, for example Walkin, Small, Small and Large is a data entry error.
The amounts that are in the matrix fields are based on a calculation in the application that looks at the average price of the item and applies a defined multiplier.
My report at the moment looks like this: (I’ll use field names for the column headers)
Code:
Item.Itemid—Item.Desc—Item.AvgCost—Item.LastCost--@Walkin--@Small--@Medium--@Large
12345---------Light---------1.00---------------1.00---------------1.35-------1.25------1.15----------1.10----
-------------------------------------------------------------------------0.00-------1.25------0.00---------0.00-----
-------------------------------------------------------------------------1.35--------0.00------0.00--------0.00-----
-------------------------------------------------------------------------0.00--------0.00------1.15--------0.00-----
-------------------------------------------------------------------------0.00---------0.00------0.00--------1.10----
Code:
//@Large$
if {ITEMPRIC.PRICETYPE} = "LARGE FLEET" then {ITEMPRIC.PRICE} else 0
//@Medium$
if {ITEMPRIC.PRICETYPE} = "MEDIUM FLEET" then {ITEMPRIC.PRICE} else 0
//@Small
if {ITEMPRIC.PRICETYPE} = "SMALL FLEET" then {ITEMPRIC.PRICE} else 0
//@Walkin
if {ITEMPRIC.PRICETYPE} = "WALK IN" then {ITEMPRIC.PRICE} else 0
Now I need to test for Data Errors:
//@TestforDataErrors
(isnull({ITEMPRIC.PRICETYPE})) or
({ITEM.LASTCOST}=0)or
({ITEM.AVGCOST}=0)or
({ITEMPRIC.PRICE}<={ITEM.AVGCOST})
Before I forget, this is my record selection formula:
Code:
{ITEM.SHOPID} = "MAIN" and
not ({ITEM.ITEMTYPE} in ["CORE", "KIT", "SUPPLIES"])
Thanks for any assistance,
Julie
CR 9,10 CE10 Sql DB