Skip to Content mrc logo mrc logo
  • What is m-Power?
    Overview Demos Build Process Case Studies Specs Pricing Trial
    m-Power Resources
    Overview How-To Videos Webinars & Podcasts White Papers Fact Sheets
  • What does m-Power build?
    Solutions by Industry
    Overview Database Front-Ends AI Reporting CRM Systems Business Intelligence Dashboards Inventory Management Mobile Apps ERP Enhancements Modernization
    Spreadsheets to the Web MS Access to the Web B2B/Web Portals Scheduling Embedded Analytics Web Forms Workflow Data Exploration Budgeting & Forecasting APIs & Web Services Db2 Web Query Alternative
    Solutions by Industry
    Overview Manufacturing Government Foodservice Software Vendors Logistics & Supply Chain Software Consultants Healthcare
  • Development Services Training Mentoring
  • Overview Partners Press Releases Careers Events Contact Blog
  • Support Home FAQ Documentation Customer Portal Enhancements Updates Roadmap Techblog
Try m-Power

m-Power Manual

Browse:

  • Home
  • Deprecated Documentation
  • Top-Ten Style Reports
Back to Manual

Top Ten Style Reports

 

Reports offer you the ability to create fully functional Top-ten style lists which will restrict the output to a pre-specified number of records and sort by your Sequence field. This is perfect for creating simple reports where you only wish to show a certain set of records, for instance — the top highest sales regions. While you can create a "Top 10" list for the detail level, this document will illustrate the process for creating a "Top 10" based upon a Sub-total Level.

Let's say you are interested in seeing the top highest values based on a particular subtotal level. Or, perhaps, you are interested in utilizing one report to see both the top 10 and the lowest 10. You could create two separate applications, or you could use Method 2 — Top-10 Lists for a Subtotal Level.

Step 1: Build your application as you normally would — be sure, however to sequence on the field you wish to "group" your top 10 list. In this example, we will be "grouping by" product number. Note: Since we are grouping by Product Number, be sure Subtotal is set to "Yes".

Be sure to specify the Report Template. In addition, be sure the "Summary or Detail" report is set to "Summary". This will allow our page to print without showing the detail line by default.

Build your application. Now, through the URL line, we can actually specify all of our parameters at run time.

For instance, our initial screen would look something like this:

Rather than clicking submit, we can modify the URL from looking like this:

DD.R00010s

To

DD.R00010s?run=2&cur_sort_col=PYDOL&sort_typ=1&top10=10

Doing so would result in a screen that looked like this:

Let's go through the syntax of the URL:

DD.R00010s?run=2&cur_sort_col=PYDOL&sort_typ=1&top10=10

DD — Data Dictionary

R00010s — Application Number

run=2 — This specifies to the servlet that you intend to skip the prompt page, and go directly to the output page. Note: You can utilize Run=1 to further specify the report (Output format, levels of data included). Click here to find out how.

cur_sort_col — This parameter controls what field you wish to sort your top ten list. In our case, sorting by Last Years Sales sorts by the products that earned the most money.

sort_type — This parameter controls whether you want your list in ascending or descending order. A "1" specifies a descending list where a "0" specifies an ascending list.

top10 — This parameter controls how many records you wish to have in your top ten list.

As you can see, it is very easy to build many ad hoc reports simply based off of one m-Power generate report.

Using the same application, lets change the parameters so you can see how flexible this feature is:

Our new URL:

DD.R00010s?run=2&cur_sort_col=PRDNO&sort_typ=0&top10=20

This time sort by the Product Number, in ascending order and return back 20 records. The screen shot for this screen is below:

Created: February 29, 2008 | Modified: July 16, 2013

Search


Browse By Category

Build Process (13)
Starting with m-Power (8)
Retrievals (10)
Reports (15)
Summaries (4)
Maintainers (17)
Graphs (8)
m-Power Data Explorer (4)
General (24)
Calculations (5)
Utilities (9)
m-Power Administration (23)
Security (11)
Freemarker (6)
m-Painter (29)
Form Validation (5)
External Objects & UDFs (12)
Deprecated Documentation (23)
Bootstrap Templates (7)

Popular Tags

SQL Java Video Prompt Screens Getting Started Data Dictionary Retrievals Form Validation Security External Objects Compiling DB2 Summaries Calculations m-Painter Retrieval Performance Bar Graphs Advanced Parameters Maintainers Production Popular App Properties Dropdowns Reports Excel Freemarker RPG Bootstrap Templates Build Process mrc-Productivity Series Graphs Application Properties Tomcat Graph Properties Dates Administration Record Selections Report Graphing Database Admin Maintainer Email

See all tags »

mrc

Build the custom apps and AI tools your business needs with m-Power, or have our Chicago-based team build them with you. One platform, one team that makes sure you succeed.

Since 1981 · 1,500+ customers · 4.7/5 on G2

m-Power
Overview Demos Build Process Licensing Specs Get a Demo
Solutions
Database Front-Ends Reporting AI Tools Dashboards ERP Enhancements Modernization See all solutions
Company
Case Studies Services About Blog Careers Contact Support

Privacy Policy Cookie Policy Cookie Settings

michaels, ross & cole, ltd. (mrc)
US: 2001 Midwest Road, Suite 310, Oak Brook, IL 60523 · 630-916-0662
UK: Mortlake Business Centre, 20 Mortlake High Street, London, SW14 8JN · +44-20-335-59566
© mrc. All rights reserved.