[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
pull/735/head
Christopher Lam 6 years ago
parent a107382bd7
commit 1bcffcd88d

@ -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

Loading…
Cancel
Save