Limit Report length to one page

R

Rick B

Not sure what you mean. If you have 100 items and they won't fit on one
page, what do you want to do? Do you want to just eliminate the ones that
don't fit?

More details please.
 
W

wem3rd

Rick B said:
Not sure what you mean. If you have 100 items and they won't fit on one
page, what do you want to do? Do you want to just eliminate the ones that
don't fit?

More details please.

I have a report that lists financial data for several accounts collected on
random dates, and it prints the records in descending order. I am only
interested in one page worth (about 45 records) per account.

I currently stipulate in the report's query to select only records >#DATE#,
but that proves to be a real variable and is a not reliable to give a full
page or less than two pages per account. I have looked into collecting the
number of records per group at the Report Run Time, but do not know how to
tell Access to stop after one page worth is printed per group.

Thanks.

wem3rd
 
P

Phil Smith

Here is an idea:

Make your report just header information. No detail.
Put all of your data on a subreport, drivien by a subquery, which as a
TOP 45 limitation.

One thing to note about TOP.

If your results were

A,B,B,C,C,C,C,D,E
on a TOP 5, you would actually get 7 records returned, because the 4th
through 7th are the exact same value. Find some way to make sure that
the results are unique, to avoid this problem.
 
W

wem3rd

Phil Smith said:
Here is an idea:

Make your report just header information. No detail.
Put all of your data on a subreport, drivien by a subquery, which as a
TOP 45 limitation.

One thing to note about TOP.

If your results were

A,B,B,C,C,C,C,D,E
on a TOP 5, you would actually get 7 records returned, because the 4th
through 7th are the exact same value. Find some way to make sure that
the results are unique, to avoid this problem.

Hmmm, I will give that a try. Every recorod in each group is a unique
date, so it should work. I will let you know - thanks.

wem3rd
 
W

wem3rd

wem3rd said:
Hmmm, I will give that a try. Every recorod in each group is a unique
date, so it should work. I will let you know - thanks.

wem3rd

I have succeeded in limiting the records to a number that will fit on one
page - thanks!

I used a subquery (in (Select.... )that pulled in the top most 35 dates and
then used that as criteria in the main query.

Pretty neet!

wem3rd
 

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