Report

Transaction Report

The Transaction Report report.

GnuCash's general listing of splits: for the selected accounts and dates, each split with its date, number, description, memo, the other account and the amount, grouped and subtotalled as you choose. It is the one to use to find transactions or to build your own statement; the General Ledger and Reconciliation Report are presets of it. In GnuCash: Reports ▸ Transaction Report.

The options that matter are Accounts/Accounts (at least one, or it says No accounts selected), General/Start Date and End Date, the Filter options (text, reconcile state, void), Sorting (primary and secondary key, subtotals) and Display, which chooses the columns. General/Table for Exporting gives one row per split with every field, for export.

Examples

Example: with a copy of the reports/transaction 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":"Transaction Report","options":{"Accounts":{"Accounts":["a0000000000000000000000000000003"]},"General":{"Start Date":{"absolute":"1970-01-01"},"End Date":{"absolute":"1970-12-31"}}}}}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "title": "Transaction Report",
    "sections": [
      {
        "blocks": [
          "…",
          {
            "kind": "table",
            "rows": [
              "…",
              "…",
              "…",
              "…",
              "…",
              "…",
              {
                "role": "grandTotal",
                "cells": [
                  {
                    "text": "Grand Total",
                    "…": "…"
                  },
                  null,
                  {
                    "display": "$28.00",
                    "…": "…"
                  }
                ],
                "…": "…"
              },
              "…"
            ],
            "…": "…"
          },
          "…"
        ],
        "…": "…"
      },
      "…"
    ],
    "…": "…"
  }
}

Command line

red-ale exec --book book.gnucash report.run '{"report":"Transaction Report","options":{"Accounts":{"Accounts":["a0000000000000000000000000000003"]},"General":{"Start Date":{"absolute":"1970-01-01"},"End Date":{"absolute":"1970-12-31"}}}}'

It prints:

{
  "title": "Transaction Report",
  "sections": [
    {
      "blocks": [
        "…",
        {
          "kind": "table",
          "rows": [
            "…",
            "…",
            "…",
            "…",
            "…",
            "…",
            {
              "role": "grandTotal",
              "cells": [
                {
                  "text": "Grand Total",
                  "…": "…"
                },
                null,
                {
                  "display": "$28.00",
                  "…": "…"
                }
              ],
              "…": "…"
            },
            "…"
          ],
          "…": "…"
        },
        "…"
      ],
      "…": "…"
    },
    "…"
  ],
  "…": "…"
}

MCP tool call

Tool call:

{"name":"report.run","arguments":{"report":"Transaction Report","options":{"Accounts":{"Accounts":["a0000000000000000000000000000003"]},"General":{"Start Date":{"absolute":"1970-01-01"},"End Date":{"absolute":"1970-12-31"}}}}}

Result:

{
  "structuredContent": {
    "title": "Transaction Report",
    "sections": [
      {
        "blocks": [
          "…",
          {
            "kind": "table",
            "rows": [
              "…",
              "…",
              "…",
              "…",
              "…",
              "…",
              {
                "role": "grandTotal",
                "cells": [
                  {
                    "text": "Grand Total",
                    "…": "…"
                  },
                  null,
                  {
                    "display": "$28.00",
                    "…": "…"
                  }
                ],
                "…": "…"
              },
              "…"
            ],
            "…": "…"
          },
          "…"
        ],
        "…": "…"
      },
      "…"
    ],
    "…": "…"
  }
}

Template GUID: 2fe3b9833af044abb929a88d5a59620f · Script: standard/transaction.rhai

Options

Accounts

  • Accounts (accountList, default []): Report on these accounts.
  • Filter Type (multichoice, default "none"): Filter account.
  • Filter By… (accountList, default []): Filter on these accounts.

Currency

  • Common Currency (boolean, default false): Convert all transactions into a common currency.
  • Show original currency amount (boolean, default false): Also show original currency amounts
  • Report's currency (currency, default "CURRENCY::USD"): Select the currency to display the values of this report in.
  • Price Source (multichoice, default "pricedb-nearest"): The source of price information.

Display

  • Date (boolean, default true): Display the date?
  • Reconciled Date (boolean, default false): Display the reconciled date?
  • Date Entered (boolean, default false): Display the entered date?
  • Num (boolean, default true): Display the check number?
  • Description (boolean, default true): Display the description?
  • Memo (boolean, default true): Display the memo?
  • Notes (boolean, default true): Display the notes if the memo is unavailable?
  • Invoice (boolean, default false): Display invoice details
  • Account Name (boolean, default false): Display the account name?
  • Use Full Account Name (boolean, default true): Display the full account name?
  • Account Code (boolean, default false): Display the account code?
  • Detail Level (multichoice, default "single"): Amount of detail to display per transaction.
  • Other Account Name (boolean, default true): Display the other account name? If this is a split transaction, this parameter is guessed.
  • Use Full Other Account Name (boolean, default false): Display the full account name?
  • Other Account Code (boolean, default false): Display the other account code?
  • Shares (boolean, default false): Display the number of shares?
  • Price (boolean, default false): Display the shares price?
  • Link (boolean, default false): Display the transaction linked document
  • Amount (multichoice, default "double"): Display the amount?
  • Sign Reverses (multichoice, default "global"): Reverse amount display for certain account types.
  • Enable Links (boolean, default true): Enable hyperlinks in amounts.
  • Subtotal Table (boolean, default false): Display a subtotal summary table.
  • Account Balance (boolean, default false): Display the balance of the underlying account on each line?
  • Grand Total (boolean, default true): Display a grand total section at the bottom?
  • Running Totals (multichoice, default "none"): Display running totals as per report sort order?

Filter

  • Account Name Filter (string, default ""): Show only accounts whose full name matches this filter e.g. ':Travel' will match Expenses:Travel:Holiday and Expenses:Business:Travel. It can be left blank, which will disable the filter.
  • Use regular expressions for account name filter (boolean, default false): By default the account filter will search substring only. Set this to true to enable full POSIX regular expressions capabilities. 'Car|Flights' will match both Expenses:Car and Expenses:Flights. Use a period (.) to match a single character e.g. '20../.' will match 'Travel 2017/1 London'.
  • Account Name Filter excludes matched strings (boolean, default false): If this option is selected, accounts matching filter are excluded.
  • Transaction Filter (string, default ""): Show only transactions where description, notes, or memo matches this filter. e.g. '#gift' will find all transactions with #gift in description, notes or memo. It can be left blank, which will disable the filter.
  • Use regular expressions for transaction filter (boolean, default false): By default the transaction filter will search substring only. Set this to true to enable full POSIX regular expressions capabilities. '#work|#family' will match both tags within description, notes or memo.
  • Transaction Filter excludes matched strings (boolean, default false): If this option is selected, transactions matching filter are excluded.
  • Transaction Filter is case insensitive (boolean, default false): If this option is selected, transactions matching filter is not case sensitive.
  • Reconciled Status (multichoice, default "all"): Filter by reconcile status.
  • Void Transactions (multichoice, default "non-void-only"): How to handle void transactions.
  • Closing transactions (multichoice, default "exclude-closing"): By default most users should not include closing transactions in a transaction report. Closing transactions are transfers from income and expense accounts to equity, and must usually be excluded from periodic reporting.

General

  • Report name (string, default "Transaction Report"): 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.
  • Date Filter (multichoice, default "posted"): Specify date to filter by…
  • Start Date (date, default {"relative":"start-accounting-period"}): Start of reporting period.
  • End Date (date, default {"relative":"end-accounting-period"}): End of reporting period.
  • Table for Exporting (boolean, default false): Formats the table suitable for cut & paste exporting with extra cells.

Sorting

  • Primary Key (multichoice, default "account-name"): Sort by this criterion first.
  • Primary Sort Order (multichoice, default "ascend"): Order of primary sorting.
  • Primary Subtotal for Date Key (multichoice, default "monthly"): Do a date subtotal.
  • Primary Subtotal (boolean, default true): Subtotal according to the primary key?
  • Secondary Key (multichoice, default "register-order"): Sort by this criterion second.
  • Secondary Sort Order (multichoice, default "ascend"): Order of Secondary sorting.
  • Secondary Subtotal for Date Key (multichoice, default "monthly"): Do a date subtotal.
  • Secondary Subtotal (boolean, default false): Subtotal according to the secondary key?
  • Show Full Account Name (boolean, default false): Show the full account name for subtotals and subheadings?
  • Show Account Code (boolean, default false): Show the account code for subtotals and subheadings?
  • Show Account Description (boolean, default false): Show the account description for subheadings?
  • Show Informal Debit/Credit Headers (boolean, default false): Show the informal headers for debit/credit accounts?
  • Add indenting columns (boolean, default true): Add indenting columns with grouping and subtotals?
  • Show subtotals only (hide transactional data) (boolean, default false): Show subtotals only, hiding transactional detail?

__trep

  • unique-transactions (internal, default false)