Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

GL Trail balance report

(0) ShareShare
ReportReport
Posted on by 1,821

Hi,

I want to create GL trail balance report.  I would like to know what are the tables need to use to retrieve below mentioned data from SQL SSRS

Account

Description

Beginning Balance

Debit

Credit

Net Change

Ending Balance

10-0100-0110-01101

EQUIP - COMPUTERS COST

2,650,391.74

10,452.69

0

         10,452.69

     2,660,844.43

10-0100-0110-01102

EQUIP - SOFTWARE COST

1,733,668.86

0

0

                   -  

     1,733,668.86

10-0100-0110-01103

EQUIP - TELEPHONES COST

61,403.93

0

0

                  -  

         61,403.93

*This post is locked for comments

  • Suggested answer
    Victoria Yudin Profile Picture
    22,768 on at
    RE: GL Trail balance report

    I have a number of blog posts with code for different versions of the General Ledger Trial Balance: victoriayudin.com/.../general-ledger-sql-views

    Hope this helps with what you're looking to do.

  • Community Member Profile Picture
    on at
    RE: GL Trail balance report

    You can use this query and alter it to fit your needs:

    /*

    Trial Balance Query

    */

    declare @Year int

    declare @cmp varchar(4)

    set @Year = 2018;

    With TB (CompanyID,CompanyDescription,Account,[Description],BeginBal,Debit,Credit,NetChange,Ending) as

    (

    select A.Segment1 [CompanyID],

    C.dscriptn [CompanyDescription],

    [account number] ACCOUNT,

    B.DSCRIPTN [Description],

    SUM(CASE When [Period ID] = 0 THEN [Period Balance] ELSE 0 END) AS BEGINBAL,

    SUM(CASE When [Period ID] > 0 THEN [Debit Amount] ELSE 0 END) AS Debit,

    SUM(CASE When [Period ID] > 0 THEN [Credit Amount] ELSE 0 END) AS Credit,

    SUM(CASE When [Period ID] > 0 THEN [Period Balance] ELSE 0 END) AS NetChange,

    SUM([Period Balance]) AS ENDING

    FROM (AccountSummary A

    left join gl40200 B

    on A.Segment2 = b.SGMNTID)

    left join gl40200 C on

    A.segment1 = c.sgmntid

    WHERE [Account Type]='posting account'

    and [Year] = @Year

    and b.sgmtnumb = 2

    and c.sgmtnumb = 1

    GROUP BY [segment1]

               ,[Account Number]

    ,b.dscriptn

    ,C.dscriptn

    )

    Select [CompanyID]

    ,[CompanyDescription]

    ,Account

    ,[Description] = case [Description]

    when '' then (select top 1 actdescr from gl00100 where MNACSGMT = Account)

    else [Description]

    end

    ,BeginBal

    ,Debit

    ,Credit

    ,NetChange

    ,Ending

    from TB

    order by CompanyID,account;

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >

Featured topics

Product updates

Dynamics 365 release plans