Reports Preview Incorrectly (1 Viewer)

JustPunkin

Registered User.
Local time
Yesterday, 22:48
Joined
Jan 8, 2009
Messages
38
I have all of my reports set up to preview and print in landscape.

When I run the report, the preview and print are in portrait.

I have looked, and there is a suggestion to change an option for "Name Autocorrect". I have tried that to no avail.

Any other suggestions?

Access 2003 SP2.
 

JustPunkin

Registered User.
Local time
Yesterday, 22:48
Joined
Jan 8, 2009
Messages
38
What is your Default Printer?


I went in and changed my default printer to landscape, and it seems to have fixed it.

I guess I wonder why it doesn't take the page setup in the form. Is there a way I can override the default printer and have it take the setup the way I have it in the form?

Why do I always type forum instead of form :p
 

boblarson

Smeghead
Local time
Yesterday, 19:48
Joined
Jan 12, 2001
Messages
32,059
I went in and changed my default printer to landscape, and it seems to have fixed it.

I guess I wonder why it doesn't take the page setup in the form. Is there a way I can override the default printer and have it take the setup the way I have it in the form?
Not sure but someone else might.

Why do I always type forum instead of form :p
One of life's mysteries. I doubt we'll ever figure that one out :D
 

JustPunkin

Registered User.
Local time
Yesterday, 22:48
Joined
Jan 8, 2009
Messages
38
I believe I have found the solution to this problem. After realizing that it was most likely a windows issue instead of an access issue, I did a little more research. Apparently, this is by design. From the Microsoft support page I have found this:

Symptoms: After you programmatically change properties of the Application.Printer object, forms and reports that use the default printer do not automatically inherit these settings.

Cause: Saved forms and reports store printer information as part of their definition. When you preview or print saved forms and reports, these objects use the printer information that is stored within them instead of inheriting the settings from the Application.Printer object.

Solution: (two possible)

Set the Printer Property to Application.Printer

After you customize the properties for the Application.Printer object, set the Printer property of the form or report to the Application.Printer object. This forces the form or the report to destroy its current DEVMODE structure and to inherit a new one from the Application.Printer object.

or

Assign the Printer Settings of the Object Directly

Another workaround is to programmatically set the printer settings of the object itself, instead of setting them to the Application.Printer property. Setting the individual properties of the object's Printer property is similar to the user manually changing printer settings within the Page Setup dialog box. When you programmatically set the object's printer settings directly, the settings are saved with the object automatically.


There is sample code in the help article.

Hopefully this will help someone else too :D
 

Users who are viewing this thread

Top Bottom