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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Limit Sub-Report to the top 1 record

Status
Not open for further replies.

benvegiard

Programmer
May 15, 2003
63
US
Hi All,

I am trying to limit a sub report to the most recent occurance of a related record in a sub-report (show the most recent photo) I have the sub-report tied to the photos table and sorted descending to get the most recent photo on top, but cannot find a place to set TOP N to 1.

TOP N is available in the main report. Is Top N not available in a sub-report? Should I use a formula to programatically suppress the section based on a global variable?

What do you guys think?

Thanks,
Ben
 
Place the photo in the Report Header section in the subreport and supress the other sections. You will only see the first photo if you do that.

Steve Phillips, Crystal Consultant
 
A top N is available for subreports, though you would use the group footer to display the latest version.

-k
 
TopN is for summaries, not for individual records or table fields. If you've sorted descending, then placing it in the report header (or group header) should work.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top