Set size of report

goodfu

Registered User.
Local time
Today, 14:22
Joined
Dec 23, 2010
Messages
140
I'm trying to set the size of a report. My searching says I should resize it in preview mode and click save. But the save button isn't enable. I tried Docmd.MoveSize and that didn't work. I'm using Access 2007.
 
Is there really any point of trying to resize a report when you have built-in Zoom functions available?
 
I want the report to open in the correct size.
 
That still doesn't make sense to me. What is the right size?
 
I think you want to look at the Page Setup optionof your report. You will find this in the ribbon/menubar.
 
This is an 8 1/2 by 11 inches Letter sized-report. I just want to reduce the size of the preview.
 
The inner dimensions of the report is determined by the size you've set it to. If you want to be able to control the external dimensions then you need to make the report Pop-Up.

However, note that decreasing or increasing the window will cause the report to zoom (+ or -).
 
I am using, in the On Load event of the report

Code:
DoCmd.MoveSize Leftscrpos, Topscrpos, Widthscr, Heightscr

and in a module

Code:
Public Const Leftscrpos As Integer = 0, Topscrpos As Integer = 4440, Widthscr = 12000, Heightscr = 8000

The report opens in the right position but the width and height don't seem to be having any effect. The report extends down below the bottom of the screen and I'd like to correct that. This means the report will be rather small, but that's what I want. But it won't work.
 
I just tried that and reopened the database but it had no effect.
 
I just tried that and reopened the database but it had no effect.

Did you resize and then save after setting the settings and reopening? It wouldn't likely do anything unless you did it AFTER you changed the settings.
 
Also, make sure the AutoResize property of the report is set to NO.
 
I don't understand what you mean. The resize is in code. The save button is not enabled.

When I change Auto Resize to No, the report go much wider and scroll bars appeared.
 
I think the Load event is too early for the report's dimensions to be determined.

What you want to do is use the report's Move property in this sequence:
Code:
docmd.openreport "NameOfReport", acviewpreview
reports("NameOfReport").move Leftscrpos, Topscrpos, Widthscr, Heightscr
Remove the code from the Load event.
 
When I do this, the report looks exactly like what I want. But it opens in the wrong position, way down near the bottom of the screen, whereas before it opened in the right place but was sized wrong. I tried putting the code back in the on load event but that had no effect. So now I'm getting either the report looking the way I want in the wrong place or the report not looking the way I want in the right place.
 
Set the Autoresize property to Yes
Use this instead:
Code:
docmd.openreport ...
with reports("report name")
    .move .left, .top, Widthscr, Heightscr
end with
 
I see a very brief flash and then nothing.
 
I'll have to prepare a stripped-down version.
 

Users who are viewing this thread

Back
Top Bottom