to print msflexGrid

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rekhasc
    New Member
    • Oct 2007
    • 66

    #1

    to print msflexGrid

    hi..........

    i just want to print the msflexgrid ............... .. instead of printing a form...... can any one help me plz............ i am using vb6.0 and the back end is ms access
  • Mayur2007
    New Member
    • Aug 2007
    • 67

    #2
    Hi rekhasc,

    please try to study the ATTACHMENT
    that i have posted on This forum.
    may it works fine to solved your problem.

    Comment

    • rekhasc
      New Member
      • Oct 2007
      • 66

      #3
      Originally posted by Mayur2007
      Hi rekhasc,

      please try to study the ATTACHMENT
      that i have posted on This forum.
      may it works fine to solved your problem.

      hi...........
      can you give the particular code to print only the flexgrid....... ....

      Comment

      • QVeen72
        Recognized Expert Top Contributor
        • Oct 2006
        • 1445

        #4
        Hi,

        you can start with some thing like this :

        [code=vb]
        Dim i As Integer
        Dim j As Integer
        Dim str1 As String
        For i = 0 To Grd.Rows-1
        str1 = Grd.TextMatrix( i,0)
        For j = 1 To Grd.Cols-1
        str1 = str1 & Space(4) & Grd.TextMatrix( i, j)
        Next j
        Printer.Print str1
        Next i
        Printer.EndDoc
        [/code]

        of course, you have to refine the code, so that it takes care of Next Page, Bold /Center heading..

        Regards
        Veena

        Comment

        • rekhasc
          New Member
          • Oct 2007
          • 66

          #5
          Originally posted by QVeen72
          Hi,

          you can start with some thing like this :

          [code=vb]
          Dim i As Integer
          Dim j As Integer
          Dim str1 As String
          For i = 0 To Grd.Rows-1
          str1 = Grd.TextMatrix( i,0)
          For j = 1 To Grd.Cols-1
          str1 = str1 & Space(4) & Grd.TextMatrix( i, j)
          Next j
          Printer.Print str1
          Next i
          Printer.EndDoc
          [/code]

          of course, you have to refine the code, so that it takes care of Next Page, Bold /Center heading..

          Regards
          Veena



          thanx for u r reply veena..........
          but its giving runtime error 380
          invalid property value........
          in my proj i am also printing the mschart......


          Private Sub Form_Resize()
          MSChart1.Width = Me.ScaleWidth - 200 //its giving error in this line

          grdMonData.ColW idth(0) = 960
          grdMonData.ColW idth(1) = Me.ScaleWidth - 960 - 2025
          grdMonData.ColW idth(2) = 2025
          End Sub


          End sub

          Comment

          Working...