How to NEVER have a page break?

D

Dennis

I have this report that ultimately gets exported to a TXT file. This report
has extra linefeeds in the TXT file where page breaks would occur. My need is
to completely elliminate these extra lines/page breaks from the report. Any
way to do this?

Thanks!!
 
A

Allen Browne

You cannot have a page-free report.

Create a query that generates the records you need, and use TransferText to
export the query instead.
 
M

Maurice Snell

A lot of users would be happy for outputting reports to html and/or text if
Access allowed a non-paginating report output! See loads of other entries in
this forum on this topic. Microsoft can you please add this in a later
version!

I solved this problem by calling an external script to clean up trailing
spaces from the end of report output lines, and remove blank lines from the
text file.

I have a small text file called DelSpace.awk, which contains these lines:
# Written by Maurice Snell
# 3.2.1998
# Modified 15.7.99 to NONoptionally strip blank lines

# N.B. This is used by F:\C\ROLLCALL\DBASE\NEWTHING.BAT etc.
# As used by the Access IDs database to output various text files

# Remove trailing spaces from each line of input.
# Eg. Input "Some text \n \n\n" gives output "Some text\n"

# MS Access reports pad each line of the text file to the end,
# which makes the file about 3 times as big as it should be.

BEGIN {
StripBlankLines=1
}

# Do this action to every line
{
EndOfLine=length($0)
while ( (EndOfLine>0) && (substr($0,EndOfLine,1) == " ") )
{
EndOfLine--
}
if ((StripBlankLines==0) || (EndOfLine>0))
print substr($0,0,EndOfLine)
}
############ end of DelSpace.awk

Then you can clean up a file with a command line such as
awk -f DelSpace.awk < InputReport.txt > OutputReport.txt

You will need to download the free AWK utility.
 

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