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

TOP N + SUB REPORT Formula

Status
Not open for further replies.

rocky22

MIS
Dec 23, 2002
4
I need to produce a Top N report ranked using a formula field with a calculation including a value derived from a sub report....Is this possible? or suggested alternative solutions please.
 
I don't think the formula would be available for TopN. If you don't have too many group instances, you could run the report, note the results, and then manually order the groups by going to report->change group expert->options and selecting "Specified Order." Enter the group instances in order of the formula results.

-LB

 
Values returned from a subreport are found last of all, and thus are only available to a 'lower' section. This creates problems when you want to suppress a section if the subreport is blank or has the wrong value, it can't be done directly, though there is a work-round, detailed at thread782-477236 your case, if I've understood you correctly, you want to select the top details from a larger selection. This means knowing all of the values before deciding what to print, which Crystal doesn't allow.

The only way round that I can think of is to accumulate the values into an array and then select from the array. No detailed ideas as to how you'd do that.

Or maybe you need to rebuild the report, possibly raise the 'subreport' data to the main report, dropping down something else if necessary. Note that you can have a report where the 'detail' lines are actually headers or footers, though they have restrictions which a true detail line does not have.

Madawc Williams
East Anglia, Great Britain
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top