Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing a record set on A4 paper

Status
Not open for further replies.

T3x

Technical User
Sep 23, 2003
11
LK
hi there, i like to know how to print a record set in the following manner
with out using crystal reports or printing to the form or using msword etc.

heading 1



empno name salary

1111 abc 10000
. . .
. . .
. . .

there must be 1" gap between fields. all so after 50 records there must be a page break.
please put comments if you are giveing a small sample code (what i'm hoping for) cos i'm a new guy to this VB6 programming.
i'm testing this using "A4" paper so the main heading must centered.the whole process (reading data from database and then printing it)
must be done by single clicking of a command button.(i'm ok with reading from database part, just want to know the printing part)
the printing must be done while the vb programm is running (spoolng the data and then printing after the exit from the program is not the idea)
thank you.
 
You need to use the reports/data environment built in VB.
Add to your project a data environment, a connection and a command. On top of them you can build your report (not Chrystal report, just a VB built in report).
You can find those in components window (in another tab...).

Hope I've been helpful,
Bogdan Muresan.
 
Go to the Project Menu and select Add DataReport, then Add DataEnvironment. Or to get you started just do File|New Project| Data project.

There are examples in VBHelp to get you started on this.

If you come up against any specific problems read faq222-2244 carefully and come back with the specific problem that you have got.

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'

for steam enthusiasts
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top