Fancy Report Output in 4GL
Posted in 1994
Daniel Wynalda (danielw@wyn386.mi.org) posted: > I am looking to find a better way to create 4GL reports (Vertical lines, > boxes, shading, etc) direct from 4gl. Is there an addon program/filter > one can use to (ideally) design a form and place it in a file. <clipped> We have done line graphics on reports in two different ways. Neither one is very elegant but they do work. The first way is to actually include all the line graphics characters in every line of the report. Life is easier if you initialize a set of variables with the ascii characters for each psoition (upper left corner, lower right corner,...) and then use these in your output. For example: print v_bar, text line, v_bar The headers and footers are the best place to put the top and bottom line of the box. Keep in mind that this may require escape sequences to select a particular character set, and line counting is a requirement to avoid broken lines. A little bit of extra work can initialize the line draw variables with characters of your choice to support multiple printers (laser printer, line printer). The second way is to use a pcl macro to produce all the graphics on the page. The best place to send the macro from is from the first page header. This requires as intimate understanding of pcl graphics (somebody else here did this...), produces a cleaner report module, but leaves a single string at the top of the program which can be a pain to modify. This solution also does not lend itself well to support of multiple printers. If anybody has a better way of doing this, PLEASE POST. I would also like to hear how people are using postscript printers from Informix. PS If anybody is interested, I have code which contains the ascii characters for line drawing on HP lasers. Simple to find, but a pain to type. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Miguel A. Caldera ! Antares Development Corp. ! Phone (210) 490-9626 mac@antares-dev.com ! 1000 Central Pkwy North ! Fax (210) 490-0874 73564,2200 Compuserve ! San Antonio, TX 78232 USA ! #include <std_disclaim.h> ----------------------------------------------------------------------------- =-> I haven't lost my mind, I know exactly where I left it!!! <-=