Report

Trial Balance

The Trial Balance report.

Each account's balance at a date as a debit or credit, with the two totals, which must be equal. Use it to check a book before closing it. The adjusting entries in the period appear in their own columns. In GnuCash: Reports ▸ Income & Expense ▸ Trial Balance.

The options that matter are General/Date of Report, General/Start of Adjusting/Closing (the first day of the adjusting and closing entries), General/Report variation, the Entries patterns that name the adjusting and closing transactions, Accounts/Accounts and Levels of Subaccounts, and Commodities/Price Source.

Examples

Example: with a copy of the reports/adjusting-entries example book open as book.gnucash, at 2024-03-15T12:00:00Z.

JSON-RPC

Request:

{"jsonrpc":"2.0","id":1,"method":"report.run","params":{"report":"Trial Balance"}}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "title": " Trial Balance 12/31/24",
    "sections": [
      {
        "blocks": [
          {
            "kind": "table",
            "rows": [
              "…",
              "…",
              "…",
              "…",
              "…",
              "…",
              "…",
              "…",
              "…",
              "…",
              {
                "role": "total",
                "cells": [
                  null,
                  {
                    "display": "$3,086.00",
                    "…": "…"
                  },
                  {
                    "display": "$3,086.00",
                    "…": "…"
                  }
                ],
                "…": "…"
              },
              "…"
            ],
            "…": "…"
          },
          "…"
        ],
        "…": "…"
      },
      "…"
    ],
    "…": "…"
  }
}

Command line

red-ale exec --book book.gnucash report.run '{"report":"Trial Balance"}'

It prints:

{
  "title": " Trial Balance 12/31/24",
  "sections": [
    {
      "blocks": [
        {
          "kind": "table",
          "rows": [
            "…",
            "…",
            "…",
            "…",
            "…",
            "…",
            "…",
            "…",
            "…",
            "…",
            {
              "role": "total",
              "cells": [
                null,
                {
                  "display": "$3,086.00",
                  "…": "…"
                },
                {
                  "display": "$3,086.00",
                  "…": "…"
                }
              ],
              "…": "…"
            },
            "…"
          ],
          "…": "…"
        },
        "…"
      ],
      "…": "…"
    },
    "…"
  ],
  "…": "…"
}

MCP tool call

Tool call:

{"name":"report.run","arguments":{"report":"Trial Balance"}}

Result:

{
  "structuredContent": {
    "title": " Trial Balance 12/31/24",
    "sections": [
      {
        "blocks": [
          {
            "kind": "table",
            "rows": [
              "…",
              "…",
              "…",
              "…",
              "…",
              "…",
              "…",
              "…",
              "…",
              "…",
              {
                "role": "total",
                "cells": [
                  null,
                  {
                    "display": "$3,086.00",
                    "…": "…"
                  },
                  {
                    "display": "$3,086.00",
                    "…": "…"
                  }
                ],
                "…": "…"
              },
              "…"
            ],
            "…": "…"
          },
          "…"
        ],
        "…": "…"
      },
      "…"
    ],
    "…": "…"
  }
}

Template GUID: 216cd0cf6931453ebcce85415aba7082 · Script: standard/trial-balance.rhai

Options

Accounts

  • Accounts (accountList, default []): Report on these accounts.
  • Levels of Subaccounts (multichoice, default 1): Maximum number of levels in the account tree displayed.

Commodities

  • Report's currency (currency, default "CURRENCY::USD"): Select the currency to display the values of this report in.
  • Price Source (multichoice, default "average-cost"): The source of price information.
  • Show Foreign Currencies (boolean, default false): Display any foreign currency amount in an account.
  • Show Exchange Rates (boolean, default false): Show the exchange rates used.

Display

  • Display accounts as hyperlinks (boolean, default true): Shows each account in the table as a hyperlink to its register window.

Entries

  • Adjusting Entries pattern (string, default "Adjusting Entries"): Any text in the Description column which identifies adjusting entries.
  • Adjusting Entries pattern is case-sensitive (boolean, default false): Causes the Adjusting Entries Pattern match to be case-sensitive.
  • Adjusting Entries Pattern is regular expression (boolean, default false): Causes the Adjusting Entries Pattern to be treated as a regular expression.
  • Closing Entries pattern (string, default "Closing Entries"): Any text in the Description column which identifies closing entries.
  • Closing Entries pattern is case-sensitive (boolean, default false): Causes the Closing Entries Pattern match to be case-sensitive.
  • Closing Entries Pattern is regular expression (boolean, default false): Causes the Closing Entries Pattern to be treated as a regular expression.

General

  • Report name (string, default "Trial Balance"): Enter a descriptive name for this report.
  • Stylesheet (multichoice, default "Default"): Select a stylesheet for the report.
  • Add options summary (multichoice, default "never"): Add summary of options.
  • Report Title (string, default "Trial Balance"): Title for this report.
  • Start of Adjusting/Closing (date, default {"relative":"start-accounting-period"}): Start of reporting period.
  • Date of Report (date, default {"relative":"end-accounting-period"}): End of reporting period.
  • Report variation (multichoice, default "current"): Kind of trial balance to generate.

Merchandising

  • Gross adjustment accounts. (accountList, default []): Do not net, but show gross debit/credit adjustments to these accounts. Merchandising businesses will normally select their inventory accounts here.
  • Income summary accounts (accountList, default []): Adjustments made to these accounts are gross adjusted (see above) in the Adjustments, Adjusted Trial Balance, and Income Statement columns. Mostly useful for merchandising businesses.