Custom Report in Windows

Derek Atkins warlord at MIT.EDU
Thu Feb 4 09:31:48 EST 2010


Hi,

What if you try running GnuCash in GDB?

-derek

Jason Dunham <jwdunham at gmail.com> writes:

> I am still futzing around with the basics of custom reports without much
> success.
>
> I'm running GC 2.3.8 on Windows 7 64-bit.
>
> This is the contents of my config.user file:
>
> (load-from-path "C:\\Users\\jdunham\\.gnucash\\JasonsReport.scm")
>
>
> I know that this is working, because previously I had gotten relevant errors
> in the trace file when the .scm file had improper syntax.  I could actually
> use a relative path, but later on I will move the reports to a different
> folder.
>
> When GC loads, it gets most of the way through loading, and then crashes
> out.  There is nothing in the trace file except a warning that was there
> even before I attempted to load any reports, so I doubt it is relevant.  GC
> gets as far as saying "loading stylesheets" on the splash screen but does
> not reach the bit about "Checking Finance::Quote" [or something like that;
> it appears too briefly to read it easily]
>
> I'm not sure what to try next. Once I get a report loaded, then I'll worry
> about any customization.
>
> This report ("JasonsReport.scm") is a copy of hello-world.scm with the
> following differences:
>
> Comparing files hello-world.scm and \USERS\JDUNHAM\.GNUCASH\JASONSREPORT.SCM
> ***** hello-world.scm
>
> (define-module (gnucash report hello-world))
> (use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing.
> ***** \USERS\JDUNHAM\.GNUCASH\JASONSREPORT.SCM
>
> ;;(define-module (gnucash report hello-world))
> (define-module (gnucash report jasons-custom-report))
> (use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing.
> *****
>
> ***** hello-world.scm
> ;; values for your report's parameters.
> (define (options-generator)
>   (let* ((options (gnc:new-options))
> ***** \USERS\JDUNHAM\.GNUCASH\JASONSREPORT.SCM
> ;; values for your report's parameters.
> (define (options-generator-JR)
>   (let* ((options (gnc:new-options))
> *****
>
> ***** hello-world.scm
> ;; defined above.
> (define (hello-world-renderer report-obj)
>   ;; These are some helper functions for looking up option values.
> ***** \USERS\JDUNHAM\.GNUCASH\JASONSREPORT.SCM
> ;; defined above.
> (define (hello-world-renderer-JR report-obj)
>   ;; These are some helper functions for looking up option values.
> *****
>
> ***** hello-world.scm
>  ;; untranslated value here!
>  'name (N_ "Hello, World")
>
> ***** \USERS\JDUNHAM\.GNUCASH\JASONSREPORT.SCM
>  ;; untranslated value here!
>  ;; 'name (N_ "Hello, World")
>  'name (N_ "JasonsCustomStatement")
>
> *****
>
> ***** hello-world.scm
>  ;; the results in here. You must make a new guid for each report!
>  'report-guid "898d78ec92854402bf76e20a36d24ade"
>
> ***** \USERS\JDUNHAM\.GNUCASH\JASONSREPORT.SCM
>  ;; the results in here. You must make a new guid for each report!
>  ;; 'report-guid "898d78ec92854402bf76e20a36d24ade"
>  'report-guid "d67fd9a118fa438ab884523fa4fde53b"
>
> *****
>
> ***** hello-world.scm
>  ;; (only necessary if it differs from the name)
>  'menu-name (N_ "Sample Report with Examples")
>
> ***** \USERS\JDUNHAM\.GNUCASH\JASONSREPORT.SCM
>  ;; (only necessary if it differs from the name)
>  ;; 'menu-name (N_ "Sample Report with Examples")
>  'menu-name (N_ "Jasons Custom Statement")
>
> *****
>
> ***** hello-world.scm
>  ;; report to the user.
>  'menu-tip (N_ "A sample report with examples.")
>
> ***** \USERS\JDUNHAM\.GNUCASH\JASONSREPORT.SCM
>  ;; report to the user.
>  ;; 'menu-tip (N_ "a sample report with examples.")
>  'menu-tip (N_ "Based on Hello, World sample report with examples.")
>
> *****
>
> ***** hello-world.scm
>  ;; The options generator function defined above.
>  'options-generator options-generator
>
> ***** \USERS\JDUNHAM\.GNUCASH\JASONSREPORT.SCM
>  ;; The options generator function defined above.
>  'options-generator options-generator-JR
>
> *****
>
> ***** hello-world.scm
>  ;; The rendering function defined above.
>  'renderer hello-world-renderer)
> ***** \USERS\JDUNHAM\.GNUCASH\JASONSREPORT.SCM
>  ;; The rendering function defined above.
>  'renderer hello-world-renderer-JR)
> *****
> _______________________________________________
> gnucash-devel mailing list
> gnucash-devel at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
>
>

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available


More information about the gnucash-devel mailing list