Printing certain records on a subreport

V

VesG

I have a report that has a Subreport. I'd like to print
the first 2 records from the Subreport with the Main
report page then print all remaining records on the next
page. Is this possible?

Thanks
 
V

VesG

If I create two subreports, how do I make the first
subreport print no more than 2 records?
 
D

Duane Hookom

I would add a text box to the detail section:
Name: txtCount
Control Source: =1
Running Sum: Over Group
Then add code to the On Format Event
Cancel = Me.txtCount >2

This will only print two records.
 
V

VesG

That works. Thanks.
I've been trying a few other things, but still can't get
the results I'm looking for.

What I have now is a 2-page report. I'm using 2 subreports
that basically print out the same data. The first
subreport is used to print when there are <=2 records, and
the second subreport prints on the next page if there are
2 records. I have the second subreport position pass the
bottom margin, so therefore it prints on the next page
(which is what I want it to do). The problem is because
it is positioned there, I will always have 2 pages even
when I only want one (which is when there are <= 2 records
to display). How do I stop the second page from printing
when its <=2 records?

Thanks

Vesg
 

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