Summary


The PrintDocument object sits at the heart of the standard Visual Basic printing process. A program makes a PrintDocument object and then responds to its BeginPrint, QueryPageSettings, PrintPage, and EndPrint events to generate a printout.

The PrintDocument object’s Print method immediately generates a printout. You can also attach the PrintDocument to a PrintDialog, PrintPreviewDialog, or PrintPreviewControl and use those objects to display previews and generate printouts.

This chapter describes printing in general. Using the Graphics object provided by the PrintDocument object’s PrintPage event, you can print lines, curves, text, images, and anything else you can draw to the screen.

One particular kind of printing is very common in business applications: reporting. Although you can use the general printing techniques described in this chapter to draw your own reports, Visual Studio 2005 Professional Edition comes with a tool that simplifies many reporting tasks: Crystal Reports.

Crystal Reports can help you build, format, display, and print reports. It can automatically load data from a database and display it in tabular form complete with headers, sections, totals, subtotals, and graphs. Chapter 25 introduces Crystal Reports.




Visual Basic 2005 with  .NET 3.0 Programmer's Reference
Visual Basic 2005 with .NET 3.0 Programmer's Reference
ISBN: 470137053
EAN: N/A
Year: 2007
Pages: 417

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net