473,435 Members | 1,704 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,435 software developers and data experts.

Blank Lines In Reports

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 the remaining page to fill and
print blank lines with the same number of fields as the line items. In
addition, if there were a long list of line items that carried over to a
second and possibly more pages, to print blank lines at the last page. The
available page length would be more after the first page.

And as a wrench in the works, say an orders report is for several customers
and the report page breaks at the end of each customer, the procedure would
need to print blank lines after each customer.

Thank you very much!

Melissa
Nov 13 '05 #1
6 5492
Melissa wrote:
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 the remaining page to fill and
print blank lines with the same number of fields as the line items. In
addition, if there were a long list of line items that carried over to a
second and possibly more pages, to print blank lines at the last page. The
available page length would be more after the first page.

And as a wrench in the works, say an orders report is for several customers
and the report page breaks at the end of each customer, the procedure would
need to print blank lines after each customer.

Thank you very much!

Melissa


Do you know how to program VBA? Or are you a macro coder?

If you are a programmer utilizing VBA, please look at
MoveLayout/MoveNext/PrintSecion in on-line help.

You might want to create a running sum variable that is reset on page
breaks or something like that. Increment the variable for each detail
line. Then run a loop.

Here is an example. It will not do what you want but it should provide
some info. I created a field called MoveCount and it is in the
GroupHeader0 band.

Private Sub GroupHeader0_Format(Cancel As Integer, _
FormatCount As Integer)

'intCount is a global variable for the report
If Me.MoveCount < intLineCnt Then
'I want to move to the next line until
'I can start printing. This report prints
'from the middle of the page to the bottom
'so I need to calc when to start printing
'but not overflow to the next page.
Me.MoveLayout = True
Me.PrintSection = False
Me.NextRecord = False
Me.MoveCount = Nz(Me.MoveCount, 0) + 1
Else
Me.MoveLayout = True
Me.PrintSection = True
Me.NextRecord = True
End If
End Sub

Private Sub PageHeader_Format(Cancel As Integer, FormatCount As Integer)
Me.MoveCount = 0
Dim rst As Recordset
Dim strSQL As String
Dim lngWidth As Long
Dim lngHeight As Long
Dim lngTotalLines As Long
Dim lngRet As Long

'get the number of records to print on this page
intRecCnt = GetRecCount()

If Me.Notes > "" Then
'get the number of lines it will take to
'print a memo field. This is a Stephan
'Lebans routine found at his web page.
lngRet = fTextHeight(Me.Notes, , _
lngHeight, lngWidth, lngTotalLines)
intNotes = lngTotalLines
End If

'used to calc where to start printing on a page
intLineCnt = 31 - intNotes - (intRecCnt + 1)

End Sub
If you are not a programmer...grin...now's a good time to start.

Nov 13 '05 #2
I think that you would have a quicker and easier solution to your request if
you used the page and report header/footers to format your invoices, rather
than trying to pad the detail section with blank lines.
-Ed

"Melissa" <mb****@earthlink.net> wrote in message
news:1p***************@newsread2.news.atl.earthlin k.net...
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 the remaining page to fill and
print blank lines with the same number of fields as the line items. In
addition, if there were a long list of line items that carried over to a
second and possibly more pages, to print blank lines at the last page. The
available page length would be more after the first page.

And as a wrench in the works, say an orders report is for several
customers
and the report page breaks at the end of each customer, the procedure
would
need to print blank lines after each customer.

Thank you very much!

Melissa

Nov 13 '05 #3
Ed,

Thank you for the recommendation. Any suggestion on how to do it?

Thanks!

Melissa
"Ed Robichaud" <ed*********@wdn.com> wrote in message
news:F2*******************@newshog.newsread.com...
I think that you would have a quicker and easier solution to your request if you used the page and report header/footers to format your invoices, rather than trying to pad the detail section with blank lines.
-Ed

"Melissa" <mb****@earthlink.net> wrote in message
news:1p***************@newsread2.news.atl.earthlin k.net...
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 the remaining page to fill and
print blank lines with the same number of fields as the line items. In
addition, if there were a long list of line items that carried over to a
second and possibly more pages, to print blank lines at the last page. The available page length would be more after the first page.

And as a wrench in the works, say an orders report is for several
customers
and the report page breaks at the end of each customer, the procedure
would
need to print blank lines after each customer.

Thank you very much!

Melissa


Nov 13 '05 #4
You can print lines or rectangles in the On Page event of the report. The
following code will print 25 numbered lines on a page regardless of the
number of records on the page.

Private Sub Report_Page()
Dim intRows As Integer
Dim intLoop As Integer
Dim intTopMargin As Integer
intRows = 24
intDetailHeight = Me.Section(0).Height
intTopMargin = 360
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

--
Duane Hookom
MS Access MVP
"Melissa" <mb****@earthlink.net> wrote in message
news:1p***************@newsread2.news.atl.earthlin k.net...
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 the remaining page to fill and
print blank lines with the same number of fields as the line items. In
addition, if there were a long list of line items that carried over to a
second and possibly more pages, to print blank lines at the last page. The
available page length would be more after the first page.

And as a wrench in the works, say an orders report is for several customers and the report page breaks at the end of each customer, the procedure would need to print blank lines after each customer.

Thank you very much!

Melissa

Nov 13 '05 #5
Duane,

Thank you for responding! This might be able to be adapted into the
solution. I need to be able to determine how many records are on each page.
Any idea how to do that? Then I need to fill the remaining page with blank
lines.

Melissa
"Duane Hookom" <duanehookom@NO_SPAMhotmail.com> wrote in message
news:Oi**************@TK2MSFTNGP14.phx.gbl...
You can print lines or rectangles in the On Page event of the report. The
following code will print 25 numbered lines on a page regardless of the
number of records on the page.

Private Sub Report_Page()
Dim intRows As Integer
Dim intLoop As Integer
Dim intTopMargin As Integer
intRows = 24
intDetailHeight = Me.Section(0).Height
intTopMargin = 360
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

--
Duane Hookom
MS Access MVP
"Melissa" <mb****@earthlink.net> wrote in message
news:1p***************@newsread2.news.atl.earthlin k.net...
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 the remaining page to fill and
print blank lines with the same number of fields as the line items. In
addition, if there were a long list of line items that carried over to a
second and possibly more pages, to print blank lines at the last page.

The available page length would be more after the first page.

And as a wrench in the works, say an orders report is for several

customers
and the report page breaks at the end of each customer, the procedure

would
need to print blank lines after each customer.

Thank you very much!

Melissa


Nov 13 '05 #6
I don't know how to determine this unless you have a set number of records
on each page (can't grow). This might also depend if each group begins on a
new page.

--
Duane Hookom
MS Access MVP
"Melissa" <mb****@earthlink.net> wrote in message
news:yh***************@newsread2.news.atl.earthlin k.net...
Duane,

Thank you for responding! This might be able to be adapted into the
solution. I need to be able to determine how many records are on each page. Any idea how to do that? Then I need to fill the remaining page with blank
lines.

Melissa
"Duane Hookom" <duanehookom@NO_SPAMhotmail.com> wrote in message
news:Oi**************@TK2MSFTNGP14.phx.gbl...
You can print lines or rectangles in the On Page event of the report. The
following code will print 25 numbered lines on a page regardless of the
number of records on the page.

Private Sub Report_Page()
Dim intRows As Integer
Dim intLoop As Integer
Dim intTopMargin As Integer
intRows = 24
intDetailHeight = Me.Section(0).Height
intTopMargin = 360
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

--
Duane Hookom
MS Access MVP
"Melissa" <mb****@earthlink.net> wrote in message
news:1p***************@newsread2.news.atl.earthlin k.net...
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 the remaining page to fill and print blank lines with the same number of fields as the line items. In
addition, if there were a long list of line items that carried over to a second and possibly more pages, to print blank lines at the last page.

The available page length would be more after the first page.

And as a wrench in the works, say an orders report is for several

customers
and the report page breaks at the end of each customer, the procedure

would
need to print blank lines after each customer.

Thank you very much!

Melissa



Nov 13 '05 #7

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

Similar topics

6
by: Ruben | last post by:
Hello. I am trying to read a small text file using the readline statement. I can only read the first 2 records from the file. It stops at the blank lines or at lines with only spaces. I have a...
1
by: JW | last post by:
The problem of hiding / showing a sub reports on No Data is often asked, my problem here is a little different. My Main report has, as a page header, company details (so each company to a new...
7
by: peggyfiorentino | last post by:
I'm an intermediate Access user. I have 3 summary reports that I would like to combine on one report. I tried to create a report in design view using 3 seperate subreport boxes. Specifying the...
4
by: Robert McClenon | last post by:
I am having a minor but annoying problem with some reports in Access 2003. (I had the same problem with Access 97, so it isn't version-dependent.) Some of the reports that I originally developed...
3
by: Jeff Calico | last post by:
Hello everyone I am transforming an XML document to text, basically only outputting a small portion of it. When I run the following XSLT via Xalan's processor, I get a bunch of unwanted blank...
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....
3
by: MarcGA | last post by:
(Excel 2003, Access 2003, XP, novice user here) I can't get Access to accept multiple Excel files to the same table. I can import the spreadsheets to a new table, but I need to import 23...
10
by: Lorie0114 | last post by:
Hello, We have an issue that I do not know how to resolve. Our website has several hundred reports. There are a handful of them that are causing issues when there is no interaction for a couple...
2
by: Diyaaa | last post by:
HI i have a problem with oracle reports 6i. the output has 1000s of lines. in my output first to 999th line is fine..bt then 1000th line is blank and again the data continues to be shown from...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

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.