Center data on page (1 Viewer)

mcalex

Registered User.
Local time
Today, 12:34
Joined
Jun 18, 2009
Messages
141
Hi all,

I have a report that prints data about a number of different offices, listing sections and key staff in those offices. Some have more sections than others, but the data for each office fits on one page.

I want to know if i can center the information on the page, so that the data for offices with only one or two sections starts printing further down the page than those offices with 6 or more sections. I have a feeling I can do this in the Format event of the section - but how I'd go about it is beyond me. At the moment the report page for the smaller offices leaves lots of ugly whitespace at the bottom of the page.

Can anyone point me in the right direction?


many thanks
mcalex
 

PNGBill

Win10 Office Pro 2016
Local time
Today, 16:34
Joined
Jul 15, 2008
Messages
2,271
When you are in design view of your report you can use Page Setup as you would a normal word doc and select landscape, portrait etc including the options for margins and center - does this solve the problem?
 

PNGBill

Win10 Office Pro 2016
Local time
Today, 16:34
Joined
Jul 15, 2008
Messages
2,271
Sorry, you get margins but not center:(:eek:
 

PNGBill

Win10 Office Pro 2016
Local time
Today, 16:34
Joined
Jul 15, 2008
Messages
2,271
Left, Top Properties (Microsoft Access)@import url(/Office.css);

Left, Top Properties


You can use the Left and Top properties to specify an object's location on a form or report. For example, you might want a control to be always positioned in the upper-right corner of a section.
Setting
A control's location is the distance measured from its left or top border to the left or top edge of the section containing the control. Setting the Left or Top property to 0 places the control's edge at the very left or top of the section. To use a unit of measurement different from the setting in the Regional Settings Properties dialog box in Windows Control Panel, specify the unit, such as cm or in (for example, 3 cm or 2 in).
In Visual Basic, use a numeric expression to set the value of this property. Values are expressed in twips.
For controls, you can set these properties by using a control's property sheet, a macro, or Visual Basic.
For reports, you can set these properties only by using a macro or event procedure in Visual Basic while the report is in Print Preview or being printed.
Remarks
When you move a control, its new Left and Top property settings are automatically entered in the property sheet. When you view a form or report in Print Preview or when you print a form, a control's location is determined by its Left and Top property settings along with the margin settings in the Page Setup dialog box, available by clicking Page Setup on the File menu.
For reports, the Top property setting is the amount the current section is offset from the top of the page; the Left property setting is the amount the current section is offset from the left edge of the page. Both property settings are expressed in twips. You can use these properties to specify how far down the page you want a section to print in the section's Format event procedure.


This is copied from access help file print Property.
Left and Right
 

mcalex

Registered User.
Local time
Today, 12:34
Joined
Jun 18, 2009
Messages
141
Hi PNGBill

You can use these properties to specify how far down the page you want a section to print in the section's Format event procedure
OK, so I do something to guesstimate the Height of the detail section - (# of sections x section height) + (# of key staff x detail height) - and then subtract that from the page size and divide by 2???

Is there a way to get those counts (# of sections & detail rows in each) from within the report or do I have to write SQL to get the numbers?

If I need to write additional queries, how do I tell access to use these queries, in addition to the main RecordSource query?

thanks for the help :)
 

PNGBill

Win10 Office Pro 2016
Local time
Today, 16:34
Joined
Jul 15, 2008
Messages
2,271
Sorry, beyond me here :confused: - lets hope one the experts drops by this thread.

You could try googling Left Print Property access.
 

Users who are viewing this thread

Top Bottom