PC Review


Reply
Thread Tools Rate Thread

Suppress print using code, how to get rid of white space?

 
 
Allison
Guest
Posts: n/a
 
      6th Feb 2008
Hello,

I asked and received the below advice for how to print a set of labels
one-time only, below the page header.

This code does do that. But, it leaves all the white space reserved for
this on each successive page.

How do I get rid of all the white space on each successive page, so that the
detail prints right after the header?

Thanks for any help you can give.

Prior advice:

On Mon, 4 Feb 2008 12:38:00 -0800, Allison wrote:

> Access 2003, XP SP 2
>
> I have a report, grouped by alphabet.
>
> I need one set of instructions BELOW the page header, on the first page
> only. Same for end of report.
>
> Like this:
>
> {Page Header}
>
> [One-time text on first page only]
>
> {Group Header}
>
> [Detail]
>
> [One-time text on last page only]
>
> {Page Footer}
>
> I tried using {Report Header}, but it prints the Rpt Header first, then the
> Page Header and I need it reversed.
>
> Any suggestions?


Add a control to the report that computes [Pages] (if you don't
already have one, i.e. = "Page " & [Page] & " of " & [Pages]).
You can make it not visible if you don't want to display it.

Add whatever text boxes you need to the top portion of the Group
Header.
Then code the Group Header Format event:
Me.[ControlName1].Visible = Me.[Page] = 1
Me.[ControlName2].Visible = Me.[Page] = 1
etc.

Those controls will only appear on the first page.

Do similar for the Group Footer controls, except this time place the
controls at the bottom portion of the Footer and code the GroupFooter
Format event:

Me.[ControlName1].Visible = Me.[Page] = [Pages]
Me.[ControlName2].Visible = Me.[Page] = [Pages]
etc.

These controls will only appear on the last page group footer.

Set the GroupHeader and GroupFooter CanShrink property to Yes.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail

 
Reply With Quote
 
 
 
 
fredg
Guest
Posts: n/a
 
      7th Feb 2008
On Wed, 6 Feb 2008 11:22:01 -0800, Allison wrote:

> Hello,
>
> I asked and received the below advice for how to print a set of labels
> one-time only, below the page header.
>
> This code does do that. But, it leaves all the white space reserved for
> this on each successive page.
>
> How do I get rid of all the white space on each successive page, so that the
> detail prints right after the header?
>
> Thanks for any help you can give.
>
> Prior advice:
>
> On Mon, 4 Feb 2008 12:38:00 -0800, Allison wrote:
>
>> Access 2003, XP SP 2
>>
>> I have a report, grouped by alphabet.
>>
>> I need one set of instructions BELOW the page header, on the first page
>> only. Same for end of report.
>>
>> Like this:
>>
>> {Page Header}
>>
>> [One-time text on first page only]
>>
>> {Group Header}
>>
>> [Detail]
>>
>> [One-time text on last page only]
>>
>> {Page Footer}
>>
>> I tried using {Report Header}, but it prints the Rpt Header first, then the
>> Page Header and I need it reversed.
>>
>> Any suggestions?

>
> Add a control to the report that computes [Pages] (if you don't
> already have one, i.e. = "Page " & [Page] & " of " & [Pages]).
> You can make it not visible if you don't want to display it.
>
> Add whatever text boxes you need to the top portion of the Group
> Header.
> Then code the Group Header Format event:
> Me.[ControlName1].Visible = Me.[Page] = 1
> Me.[ControlName2].Visible = Me.[Page] = 1
> etc.
>
> Those controls will only appear on the first page.
>
> Do similar for the Group Footer controls, except this time place the
> controls at the bottom portion of the Footer and code the GroupFooter
> Format event:
>
> Me.[ControlName1].Visible = Me.[Page] = [Pages]
> Me.[ControlName2].Visible = Me.[Page] = [Pages]
> etc.
>
> These controls will only appear on the last page group footer.
>
> Set the GroupHeader and GroupFooter CanShrink property to Yes.


You can do this. Here is my method just for the group header. You can
adapt it for the group footer portion.

You have to determine beforehand where the top of each control is
going to print in the Group Header section, It's easy enough.
Position the controls where you wish them to be. Then write down each
control's Top property value.

Next make note of the Group Header's Height property value.

My example below will show 4 labels I wish to show just on page 1.
[LastName] is a control I wish to show on all pages.

Note: All measurements are in Twips, 1440 per inch. So if the top
property of one of your controls read 1.38", you would use 1.38 * 1440
in the code below.
My example simply spaces the controls 1/2-inch apart, starting at .1
inch from the top.
The Page 1 Height of the GroupHeader is 3 inches.
On each additional page the height will be .5 inch

Code the GroupHeader Format event:

IIf Me.[Page] = 1 Then
Me.GroupHeader0.Height = 3 * 1440

Me.Label383.Visible = True
Me.Label383.Top = 0.1 * 1440
Me.Label384.Visible = True
Me.Label384.Top = 0.6 * 1440
Me.Label385.Visible = True
Me.Label385.Top = 1.1 * 1440
Me.Label386.Visible = True
Me.Label386.Top = 1.6 * 1440

Me.[LastName].Top = 2.6 * 1440
Else
Me.Label383.Top = 0
Me.Label383.Visible = False
Me.Label384.Top = 0
Me.Label384.Visible = False
Me.Label385.Top = 0
Me.Label385.Visible = False
Me.Label386.Top = 0
Me.Label386.Visible = False

Me.[LastName].Top = 0.1 * 1440

Me.GroupHeader0.Height = 0.5 * 1440
End If

The above code will display the 4 labels (Label383 - Label 386) on
page 1 above the [LastName] in the Group Header.

On subsequent pages, only the [LastName] will appear, just .1 inch
below the Page Header.
The height of the GroupHeader will shrink to .5 inch.

Adjust all of these measurements to whatever you require.

Do similar code in the GroupFooter Format event, using
If [Page] = [Pages] instead of If [Page] = 1
I'm sure you'll be able to adapt this.

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
 
Reply With Quote
 
 
 
 
Allison
Guest
Posts: n/a
 
      7th Feb 2008
Thank you Fred. I'll try that.

"fredg" wrote:

> On Wed, 6 Feb 2008 11:22:01 -0800, Allison wrote:
>
> > Hello,
> >
> > I asked and received the below advice for how to print a set of labels
> > one-time only, below the page header.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I get a white border when I print - how can I get rid of it? frankenface Microsoft Word Document Management 2 12th Aug 2009 12:33 PM
white patches ankles white patches on tonsils white raised patchesskin white patches on skin vitiligoproblem Scanners 0 30th Mar 2009 09:25 PM
white patches ankles white patches on tonsils white raised patchesskin white patches on skin vitiligoproblem Scanners 0 29th Mar 2009 06:50 PM
Re: suppress UDF, suppress Juliet the wharf rat Windows Vista General Discussion 5 15th Aug 2008 03:59 AM
I CANNOT GET RID OF THE FIELD #'S. I ALSO CANNOT GET A WHITE PAGE =?Utf-8?B?QVNITEVF?= Microsoft Word New Users 2 15th Jun 2005 08:18 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:33 PM.