THESE ARE CALCULATED FIELDS IN A REPORT THAT I AM TRYING TO DESIGN
PAGENO = PAGENO()
DATE = LTRIM(STR(DAY(DATE())))+"-"+CMONTH(DATE())+"-"+CYEAR(DATE())
tot = total(Booked+Oversubscribed,GRP->detail)
subtot = total(calc->Tot,GRP->coursecode)
tot_calc_subtot_for_coursecode = run_total(Calc->Subtot,GRP->coursecode)
grandtot = total(calc->Subtot,GRP->Grand)
Fee = first(Coursefee)
Acctot = calc->Fee*calc->Subtot
fees = calc->Acctot
totalfees = total(calc->Fees,GRP->Grand)
I am designing a report for a table, the report is grouped by a field called coursecode and each time the group changes the group section of the report has calculated fields of the number of bookings multiplied by the fee for that particular group to get the total revenue. This part of the report works fine.
I then want to put in the report footer a grand total field which adds up the totals for each group, there is value in the totalfees field but it is wrong. I thought the problem may have been that I was asking it to total up a field which had a calculation in it (Acctot), so I created another summary field which I called fees, I went on to put a field in the footer called totalfees but the value of it is the same wrong value as when I ask it to calculate the grand total of the field called Acctot.
I hope you can make sense of what I'm trying to explain, I am keen to do this as I had the same problem when I used Alpha4 and I'd like to impress my boss;)
PAGENO = PAGENO()
DATE = LTRIM(STR(DAY(DATE())))+"-"+CMONTH(DATE())+"-"+CYEAR(DATE())
tot = total(Booked+Oversubscribed,GRP->detail)
subtot = total(calc->Tot,GRP->coursecode)
tot_calc_subtot_for_coursecode = run_total(Calc->Subtot,GRP->coursecode)
grandtot = total(calc->Subtot,GRP->Grand)
Fee = first(Coursefee)
Acctot = calc->Fee*calc->Subtot
fees = calc->Acctot
totalfees = total(calc->Fees,GRP->Grand)
I am designing a report for a table, the report is grouped by a field called coursecode and each time the group changes the group section of the report has calculated fields of the number of bookings multiplied by the fee for that particular group to get the total revenue. This part of the report works fine.
I then want to put in the report footer a grand total field which adds up the totals for each group, there is value in the totalfees field but it is wrong. I thought the problem may have been that I was asking it to total up a field which had a calculation in it (Acctot), so I created another summary field which I called fees, I went on to put a field in the footer called totalfees but the value of it is the same wrong value as when I ask it to calculate the grand total of the field called Acctot.
I hope you can make sense of what I'm trying to explain, I am keen to do this as I had the same problem when I used Alpha4 and I'd like to impress my boss;)
Comment