Printing form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • phpmagesh
    New Member
    • Nov 2008
    • 119

    Printing form

    Hi,

    I have a form with customer details which is fetched from Database,

    What i want to do is i want to print the details. when i click print button in form it should show dialog box with ok and cancel button.

    If i click OK then it should print the form.. i am new to this Vb can any one give idea how to do this please,

    Sample code will be more useful for me to do..

    Thanks in advance

    Regards
    magesh
  • QVeen72
    Recognized Expert Top Contributor
    • Oct 2006
    • 1445

    #2
    Hi,

    First, You have to design the Report in Crystal Report or DataReport.
    and then Show the Report from vb6..

    Regards
    Veena

    Comment

    • phpmagesh
      New Member
      • Nov 2008
      • 119

      #3
      Originally posted by QVeen72
      Hi,

      First, You have to design the Report in Crystal Report or DataReport.
      and then Show the Report from vb6..

      Regards
      Veena

      Hi,

      Without using crystal report or data report is it possible to print the form details.

      I want to print the form details alone.

      Regards
      magesh

      Comment

      • QVeen72
        Recognized Expert Top Contributor
        • Oct 2006
        • 1445

        #4
        Hi,

        Yes it is possible, but all the formatting, you have to do.. like Bold, Column Format, everything needs to be taken care by the program..
        Try This :

        [code=vb]
        Printer.Print "MyFirst Line"
        Printer.Print "My Second Line"
        Printer.Print Text1.Text
        Printer.Print Text2.Text
        Printer.EndDoc
        Printer.NewPage
        [/code]

        REgards
        Veena

        Comment

        Working...