January 2003
Beginner
696 pages
16h 38m
English
You can bypass the viewer control and print a report directly from a menu item or the click event of a button. Using the PrintToPrinter method of the ReportDocument class, you can print a loaded report directly to a printer. Listing 18.2 demonstrates how you could accomplish this in the click event of a button. Notice the code comments for the parameters for the PrintToPrinter method that sets the properties on the printed document.
Private Sub button1_Click(sender As Object, e As System.EventArgs) oRpt = New ReportDocument() oRpt.Load("C:\Report1.rpt") ... |
Read now
Unlock full access