magazine resources subscribe about advertising

New Architect Daily
Commentary and updates on current events and technologies

CMP Media E-Book

Download your copy today.

Research
Search for reports and white papers from industry vendors and analysts.

This Week at NewArchitect.com Subscribe now to our free email newsletter and get notified when the site is updated with new articles







Day of Defeat Online Gaming

 New Architect > Archives > 1996 > 09 > Features  

Database Report Generation For The Web

Formatting Reports Using PDF

By Joe Hughes

As corporate developers begin migrating existing database applications to the Web, they'll likely run into a roadblock when it comes to report generation. One problem is that HTML was not designed with printers in mind, so it doesn't currently support features like page headers and footers.

A browser can scroll forever. So, if you attempt to put a footer into an HTML document containing the equivalent of two 8.5"x11" printed pages, the footer will only appear on the second printed page. Also, the first page will contain a header, but the second will not. You can attempt to put in a header and footer where you think each page should start and end, but this is a fool's errand. Since browsers are cross-platform and you have no real font control, the report will look nice in one browser, but not in another. You could attempt to create a GIF file for each report page, but then the output is guaranteed to be jagged, since GIF is not a vector format.

Even if you can ignore the header/footer issue, HTML tables are notoriously difficult to print. Most browsers, including Netscape, have a hard time breaking up wide tables. For example, let's say that 15 out of 30 columns of data fit on a printed page. Not all browser print engines are smart enough to put the right-most columns on the next page. Some browsers simply lop off the table. Even smart browsers may split the page down the middle of the right-most column, making the next page look awful. Changing the page orientation in the browser's print setup only delays the inevitable page overrun, and then you have set your orientation for all pages.




  Day of Defeat Online Gaming

home | daily | current issue | archives | features | critical decisions | case studies | expert opinion | reviews | access | industry events | newsletter | research | careers | info centers | advertising | subscribe | subscriber service | editorial calendar | press | contacts


Copyright © 2006 CMP Media, LLC Read our privacy policy, your California privacy rights, terms of service.
SDMG Web sites: BYTE.com, C/C++ Users Journal, Developer Pipeline, Dr. Dobb's Journal, DotNetJunkies, MSDN Magazine, Sys Admin,
SD Expo, SD Magazine, SqlJunkies, The Perl Journal, Unixreview, Windows Developer Network, New Architect

web2