Op zaterdag 25 augustus 2018 02:11:38 CEST schreef Stephen M. Butler:
> On 08/24/2018 12:40 AM, Geert Janssens wrote:
> > Op donderdag 23 augustus 2018 19:35:43 CEST schreef Stephen M. Butler:
> >> On 08/23/2018 09:44 AM, Geert Janssens wrote:
> >>> Better still: don't mess with the installation directory at all and
> >>> instead
> >>> follow
> >>> https://wiki.gnucash.org/wiki/Custom_Reports#Loading_Your_Report
> >>> to load your custom report.
> >> 
> >> I tried that path and it didn't work.  One of these days I'll figure out
> >> what I did wrong there.  But, if the above will work then I'm willing to
> >> suffer making the changes for each new release.
> > 
> > What error did you get in this case ? I expect it to be different and
> > related to the location of the associated *-eguile.scm and/or *.css file
> > ?
> > 
> > Geert
> 
> moved balsheet-fmtd.scm and balsheet-fmtd.eguild.scm to standard-reports
> folder.  Commented out the line for balsheet-fmtd in
> business-reports.scm to get back to the state where I had the problems. 
> These error messages:
> 
> gnucash --logto stdout
> 
> (gnucash:10123): Gtk-WARNING **: 16:57:47.073: Theme parsing error:
> gtk.css:1278:13: The 'icon-shadow' property has been renamed to
> '-gtk-icon-shadow'
> 
> (gnucash:10123): Gtk-WARNING **: 16:57:47.073: Theme parsing error:
> gtk.css:1281:15: The 'icon-shadow' property has been renamed to
> '-gtk-icon-shadow'
> Backtrace:
> In ice-9/eval-string.scm:
>   44: 19 [read-and-eval #<input: string 559fb2aae340> #:lang ...]
>   37: 18 [lp (use-modules (gnucash report standard-reports))]
> In ice-9/eval.scm:
>  505: 17 [#<procedure 559fb1f07340 at ice-9/eval.scm:499:4 (exp)>
> (use-modules #)]
> In ice-9/psyntax.scm:
> 1106: 16 [expand-top-sequence ((use-modules #)) () ((top)) ...]
>  989: 15 [scan ((use-modules (gnucash report standard-reports))) () ...]
>  279: 14 [scan ((# #) #(syntax-object *unspecified* # #)) () (()) ...]
> In ice-9/boot-9.scm:
> 3589: 13 [process-use-modules (((gnucash report standard-reports)))]
>  705: 12 [map #<procedure 559fb1fcfd40 at ice-9/boot-9.scm:3589:25
> (mif-args)> ((#))]
> 3590: 11 [#<procedure 559fb1fcfd40 at ice-9/boot-9.scm:3589:25
> (mif-args)> (#)]
> 2867: 10 [resolve-interface (gnucash report standard-reports) #:select ...]
> 2792: 9 [#<procedure 559fb1fc2620 at ice-9/boot-9.scm:2780:4 (name
> #:optional autoload version #:key ensure)> # ...]
> 3068: 8 [try-module-autoload (gnucash report standard-reports) #f]
> 2404: 7 [save-module-excursion #<procedure 559fb2d76a50 at
> ice-9/boot-9.scm:3069:17 ()>]
> 3088: 6 [#<procedure 559fb2d76a50 at ice-9/boot-9.scm:3069:17 ()>]
> In unknown file:
>    ?: 5 [primitive-load-path "gnucash/report/standard-reports" ...]
> In standard-reports.scm:
>  149: 4 [#<procedure 559fb2b73fa0 ()>]
> In ice-9/boot-9.scm:
>  771: 3 [for-each #<procedure 559fb2ba3820 at standard-reports.scm:150:4
> (x)> #]
> In standard-reports.scm:
>  153: 2 [#<procedure 559fb2ba3820 at standard-reports.scm:150:4 (x)>
> balsheet-fmtd.eguile]
> In ice-9/boot-9.scm:
> 2870: 1 [resolve-interface (gnucash report standard-reports ...)
> #:select ...]
> In unknown file:
>    ?: 0 [scm-error misc-error #f ...]
> 
> ERROR: In procedure scm-error:
> ERROR: no code for module (gnucash report standard-reports
> balsheet-fmtd.eguile)
> 
> Now, put the line back into business-reports.scm but pointing down to
> standard-reports:
> (use-modules (gnucash report standard-reports balsheet-fmtd))
> 
> and see these errors:
> gnucash --logto stdout
> 
> (gnucash:10175): Gtk-WARNING **: 17:04:08.548: Theme parsing error:
> gtk.css:1278:13: The 'icon-shadow' property has been renamed to
> '-gtk-icon-shadow'
> 
> (gnucash:10175): Gtk-WARNING **: 17:04:08.548: Theme parsing error:
> gtk.css:1281:15: The 'icon-shadow' property has been renamed to
> '-gtk-icon-shadow'
> Backtrace:
> In ice-9/eval-string.scm:
>   44: 19 [read-and-eval #<input: string 555a37deaea0> #:lang ...]
>   37: 18 [lp (use-modules (gnucash report standard-reports))]
> In ice-9/eval.scm:
>  505: 17 [#<procedure 555a37170340 at ice-9/eval.scm:499:4 (exp)>
> (use-modules #)]
> In ice-9/psyntax.scm:
> 1106: 16 [expand-top-sequence ((use-modules #)) () ((top)) ...]
>  989: 15 [scan ((use-modules (gnucash report standard-reports))) () ...]
>  279: 14 [scan ((# #) #(syntax-object *unspecified* # #)) () (()) ...]
> In ice-9/boot-9.scm:
> 3589: 13 [process-use-modules (((gnucash report standard-reports)))]
>  705: 12 [map #<procedure 555a3720ed40 at ice-9/boot-9.scm:3589:25
> (mif-args)> ((#))]
> 3590: 11 [#<procedure 555a3720ed40 at ice-9/boot-9.scm:3589:25
> (mif-args)> (#)]
> 2867: 10 [resolve-interface (gnucash report standard-reports) #:select ...]
> 2792: 9 [#<procedure 555a37201620 at ice-9/boot-9.scm:2780:4 (name
> #:optional autoload version #:key ensure)> # ...]
> 3068: 8 [try-module-autoload (gnucash report standard-reports) #f]
> 2404: 7 [save-module-excursion #<procedure 555a38159660 at
> ice-9/boot-9.scm:3069:17 ()>]
> 3088: 6 [#<procedure 555a38159660 at ice-9/boot-9.scm:3069:17 ()>]
> In unknown file:
>    ?: 5 [primitive-load-path "gnucash/report/standard-reports" ...]
> In standard-reports.scm:
>  149: 4 [#<procedure 555a37e19ce0 ()>]
> In ice-9/boot-9.scm:
>  771: 3 [for-each #<procedure 555a37e74c80 at standard-reports.scm:150:4
> (x)> #]
> In standard-reports.scm:
>  153: 2 [#<procedure 555a37e74c80 at standard-reports.scm:150:4 (x)>
> balsheet-fmtd.eguile]
> In ice-9/boot-9.scm:
> 2870: 1 [resolve-interface (gnucash report standard-reports ...)
> #:select ...]
> In unknown file:
>    ?: 0 [scm-error misc-error #f ...]
> 
> ERROR: In procedure scm-error:
> ERROR: no code for module (gnucash report standard-reports
> balsheet-fmtd.eguile)
> 
> 
These errors make sense. Let me explain:

An eguile report consists of 3 files
- the report code (foo.scm)
- the report template (foo.eguile.scm)
- the report style definition (foo.css)

The report code is what gnucash loads like any other report. So either it 
lives in report/standard-reports and gnucash will load it automatically or you 
can store it in report and you have to update business-reports.scm. And in 
fact the recommended way is still different: store it in your personal gnucash 
data directory and load it from there as explained in the Custom Reports link 
I sent in a previous mail.

The two other files will be used by the report code. And unless these files 
are specified as absolute paths in the report options, they are searched for 
in these directories:
<install path>/share/gnucash/scm/gnucash/report
<gnucash_data_home>

IIRC you are on linux so <install_path> is likely /usr/local/
and <gnucash_data_home> is normally $HOME/.local/share/gnucash

I have just tested this on my system (Fedora 27)
- report code stored in standard-reports
- template and style stored in either of the above directories
And the report runs fine.

Having said all that my original question was what problems you had when 
setting up the report as decribed in
https://wiki.gnucash.org/wiki/Custom_Reports#Loading_Your_Report
With that I meant what problems did you encounter when storing *all three 
files* in $HOME/.local/share/gnucash and creating a load file in 
$HOME/.config/gnucash called config-user.scm with this content:
(load (gnc-build-userdata-path "balsheet-fmtd.scm"))

This works equally well on my system and is recommended.

So what issues do you get when setting up the reports in your home directory ?

Geert


_______________________________________________
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.

Reply via email to