Results 1 to 3 of 3

Thread: printing msflexgrid data excluding empty rows

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2013
    Posts
    22

    printing msflexgrid data excluding empty rows

    I am in a progress of making point of sale program.now,my problem is when i print the data in msflexgrid as a receipt the empty rows will also give a space.what i wanted to happen is to print data in the msflexgrid without having space for the empty rows..can someone help me please..thank you..

  2. #2
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: printing msflexgrid data excluding empty rows

    Two methods I can think of:
    1. Delete the empty rows from the Grid just before printing
    2. Before Printing a Row, check if it's empty, if it is then don't print that row

    It would help to see the code you're using to perform the print.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jan 2013
    Posts
    22

    Re: printing msflexgrid data excluding empty rows

    Form8.LBNO.Caption = lblOR.Caption
    Form8.LNP.Caption = Label8.Caption
    Form8.Label10.Caption = Label9.Caption
    Form8.Label11.Caption = LBLTOTAL.Caption
    Form8.Label19.Caption = text10.Text
    Form8.Label10.Caption = txtcash.Text
    Form8.Label11.Caption = Form8.Label10.Caption - Form8.LNP.Caption
    Form8.Label11.Caption = Format(Form8.Label11.Caption, "0,000.00")
    Form8.Label11.Caption = Format(Form8.Label11.Caption, "000.00")
    Form8.Label11.Caption = Format(Form8.Label11.Caption, "00.00")
    Form8.Label11.Caption = Format(Form8.Label11.Caption, "0.00")
    For i = 1 To key
    Form8.LPIZZA(Form8.LPIZZA.UBound).Caption = flex.TextMatrix(i, 3)
    Form8.LUP(Form8.LUP.UBound).Caption = flex.TextMatrix(i, 4)
    Form8.LQTY(Form8.LQTY.UBound).Caption = flex.TextMatrix(i, 1)
    Form8.LTOT(Form8.LTOT.UBound).Caption = flex.TextMatrix(i, 5)

    If (Form8.LPIZZA.UBound = 0) Then


    GoTo SA

    End If
    ' PIZZA NAME
    Form8.LPIZZA(Form8.LPIZZA.UBound).Left = Form8.LPIZZA(Form8.LPIZZA.UBound - 1).Left
    Form8.LPIZZA(Form8.LPIZZA.UBound).Top = Form8.LPIZZA(Form8.LPIZZA.UBound - 1).Top + 200
    Form8.LPIZZA(Form8.LPIZZA.UBound).Visible = True
    'Form8.Frame1.Top = Form8.LPIZZA.UBound + Form8.Frame1.Top + 200
    'UNIT PRICE
    Form8.LUP(Form8.LUP.UBound).Left = Form8.LUP(Form8.LUP.UBound - 1).Left
    Form8.LUP(Form8.LUP.UBound).Top = Form8.LUP(Form8.LUP.UBound - 1).Top + 200
    Form8.LUP(Form8.LUP.UBound).Visible = True

    'QUANTITY
    Form8.LQTY(Form8.LQTY.UBound).Left = Form8.LQTY(Form8.LQTY.UBound - 1).Left
    Form8.LQTY(Form8.LQTY.UBound).Top = Form8.LQTY(Form8.LQTY.UBound - 1).Top + 200
    Form8.LQTY(Form8.LQTY.UBound).Visible = True
    'Form8.Frame1.Top = Form8.Frame1.Top + 10
    'TOTAL PRICE
    Form8.LTOT(Form8.LTOT.UBound).Left = Form8.LTOT(Form8.LTOT.UBound - 1).Left
    Form8.LTOT(Form8.LTOT.UBound).Top = Form8.LTOT(Form8.LTOT.UBound - 1).Top + 200
    Form8.LTOT(Form8.LTOT.UBound).Visible = True
    'Form8.Frame1.Top = Form8.LPIZZA.UBound + Form8.Frame1.Top + 10

    SA:

    Load Form8.LPIZZA(Form8.LPIZZA.UBound + 1) ' + Form8.LPIZZA.UBound '+ Form8.Frame1.Top '+ 10 '.Top -200
    Load Form8.LUP(Form8.LUP.UBound + 1) '.Top -200
    Load Form8.LQTY(Form8.LQTY.UBound + 1) '.Top -200
    Load Form8.LTOT(Form8.LTOT.UBound + 1) '.Top -200
    'Form8.Line3.Y2 = Form8.Line3.Y2 + 10
    'Form8.Line4.Y2 = Form8.Line4.Y2 + 500
    'Form8.Line5.Y2 = Form8.Line5.Y2 + 500
    ' Form8.Line6.Y2 = Form8.Line6.Y2 + 500
    'Form8.Line7.Y2 = Form8.Line7.Y2 + 500

    'Form8.LPIZZA(Form8.LPIZZA.UBound).Top = Form8.LPIZZA(Form8.LPIZZA.UBound).Top + 10
    Form8.Frame1.Top = Form8.LPIZZA.UBound + Form8.Frame1.Top + 195 ' Form8.LPIZZA.UBound
    Next i
    'Form8.Frame1.Top = Form8.Frame1.Top + 10
    '- 200 '+ Form8.Frame1.Top + 10
    '//////////////
    'Form2.Show

    '////////////
    MsgBox " RECORD SAVED", vbInformation, "Abeneca POS and Inventory System"
    'flex.clear
    Form8.Command2.Value = True


    flex.clear
    'lblOR.Caption = lblOR.Caption + 1
    Call Command12_Click
    ........................
    that was a piece of command before printing

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width