

_ Public Shared Function EndPagePrinter( ByVal hPrinter As IntPtr) As Boolean End Function _ Public Shared Function StartPagePrinter( ByVal hPrinter As IntPtr) As Boolean End Function _ Public Shared Function EndDocPrinter( ByVal hPrinter As IntPtr) As Boolean End Function _ Public Shared Function StartDocPrinter( ByVal hPrinter As IntPtr, ByVal level As Int32, ByVal di As DOCINFOA) As Boolean End Function _ Public Shared Function ClosePrinter( ByVal hPrinter As IntPtr) As Boolean End Function _ Public Shared Function OpenPrinter( ByVal szPrinter As String, ByRef hPrinter As IntPtr, ByVal pd As IntPtr) As Boolean End Function Drawing.Printing Imports Imports System.IO Public Class RawPrinterHelper ' Structure and API declarions: You can read my other articles to see how to print invoice using VB.Imports Imports System.Linq Imports System.Text Imports System. If you have any ideas or if you find any problems, please tell me. Please read the code in all the forms and Data Report, then run the code to see the result.

The following code is used to bind DataGrid with one Order (you can read this code in the frmOrder form): Rs.Open InvSql, cn, adOpenStatic, adLockOptimistic ProductID " Set cn = New ADODB.Connection & " ON Employees.EmployeeID = Orders.EmployeeID) " _ & " (Customers INNER JOIN Orders ON Customers.CustomerID = Orders.CustomerID) " _ & " FROM Products INNER JOIN ((Employees INNER JOIN " _ & " Orders.OrderID, Orders.OrderDate, " _

& " Employees.FirstName & Space(1) & Employees.LastName AS Salesperson, " _ InvSql = " SELECT Customers.CompanyName, Customers.City, " _ & MyDataFile & " " & " Jet OLEDB:Database Password=" & MyPass & " " MyDataFile = App.Path & " \DataFile\Northwind.mdb" Dim MyPass As String Dim MyDataFile As String Dim InvSql As String Dim strCon As String
