[AccessD] Report Printing Problem - Graphs Being Split

Mike mjrobertson at iinet.net.au
Thu Jan 12 08:31:51 CST 2006


Hi Jim.

Thanks for the reply.

I'm certainly willing to give this method a go - I'll have some time over
the next few days to get it operational with some luck and hopefully some
more advice from you.

I've started trying it out and have initiated a 2 pass printing process on
one of the reports.

One thing I failed to mention in my original message is that all sub-reports
have been collapsed to .1cm (or 57 twips) high so that I can get all of them
into the main report's detail section. I'm unsure of what effect that may
have on this process.

I understand the intent of your suggestion - and I'm glad to see that I
still learn something new everyday - I wasn't aware of the MoveLayout
property etc.

You mentioned "record the size of each sub-report in inches of page that it
occupies".

So far, I have just used the Immediate Window to show me the heights of each
sub-report during the first execution of the onFormat event of the report's
Detail Section (all of the sub-reports are in the detail section). This pass
also hides sub-reports as dictated by the client and moves subsequent labels
and sub-report controls up the page as necessary. Then during the second
pass of the OnFormat event I display the heights of the sub-reports again.
Finally, in the OnPrint event of the Detail Section I display the heights
once more. Only the OnPrint event shows the "grown" sizes of the
sub-reports. Here's the debug output:

In first Format pass
 57 
 57 
 57 
In Second Format pass
 57 
 57 
 57 
In Print Pass
 851 
 4077 
 57 

(expressed in twips)

I need some help at this point as it seems that I am getting the "grown"
sub-report sizes too late to exert any control over page breaks (either
through use of the MoveLayout property or through unhiding page break
controls. It's my understanding that I can't alter detail section formatting
in the OnPrint event

I expected to see a change in sub-report heights after the first pass. At
that point that I would record the relevant sizes of sub-reports to be used
in the second format pass to control pagination.

Clearly I'm missing something here and need some more assistance to get back
on track.

Thanks again Jim.

Regards,


Mike Robertson



Date: Tue, 10 Jan 2006 08:39:39 -0500
From: "Jim Dettman" <jimdettman at earthlink.net>
Subject: Re: [AccessD] Report Printing Problem - Graphs Being Split
To: "Access Developers discussion and problem solving"
	<accessd at databaseadvisors.com>
Message-ID: <NDEALJOEGMMPCDKIFGNFEEKHHOAA.jimdettman at earthlink.net>
Content-Type: text/plain;	charset="iso-8859-1"

Hi Mike,

<<When a report is printed, any textual or graphical sub-report which starts
before the end of the page is "split" i.e.. part of it prints on the page it
started on and the rest prints on the following page. This is particularly
horrific when a graph is being printed - the "pie" ends up not only sliced
but also severed! I think I can live with textual type reports being split
across pages, but splitting a graph into 2 parts isn't acceptable.>>

  I'm going to suggest something and it may solve it with a little
experimentation, but if it doesn't it will certainly get you started in the
right direction.

  First, what your seeing is more or less normal report engine behavior, so
there is no easy fix for this (i.e. no setting to change) and your going to
need to mange this problem on your own.  The Access report engine is quite
controllable, much more so then many people think.  You've already seen some
of that with hiding/un-hiding sub reports with no data.

  I'm going to toss out three things that you can use to control reports and
when combined, you'll be really surprised at some of the things you can do.

1. "Two Pass" printing - This is where by placing a reference to .Pages
anywhere on the report, you force Access to do a dry run of the report to
figure out the total number of pages.  It then does a second pass to
actually print the report.
<Snip>

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.17/227 - Release Date: 11/01/2006
 



More information about the AccessD mailing list