Set the maximum # of records in subreport

  • Thread starter Thread starter Tia
  • Start date Start date
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,
 
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
 
Tia,

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

HTH

David
 
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
 
Back
Top