Version CR9. I am using a formula to count the number of unique detail records. The table contains multiple detail records of invoices so I want to only count the invoice once the invoice value has changed and only if the date value of the record = January. The formula is as follows:
The formula seems to work fine until the last record in the report. At that point the formula returns a blank where I believe the formula should display the last calculated value.
Any suggestions would be appreciated.
Thanks
Joe
Code:
numbervar JanCnt;
if {DATA12.INVOICE} <> Next ({DATA12.INVOICE})and Month ({DATA12.DATE})= 1 then
JanCnt := JanCnt +1 else JanCnt := JanCnt;
The formula seems to work fine until the last record in the report. At that point the formula returns a blank where I believe the formula should display the last calculated value.
Any suggestions would be appreciated.
Thanks
Joe