Blank lines to fill up page?

J

James Minns

Hi everyone!

I would like some advice on how to solve this problem:
The printed access report which I have created does not fill the entire
page - the details section has a length which varies with the number of
records contained in the underlying query.

I would like to insert a variable number of horizontal lines (every 0,5cm
for example) in the report footer to fill up the rest of the page, so that
written comments can be added to the printed page. Any ideas on how to
achieve this apparently easy task?

Thanks, James
 
R

Rick B

Depending on how your report is set up, you might try turning on the "group
footer" and then putting your footer information there. That will print at
the end of the data instead of atthe bottom of the page.

You may need to adjust your grouping and sorting to work this out.

Post back more details if you can't figure it out.

Rick B
 
J

James Minns

Hi Rick thanks for the suggestion, maybe I wasn't clear...
The problem is not connected to putting information into a group footer.
What I would like to do is fill all remaining white space after the end of
the details section with lines that will print on paper.

If I put 3 horizontal lines in the report footer, and there are 5 records in
the details section, I fill the page. Good.
But if there are 3 horizontal lines in the report footer, and there are 6
records in the details section, the report spills over to 2 pages. Bad - I
need to draw only 2 lines in the footer.

So I need some way to draw a variable number of lines in the footer to fill
the page. Sometimes there will be none, sometimes 20.

example, in this short report I have 5 data records and 3 horizontal lines
in the footer
+----------------+
| data record1
| data record2
| data record3
| data record4
| data record5
|-----------------
|-----------------
|-----------------
+----------------+

another example, in this report I have 3 data records and 5 horizontal lines
in the footer
+----------------+
| data record1
| data record2
| data record3
|-----------------
|-----------------
|-----------------
|-----------------
|-----------------
+----------------+

Both these fill the printed page - I think that the only way forward is to
use vba to do the line drawing...?
I could always tell the customer to print on lined paper!
James

Rick B said:
Depending on how your report is set up, you might try turning on the
"group
footer" and then putting your footer information there. That will print
at
the end of the data instead of atthe bottom of the page.

You may need to adjust your grouping and sorting to work this out.

Post back more details if you can't figure it out.

Rick B
[snip]
I would like to insert a variable number of horizontal lines (every 0,5cm
for example) in the report footer to fill up the rest of the page, so
that
written comments can be added to the printed page. Any ideas on how to
achieve this apparently easy task?
 
P

PC Datasheet

See below my sig line

From my file ----


--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com

Creating Blank Lines In A Report



Blank line items are needed in reports such as Purchase orders and Invoices
to give the area below the last detail and the top of the Report Header the
same appearance as the filled-in line items. This can be done by creating a
Table2 containing whatever the number of blank rows it takes to fill the
detail section of the report and an Union Query combining Table1 and Table2.
The example below shows a simple report using this technique.

Table1

AID A A1 A2

1
$1
11
Text1

2
$2
12
Text2

3
$3
13
Text3

4
$4
14
Text4

5
$5
15
Text5


Table2

AROW ROW B B1 B2

1
R1

2
R2

3
R3

4
R4

5
R5


Union Query

SELECT Table1.Aid, Table1.A, Table1.A1, Table1.A2

FROM Table1

WHERE (((Table1.A1)<"14"))

UNION

SELECT Table2.Row, Table2.B, Table2.B1, Table2.B2

FROM Table2

WHERE (((Table2.AROW)<="3"));



Report

A A1 A2

$1
11
Text1

$2
12
Text2

$3
13
Text3





Note: The first Where clause in the Union Query determines which records
from Table1 will be in the report. In a Purchase Order or an Invoice, the
Where Clause would specify the POID or InvoiceID to determine which detail
records would be in the report. The second Where clause in the Union Query
determines which records from Table2 (or the number of blank line items)
will be in the report. In a Purchase Order or an Invoice, the Where Clause
is used to specify the number of blank line items. In the code, the number
of detail line items would be counted and that number would be subtracted
from the number of line items that would fit in the detail section of the
report. The calculated difference would be placed in a textbox which becomes
the criteria in the second Where clause.
 
D

Duane Hookom

You can use the Line method to draw lines on the On Page event of the
report. The following code will draw up to 24 rectangles the same size as
the detail section. You can modify the code to remove the printing of the
line number and other mods.

Private Sub Report_Page()
Dim intRows As Integer
Dim intLoop As Integer
Dim intTopMargin As Integer
Dim intDetailHeight As Integer
intRows = 24
intDetailHeight = Me.Section(0).Height
intTopMargin = 360
Me.FontSize = 16
For intLoop = 0 To intRows
Me.CurrentX = 20
Me.CurrentY = intLoop * intDetailHeight + intTopMargin
Me.Print intLoop + 1
Me.Line (0, intLoop * intDetailHeight + intTopMargin)- _
Step(Me.Width, intDetailHeight), , B
Next
End Sub
 
J

James Minns

Hi everyone!

Thanks to everyone who gave me suggestions. Coming from a C background I
went with Duane's suggestion as it seemed to be the easiest for me.

Problem solved!

James
 

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