Hello all. Not sure - this post might should go in the formula forum instead. I am working on a reorder rpt that lists invoices by customer and sorts by date. I put a counter field in that resets for each customer and basically assigns a sequential number to each invoice. I needed to show the number of days between seq invoices so we can figure out the frequency of their orders. That works really well. I basically have a datediff formula for each invoice that looks like this:
---------------------
if {invoicecounter} = 2 then datediff("d", {table.InvoiceDate}, previous({table.InvoiceDate}))
--------------------------
THe counter number changes from 2 up for each invoice. The problem is now, that I need to add up all of the date diff formulas per customer and divide by num of invoices to get an average per customer. No matter how I try to sum these date diff fields, crystal says that the summary couldn't be created. I tried using tonumber formula and that didn't work either.
I would appreciate any suggestions.
Thanks in advance!
Crystal 8.5
SunnyD
---------------------
if {invoicecounter} = 2 then datediff("d", {table.InvoiceDate}, previous({table.InvoiceDate}))
--------------------------
THe counter number changes from 2 up for each invoice. The problem is now, that I need to add up all of the date diff formulas per customer and divide by num of invoices to get an average per customer. No matter how I try to sum these date diff fields, crystal says that the summary couldn't be created. I tried using tonumber formula and that didn't work either.
I would appreciate any suggestions.
Thanks in advance!
Crystal 8.5
SunnyD