Results 1 to 5 of 5

Thread: Making a Simple Report in VB6

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Dec 2006
    Posts
    139

    Making a Simple Report in VB6

    One of my friend wants to print a report..

    Now the form contains some labels and a text box.. NONE of the data is taken from any DB.. the txt comes from another form

    so how to print that as a report / text file or straight to printer?? i don't think a complex CR is required for it..

    Some simple command can help ?? the formating has to come right

    help here..

  2. #2
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    Re: Making a Simple Report in VB6

    you can use Printer.Print with Format function...consider the following example
    vb Code:
    1. Printer.Print "REPORT"
    2. Printer.Print Form1.Label1.Caption & " : " & Form1.Text1.Text
    3. Printer.Print Form1.Label2.Caption & " : " & Form1.Text2.Text
    4. '....
    If an answer to your question has been helpful, then please, Rate it!

    Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.


  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Dec 2006
    Posts
    139

    Re: Making a Simple Report in VB6

    that is ok..

    but what about formating?? looking good and proper on the paper ??

  4. #4
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Making a Simple Report in VB6

    You can set the font to use, the position to print the text, draw lines/circles/pictures, ...

    See our Classic VB FAQ's for a printing tutorial - it explains how to do these and more.

  5. #5
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    Re: Making a Simple Report in VB6

    you can use the font "Courier New" with font size "10" and padd white spaces to make it align properly...
    If an answer to your question has been helpful, then please, Rate it!

    Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.


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