krusty678
December 28th, 2005, 12:58 PM
Hi Y'all,
I have a formula that I am trying to use to create a sub-total for each group in a report.
For a field called billcode_name I am trying to separate the "Regular Bill" and "Travel" instances from the rest of the billcode names. I already have a sum that is adding the totals for these entries which is why I have to create a formula.
My code is as follows:
WhilePrintingRecords;
NumberVar totalb := 0;
If ({clientbreakdown_ttx.billcode_name} = "Regular Bill") OR ({clientbreakdown_ttx.billcode_name} = "Travel") Then
totalb := totalb + {clientbreakdown_ttx.task_dur}
Else
totalb := totalb;
totalb
This only adds the last sum to the total. Is there some sort of loop which will add both the "Regular Bill" and "Travel" to my totalb variable so I can display it?
Thanks in advance.
I have a formula that I am trying to use to create a sub-total for each group in a report.
For a field called billcode_name I am trying to separate the "Regular Bill" and "Travel" instances from the rest of the billcode names. I already have a sum that is adding the totals for these entries which is why I have to create a formula.
My code is as follows:
WhilePrintingRecords;
NumberVar totalb := 0;
If ({clientbreakdown_ttx.billcode_name} = "Regular Bill") OR ({clientbreakdown_ttx.billcode_name} = "Travel") Then
totalb := totalb + {clientbreakdown_ttx.task_dur}
Else
totalb := totalb;
totalb
This only adds the last sum to the total. Is there some sort of loop which will add both the "Regular Bill" and "Travel" to my totalb variable so I can display it?
Thanks in advance.