Back

GL Trial Balance Summary by Period SmartList Builder Template

Published: Jan 05, 2018
Post Author Written by eOne Solutions

The GL Trial Balance Summary by Period SmartList Builder setup is designed to return the Beginning Balance, Monthly Net Change, and Ending Balance for each account for each History and Open year.  This is data similar to the General Ledger Summary Trial Balance that can be printed in Microsoft Dynamics GP.  By default, the report will return totals for every period, but it can be restricted to specific ones.

ID:  GL_TB_SUM_PRD

Name:  GL Summary TB by Period
Tables Involved:

  • Account Current Summary Master
  • Account Summary History
  • Account Master

Screen shot of Setup in SmartList Builder:

Note: If you are using SmartView to display these lists, you will need to edit a few of the calculated field in the list.  Please take the syntax below and replace the calculated field text with the below text.  The difference in the scripts is that we are putting <<COMPANY_ID>>.. in front of the GL10110 and GL10111 tables to get the database context.

Ending Balance:
(CASE 
WHEN {Account Current Summary Master:Period ID} = 0
THEN {Account Current Summary Master:Period Balance}
WHEN {Account Current Summary Master:Period ID} > 0
THEN
CASE
WHEN ((select isnull(sum(PERDBLNC),0) from <<COMPANY_ID>>..GL10110 P1
where P1.[ACTINDX] = {Account Current Summary Master:Account Number}
and P1.[YEAR1] = {Account Current Summary Master:Year}
and P1.[Ledger_ID] = {Account Current Summary Master:Ledger ID}
and PERIODID <= {Account Current Summary Master:Period ID} - 1)
+ (select isnull(sum(PERDBLNC),0)
from <<COMPANY_ID>>..GL10111 P2
where P2.[ACTINDX] = {Account Current Summary Master:Account Number}
and P2.[YEAR1] = {Account Current Summary Master:Year}
and P2.[Ledger_ID] = {Account Current Summary Master:Ledger ID}
and PERIODID <= {Account Current Summary Master:Period ID} - 1)) is NOT NULL
THEN ((select isnull(sum(PERDBLNC),0) from <<COMPANY_ID>>..GL10110 P1
where P1.[ACTINDX] = {Account Current Summary Master:Account Number}
and P1.[YEAR1] = {Account Current Summary Master:Year}
and P1.[Ledger_ID] = {Account Current Summary Master:Ledger ID}
and PERIODID <= {Account Current Summary Master:Period ID} - 1)
+ (select isnull(sum(PERDBLNC),0)
from <<COMPANY_ID>>..GL10111 P2
where P2.[ACTINDX] = {Account Current Summary Master:Account Number}
and P2.[YEAR1] = {Account Current Summary Master:Year}
and P2.[Ledger_ID] = {Account Current Summary Master:Ledger ID}
and PERIODID <= {Account Current Summary Master:Period ID} - 1))
ELSE 0.00 END
ELSE 0.00 END) +
(CASE
WHEN {Account Current Summary Master:Period ID} <> 0
THEN {Account Current Summary Master:Debit Amount}
ELSE 0.00 END) -
(CASE
WHEN {Account Current Summary Master:Period ID} <> 0
THEN {Account Current Summary Master:Credit Amount}
ELSE 0.00 END)
Period Beginning Balance:
CASE 
WHEN {Account Current Summary Master:Period ID} = 0
THEN {Account Current Summary Master:Period Balance}
WHEN {Account Current Summary Master:Period ID} > 0
THEN
CASE
WHEN ((select isnull(sum(PERDBLNC),0) from <<COMPANY_ID>>..GL10110 P1
where P1.[ACTINDX] = {Account Current Summary Master:Account Number}
and P1.[YEAR1] = {Account Current Summary Master:Year}
and P1.[Ledger_ID] = {Account Current Summary Master:Ledger ID}
and PERIODID <= {Account Current Summary Master:Period ID} - 1)
+ (select isnull(sum(PERDBLNC),0)
from <<COMPANY_ID>>..GL10111 P2
where P2.[ACTINDX] = {Account Current Summary Master:Account Number}
and P2.[YEAR1] = {Account Current Summary Master:Year}
and P2.[Ledger_ID] = {Account Current Summary Master:Ledger ID}
and PERIODID <= {Account Current Summary Master:Period ID} - 1)) is NOT NULL
THEN ((select isnull(sum(PERDBLNC),0) from <<COMPANY_ID>>..GL10110 P1
where P1.[ACTINDX] = {Account Current Summary Master:Account Number}
and P1.[YEAR1] = {Account Current Summary Master:Year}
and P1.[Ledger_ID] = {Account Current Summary Master:Ledger ID}
and PERIODID <= {Account Current Summary Master:Period ID} - 1)
+ (select isnull(sum(PERDBLNC),0)
from <<COMPANY_ID>>..GL10111 P2
where P2.[ACTINDX] = {Account Current Summary Master:Account Number}
and P2.[YEAR1] = {Account Current Summary Master:Year}
and P2.[Ledger_ID] = {Account Current Summary Master:Ledger ID}
and PERIODID <= {Account Current Summary Master:Period ID} - 1))
ELSE 0.00 END
ELSE 0.00 END

Note: These templates are designed to be a starting place for your reporting needs.  While we try to make them as accurate as possible, we always recommend you check them with your data as we don’t guarantee their results.  Differences in how data is entered and used in Microsoft Dynamics GP can produce different results with these templates.

Feeling stuck? Get the support and guidance you need to help you power through any data challenge

We're on your integration team. Connect with our people and let us know how we can help you.