| Author |
Printing Reports
|
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 12513
|
|
(topic change carried over from http://www.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=25&t=001730 ) Well, going all the way back to my COBOL days, the way I've usually printed reports was to output the detail lines via a report-print subroutine. In the old days, it looked something like this: The only real difference in the modern-day approach is that "line-number" has become a Y-coordinate, incremented by LINE_HEIGHT and the LINESPERPAGE item is now the y value that signals the break between page details and the footer. And, of, course, printLine gets replaced with graphics.drawString( reportLine, LEFT_MARGIN, y ); If you prefer Report Writers, they're a different animal, since very few general-purpose programming languages include one. IBM COBOL used to have one, but it was yanked decades ago. Microsoft is diddling around with one for VB to replace Crystal Reports, but it was pretty feeble. FoxPro's may be the best of the lot. One thing you COULD do in that regard, BTW is upgrade the FoxPro reports to Visual FoxPro, buy a copy of Adobe Acrobat and route the FoxPro output to the Acrobat printer. Although performance-wise, it would probably go faster to keep the old FoxPro 2.6 reports and run them through the code I outlined about using gnujpdf. I'm afraid that true line-oriented printing is almost extinct. Even on mainframes, the printers themselves are graphical devices. Legacy apps may THINK they're printing lines-by-line, but they're going through the same basic process as I listed up top when the printing subsystem actually gets ready to do the actual output. [ January 30, 2002: Message edited by: Tim Holloway ] [ January 30, 2002: Message edited by: Tim Holloway ]
|
One of the most odious afflictions that Business has inflicted on the modern English language is "pro-active". Most of the time it's simply redundantly used in place of the simple old word "active". And a good deal of the rest of the time it means "You're not overworked enough yet, so go out and find more!"
|
 |
 |
|
|
subject: Printing Reports
|
|
|