|
-
Sep 17th, 2002, 07:52 AM
#1
Thread Starter
Member
Using the Print object
hi,
Is there a way I can use the Print object in VB to generate a report , but with a preview option. i.e I display the report to the user in some format(other than the printer) and then he has the option to print it, without regenerating the report.
I hope I made my question clear enough.
Thanks
Smoking Kills Slowly!!!!!!!!...........So who's in HURRY????????
-
Sep 17th, 2002, 08:26 AM
#2
Fanatic Member
Use VB reports or if you want more power and professional thing go in for Crystal Reports
Kinjal
-
Sep 17th, 2002, 08:31 AM
#3
I wonder how many charact
You could simply switch out the Printer object for the PictureBox control....
PictureBox and Printer Objects share many common properties except for .EndDoc and .NewPage.....
-
Sep 17th, 2002, 08:34 AM
#4
PowerPoster
yak77,
of course there is. Printer object is what yuo need. It's just some coding involved: page dimentions, fonts, lines (horisontal and evrtical, carret, new lines, tabs, current coordinates and some other things. If you don't mind all this then take your time and do it. As for a Preview window you may display everything on the blank form and then print to printer.
Roy
-
Sep 17th, 2002, 08:46 AM
#5
I wonder how many charact
As an example, I implemented a routine that can be passed either a Printer or a Picturebox object to create a chart... it looks exactly the same no matter which object is passed.
VB Code:
Public Sub FillChart(someobject As Object)
Dim myobject As Object
Set myobject = someobject
As I mentioned above, some properties of the Printer Object don't work with the Picturebox, and vice versa (but they are few).
VB Code:
If TypeOf myobject Is PictureBox Then
myobject.BackColor = vbWhite
EndIf
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|