By using this website, you agree to our Terms of Use (click here)
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
=$BegBalance +
IIF
( CStr($PrevBranchID) + CStr($PrevSubID) + CStr($PrevFinPeriodID) <>
CStr([GLHistoryByPeriod.BranchID]) + CStr([GLHistoryByPeriod.SubID]) + CStr([GLHistoryByPeriod.FinPeriodID])
And [GLHistoryByPeriod.FinPeriodID] = [@StartPeriod],
IIF
( (([Account.Type] = 'I' Or [Account.Type] = 'E') And Payments.ArePeriodsInSameYear([GLHistoryByPeriod.FinPeriodID.Raw],
[GLHistoryByPeriod.LastActivityPeriod.Raw]))
Or ([Account.Type] = 'A' Or [Account.Type] = 'L'), IIF
( [GLHistoryByPeriod.FinPeriodID] = [GLHistoryByPeriod.LastActivityPeriod],
IsNull([HistoryLast.FinBegBalance], 0),
IsNull([HistoryLast.FinYtdBalance], 0)
),
0
)
, 0
)
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.
Can you attach your .rpx file? Part of what I want to see is where in the report the variable is calculated.