how do i center a report horizontally ?

  • Thread starter Thread starter jfp
  • Start date Start date
J

jfp

Suppose i am designing a report -- usual stuff, a bunch of columns. I
start at the left (0.0), place a field, size it, leave some room, place
the next field, etc. When i am done, suppose i have only used 6" of the
8" typically available. Now, i would like to set a 1" left margin so
that the report is centered horizontally when it prints. I do not want
to go back and move everything over an inch -- that seems like an
unnecessary pain -- especially if i go back and make changes. I see no
properties for the report that allow me to do this.
Any ideas ?
 
Cheryl said:
Click File|Page Setup and go from there.

That's fine for interactive printing.
I want to print the report programmatically in response to a user
action, so i need either:
a) some property of the report i can set when i design it,
b) some way to programmatically effect what you suggest in some event
handler for the report.

Any ideas ?
 
jfp said:
That's fine for interactive printing.
I want to print the report programmatically in response to a user
action, so i need either:
a) some property of the report i can set when i design it,
b) some way to programmatically effect what you suggest in some event
handler for the report.

If you set the margins and save the report those settings should be
retained. Unless you have Acess 2000 without the service patches in which
case there is a bug that often causes the margins to reset themselves.
 
Cheryl -- sorry; i didn't realize that changes made this way would be
permanent; i assumed without trying that they would affect only the
current printing.
Rick -- you say "and save the report". Makes sense, but:

With testing, i found that if i open the report directly (preview; do
not go to design mode at all) and then set the margin and then close the
report, this too saves the new settings (there is no need to do an
explicit save). Sort of a cute but not clear that it is a documented
anywhere feature.
Anyway: suppose i am developing an application and (for whatever
reason) i do *not* want the user to be changing the margins around.
(For example, there might be a single mdb containing the reports that is
used by several users.) I see no way to prevent the above from
happening. A form has a "Allow Design Changes" property, but a report
doesn't. Any ideas ?
-=-=-=
 
(For example, there might be a single mdb containing the reports that is
used by several users.)

Users where my databases are deployed always get their own copy of the
Front-End of the application(queries, forms, reports, macros and modules)
linked to tables in a Back-End. If a user has a full copy of Access and
wants to make design changes, they can do so to their heart's content and
will not affect what any other user does. If they "mess up", it is then
very easy to get them a new copy of the Front-End.

Alternatively, you could give each user a copy of the Front-End converted to
an MDE file, which removes the capability to make design changes (except to
queries and tables, IIRC) even if they have their own copy of Access.

And, then, there is the option to implement Access Security, which can be
quite a bit of work.

hth,
 
jfp said:
Cheryl -- sorry; i didn't realize that changes made this way would be
permanent; i assumed without trying that they would affect only the
current printing.
Rick -- you say "and save the report". Makes sense, but:

With testing, i found that if i open the report directly (preview; do
not go to design mode at all) and then set the margin and then close the
report, this too saves the new settings (there is no need to do an
explicit save). Sort of a cute but not clear that it is a documented
anywhere feature.
Anyway: suppose i am developing an application and (for whatever
reason) i do *not* want the user to be changing the margins around.
(For example, there might be a single mdb containing the reports that is
used by several users.) I see no way to prevent the above from
happening. A form has a "Allow Design Changes" property, but a report
doesn't. Any ideas ?

If you distribute as an MDE then the report could not be changed by the
user. I have always assumed that this applied to the Page Settings as
well, but I can't say that I've ever tested it.
 
Back
Top