Select a printer, print Report, and close

edited 12:00PM in FastReport .NET
I have created a Report with a ListBox that lists all available Printers on my computer.

I would like to be able to click on a Printer, and have the Report printed to that Printer, and then close. Here's what I have so far:

Private Sub lstPrinters_Click(ByVal sender As object, ByVal e As EventArgs) 'Handles lstPrinters.SelectedIndexChanged
Report.PrintSettings.Printer = lstPrinters.SelectedItem.ToString 'WORKS - sets the Printer to the one I selected.

' NOW WHAT?

' Report.PrintPrepared()
' report.Prepare()
' Report.Print()
' Report.Dispose()
' Report.PrintPrepared

End Sub

What code do I have to add to accomplish this?

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.