I am trying to build a general ledger by tweaking the Transactions for Account report. All I really did was add a range for the accounts instead of having it pull just one account. Along with a little bit of other stuff, I essentially got to where I need to be except for one problem. Only the first account gets a beginning balance, and every other account starts off with zero. I believe this issue is arising from the $BegBalance variable, but I'm not sure how to get around it. Currently the code for this variable (which was already in the system) looks like
( CStr($PrevBranchID) + CStr($PrevSubID) + CStr($PrevFinPeriodID) <>
CStr([GLHistoryByPeriod.BranchID]) + CStr([GLHistoryByPeriod.SubID]) + CStr([GLHistoryByPeriod.FinPeriodID])
And [GLHistoryByPeriod.FinPeriodID] = [@StartPeriod],
( (([Account.Type] = 'I' Or [Account.Type] = 'E') And Payments.ArePeriodsInSameYear([GLHistoryByPeriod.FinPeriodID.Raw],
Or ([Account.Type] = 'A' Or [Account.Type] = 'L'), IIF
( [GLHistoryByPeriod.FinPeriodID] = [GLHistoryByPeriod.LastActivityPeriod],
I'm not great at coding, so I'm not sure if there is something in here prohibiting two accounts from getting a beginning balance, or maybe there is something I could add to allow it. I already tried resetting the variable after every account, but that seemed to just make every account, even the first one, have a beginning balance of zero.