From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8cc649f593606ebf X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-03 09:35:59 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.stueberl.de!eusc.inter.net!cs.tu-berlin.de!uni-duisburg.de!not-for-mail From: Georg Bauhaus Newsgroups: comp.lang.ada Subject: Re: Prettty printed reports in MSWindows Date: Sat, 3 May 2003 16:35:58 +0000 (UTC) Organization: GMUGHDU Sender: Georg Bauhaus Message-ID: References: <3EB1A07A.6050108@dontspam.net> NNTP-Posting-Host: d2-hrz.uni-duisburg.de X-Trace: a1-hrz.uni-duisburg.de 1051979758 16804 134.91.1.15 (3 May 2003 16:35:58 GMT) X-Complaints-To: usenet@news.uni-duisburg.de NNTP-Posting-Date: Sat, 3 May 2003 16:35:58 +0000 (UTC) User-Agent: tin/1.5.8-20010221 ("Blue Water") (UNIX) (HP-UX/B.11.00 (9000/831)) Xref: archiver1.google.com comp.lang.ada:36914 Date: 2003-05-03T16:35:58+00:00 List-Id: Mark wrote: : I am currently trying to figure out a good way to print some : formatted business reports. We do that every day (though unfortunately only rarely with the help of Ada programs). Things to look at should, I think, include employing XSL style sheets and XSL transformations, together with a formatting backend. (Or DSSSL, precursor to XSL(T).) You produce a marked up data stream using some XML tags as markup, and employ a style sheet producing high quality portable, printable material. (Several transformers and backends are available, some of them Free Software, some of them proprietory sofware.) You can do number formatting using Ada's COBOL facilities, or, to an acceeptable extent, XSLT number formats, or both Editing and XSL. Setting up a pipe to a DSSSL program might be an option too. A well known program suite, Jade, can produce various output formats, including RTF, TeX, HTML, and MIF. In producing XML streams, AWS's template mechanism can help, but you could as well extends your types with a suitable To_XML function, and possibly combine the two. If your reports will have mainly data set like items, that is, a sequence of flat containers so to speak, producing XML data from them should be straightforward. Otherwise, since XML documents are trees, you might have to build adapters or some such. If you are familiar with TeX, which according to Knuth (2000) was conceived as a backend, you can again use AWS's templates to produce TeX input; however, page breaking and the presence of inserts (footnotes, running heads) and absolute positioning might cause some headaches. For two years or so I have received invoices from a provider that were automatically produced in that fashion. The results are comparatively impressive (for invoices), due to the excellent paragraph breaking that TeX does, hard to beat in particular using good fonts. HTH, Georg ---------------------------------------------------------------- Georg Bauhaus bauhaus@futureapps.de Future Apps GmbH http://www.futureapps.de phone: +49 203 306 1560