{"id":9247,"date":"2013-07-18T14:34:18","date_gmt":"2013-07-18T20:34:18","guid":{"rendered":"http:\/\/www.mrc-productivity.com\/techblog\/?p=9247"},"modified":"2023-05-12T13:23:34","modified_gmt":"2023-05-12T19:23:34","slug":"top-ten-style-reports","status":"publish","type":"ht_kb","link":"https:\/\/www.mrc-productivity.com\/techblog\/?ht_kb=top-ten-style-reports","title":{"rendered":"Top-Ten Style Reports"},"content":{"rendered":"<p><!-- Begin Content --><\/p>\n<h1>Top-Ten Style Reports<\/h1>\n<p>Reports can be used to create fully functional Top-Ten lists, restricting output to a specified number of records sorted by your sequence key.\u00a0 While you can create a Top-Ten list for the detail level, this document will describe how to create a Top-Ten list based upon a Sub-total Level.<\/p>\n<p>Experienced m-Power developers will recognize that the Top-Ten Style Report is similar to the standard Ranking Report template.  For developers looking for a more hands-on approach, the Top-Ten Style Report offers a greater degree of flexibility and ease of use.<\/p>\n<h4>Setting up the report:<\/h4>\n<p>Build your report, making sure the &#8220;Summary or Detail&#8221; report is set to &#8220;Summary&#8221;.\u00a0 This will allow your page to print without showing the detail line by default.\u00a0 Also, keep in mind the field you sequence by will be the field that groups your top ten list.\u00a0 Build the application.<\/p>\n<h4>Specifying run time parameters:<\/h4>\n<p>To utilize a Top Ten style list, you must use URL parameters to bypass the prompt page and pull in the top ten records.<\/p>\n<p style=\"padding-left: 60px;\"><strong>run=2<\/strong> &#8212; This specifies that you intend to skip the prompt page, and go directly to the output page of the report.<\/p>\n<p style=\"padding-left: 60px;\"><strong>cur_sort_col<\/strong> &#8212; This parameter controls the field you wish to sort your top ten list by.\u00a0 Substitute your field name for FIELDNAME.<\/p>\n<p style=\"padding-left: 60px;\"><strong>sort_type<\/strong> &#8212; This parameter controls whether you want your list in ascending or descending order. \u00a0 &#8220;1&#8221; specifies a descending list whereas &#8220;0&#8221; specifies an ascending list.<\/p>\n<p style=\"padding-left: 60px;\"><strong>top10<\/strong> &#8212; This parameter controls how many records you wish to have in your top ten list.<\/p>\n<p>The final URL will look similar to this example:<\/p>\n<p><code>\/DATADICTIONARY.R00010s?run=2&cur_sort_col=FIELDNAME&sort_typ=1&top10=10<\/code><\/p>\n<p>An example of a finished report:<\/p>\n<p><a href=\"https:\/\/www.mrc-productivity.com\/techblog\/images\/top10.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-9260\" alt=\"top10\" src=\"https:\/\/www.mrc-productivity.com\/techblog\/images\/top10.png\" width=\"320\" height=\"343\" srcset=\"https:\/\/www.mrc-productivity.com\/techblog\/images\/top10.png 400w, https:\/\/www.mrc-productivity.com\/techblog\/images\/top10-279x300.png 279w\" sizes=\"auto, (max-width: 320px) 100vw, 320px\" \/><\/a><\/p>\n<p>Changing the parameters in the URL allows you to easily build a range of ad hoc reports based off of a single application.\u00a0 For instance, changing sort_type to equal &#8220;0&#8221; will sort the report in descending order.\u00a0 This allows you to easily switch between a Top-Ten Style list and a Bottom-Ten Style list.<\/p>\n<p><!-- End Content --><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Top-Ten Style Reports Reports can be used to create fully functional Top-Ten lists, restricting output to a specified number of records sorted by your sequence key.\u00a0 While you can create a Top-Ten list for the detail level, this document will describe how to create a Top-Ten list based upon a&#8230;<\/p>\n","protected":false},"author":1,"comment_status":"closed","ping_status":"open","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[],"ht-kb-tag":[],"class_list":["post-9247","ht_kb","type-ht_kb","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/ht-kb\/9247","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9247"}],"version-history":[{"count":27,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/ht-kb\/9247\/revisions"}],"predecessor-version":[{"id":11716,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/ht-kb\/9247\/revisions\/11716"}],"wp:attachment":[{"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9247"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=%2Fwp%2Fv2%2Fht-kb-category&post=9247"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=%2Fwp%2Fv2%2Fht-kb-tag&post=9247"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}