An Alternative to Externally Described Printer Files, Take 2
April 2, 2008 Ted Holt
Note: The code accompanying this article is available for download here. Tomorrow, Lord willing, I will present a session entitled “An Alternative to Externally Described Printer Files” at the COMMON conference in Nashville. I’ll be sharing the report-building technique my reclusive colleague Cletus the Codeslinger introduced almost four years ago in this august publication. Since that time, various people have offered feedback, which Cletus and I have used to update the template that he provided. In this article, I present the updated template and two example programs: one using native I/O, one using SQL. First, if you haven’t read Cletus’ article, I encourage you to do so. While you’re at it, take a look at the example code. Now that we’re all up to speed, let me point out the enhancements that Cletus and I have made in response to your feedback.
You’ll notice that the code is all in fixed format. Both Cletus and I much prefer to work with free-format calculations, but we decided to publish fixed format in order to cater to as broad an audience as possible. To put it another way, we didn’t want people to think that this report technique applies only to free-format code. I used LPEX to convert the template to free-format. All feedback I have received to this report generation technique has been positive, although one frequent correspondent mentions that the other developers in his shop think this code’s a little funny. If you haven’t generated columnar reports using Cletus’ method, I hope you’ll give it a try and let me know what you think of it. RELATED STORY An Alternative to Externally Described Printer Files
|