473,473 Members | 2,236 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Pad lines on a report

I can swear I saw an answer to this a while back but can't locate it.

I need to pad lines on a report (print 20 lines, even if there are only 15
records - the last 5 lines blank).

Any suggestion appreciated.

--
Randy Harris
(tech at promail dot com)
Nov 13 '05 #1
3 2026
Here's an outline of what I used ---------------
Data for my report comes from a query. The query includes the primary key
and five fields from a table.
1. Create TblBlankLine:
TblBlankLine
ARow
A1
A2
A3
A4
A5
Set ARow data type to long integer and A1 to A5 data types to match the
data types of the fields in the query. ARow is numbered 5000001 to 5000028
2. I needed a total of 28 records and blank lines in my report. Put the
following in a standard module:
Function BlankLines()
Dim Items As Integer
Items = DCount("*", "MyQuery")
BlankLines = 28 - Items
End Function
3. Union MyQuery with TblBlankLine and include the Where clause:
WHERE TblBlankLine.ARow<=(BlankLines()+5000000)
4. Put the following in the ReportHeader_Format event:
Call BlankLines

When the report opens, BlankLines is calculated. The Union query returns 28
records; whatever number of records from MyQuery and the remainder as blank
lines. Note that the fields in the report must show their borders.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

"Randy Harris" <ra***@SpamFree.com> wrote in message
news:tg*****************@newssvr31.news.prodigy.co m...
I can swear I saw an answer to this a while back but can't locate it.

I need to pad lines on a report (print 20 lines, even if there are only 15
records - the last 5 lines blank).

Any suggestion appreciated.

--
Randy Harris
(tech at promail dot com)

Nov 13 '05 #2
Thanks, I knew I'd seen a sample of how to accomplish that recently. What I
neglected to mention, however, is that the RecordSource for the report is an
ODBC pass-thru query. I'm not sure if I can union TblBlankLine to it. Have
to give it a try.

Thanks again,
--
Randy Harris
(tech at promail dot com)
"PC Datasheet" <no****@nospam.spam> wrote in message
news:ZS****************@newsread2.news.atl.earthli nk.net...
Here's an outline of what I used ---------------
Data for my report comes from a query. The query includes the primary key
and five fields from a table.
1. Create TblBlankLine:
TblBlankLine
ARow
A1
A2
A3
A4
A5
Set ARow data type to long integer and A1 to A5 data types to match the data types of the fields in the query. ARow is numbered 5000001 to 5000028
2. I needed a total of 28 records and blank lines in my report. Put the
following in a standard module:
Function BlankLines()
Dim Items As Integer
Items = DCount("*", "MyQuery")
BlankLines = 28 - Items
End Function
3. Union MyQuery with TblBlankLine and include the Where clause:
WHERE TblBlankLine.ARow<=(BlankLines()+5000000)
4. Put the following in the ReportHeader_Format event:
Call BlankLines

When the report opens, BlankLines is calculated. The Union query returns 28 records; whatever number of records from MyQuery and the remainder as blank lines. Note that the fields in the report must show their borders.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

"Randy Harris" <ra***@SpamFree.com> wrote in message
news:tg*****************@newssvr31.news.prodigy.co m...
I can swear I saw an answer to this a while back but can't locate it.

I need to pad lines on a report (print 20 lines, even if there are only 15 records - the last 5 lines blank).

Any suggestion appreciated.

--
Randy Harris
(tech at promail dot com)


Nov 13 '05 #3
Randy Harris wrote:
Thanks, I knew I'd seen a sample of how to accomplish that recently. What I
neglected to mention, however, is that the RecordSource for the report is an
ODBC pass-thru query. I'm not sure if I can union TblBlankLine to it. Have
to give it a try.


If possible, put a tblBlankline on the server and union it there, it'll
be better than a heterogeneous query.

Otherwise tblBlankLine in the local db and union your passthrough query
with that, e.g.
select * from passthroughquery union ALL select * from tblBlankline
As opposed to trying anything else within the passthrough query itself.

Note the ALL keyword in the union, unions usually elimiate duplicates,
you won't have duplicates so no need toi waste time/resources
eliminating them.

--
This sig left intentionally blank
Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: David | last post by:
Hi, I have a report with a sub-report. On the sub-report I have the following data: Product | Qty | Print (As Checkbox) What I want to do is hide all lines in the sub-report where...
1
by: Katrin Limp?ck | last post by:
Hi all, is there a possiblity to count the lines in a sub report? Background: I have a form, where to put data, in this form there is a fixed place, where I put the sub report. I know, that I...
6
by: Melissa | last post by:
Does anyone have a generic procedure for adding blank lines to reports like Sales details, PO details and/or Orders details. The procedure would need to count the number of line items, determine...
10
by: PC Datasheet | last post by:
How do you create blank lines with lines to fill such reports as invoices and purchase orders? Thanks! Marie
2
by: Rico | last post by:
Hello, I'm formatting a report based on an existing controlled document. The document that I'm duplicating has a number of lines that the user fills our manually, but the database version of...
1
by: DAnne | last post by:
Hi, I have checked your archives but have not been able to find anything that works for my situation. I have a for loop that brings back a list of unique responses for each section in a report....
4
by: bobh | last post by:
Hi All, In report design view is there a way to Not display the grid lines But display the grid dots? thanks bobh
4
by: ramaswamynanda | last post by:
Hello, I have an application in Access where I have developed about 10 reports. These have been working for a while and produce data properly. I recently tried exporting the report, from the...
6
by: Annalyzer | last post by:
My database must produces a .csv file with a header line that is different from the detail lines. This .csv file contains a monthly report to an outside agency and is uploaded online so it must...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.