Printing Reports to Dotmatrix Printer from Visual Basic 5.0 OR 6.0

5 pts.
Tags:
Printers
SQL
VB
VB5
Visual Basic
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
ASKED: September 6, 2008  7:32 PM
UPDATED: September 28, 2008  5:57 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

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>

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following