Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Limiting Records in Section Expert 1

Status
Not open for further replies.

LMGroup

MIS
Apr 10, 2006
85
CA
I'm using CR 2008 and trying to limit the number of records I'm retrieving in a subreport to the 5 most recent revisions based on the revision number. I've entered the following the the Section Expert-Details-Common-Suppress (No Drill-Down) formula
Code:
numbervar RevLoop;
numbervar RevMax;

RevMax = Maximum ({Revisions.RevisionN});
RevLoop = RevMax-4;

{Revisions.RevisionN}<>RevLoop To RevMax
I'm a total rookie at this (obviously) so I'm sure I'm missing information that you may require.

Thanks for any help.
Lorraine
 
Assuming you have sorted in descending order by revision number and that there is one row per revision number, use a suppression formula like this:

recordnumber > 5

-LB
 
That was much easier than what I was trying to do. Now I'm only getting the last 5 instead of all or none. Is there a way to make it print in ascending order after doing that?
 
Never mind the previous post. I used your tip and sort of combined it with mine and got the last 5 records printing in ascending order.

Thanks so much!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top