Re: Report Printing under windows

new topic     » goto parent     » topic index » view thread      » older message » newer message

Unfortunately you have to do all the hard work yourself. Even under VB this
is true. The main reason is that the paper dimensions and the screen
dimensions are invariably different, as is the way that fonts and lines are
rendered. You have to do all the math to convert relative positions. Also,
what looks good on screen might not on paper. The screen font sizes and
paper font sizes are usually different to get the same readiblity. There are
even more subtle differences as well, like sans-serif fonts are better for
screens and serif fonts are better on paper. The thickness of lines on
screen is in integal pixel sizes but how wide is a pixel in inches? That
depends on the monitor. How many ink dots are there in a pixel? That depends
on the printer resolution. None of these things can be safely hard-coded
either. You must get run-time metrics from the system and do the conversions
yourself.

The easiest way of getting a listbox to show up on paper, is converting it
to a bitmap and dumping that out to paper. But even this is not a trival
exercise.

Of course, if GUI is not important, then just treat the report in standard
COBOL fashion, except that you have to draw a page then print it - you are
not working with line printers anymore.

-----
cheers,
Derek Parnell
derekp at solace.com.au
Solace Limited ( http://www.solace.com.au )
Melbourne, Australia
+61 3 9291 7557

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu