I am trying to group sales data in CR9 based on varying criteria. Basically i want each group shown on the report to represent one sales division. I have created a formula for each of my sales divisions i.e '@group_01' is
another division is based on different criteria: (@group_02)
I then call on all of my 46! sales division formulas from a formula called 'sales_groups' which looks something like this:
etc etc.
I use the formula 'sales_groups' as my top level group. The problem is that although my sales division formulas cover every possible transaction scenario, i get a load of transactions that should appear in several of my divisions appearing in an un-named group. In the example above, the @group_2 does not populate with records, instead all of the records go into this un-named group.
Code:
{SALES.TERRITORY} = "HO" and
{SALES.ANALYSIS_CODES2} in ["SCOT", "NIRE"] and
not {SALES.ALPHA} in ["OCWIPEL", "OC8 CLEANI", "OC8", "CEANEL", "QUINODERM", "Hydromol", "HYDROMOL", "HYDROM", "CHLOROCLE", "CHLOROCLEN", "CHLOROCLENS", "CYCLENS", "PHARMACLE", "PHARMACLEN", "PHARMACLENS", "PHENO", "PHENOCLE", "PHENOCLEN", "PHENOCLENS", "QUATCLEN", "QUATCLENS", "SPIRICLEN", "SPIRICLENS", "PHARMAQUIP"]) and
{SALES.CLASS} in ["HOSP", "PH"]
another division is based on different criteria: (@group_02)
Code:
{SALES.PRODUCT} in ["1ANDARIK"]
I then call on all of my 46! sales division formulas from a formula called 'sales_groups' which looks something like this:
Code:
if
{@group_01}
then "01 - Home - IC - Hospital - Rep 01"
else if
{@group_02}
then "02 - Andarik"
else if
{@group_03}
then "03 - Home - IC - Hospital - Rep 03"
else if
{@group_04}
then "04 - Home - IC - Hospital - Rep 04"
etc etc.
I use the formula 'sales_groups' as my top level group. The problem is that although my sales division formulas cover every possible transaction scenario, i get a load of transactions that should appear in several of my divisions appearing in an un-named group. In the example above, the @group_2 does not populate with records, instead all of the records go into this un-named group.