Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting summaries based on previous summaries

Status
Not open for further replies.

meryls

Technical User
Nov 20, 2003
62
0
0
US
Using Crystal 9.

I need to format group summaries based on previous group summaries.

I have sales records which I am grouping first by customer, then by year. To sum this up, I need to highlight sums that are zero at the year-group level based on information about a previous year-group summary and the customer group of that previous year-group.

The details:

I am currently using a formula to add charge amounts on invoices in buckets based on the month of the sale, and so, if the sale was in February, I add the charge amount to the February bucket.

@Feb formula:
if Month ({FinancialSalesInvoiceList.invdate}) = 2 then
{FinancialSalesInvoiceList.chrgamt}.

I then print the summaries of each month formula, grouped by year within each customer group. This works very nicely.

Now I have run into a problem with a new requirement to highlight (bold) each year-group-level summary that fits one of these criteria:

if the summary of this month is zero
if this customer had a previous year
if the summary for the same month in the previous year was greater then zero
then BOLD
OR
if the summary of this month is zero AND this month is > March
if summary of the previous 3 months was greater then zero.
then BOLD
OR
if the summary of this month is zero AND this month is =< March
if this customer had a previous year
if summary of the previous 3 months was greater then zero.
then BOLD

Where I can run into trouble is where I have this data:
-------------------------------------------------------
Customer A
Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
2004 50 40 40 40 30 50 60 80 80 80 70 80
2005 50 40 0 40 30 50 60 80 80 80 70 80

Customer B
Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
2006 50 0 0 40 30 50 60 80 80 80 70 80
-----------------------------------------------------------

When I look at customer A at March 2005, I can look at Feb 2005 + Jan 2005 + Dec 2004 to determine if I should highlight Mar 2005.

BUT when I look at customer B at March 2006, I can only look at Feb 2006 and Jan 2006. I need something to prevent me from looking at the Customer A's Dec 2005 record.

Does anyone have an idea how to approach this?

Thanks!

Meryl
 
Try Running Totals, they can use complex formulas to accumulate.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top