Skip to content
+1-888-319-3663

HELP ARTICLE

GL Trial Balance Summary by Period SmartList Builder Template


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.

RECENT POSTS


Use the REST Connector to parse nested Value Arrays
SmartConnect email task fails with error: An invalid character was found in the email header
Does SmartConnect import into Avalara Avatax software
Could not initialize a collection when launching SmartConnect
ERROR [HY000] [Microsoft][ODBC Excel Driver]General error Unable to open registry key when you open a SmartConnect map.

POPULAR POSTS


SSL Security error using OLEDB Connection
This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms
Removed Part: /xl/vbaProject.bin part. (Visual Basic for Applications (VBA))
The server process could not be started because the configured identity is incorrect.
Using WINSCP and a task to upload or download files from an SFTP site

CATEGORIES

TAGS

Business Central CRM D365 Business Central Dynamics 365 dynamics crm Dynamics GP Dynamics NAV Econnect Employee Spotlight eone eOne News error Error Message Events Excel Excel Report Builder Extender Flexicoder GP integration Map Meet the Team Microsoft dynamics crm Microsoft Dynamics GP Navigation List Builder Office Relationships partners Popdock release Reporting SalesForce SalesForce.com SmartConnect SmartConnect.com SmartConnect Bootcamp SmartConnect Maps SmartConnect Office Hours SmartList SmartList Builder SmartPost SmartView SQL Tech Tuesday Templates training

Integrate & Automate without Any Code.

SmartList Data has Never Been Faster.

The Easiest Way to Report on GP Data.