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
Printable View
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
I hvae the exact same problem. Does anyone have a solution?
Thanks,
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
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
Tnx guys...
Can you share me that file...?
Send me youre e-mail address and I'll mail it to you
[Edited by hermanvd on 09-28-2000 at 10:05 AM]
my email: [email protected]
tnx again....