Sub DisplayReport()
Dim instanceReportSource As New Telerik.Reporting.InstanceReportSource()
Dim oPackingSlip As New PackingSlip
oPackingSlip.DataSource = SPs.DD_SOPPackingSlip("io-003212", 2).getTable
instanceReportSource.ReportDocument = oPackingSlip
ReportViewer1.ReportSource = instanceReportSource
ReportViewer1.RefreshReport()
End Sub
Sub PrintReport()
Dim instanceReportSource As New Telerik.Reporting.InstanceReportSource()
Dim oPackingSlip As New PackingSlip
oPackingSlip.DataSource = SPs.DD_SOPPackingSlip("io-003212", 2).getTable
' Obtain the settings of the default printer
Dim printerSettings As New System.Drawing.Printing.PrinterSettings
' The standard print controller comes with no UI
Dim standardPrintController As New System.Drawing.Printing.StandardPrintController
' Create an instance report source to pass the report to the report processor
instanceReportSource.ReportDocument = oPackingSlip
' Print the report using the custom print controller
Dim reportProcessor As New Telerik.Reporting.Processing.ReportProcessor
reportProcessor.PrintController = standardPrintController
reportProcessor.PrintReport(instanceReportSource, printerSettings)
End Sub