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..
Re: Making a Simple Report in VB6
you can use Printer.Print with Format function...consider the following example
vb Code:
Printer.Print "REPORT"
Printer.Print Form1.Label1.Caption & " : " & Form1.Text1.Text
Printer.Print Form1.Label2.Caption & " : " & Form1.Text2.Text
'....
Re: Making a Simple Report in VB6
that is ok..
but what about formating?? looking good and proper on the paper ??
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.
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...