I am using CR 9 ver 9.2.2.634. I am trying to crate a running total based on an aged date of an invoice. My report is based on three groups
Grp 1 Insurance Co
Grp 2 Patient
Grp 3 Invoice
I am running three sets of aged balances for current, 30 days, 60 days, 90 days for each group.
For Grp 3 Invoice total, I am using one running total field based on Invoice.ItemBalance and I am displaying it in the appropriate aging category by repeating the running total field in each aging category and formatting the display to suppress or display depending on the appropriate aging category (i.e. suppress if not aged0to30days). This works fine.
For Grp 2 Patient total, I am using running total fields based on the following:
Field to summarize = invoice.item_balance
Evaluate on formula invoicedetail.date = Aged0To30Days, Aged31TO60Days, etc.
Reset on change of group Patient.
These totals works fine and calculates the totals correctly for each aging category.
For Grp 3 Insurance Co total, I am using the same logic as for Grp 2 with the following exception:
Field to summarize = invoice.item_balance
Evaluate on formula invoicedetail.date = Aged0To30Days, Aged31TO60Days, etc.
Reset on change of group Insurance Co
These totals also work correctly.
My problem comes when I create report totals. Again I am using the same logic as Grp 2 and 3 with the following exception:
Field to summarize = invoice.item_balance
Evaluate on formula invoicedetail.date = Aged0To30Days, Aged31TO60Days, etc.
Never Reset
These totals do not calculate correctly the totals are off and I cannot seem to identify where the calculations are failing. It would seem to me that the same logic should work fine as all I am changing is when the totals reset.
I have thought about changing the evaluation criteria formula by adding a criteria to evaluate on change of invoice group and invociedetail.date = aged0to30days, etc. however, I do not understand what function or syntax to use. I see there is a function groupnumber that returns a whole number. I assume that the whole number returned would equate to the current invoice being evaluated but I am not sure how to use the groupnumber function in my formula.
I tried the following
) but get an error. How can I use this groupnumber function in the formular and is this the correct logic?
Grp 1 Insurance Co
Grp 2 Patient
Grp 3 Invoice
I am running three sets of aged balances for current, 30 days, 60 days, 90 days for each group.
For Grp 3 Invoice total, I am using one running total field based on Invoice.ItemBalance and I am displaying it in the appropriate aging category by repeating the running total field in each aging category and formatting the display to suppress or display depending on the appropriate aging category (i.e. suppress if not aged0to30days). This works fine.
For Grp 2 Patient total, I am using running total fields based on the following:
Field to summarize = invoice.item_balance
Evaluate on formula invoicedetail.date = Aged0To30Days, Aged31TO60Days, etc.
Reset on change of group Patient.
These totals works fine and calculates the totals correctly for each aging category.
For Grp 3 Insurance Co total, I am using the same logic as for Grp 2 with the following exception:
Field to summarize = invoice.item_balance
Evaluate on formula invoicedetail.date = Aged0To30Days, Aged31TO60Days, etc.
Reset on change of group Insurance Co
These totals also work correctly.
My problem comes when I create report totals. Again I am using the same logic as Grp 2 and 3 with the following exception:
Field to summarize = invoice.item_balance
Evaluate on formula invoicedetail.date = Aged0To30Days, Aged31TO60Days, etc.
Never Reset
These totals do not calculate correctly the totals are off and I cannot seem to identify where the calculations are failing. It would seem to me that the same logic should work fine as all I am changing is when the totals reset.
I have thought about changing the evaluation criteria formula by adding a criteria to evaluate on change of invoice group and invociedetail.date = aged0to30days, etc. however, I do not understand what function or syntax to use. I see there is a function groupnumber that returns a whole number. I assume that the whole number returned would equate to the current invoice being evaluated but I am not sure how to use the groupnumber function in my formula.
I tried the following
Code:
While groupnumber sum (invoicedetail.item_balance