Report Page Length Error - OutputTo rtf

R

Robin

Hi

(Access 2003.)

I have a report that is programmatically output to a rtf document and have a
problem with page length. Whilst the footer appears in the correct place on
the Access Report, it is too high on the page once this is output to the rtf
document, with several lines of white space underneath.

I realised that the report defaults to 'Letter' format, whilst the Word
document defaults to A4 (which is slightly longer). I have tried to change
the report format from Letter to A4 but this is ignored and is not saved
with the report. As a test I tried changing the report orientation from
portrait to landscape and this does save correctly.

I need to distribute this application and need some way to force the report
page size to A4, regardless of client printer settings, so I guess I need to
do this programmatically.

Am I correct in thinking that the different default page sizes are the cause
of this problem, and if so, is there a way of forcing the default report
format to A4 using VBA?

Regards

Robin
 
R

Rick Brandt

Robin said:
Hi

(Access 2003.)

I have a report that is programmatically output to a rtf document and
have a problem with page length. Whilst the footer appears in the
correct place on the Access Report, it is too high on the page once
this is output to the rtf document, with several lines of white space
underneath.
I realised that the report defaults to 'Letter' format, whilst the
Word document defaults to A4 (which is slightly longer). I have
tried to change the report format from Letter to A4 but this is
ignored and is not saved with the report. As a test I tried changing
the report orientation from portrait to landscape and this does save
correctly.
I need to distribute this application and need some way to force the
report page size to A4, regardless of client printer settings, so I
guess I need to do this programmatically.

Am I correct in thinking that the different default page sizes are
the cause of this problem, and if so, is there a way of forcing the
default report format to A4 using VBA?

Regards

Robin

The Export To RTF feature is severely flawed and is best only used for fairly
simple tabular reports. What you are seeing is one of the mildest problems.
Others include erroneous line-feeds, truncated text, entries report sections
dropped, etc..

Your specific problem is that the "Page Footer" in an Access report does not
create a "Page Footer" in Word. It is just "text that comes after the other
text". Combining that with the fact that Access uses larger line-spacing by
default than Word does and you end up with extra space at the bottom.
 
R

Robin

The Export To RTF feature is severely flawed and is best only used for
fairly simple tabular reports. What you are seeing is one of the mildest
problems. Others include erroneous line-feeds, truncated text, entries
report sections dropped, etc..

Your specific problem is that the "Page Footer" in an Access report does
not create a "Page Footer" in Word. It is just "text that comes after the
other text". Combining that with the fact that Access uses larger
line-spacing by default than Word does and you end up with extra space at
the bottom.
I realise the limitations of rtf but I'm not sure this is 'flawed' - more
that rtf can only do certain things, and I have seen some strange effects,
particularly if subreports or text boxes are too close together - the text
can end up jumbled together. However, most limitations can be overcome by
careful layout of the report, choice of fonts and avoidance of formats that
are not supported in rtf (such as background colours and lines).

I'm pleased to say that my rtf version looks exactly the same as the Access
Report, in every way. Unfortunately this also includes pages formatted for
'Letter' rather than A4.

I need to use rtf because this presents the most portable and accessible
format for users. I want to use A4 because all users are in Europe and will
have A4 as their default. I just need a way of setting the report page size
to A4 in VBA.
 
R

Rick Brandt

Robin said:
I realise the limitations of rtf but I'm not sure this is 'flawed' -
more that rtf can only do certain things, and I have seen some
strange effects, particularly if subreports or text boxes are too
close together - the text can end up jumbled together. However, most
limitations can be overcome by careful layout of the report, choice
of fonts and avoidance of formats that are not supported in rtf (such
as background colours and lines).
I'm pleased to say that my rtf version looks exactly the same as the
Access Report, in every way. Unfortunately this also includes pages
formatted for 'Letter' rather than A4.

I need to use rtf because this presents the most portable and
accessible format for users. I want to use A4 because all users are
in Europe and will have A4 as their default. I just need a way of
setting the report page size to A4 in VBA.

The problems described are not limitations of RTF but of the Access
export-to-RTF tool. RTF on its own is perfectly capable.

Yes, any given report for a given set of data can be tweaked until a
satisfactory RTF output is achieved, but if the report is complex (grouping
levels) and has controls that can "grow" then you will eventually encounter data
that does not export to RTF accurately. Tweaking the report to fix that
particular set of data will just cause some other set of data to mess up.

These problems have been around since at least Access 95. They are (AFAICT)
inherently caused by the difference in spacing (both line and word) between
Access and Word. If Access thinks a word, sentence, paragraph, etc., should
fit in a particular location on the document and that element in fact does not
fit in the RTF document then it can either be moved down the page (merely
annoying) or lost entirely (bigger issue).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top