report.updateStyleSheet
Change a style sheet's options.
Changes options of a style sheet; an option given as null goes back to its default. It works on the predefined style
sheets too, as GnuCash lets you edit Default. Image options already in the Configuration entry survive.
Examples
Example: with no book.
JSON-RPC
Request:
{"jsonrpc":"2.0","id":1,"method":"report.updateStyleSheet","params":{"name":"Default","options":{"Tables":{"Table cell padding":6}}}}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"name": "Default",
"template": "Plain",
"predefined": true,
"options": [
"…"
]
}
}
Command line
red-ale exec report.updateStyleSheet '{"name":"Default","options":{"Tables":{"Table cell padding":6}}}'
It prints:
{
"name": "Default",
"template": "Plain",
"predefined": true,
"options": [
"…"
]
}
MCP tool call
Tool call:
{"name":"report.updateStyleSheet","arguments":{"name":"Default","options":{"Tables":{"Table cell padding":6}}}}
Result:
{
"structuredContent": {
"name": "Default",
"template": "Plain",
"predefined": true,
"options": [
"…"
]
}
}
Effect: write, on the Configuration only.
Params
Params of report.updateStyleSheet.
name(string, required): The style sheet.options(ReportOptions, required): The options to set;nullreturns one to its default.
Result
A style sheet with its options.
name(string, required): The style sheet's name.template(string, required): Its template's name.predefined(boolean, required): Whether it is one of GnuCash's six predefined style sheets, which can be changed and reset but not deleted.options(array of OptionInfo, required): Its options, with their defaults and values.