How can i print the contents of a datagrid?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • michael8027
    New Member
    • Nov 2007
    • 4

    How can i print the contents of a datagrid?

    Please Direct Me To How Can I Print A The Contents Of Datagrid Which I Have Selected From A Combobox I Wanna To Print Only Contents Not Form Plesase Send Ways How To With Code Itself
  • lotus18
    Contributor
    • Nov 2007
    • 865

    #2
    Originally posted by michael8027
    Please Direct Me To How Can I Print A The Contents Of Datagrid Which I Have Selected From A Combobox I Wanna To Print Only Contents Not Form Plesase Send Ways How To With Code Itself
    Hi michael8027

    Show us much more details of what have you done so far : )

    Rey Sean

    Comment

    • hariharanmca
      Top Contributor
      • Dec 2006
      • 1977

      #3
      Originally posted by michael8027
      Please Direct Me To How Can I Print A The Contents Of Datagrid Which I Have Selected From A Combobox I Wanna To Print Only Contents Not Form Plesase Send Ways How To With Code Itself
      • open a text file for output
      • For loop
      • use Print statement to print items
      • next
      • Close text file.

      Comment

      • lotus18
        Contributor
        • Nov 2007
        • 865

        #4
        Hi michael8027

        Print? A hardcopy or printing it on a textfile as posted by hariharanmca?


        Rey Sean

        Comment

        • michael8027
          New Member
          • Nov 2007
          • 4

          #5
          acutally i working in a triaing management sysytem in my project i want get aprint out from datagrid code from visual basic 6.0 can u help me out

          Comment

          • lotus18
            Contributor
            • Nov 2007
            • 865

            #6
            Originally posted by michael8027
            acutally i working in a triaing management sysytem in my project i want get aprint out from datagrid code from visual basic 6.0 can u help me out
            So you mean a hardcopy?
            Here's the query

            [code=vb]
            "Select * From <TableName> Where <FieldName>=' " & Combo1.Text & "'"
            [/code]

            Are you using a DataReport (vb) or CR?

            Rey Sean

            Comment

            • jaz215
              New Member
              • Nov 2007
              • 55

              #7
              Originally posted by lotus18
              So you mean a hardcopy?
              Here's the query

              [code=vb]
              "Select * From <TableName> Where <FieldName>=' " & Combo1.Text & "'"
              [/code]

              Are you using a DataReport (vb) or CR?

              Rey Sean
              yup if you want to print a hardcopy, use the data reports in vb6 we can show you how, if that's what you really want

              Comment

              • michael8027
                New Member
                • Nov 2007
                • 4

                #8
                [i have made a table// i can retrieve data from the table /and view it in datagrid which will fulfill my crtiteria now i want the contents of the data presaent in the datagrid for printing is this possible or else another way to print the data

                Comment

                • freedom
                  New Member
                  • Apr 2007
                  • 16

                  #9
                  Hi,

                  What type of contents/data are printing here? Say if your would like to print data which will be based on certain date, ID number, Names etc...you can use a combo box here to get there info..then use a select statement to get the value depending on your input.

                  Cheers!

                  Comment

                  • michael8027
                    New Member
                    • Nov 2007
                    • 4

                    #10
                    i got all out put in selected datagrid but i want how to write code in VB get print in datgrid

                    Comment

                    • lotus18
                      Contributor
                      • Nov 2007
                      • 865

                      #11
                      Originally posted by michael8027
                      i got all out put in selected datagrid but i want how to write code in VB get print in datgrid
                      Can you show us your codes so that we can make a solution.

                      Rey Sean

                      Comment

                      • chiragchavda424
                        New Member
                        • Dec 2011
                        • 1

                        #12
                        i also Want to print whole data grid value what is code for that please help me out on this.........

                        thanks for your help

                        Comment

                        Working...