by
allistar >> Tue, 13 May 2003 10:04:23 GMT
Hi Murray,
We have our own report writer written in Jade. The output of a report is a collection of pages, and a page is a collection of labels (with top, left, width, caption etc. set accordingly). The code that converts this to HTML works something like this:
- each page is a new HTML table
- the labels are all lined up in transient memory structures, essentially breaking the page into a collection of lines, where a line is a collection of labels.
- each line is a row in the HTML table.
- if the positioning of the columns in the row differ from one line to the next then a new HTML table is created, otherwise a new HTML row is added to the existing table. (The code that does this has some cleverness built in to account for columns that are missing and columns that don't quite line up).
- what is returned is a String (the size of which depends on the number of pages in the report).
This String can then be saved as a file, emailed directly or displayed in a browser. We have used JHP (
www.silvermoon.co.nz/jhp.html) to interface this code to an Apache webserver which allows users to schedule reports via a web page and view the results on a web page, without needing any special Jade software. Any browser is all that's required.
I would image the way a Jade report writer report is output is the same as (if not similar to) our format (that is a colection of pages, which each page is a collection of labels).
It doesn't yet handle for images embedded in the report, but it does deal with fonts, colours, sizes, and styles quite well.
What we do it run a report, and once we have its output we HTMLise it instead of giving it to a printer. Given that I see no reason why you would need to modify your existing reports.
Regards,
Allistar.
------------------------------------------------------------------
Allistar Melville
Software Developer, Analyst
allistar@silvermoon.co.nz
Auckland, NEW ZEALAND
Silvermoon Software
Specialising in JADE development and consulting
Visit us at:
http://www.silvermoon.co.nz ------------------------------------------------------------------