> Announce:
> 
> Version 1.1.20 of gnucash is out.  This rolls in miscellaneous bug fixes,
> and provides the very first skeleton of a report generator.  Although
> it ships with XmHTML-1.1.0, it really requires you to install XmHTML-1.1.5
> to work properly.  Re-run the configure scripts after installing
> XmHTML-1.1.5.
> 
> I envision creating the reports as html, and using the XmHTML widget to
> display them.  In fact, I am very excited contemplating this technology.
> 
> By using the HTML widget as the main display canvas, I have an easy-to-use
> but quite powerful layout engine that I could not match if I used, say,
> XmDrawingArea or gtk_canvas(?).  It allows for nice colors, easy-to change
> fonts, a "frames" sidebar with a report menu in it, embedded graphics, 
> etc.etc.   Writing the code to emit the appropriate tables & etc. needed
> is a bit harder.  In order to make a clean distinction between the code
> that creates the reports and the html that displays them, I'm thinking of
> butchering a copy of PHP-3 and using that to render the pages.   This is a
> rather wild thought, as PHP-3 is normally used to crete server cgi-bins, 
> not client-side display canvases.  And that is, of course, why I'm excited
> by this idea.
> 
> GUI programing has long been a tedious, time-consuming process, and people
> have been scheming around it for a decade, with everything from NeXT's very
> first GUI builder to ActveX and whatnot.   I really like the idea of
> combining a simple markup language like HTML that non-programmers can
> master, with an engine that doesn't need to know about GUI's, to create a
> whole that is greater than the sum of its parts. 

My suspicion is that a year from now, it may prove preferable to use XML for
this purpose.

Using XML allows you to tag things in a much more "directed" fashion; you
might create:

<?xml version="1.0"?>   
<report>
<rheader>
<rtitle> Monthly Income and Expenses </rtitle>
<rsubtitle> Sorted by Category
</rheader>
<rbody>
<sect> 
<secttitle> 1998-01
</secttitle>
<sectbody>
<item category="Computer Stuff" amount="700.00" refid="1998-01:Computer Stuff"/>
<item category="Groceries" amount="300.00" refid="1998-01:Groceries"/>
<item category="Rent" amount="600.00" refid="1998-01:Groceries"/>
<item category="Salary" amount="-2000.00" refid="1998-01:Salary"/>
<item category="Savings" amount="400.00" refid="1998-01:Savings/>
</sectbody>
</sect>
<sect> 
<secttitle> 1998-02
</secttitle>
<sectbody>
<item category="Computer Stuff" amount="400.00" refid="1998-02:Computer Stuff"/>
<item category="Groceries" amount="500.00" refid="1998-02:Groceries"/>
<item category="Rent" amount="600.00" refid="1998-02:Groceries"/>
<item category="Salary" amount="-2500.00" refid="1998-02:Salary"/>
<item category="Savings" amount="1000.00" refid="1998-02:Savings/>
</sectbody>
</sect>
</rbody>
</report>

Note that "refid" might be used to drill back into GnuCash so that you could
reference back to a group of transactions...

Next step is to let this integrate into Gnumeric, by creating a spreadsheet
out of this.

Note that a Gnumeric spreadsheet looks something like:

<?xml version="1.0"?>
<gmr:Workbook xmlns:gmr="http://www.gnome.org/gnumeric/">
  <gmr:Sheets>
    <gmr:Sheet>
      <gmr:Name>Sheet 0</gmr:Name>
      <gmr:Zoom>1.000000</gmr:Zoom>
      <gmr:MaxCol>3</gmr:MaxCol>
      <gmr:MaxRow>10</gmr:MaxRow>
      <gmr:Cols>
      </gmr:Cols>
      <gmr:Rows>
      </gmr:Rows>
      <gmr:Cells>
        <gmr:Cell Col="0" Row="0">Titles      </gmr:Cell>
        <gmr:Cell Col="1" Row="0">Title2      </gmr:Cell>
        <gmr:Cell Col="2" Row="0">Title3      </gmr:Cell>
        <gmr:Cell Col="0" Row="1">1      </gmr:Cell>
        <gmr:Cell Col="0" Row="2">2      </gmr:Cell>
        <gmr:Cell Col="0" Row="3">3      </gmr:Cell>
        <gmr:Cell Col="1" Row="1">4      </gmr:Cell>
        <gmr:Cell Col="1" Row="1">5      </gmr:Cell>
        <gmr:Cell Col="1" Row="1">6      </gmr:Cell>
        <gmr:Cell Col="2" Row="1">=sum(A2:B2)      </gmr:Cell>
        <gmr:Cell Col="2" Row="2">=sum(A3:B3)      </gmr:Cell>
        <gmr:Cell Col="2" Row="3">=sum(A4:B4)      </gmr:Cell>
      </gmr:Cells>
    </gmr:Sheet>
  </gmr:Sheets>
</gmr:Workbook>

Which shouldn't be excessively difficult to generate out of GnuCash...

(Note: that spreadsheet will make Gnumeric crash; it needs some further info
to make the spreadsheet truly valid.)

Note that I'm "waving hands furiously" at how the report actually gets
displayed.  XML, XSL, Jade all might get involved...  There are some serious
efforts going into this in various pieces of GNOME...

My point here is that committing deeply to HTML as the rendering engine may
not be the smartest answer; being prepared to, at an appropriate juncture,
"leap" to XML would probably be wise...

--
Christopher B. Browne, [EMAIL PROTECTED], [EMAIL PROTECTED]
Web: http://www.ntlug.org/~cbbrowne  SAP Basis Consultant, UNIX Guy
Windows NT - How to make a 100 MIPS Linux workstation perform like an 8 MHz 286
----- %< -------------------------------------------- >% ------
The GnuCash / X-Accountant Mailing List
To unsubscribe, send mail to [EMAIL PROTECTED] and
put "unsubscribe gnucash-devel [EMAIL PROTECTED]" in the body

Reply via email to