I am working on this report pulls all of our Projected Purchases grouped by Month displaying a sum (called "Monthly_Total"
for the month as well as displays the Budget (called "Monthly_Budget"
for the month. I also have a subreport that I use a shared currencyvar "Starting_Balance"
. This shared variable updates whenever the report is run.
I need to find a way to do the following calculation:
for the first month (in this case the report starts with March) it should be
"Starting_Balance" + "Monthly_Total") - "Monthly_Budget" = "New_Balance"
each subsequent Month would use the formula
("New_Balance" + "Monthly_Total") - "Monthly_Budget"
I can get it to work for the first group footer, but with then each month after that is referencing back to the "Starting_Balance"
rather than the "New_Balance"
any ideas?
Best Answer
Try using a flag variable that says whether or not the first month has been reported yet. I originally though of using New_Balance as 0, but that could potentially happen naturally.
So, something like
Initializer in the report header:
Monthly formula