Extract Balance Sheet and Income Statement using SQL Script


Someone knows how to extract complete Balance Sheet or Income Statement directly from GlPeriodBal or others GL tables directly using SQL Script ??

I have the same question also. We’re trying to pull the fields from the General Ledger Report using the GLPeriodBal table but it seems like those are calculated balance fields.

I have a Stored Procedure that use GlRptRow to create a temporal table to set the row structure of complete balance or income statement, also I use other tables like GLAccount, COASegValues, after that, I update all balance accounts amounts in temporal table using GlPeriodBal and ultimately I update grouping all total by category, very complicated.

My question is about an easy way to do that.