From 1bcffcd88d575782b1e06eeada1efaa980076e92 Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Sat, 13 Jun 2020 23:50:26 +0800 Subject: [PATCH] [html-utilities] gnc:html-render-options-changed shows subreports This is useful for cli to show Multicolumn report with subreports. e.g. * guid: 2f17ecb535f24a3a9f314bc5855569e5 General / Number of columns: 2.0 General / Report name: A saved-report based on nmulticolumn-view General / Stylesheet: Easy Embedded Report: Welcome to GnuCash Embedded Report: Balance Sheet * guid: d8ba4a2e89e8479ca9f6eccdeb164588 --- gnucash/report/html-utilities.scm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gnucash/report/html-utilities.scm b/gnucash/report/html-utilities.scm index 1822c3598d..f413dccf21 100644 --- a/gnucash/report/html-utilities.scm +++ b/gnucash/report/html-utilities.scm @@ -270,7 +270,9 @@ (try xaccAccountGetName) (try gnc-budget-get-name) (format #f "~a" d))) - (let ((render-list '())) + (let ((render-list '()) + (report-list (gnc:option-value + (gnc:lookup-option options "__general" "report-list")))) (define (add-option-if-changed option) (let* ((section (gnc:option-section option)) (name (gnc:option-name option)) @@ -281,6 +283,11 @@ (if (not (or (equal? default-value value) (char=? (string-ref section 0) #\_))) (addto! render-list retval)))) + (for-each + (lambda (child) + (let ((report (gnc-report-find (car child)))) + (addto! render-list (cons "Embedded Report" (gnc:report-name report))))) + (or report-list '())) (gnc:options-for-each add-option-if-changed options) (if plaintext? (string-append