To do this, insert a subreport that does not group by district. Sort the subreport records in descending order by sales, and then add the Special Field->RecordNumber to the details section. Suppress all sections except the details section, and suppress all fields except Recordnumber.
Do not link the subreport to the main report. Place the subreport in the details section of the main report. At this point, it will display all ranks for all stores in every detail section. Next, create a formula in the main report {@shared storeID}:
Place this in the GH#1_a. The subreport should be in an inserted section GH#1_b. Drag it there, after inserting GH#1_b. GH#1_a should be formatted in the section expert to "Underlay following sections", so that the rank in GH#1_b will align with the fields in GH#1_a.
In the subreport, go to the section expert->details->suppress->x+2 and enter:
whileprintingrecords;
shared numbervar storeID;
{table.storeID} <> storeID
This will suppress all but the correct rank for that store.
My mistake--I lost track of your report structure. The shared variable formula belongs in detail_a, and the subreport in detail_b. Detail_a should be formatted to "Underlay following sections".
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.