Hye all
I am developing a Shop Software i want to know what kind of Grid i have to use at Sale Form which will sum up and print bill?

Recommended Answers

All 9 Replies

Listview i think..

hye jan plz explain how can i use Listview? In my project.?

hye jan plz explain how can i use Listview? In my project.?

Project -> Component (Ctrl + T)
looking for "Microsoft Windows Common Controls 6.0 (SP6)" and check it.
you can find listview on your toolbox.

thx I got List view now my prolem is that I have to calculate total amount of Item cost in saprete text box.
My code is below.

'here is headers of List .First I want to Multiply Price with Quantity which is a 'text Box of Item (which will be display under Quantity Header) and 'this(Quantity*Price) result will be displayed under the header "Cost of Item"  ' and 'then Grand total of the "Cost of Item" coloum in Total Payable amount Amount    

List.ListItems.Add(1).Text = txtSBCode.Text
List.ListItems.Item(1).ListSubItems.Add.Text = txtINameS.Text
List.ListItems.Item(1).ListSubItems.Add.Text = txtQunt.Text
List.ListItems.Item(1).ListSubItems.Add.Text = txtPrice.Text

dim i As Integer, adu As Single, ravi As ListItem
For i = 1 To 4
Set ravi = List.ListItems.Add

txtTAm.Text = i
adu = adu + CInt(i)

Next

waiting for reply.
zeb noon

hye all,
I almost solved issue .But now a little problem is that i cannt get Grang Total in the txtAmt.text.My code is below.

Private Sub cmdAdd_Click()

List.ListItems.Add(1).Text = txtSBCode.Text
List.ListItems.Item(1).ListSubItems.Add.Text = txtINameS.Text
List.ListItems.Item(1).ListSubItems.Add.Text = txtQunt.Text
List.ListItems.Item(1).ListSubItems.Add.Text = txtPrice.Text

        
        
Dim sum As Double
Dim x

For x = 1 To List.ListItems.Count
sum = 0
        
List.ListItems.Item(1).ListSubItems.Add.Text = (CDbl(List.ListItems.Item(x).SubItems(3))) * (CDbl(txtQunt.Text))

'sum = sum + (CDbl(List.ListItems.Item(x).ListSubItems.Add.Text))???????
   Next x
End Sub

hye all
i want to print all the items of Listview . the code is below

Dim Li As ListItem
Dim curTotal As Currency
Dim CurTax  As Currency
Dim curTaxRate As Currency

List.ListItems.Add(1).Text = txtSBCode.Text
List.ListItems.Item(1).ListSubItems.Add.Text = txtINameS.Text
List.ListItems.Item(1).ListSubItems.Add.Text = txtQunt.Text
List.ListItems.Item(1).ListSubItems.Add.Text = txtPrice.Text

        
        
'Dim sum As Double
Dim x

For x = 1 To List.ListItems.Count
'sum = 0
        
List.ListItems.Item(1).ListSubItems.Add.Text = (CDbl(List.ListItems.Item(x).SubItems(3))) * (CDbl(txtQunt.Text))
'sum = sum + (CDbl(List.ListItems.Item(x).ListSubItems.Add.Text))
   Next x
For Each Li In List.ListItems
 If List.ListItems.Count = 0 Then
  curTotal = 0
  CurTax = 0
  Else
curTotal = curTotal + CCur(Li.SubItems(4))
'CurTax = CurTax + IIf(Li.ListSubItems(5) = "N", 0, CCur(Li.SubItems(4) * curTaxRate))
 End If
 txtTAm.Text = curTotal
 Next
 
 'cleare txtbox
 txtSBCode.Text = ""
 txtINameS.Text = ""
 txtPrice.Text = ""

plz hel me.

so what the result of your codes above?
any errors?
in which sub item of listview that you want to sum the items?

code is runing well.but plz tell me how can i print ListView Items on Bill receipt. Have to i use any Other tool like data report or what? plz help me.

Please make new thread for different question.
It will help another members if they have same problem like you.
Also other members can help to answer you question if you have specific thread.
If this thread already done than please mark as solved.

Thank you.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.