Printing the report

After you build the DataWindow object and fill in print specifications, you can place it in a DataWindowControl on a form, as described in “Using drag-and-drop”.

To allow users to print the report, your application needs code that performs the printing logic. For example, you can place a button on the form, then write code that is run when the user clicks the button.

To print the contents of a single DataWindow control or DataStore, call the Print method. For example, this Visual Basic statement prints the report in the DataWindowControl dwSales:

dwSales.Print()

For information about the Print method, see the online Help. For information about using composite reports to print multiple DataWindows, see “Using composite reports”. For information about printing Web DataWindows, see “Printing Web DataWindows”.