diff --git a/src/report/report-system/report.scm b/src/report/report-system/report.scm
index 02a1e44..489d651 100644
--- a/src/report/report-system/report.scm
+++ b/src/report/report-system/report.scm
@@ -80,6 +80,16 @@
 ;; report-template, but only once
 (define gnc:old-style-report-warned #f)
 
+(define dumpfile "/home/janssege/report-options.txt")
+(define print-port #f)
+(define (print-option-names option)
+(display " " print-port)
+(display (gnc:option-section option) print-port)
+(display " - " print-port)
+(display (gnc:option-name option) print-port)
+(newline print-port)
+)
+
 ;; A <report-template> represents one of the available report types.
 (define <report-template>
   (make-record-type "<report-template>"
@@ -136,8 +146,16 @@
 	       (name (gnc:report-template-name report-rec))
 	       (tmpl (hash-ref *gnc:_report-templates_* report-guid)))
 	  (if (not tmpl)
-	      (hash-set! *gnc:_report-templates_*
-			 report-guid report-rec)
+              (begin
+	        (hash-set! *gnc:_report-templates_*
+                            report-guid report-rec)
+
+                (let* ((port (open-file dumpfile "a"))
+                       (options (gnc:report-template-new-options report-rec)))
+                      (set! print-port port)
+                      (newline port)(display "Report: " port)(display name port)(newline port)
+                      (gnc:options-for-each print-option-names options)
+                      (close-port port)))
 	      (begin
 		;; FIXME: We should pass the top-level window
 		;; instead of the '() to gnc-error-dialog, but I
