Take note: this change will *hide* any manually hacked saved reports
that make use of the new report-guid. The new saved-reports-2.4 file
will shadow the old saved-reports-2.0 file and will leave those hacked
reports behind. Any pre-existing saved reports that use report-guid will
have to be manually migrated to the new file.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17942 57a11ea4-9604-0410-9ed3-97b8803252fd
(gnc:debug"done setting, is now "(gnc:report-template-parent-typereport-rec)))))
*gnc:_report-templates_*)))
*gnc:_report-templates_*)
;; re-save this old-style report in the new format
(gnc:report-template-save-to-savefilereport-rec)
(gnc:debug"complete saving "(gnc:report-template-namereport-rec)" in new format")
))
(if (not gnc:old-style-report-warned)
(begin
(set! gnc:old-style-report-warned#t)
(gnc-error-dialog'()(string-append (_"Your report system includes one or more reports without a proper report-guid field. This report may break without warning in future versions of GnuCash. Please review your saved reports file and update those reports.")))))
(gnc-error-dialog'()(string-append (_"The GnuCash report system has been upgraded. Your old saved reports have been transfered into a new format. If you experience trouble with saved reports, please contact the GnuCash development team.")))))
(gnc:warn"gnc:define-report: old-style report. setting guid for "(gnc:report-template-namereport-rec)" to "(gnc:report-template-report-guidreport-rec)))
(gnc:report-template-parent-typereport-template);;a saved report also needs its type stored separately to reference the template
(gnc:report-template-parent-typereport-template)
(gnc:report-template-namereport-template))))
(define gnc:current-saved-reports
(gnc-build-dotgnucash-path"saved-reports-2.0"))
(gnc-build-dotgnucash-path"saved-reports-2.4"))
(define (gnc:report-save-to-savefilereport)
(let* ((conf-file-namegnc:current-saved-reports)
@ -534,17 +566,29 @@
(display saved-form
(open-fileconf-file-name"a"))
(force-output)
(let ((report-name(gnc:report-namereport)))
(gnc-info-dialog
'()
(sprintf
#f(_"Your report \"%s\" has been saved into the configuration file \"%s\". The report will be available in the menu Reports -> Custom at the next startup of GnuCash.")
#f(_"Your report \"%s\" has been saved into the configuration file \"%s\". The report will be available in the menu Reports -> Custom at the next startup of GnuCash.")