browse: forums | FAQ
Connecting Tech Pros Worldwide

Hey there! Do you need Visual Basic 4 / 5 / 6 help?

Get answers from our community of Visual Basic 4 / 5 / 6 experts on BYTES! It's free.

Printing form

Member
 
Join Date: Nov 2008
Location: Chennai, India
Posts: 103
#1: Jan 23 '09
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's Avatar
Moderator
 
Join Date: Oct 2006
Location: Bangalore
Posts: 1,386
#2: Jan 23 '09

re: Printing form


Hi,

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

Regards
Veena
Member
 
Join Date: Nov 2008
Location: Chennai, India
Posts: 103
#3: Jan 23 '09

re: Printing form


Quote:

Originally Posted by QVeen72 View Post

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
QVeen72's Avatar
Moderator
 
Join Date: Oct 2006
Location: Bangalore
Posts: 1,386
#4: Jan 23 '09

re: Printing form


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 :

Expand|Select|Wrap|Line Numbers
  1. Printer.Print "MyFirst Line"
  2. Printer.Print "My Second Line"
  3. Printer.Print Text1.Text
  4. Printer.Print Text2.Text
  5. Printer.EndDoc
  6. Printer.NewPage
  7.  
REgards
Veena
Reply