473,406 Members | 2,705 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Print lines on an invoice

lee123
556 512MB
hey ( killer42 ) hi there, im programing in vb 6 and i want to make lines on a invoice i created in vb6 but don't know how i would go about doing that.. i have everything layed out to print (codes) but no lines to separate the orders from one another, it doesn't look good the way it is i would like the lines in there as well

lee123
Jul 28 '07 #1
7 4737
Killer42
8,435 Expert 8TB
hey ( killer42 ) hi there, im programing in vb 6 and i want to make lines on a invoice i created in vb6 but don't know how i would go about doing that.. i have everything layed out to print (codes) but no lines to separate the orders from one another, it doesn't look good the way it is i would like the lines in there as well
How are you printing the invoice? If you're using the Printer object, you should be able to draw the lines using the .Line method.
Jul 29 '07 #2
lee123
556 512MB
hello killer42 im sorry about the anouncement to you but your very smart i like dealing with you, im not saying the others aren't you dealt with me several times in the past. anyway i have a button on the form with alot of code behind it to print because lets face it this is a whole different world then access i guess i don't understand the question is the printer object something you type in the code like (printer.print) or is it in the tools
Jul 29 '07 #3
lee123
556 512MB
well i know there is the "y" and the "x" thing how do you write the code for it.
Jul 29 '07 #4
Killer42
8,435 Expert 8TB
well i know there is the "y" and the "x" thing how do you write the code for it.
I think it might be simpler if you could show me how you're doing the printing now.

The Printer object just provides a relatively simple way to deal with the printer(s) available to your system. I do recommend using it if possible, but don't know whether it will make any major difference until I see what you're already doing. For that matter, I'm no expert in printing anyway - I rarely use it in VB, mostly just working with the screen and files.

Oh, by the way - if you're referring to the change in the title of the thread, it's no problem. I'm required to do that anyway. The site guidelines state that the title is supposed to be a simple statement reflecting what the question is about, and as Moderators we're supposed to enforce that, by changing the title if necessary. Otherwise the forum fills up with threads about subjects like "Plz help!!!!" and "VB". These are not a lot of use for searching purposes.
Jul 30 '07 #5
lee123
556 512MB
well thats no problem i can do that.

the button for print:

Expand|Select|Wrap|Line Numbers
  1. Printer.CurrentY = 1300   'THIS IS FOR THE NAME OF COMPANY
  2.   Printer.Print Spc(35); (Label1)
  3.   Printer.CurrentY = 1700   'THIS IS FOR THE ADDRESS
  4.   Printer.Print Spc(35); (Label2)
  5.   Printer.CurrentY = 2100   'THIS IS FOR THE CITY,STATE,ZIP
  6.   Printer.Print Spc(35); (ADDRESS)
  7.   Printer.CurrentY = 2500   'THIS IS FOR THE PHONE #
  8.   Printer.Print Spc(35); (Label3)
  9.  
  10.   Printer.CurrentY = 1300   'THIS IS FOR THE LABEL "P.O.#"  & "INVOICE #"
  11.   Printer.Print Spc(7); ("P.O #"); Tab(6); (Label5)
  12.  
  13.   Printer.CurrentY = 1300   'THIS IS FOR TH LABELS "PAID BY"  &  "PAYMENT"
  14.   Printer.Print Spc(75); ("PAID BY"); Tab(76); (PAYMENT)
  15.  
  16.   Printer.CurrentY = 3500   'THIS IS THE HEADINGS FOR THE ORDER
  17.   Printer.Print Spc(11); ("QTY"); Spc(7); ("PRODUCT"); Spc(15); ("UNITPRICE"); Spc(6); ("TOTAL")
  18.  
  19.  
  20.  
  21.   Printer.CurrentY = 4000    'THIS IS LINE (1)
  22.   Printer.Print Spc(12); (Text1); Tab(24); (Text2)
  23.   Printer.CurrentY = 4000
  24.   Printer.Print Spc(53); (Text3); Tab(69); (TOTAL1)
  25.  
  26.  
  27.   Printer.CurrentY = 4500    'THIS IS LINE (2)
  28.   Printer.Print Spc(12); (Text4); Tab(24); (Text5)
  29.   Printer.CurrentY = 4500
  30.   Printer.Print Spc(53); (Text6); Tab(69); (TOTAL2)
this is only part of what i got the lines i want is suppose to be under the headings "qty" , "product", "unitprice" ,'total" i don't know if i did this right but it works. thanks i know why you changed the title that was to get your attention(sorry) i understand but see what you can do with this code.

lee123
Jul 30 '07 #6
Killer42
8,435 Expert 8TB
Ah, so you're already using the Printer object. Excellent! Sometimes people open the LPT port and send printer-specific codes, and stuff like that - I think it makes things much harder.

In this case, to draw a line you could just do something like...
Expand|Select|Wrap|Line Numbers
  1. Printer.Line (0, 4000) - (3000, 4000)
Of course, you may need to set some properties first, such as DrawMode, ForeColor, that sort of thing. It works much the same as drawing on a form or picturebox.

Depending on the exact outcome you're looking for, it may help to know that you could just run on the FontUnderline property before printing a label, to get a line under it.
Jul 30 '07 #7
lee123
556 512MB
thanks i'll give that a try, you know instead of using text boxes for all the orders i have just discovered the datagrid but dont know how that works it probably would of made a shorter code mayby you can tell me how to use this for future projects because i tried but can figure out this. is it for already built databases like for (access)? anyway i'll try the print.line and see how it works

lee123
Jul 30 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Alan | last post by:
While not rs.eof <td><%=rs("InvoiceNo")%></td> <td><%=rs("Name")%></td> <td><a href="InvoicePrint.asp?WInv=<%=rs("InvoiceNo")%>"></a></td> <td>Print this invoice</td> rs.MoveNext Wend Now...
10
by: PC Datasheet | last post by:
How do you create blank lines with lines to fill such reports as invoices and purchase orders? Thanks! Marie
3
by: Guoqi Zheng | last post by:
Dear sir, Our E-commerce site needs to print out a few 100s invoice a day. I do not know what is the best way to print invoice. Those invoice has to be printed on a very precise position on our...
2
by: project | last post by:
I want to print an sales invoice with out open crystal report. I want to know ,with out opening Crystal report, how can I give the command to be printing invoice. I'm using the following lines...
2
by: ahafeez | last post by:
Hello I am finding a problem in code to generate an output direct from Access Form. I am explaining my problem with the help of example I designed an invoice form on the MS Access and designed...
2
by: EnjoyNews | last post by:
Hi NG I have a site where an invoice is shown on the screen in a IFrame. I have this script on the site: <script type="text/javascript"> function zPrint(oTgt) { oTgt.focus(); oTgt.print(); }
12
by: Studiotyphoon | last post by:
Hi, I have report which I need to print 3 times, but would like to have the following headings Customer Copy - Print 1 Accounts Copy - Print 2 File Copy -Print 3 I created a macro to...
1
by: mhafeez | last post by:
I have an invoice system developed in MS Access and invoice developed in Crystal Report 8.5. Now i want to print crystal report developed invoice from MS Access application Invoice Screen Directly by...
3
by: Ly Cao | last post by:
Please shine the light, how do you place the total on the last page of the invoice? how do you find out the it is a last page of the detail lines then place the total of the invoice into that last...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.