What is a database ranking, Creating a database ranking – HP Intelligent Management Center Standard Software Platform User Manual

Page 480

Advertising
background image

What is a database ranking?

Database rankings allow you to answer questions like "what are the top three
customers, based on the revenue they generated for each year?" at the
query level, without the need to return data that falls outside the ranking to
Crystal Reports. You can then filter this data using a ranking.

When you rank data you sort and filter it according to ranking criteria. This
process is much like selecting Top or Bottom N values when sorting groups
in Crystal Reports. For more information, see

Selecting top or bottom N

groups or percentages

.

A database ranking allows you to specify a ranking at the query and database
level so that the data returned to Crystal Reports by the query is already
ranked. This has the following advantages:

Ranking data can be processing-intensive. By ranking at the database
level you allow the server, which is typically far more powerful than the
client machine, to perform this processing.

Pre-ranking data reduces the amount of data retrieved across the network
and stored in Crystal Reports.

Note:

You can perform a database ranking only if your database supports it. If
this is not the case, the "Add a top bottom" button is disabled on the Query
Panel toolbar. Databases that support ranking are Oracle, DB2, Terradata
and Redbrick.

Crystal Reports uses the SQL-99 Rank function in ranking SQL.

SQL is the query language supported by all relational databases (RDBMS),
although each database has its own syntax.

Creating a database ranking

You create a database ranking in the Query Filters pane of the Query Panel.

Note:

You can mix database rankings and other types of query filter in the Query
Filters pane.

480

Crystal Reports 2008 SP3 User's Guide

Building Queries

18

Filtering data using subqueries and database ranking

Advertising