[Solved] Count months when grouping by month in report
Posted: Sat Jan 13, 2018 4:53 pm
I have a report built using the sun report builder extension that is based on a query of a table of “expenses”.
I’m trying to create a report that displays expense by month with monthly totals, yearly totals and average monthly expense by year.
The report is grouped by year and then month number.
Using the tutorial Base/Report Builder First Steps in this form, I’ve managed to create the user-defined functions to get the monthly total in a text box in the “month number” group footer and yearly totals in the year group footer. I’d like to also show the monthly average in the year group footer. To do that I need to determine the number of months in the year group, (not all months have expenses, so I can’t just divide the total by 12)
Can anyone tell me how to set up a counter for this? Something that would count the “groups” in the outer, (yearly) group would work I think but I can’t figure out how.
Thanks for any help provided.
I’m trying to create a report that displays expense by month with monthly totals, yearly totals and average monthly expense by year.
The report is grouped by year and then month number.
Using the tutorial Base/Report Builder First Steps in this form, I’ve managed to create the user-defined functions to get the monthly total in a text box in the “month number” group footer and yearly totals in the year group footer. I’d like to also show the monthly average in the year group footer. To do that I need to determine the number of months in the year group, (not all months have expenses, so I can’t just divide the total by 12)
Can anyone tell me how to set up a counter for this? Something that would count the “groups” in the outer, (yearly) group would work I think but I can’t figure out how.
Thanks for any help provided.