We recently had a requirement to report on the running sum of a certain GL account (it was the cash account)
We needed the BBF entry, and then a running sum of all the periods after that. Problem is, you don't know where to look for the BBF. In January it might be in history or open. Also, the periods that we need to report from might also be in history or open.
The code below handles all of that. It can easily be expanded to return more accounts, and restricted to fewer months.