Running Crystal Reports v10
Goal: Count new accounts sold in current year vs. prior year by comparing current YTD sales greater than 0 against all of prior year sales.
Problem: I have created a formula to evaluate current YTD and prior year sales to give me a 1 for any account that ordered in 2006 but not 2005 and 0 for any account with sales in both years. When I try to add my summary, the field is not available to sum.
The summary I am looking for will be placed on the user level.
Groups:
G1: User
G2: Account (client)
G3: Order
D: Lines and totals within the order
Formulas:
Prior Year Sales: (G2) Sum of @ prioryearsales
Current Year Sales: (G2) Sum of @yeartodatelinetotal
Zero or One for new accounts (@newacctcount):
if Sum ({@prioryearsales}, {account.account_name})<=0
and Sum ({@yeartodatelinetotal}, {account.account_name})> 0
then tonumber(1) else tonumber(0)
Want to sum the zero or ones to give a total count of new clients.
Goal: Count new accounts sold in current year vs. prior year by comparing current YTD sales greater than 0 against all of prior year sales.
Problem: I have created a formula to evaluate current YTD and prior year sales to give me a 1 for any account that ordered in 2006 but not 2005 and 0 for any account with sales in both years. When I try to add my summary, the field is not available to sum.
The summary I am looking for will be placed on the user level.
Groups:
G1: User
G2: Account (client)
G3: Order
D: Lines and totals within the order
Formulas:
Prior Year Sales: (G2) Sum of @ prioryearsales
Current Year Sales: (G2) Sum of @yeartodatelinetotal
Zero or One for new accounts (@newacctcount):
if Sum ({@prioryearsales}, {account.account_name})<=0
and Sum ({@yeartodatelinetotal}, {account.account_name})> 0
then tonumber(1) else tonumber(0)
Want to sum the zero or ones to give a total count of new clients.