Hi, please locate the stored procedure named "dbo.seeglPrintSRSTrialBalance". Right-click on the stored procedure and select "Modify" to open it in a query window. In the query window, you can view the SQL code for the GP trial balance report.
You may refer to the MS document: