I am using Crystal v9 with Peachtree 2006/Brtrieve.
I am trying to understand Range Variable(s).
If I create a report that places sales amounts into specific ranges and then groups on those ranges so a count can be done for customers in each group, do I use a range variable to accomplish this?
I want groups of sales amounts from 0 to 1000, then 1001 to 2000 and then 2001 to 5000.
Would I create the range variables like the following:
{@Sales1000}
WhilePrintingRecords;
NumberVar range Sales1000;
Sales1000 := 0 to 1000;
0
{@Sales2000}
WhilePrintingRecords;
NumberVar range Sales2000;
Sales5000 := 1001 to 2000;
0
{@Sales5000}
WhilePrintingRecords;
NumberVar range Sales5000;
Sales5000 := 2001 to 5000;
0
and then place the formulas in the Group header #1: {Customers.SalesThisYear}.
I've tried grouping on the {Customers.SalesThisYr} and customizing the group name, but it's not creating the groups correctly.
I want the data to show:
ID Name Sales
$0 to $1000: 3
A Company A $500
D Company D $799
K Company K $640
$1001 to $2000: 3
B Company B $1500
E Company E $1800
I Company I $2000
$2001 to $5000: 4
C Company C $2500
F Company F $5000
G Company G $7000
H Company H $3000
Any help is appreciated.
I am trying to understand Range Variable(s).
If I create a report that places sales amounts into specific ranges and then groups on those ranges so a count can be done for customers in each group, do I use a range variable to accomplish this?
I want groups of sales amounts from 0 to 1000, then 1001 to 2000 and then 2001 to 5000.
Would I create the range variables like the following:
{@Sales1000}
WhilePrintingRecords;
NumberVar range Sales1000;
Sales1000 := 0 to 1000;
0
{@Sales2000}
WhilePrintingRecords;
NumberVar range Sales2000;
Sales5000 := 1001 to 2000;
0
{@Sales5000}
WhilePrintingRecords;
NumberVar range Sales5000;
Sales5000 := 2001 to 5000;
0
and then place the formulas in the Group header #1: {Customers.SalesThisYear}.
I've tried grouping on the {Customers.SalesThisYr} and customizing the group name, but it's not creating the groups correctly.
I want the data to show:
ID Name Sales
$0 to $1000: 3
A Company A $500
D Company D $799
K Company K $640
$1001 to $2000: 3
B Company B $1500
E Company E $1800
I Company I $2000
$2001 to $5000: 4
C Company C $2500
F Company F $5000
G Company G $7000
H Company H $3000
Any help is appreciated.