Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Print (VB6) DataReport in Legal/Landscape

380 views
Skip to first unread message

Cameron Melvin

unread,
Aug 16, 1999, 3:00:00 AM8/16/99
to
I'm using VB6 with ADO 2.1 on NT4. I need to print a DataReport on legal
paper with landscape orientation. If I set the PaperSize and Orientation
properties of the VB.Printer object, the report should print in legal
landscape, right? But it doesn't. It just prints on letter with portrait
orientation. And if I make the report too wide I get that annoying "Report
width is larger than paper width" message. The only way I can get it to
actually print on legal landscape is to change the printer defaults in the
Control Panel. Is this a bug or am I just clueless?

Cam

Ketil Krumm

unread,
Aug 17, 1999, 3:00:00 AM8/17/99
to
Cam,

>I'm using VB6 with ADO 2.1 on NT4. I need to print a DataReport on legal
>paper with landscape orientation. If I set the PaperSize and Orientation
>properties of the VB.Printer object, the report should print in legal
>landscape, right? But it doesn't. It just prints on letter with portrait


Well, you should think so, but you're right - it doesn't...

>actually print on legal landscape is to change the printer defaults in the
>Control Panel. Is this a bug or am I just clueless?


Neither - it's by [poor] design, and you've just found the only solution...

It seems the Data Report suffers from the same conceptual problems that the
Printer object did: It's a great idea poorly implemented... The VB team
just doesn't seem to get along well with printers and printing :))

The problem is (or so I've read) that the Data Report has its own device
context for the printer, and doesn't expose it for you to programatically
make changes. It creates it from the default printer setting, so whatever
you have there is what you get for the Data Report - just as you discovered.

The only workaround is to change the default printer settings, preview/print
the report, and change the defaults back. Obviously this solution has a
number of drawbacks, most noticeably the fact that the default printer
setting have been altered if your user decides to print from another program
while the Data Report preview is open. For some programs like Word, Excel
etc that explicitly sets properties for each job it doesn't matter, but a
lot of other programs will then print using the wrong settings.

Probably not what you wanted to hear, but these are the cold facts...

Ketil


Mª Pilar Hernández Alzuet

unread,
Sep 9, 1999, 3:00:00 AM9/9/99
to
Hi Cameron and everybody:

Try this:

http://support.microsoft.com/support/kb/articles/q198/9/01.asp

I haven't been able to get a correct preview: this keeps being on
portrait mode. However the datareports is printed correctly.

Good luck!
__________________________
Mª Pilar Hernández Alzuet
mpherna...@logiccontrol.es
http://alzuet.hypermart.net

> I'm using VB6 with ADO 2.1 on NT4. I need to print a DataReport on
>legal paper with landscape orientation. If I set the PaperSize and
Orientation
> properties of the VB.Printer object, the report should print in legal
> landscape, right? But it doesn't. It just prints on letter with
portrait

> orientation. And if I make the report too wide I get that
annoying "Report
> width is larger than paper width" message. The only way I can get it
to

> actually print on legal landscape is to change the printer defaults
in the
> Control Panel. Is this a bug or am I just clueless?
>

> Cam


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

0 new messages