Report Formatting

C

Chris

I have an access report for checking out equipment. Right now, in the report
detail we have the record fields and 6 blank lines. This causes each record
to have 6 blank lines. What I would like is all the records printed together
and then the blank lines fill to the end of the page. The fields are listed
below

Equipment Checkout Expected Init Per Name
Phone Sign
[equip name] [checkout date] [checkin date] ___ ___ [users name] [phone] _____
 
A

Allen Browne

In report design view, set the Can Shrink property of your text boxes to
Yes.

This will cause them to use up no vertical space on the report, provided
there is nothing else beside them that requires that space.

Often you have a label beside the text box, e.g.:
City: New York
Access won't shrink the space if it has such as label beside it.

To solve that problem, right-click the Label and choose:
Change To | Text Box
Set the Control Source property of the new text box like this:
=IIf[City] Is Null, Null, "City:")
and set its Can Shrink property to Yes.
Now this 'label' (really a text box) shows "City:" if the City text box
contains a value, but is null if the City box is null, so the label shrinks
as well.
 
C

Chris

The labels are in the header and the fields are in the details. What we want
is the details to print first, then blank lines for the fields to print to
the end of the page less the footer area.

Allen Browne said:
In report design view, set the Can Shrink property of your text boxes to
Yes.

This will cause them to use up no vertical space on the report, provided
there is nothing else beside them that requires that space.

Often you have a label beside the text box, e.g.:
City: New York
Access won't shrink the space if it has such as label beside it.

To solve that problem, right-click the Label and choose:
Change To | Text Box
Set the Control Source property of the new text box like this:
=IIf[City] Is Null, Null, "City:")
and set its Can Shrink property to Yes.
Now this 'label' (really a text box) shows "City:" if the City text box
contains a value, but is null if the City box is null, so the label shrinks
as well.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Chris said:
I have an access report for checking out equipment. Right now, in the
report
detail we have the record fields and 6 blank lines. This causes each
record
to have 6 blank lines. What I would like is all the records printed
together
and then the blank lines fill to the end of the page. The fields are
listed
below

Equipment Checkout Expected Init Per Name
Phone Sign
[equip name] [checkout date] [checkin date] ___ ___ [users name] [phone]
_____
 
A

Allen Browne

If the rows are of fixed height (not using CanGrow or CanShrink), there are
some ways to fudge this by writing code in the Detail section's events.

Essentiallly, you need to determine when the report has reached the last
record, and change the ForeColor of the controls to vbWhite so no text
prints. Set the report's NextRecord to false, so it continues to print the
same record again (with the white text not showing up) until you are far
enough down the page (determined from the report's Top property in twips,
where 1440 twips = 1 inch.)

It's quite messy, and you will certainly need some VBA experience to achieve
it. Often the problem is that whoever is requesting this is merely trying to
duplicate a paper form where there was space to write an unknown number of
items, whereas a database knows how many items there are.

Among the problems to solve is knowing which is the last record. The report
may be opened with a filter, so it's not merely a DMax() on the data. You
can examine the report's Filter property, but that sometimes contains an
artifact, so you also need to check if the report's FilterOn property is
true. Now you're snookered, because there's a bug in Access such that the
FilterOn property is not reported correctly in Report_Open.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Chris said:
The labels are in the header and the fields are in the details. What we
want
is the details to print first, then blank lines for the fields to print to
the end of the page less the footer area.

Allen Browne said:
In report design view, set the Can Shrink property of your text boxes to
Yes.

This will cause them to use up no vertical space on the report, provided
there is nothing else beside them that requires that space.

Often you have a label beside the text box, e.g.:
City: New York
Access won't shrink the space if it has such as label beside it.

To solve that problem, right-click the Label and choose:
Change To | Text Box
Set the Control Source property of the new text box like this:
=IIf[City] Is Null, Null, "City:")
and set its Can Shrink property to Yes.
Now this 'label' (really a text box) shows "City:" if the City text box
contains a value, but is null if the City box is null, so the label
shrinks
as well.

Chris said:
I have an access report for checking out equipment. Right now, in the
report
detail we have the record fields and 6 blank lines. This causes each
record
to have 6 blank lines. What I would like is all the records printed
together
and then the blank lines fill to the end of the page. The fields are
listed
below

Equipment Checkout Expected Init Per Name
Phone Sign
[equip name] [checkout date] [checkin date] ___ ___ [users name]
[phone]
_____
 

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