Report

Transaction Breakdown Report

The Transaction Breakdown Report report.

For one account, its transactions between two dates with the amount split by the other accounts, one column for each of them, and a total row. Use it to see how each transaction in an account was spread, such as a card statement over expense accounts. In GnuCash: Reports ▸ Experimental ▸ Transaction Breakdown Report.

The options that matter are General/Account (the account to break down), General/Start Date and End Date, General/Description Filter and General/Limit for number of columns.

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 Breakdown Report","options":{"General":{"Account":"a0000000000000000000000000000003","Start Date":{"absolute":"1970-01-01"},"End Date":{"absolute":"1970-12-31"}}}}}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "title": "Transaction Breakdown Report",
    "sections": [
      {
        "blocks": [
          {
            "kind": "table",
            "rows": [
              "…",
              "…",
              "…",
              {
                "role": "total",
                "cells": [
                  {
                    "text": "Total For 01/01/70 to 12/31/70",
                    "…": "…"
                  },
                  {
                    "display": "-$28.00",
                    "…": "…"
                  },
                  {
                    "display": "-$8.00",
                    "…": "…"
                  },
                  {
                    "display": "$20.00",
                    "…": "…"
                  }
                ],
                "…": "…"
              },
              "…"
            ],
            "…": "…"
          },
          "…"
        ],
        "…": "…"
      },
      "…"
    ],
    "…": "…"
  }
}

Command line

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

It prints:

{
  "title": "Transaction Breakdown Report",
  "sections": [
    {
      "blocks": [
        {
          "kind": "table",
          "rows": [
            "…",
            "…",
            "…",
            {
              "role": "total",
              "cells": [
                {
                  "text": "Total For 01/01/70 to 12/31/70",
                  "…": "…"
                },
                {
                  "display": "-$28.00",
                  "…": "…"
                },
                {
                  "display": "-$8.00",
                  "…": "…"
                },
                {
                  "display": "$20.00",
                  "…": "…"
                }
              ],
              "…": "…"
            },
            "…"
          ],
          "…": "…"
        },
        "…"
      ],
      "…": "…"
    },
    "…"
  ],
  "…": "…"
}

MCP tool call

Tool call:

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

Result:

{
  "structuredContent": {
    "title": "Transaction Breakdown Report",
    "sections": [
      {
        "blocks": [
          {
            "kind": "table",
            "rows": [
              "…",
              "…",
              "…",
              {
                "role": "total",
                "cells": [
                  {
                    "text": "Total For 01/01/70 to 12/31/70",
                    "…": "…"
                  },
                  {
                    "display": "-$28.00",
                    "…": "…"
                  },
                  {
                    "display": "-$8.00",
                    "…": "…"
                  },
                  {
                    "display": "$20.00",
                    "…": "…"
                  }
                ],
                "…": "…"
              },
              "…"
            ],
            "…": "…"
          },
          "…"
        ],
        "…": "…"
      },
      "…"
    ],
    "…": "…"
  }
}

Template GUID: 03603f0443494a6fa790b417f35d90d4 · Script: standard/txn-columns.rhai

Options

General

  • Report name (string, default "Transaction Breakdown 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.
  • Start Date (date, default {"relative":"start-accounting-period"}): Start of reporting period.
  • End Date (date, default {"relative":"end-accounting-period"}): End of reporting period.
  • Account (accountSel, default null): Account
  • Description Filter (string, default ""): Description Filter
  • Limit for number of columns (numberRange, default 10): Set the upper limit for number of columns