Set the maximum # of records in subreport

T

Tia

How do I set the maximum number of records in a subreport? I need 20 records
per subreport. I tried resizing and it seemed to undo my grouping and put
each record on a new report. However, I'm not sure I did it right. So if
you have suggestions or could offer input on how to go about resizing, I
would be appreciative.

Thanks,
 
K

Keven Denen

How do I set the maximum number of records in a subreport?  I need 20 records
per subreport.  I tried resizing and it seemed to undo my grouping and put
each record on a new report.  However, I'm not sure I did it right.  So if
you have suggestions or could offer input on how to go about resizing, I
would be appreciative.

Thanks,

Why are you limiting it to 20 records per subreport? How should the
subreport determine which 20 of the records to display? What business
rule is determining this?

Keven Denen
 
R

roccogrand

Tia,

One thing that you may consider using is the SQL "Top" function in your
record source for the subreport.

HTH

David
 
D

Duane Hookom

You can add a "counter" in the subreport and cancel the printing when the
counter > 20.

Add a text box to the detail section:
Name: txtCounter
Control Source: =1
Running Sum: Over All
Visible: No
Add code to the On Format event of the detail section:
Cancel = Me.txtCounter > 20
 

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