> > > Anyway Rob, now that I have this working, can you tell me how I can
> > > get the scheme reports to pass the html to gnome as one large string?
> >
> > Well, I don't offhand about the gnome bit, but to get the output as a
> > long string instead of having it display (which I presumed we'd need
> > to do eventually), you just need to redefine the gnc:run-report
> > function. As I mention in the comment in the current code,
> > call-with-output-string will let us use the normal output functions to
> > build a string. Perhaps something like this (I haven't tested it, so
> > let me know if it doesn't work):
>
> If I can just get the string, I can take it from there.
> I tried this version of your function:
>
> (define (gnc:run-report report-name)
> ;; Return a string consisting of the contents of the report.
>
> (define (display-report-list-item item port)
> (cond
> ((string? item) (display item port))
> ((null? item) #t)
> ((list? item) (map display-report-list-item item port))
Oh, wait, the above is obviously wrong, because of the map. Duh.
I changed it to
((list? item) (map (lambda (item) (display-report-list-item item port))
item))
And that seems to work, sort of. But if I run the P&L report
and then the balance report or vice versa, it bombs out.
dave
--
Gnucash Developer's List
To unsubscribe send empty email to: [EMAIL PROTECTED]