Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET
Hello !
 
i have a datagridview like this:
 
ID |Items Name | Qyt.|Price| Sum|
--------------------------------------
1 |Coca cola | 2 | 3.5 | 7.00|
2 |chesseburger | 2 | 6.0 |12.00|
.
.
.
.
 
I want to brint this in a receipt?
 
i have a code but what is doing is this:
 

1 |Coca cola | 2 | 3.5 | 7.00|
2 |chesseburger | 2 | 6.0 |12.00|
 Dim line As String
        Dim c As Integer = 70
        For Each row As DataGridViewRow In DataGridView.Rows
            line = String.Empty
            For Each cell As DataGridViewCell In row.Cells
                line += cell.Value.ToString() & vbTab
            Next
            c = c + 20
            g.DrawString(line, myfont, Brushes.Black, 10, c)
        Next
i want to make a receipt like this:
 
that the item string mus have maximum 15 characters, price 4 caracters,qty. 4 caracters sum 4 caracters !
 
but i dont know how!
plz Help me!
 

 
sorry for my english!
Posted 29-May-11 14:09pm
Atmir852
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Here you go...(I recommend this)
 
How to Print Receipt by POS Printer using VB.Net.[^]
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Dear Have you got answer for that? I am using datagridview1. Please reply me how do I print receipt by using datagridview1. I am not understanding the link. it says there
If CType(dgTransactionList.Item(k, 0), System.String) = "True"
 
No Idea of "dgTransactionList" what it mean.
 
Please reply me with the datagridview1 to receipt print.
 
my email id <REMOVED>@gmail.com
 
waiting for your quick reply
  Permalink  
v2
Comments
VitorHugoGarcia at 5-Feb-13 5:05am
   
you shouldn't post your email here, unless you love spam.
This is a public website and the solutions should be available to the community, not exchanged via email as you proposed.
 
You also posted a question as a solution, which isn't the right thing to do.
 
Take care,VG

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web04 | 2.8.140814.1 | Last Updated 7 Apr 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100