473,382 Members | 1,593 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,382 software developers and data experts.

Print lines on an invoice

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

Jul 28 '07 #1
7 4733
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
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
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
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
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)
  10.   Printer.CurrentY = 1300   'THIS IS FOR THE LABEL "P.O.#"  & "INVOICE #"
  11.   Printer.Print Spc(7); ("P.O #"); Tab(6); (Label5)
  13.   Printer.CurrentY = 1300   'THIS IS FOR TH LABELS "PAID BY"  &  "PAYMENT"
  14.   Printer.Print Spc(75); ("PAID BY"); Tab(76); (PAYMENT)
  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")
  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)
  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.

Jul 30 '07 #6
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
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

Jul 30 '07 #8

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

Similar topics

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...
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
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...
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...
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...
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(); }
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...
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...
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...
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.