|
-
Sep 26th, 2000, 07:58 AM
#1
Thread Starter
New Member
Im using VB6. I use the data designer to print my
reports and is bound to a data class.
My problem is that I cannot setup the default printer
setting e.g. (LANDSCAPE or PORTRAIT) at runtime....
pls. need help...tnx
-
Sep 26th, 2000, 10:21 AM
#2
Lively Member
I hvae the exact same problem. Does anyone have a solution?
Thanks,
-
Sep 27th, 2000, 04:27 AM
#3
New Member
datreprt
Set the page orientation:
datareport1.orientation = rptOrientLandscape
datareport1.show
This will then set the page as landscape.
You may need to get hold of the latest service pack
to get the above to work.
Zed
-
Sep 27th, 2000, 06:08 AM
#4
Hallo
First you will need to register the Pageset.dll on your PC (let me know if you need the file).
Code
Declare the following in module:
Public gprinter As PageSet.PrinterControl
Put the following on Report or in module:
Public Sub Set_Landscape()
On Error GoTo SetLandscapeError
Set gprinter = New PrinterControl
gprinter.ChngOrientationLandscape
Exit Sub
SetLandscapeError:
MsgBox Err.Description & "Error setting Printer to Landscape"
gprinter.ReSetOrientation
End Sub
Remember to reset orientation of printer:
gprinter.ReSetOrientation (on close/unload form)
If you are using a network printer with Windows NT 4.0, you would need to create a dummy printer on pc that points to the printer you want to use. NT denies you the ability to change printer settings on runtime. Why I don't know? (documented bug probably)
Hope this helps!!! Let me know
-
Sep 28th, 2000, 08:12 AM
#5
Thread Starter
New Member
data report
Tnx guys...
Can you share me that file...?
-
Sep 28th, 2000, 08:31 AM
#6
Send me youre e-mail address and I'll mail it to you
[Edited by hermanvd on 09-28-2000 at 10:05 AM]
-
Sep 28th, 2000, 12:41 PM
#7
Thread Starter
New Member
data report
my email: [email protected]
tnx again....
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
|