
Landscape datareport in vb6?
Here is only working solution for NT problem: it forces uses to
change it himself. You must detect printer.orientation before opening
the data report - if it is isn't what is needed, ask user to change
it. Regards, Les Caudle
If Printer.Orientation = DMORIENT_PORTRAIT Then
MsgBox "After you close this dialog, we will pop up the
printers folder." & vbCrLf & vbCrLf & "Right click on your printer and
set 'Document defaults...' so that it is in LandScape mode."
Shell "rundll32.exe shell32.dll,SHHelpShortcuts_RunDLL
PrintersFolder"
Exit Sub
End If
Quote:
>I've seen various posts related to problems viewing/printingVB6 datareports
>in landscape. Has anyone figured this out yet? It can be fixed manually by
>setting the default printer's Document Defaults in settings->printers to
>landscape prior to calling datareport.show() however many of the apporaches
>which using direct calls to GetPrinter(), SetPrinter(),
>DocumentProperties(), etc affect only the local printer context and
>datareports appears to be looking at a more global context of printer
>characteristics.
>In my case I'm running under NT. Knowledge base articles suggest the proper
>access rights need to be defined in the OpenPrinter() call for the
>SetPrinter() to succeed. I've tried various attempts at this with no
>resolve.
>Requiring a user to first go to settings->printers to change document
>defaults to landscape prior to printing a datareport is a bit extreme.
>Thanks in advance
--