29-10-19, 04:40 PM
PHP كود :
strSQL = "your select statement"
Dim crptDV As New ReportDocument()
Dim da As New SqlDataAdapter(strSQL, SqlCon)
Dim ds As New DataSet
da.Fill(ds)
If ds.Tables(0).Rows.Count = 0 Then
Exit Sub
End If
Dim path As String //Report Path
crptDV.Load(path & "\reports\ReportName.rpt")
End If
crptDV.PrintOptions.PrinterName = PrinterName1
crptDV.PrintToPrinter(1, True, 0, 0)
crptDV.PrintOptions.PrinterName = PrinterName2
crptDV.PrintToPrinter(1, True, 0, 0)
crptDV.Close()
crptDV.Dispose()
