5 pts.
 Printing Reports to Dotmatrix Printer from Visual Basic 5.0 OR 6.0
Respected Sir, In SQL I would like to solve the following complex script by using Visual Basic 5.0 or 6.0 Versions. First Table Name: tblClient Fields: ClientID, ClientName Second Table Name: tblPurchase Fields: ClientID, Item Name, Qty, Price Here How can I pass one SQL query for a Dos print out by opening a text file and how can I create a batch file for execute the batch file for print in dos mode. The Dos Out put I would like to get the following format For E.g. Client ID: 101 Client Name: Mr.Abc Item Purchased Qty Price ----- ----- --- If ClientID 101 bought 5 Items all will show here and the next client id may be 102 it should come in a new page. The command I have to give from a Visual basic through a command button. Expecting your solution for this complicated criteria, Sincerely Yours, Afzal

Software/Hardware used:
ASKED: September 6, 2008  7:32 PM
UPDATED: September 28, 2008  5:57 AM

Answer Wiki:
The SQL Query is pretty basic. However you will need to use the client code to format the data in the way that you want to see if. SQL code isn't used to format the data in this way. <pre> select tblClient.ClientId, tblClient.ClientName, tblPurchase.[Item Name], tblPurchase.Qty, tblPurchase.Price FROM tblClient JOIN tblPurchase ON tblClient.ClientId = tblPurcahse.ClientId</pre>
Last Wiki Answer Submitted:  September 28, 2008  5:57 am  by  Denny Cherry   64,520 pts.
All Answer Wiki Contributors:  Denny Cherry   64,520 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _