Consultor Eletrônico



Kbase P15054: How to handle the sort criteria on RB engine
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   1/31/2003
Status: Unverified

GOAL:

How to handle the sort criteria on RB engine?

FACT(s) (Environment):

Report Builder Engine

FIX:

Overriding the Sort Criteria

You can override the sort criteria at run time with a user-defined parameter. For
example, to specify the sort criteria, follow these steps:

1.In Report Builder, create a calculated field named Sort-Criteria with the following
expression:

CASE(RUNTIME-PARAMETER("SORTFIELD"), "NAME", Name, "STATE", State,

"ZIP CODE", Postal-Code, City)


Because the CASE function requires that all potential return values have the same data
type, you must list fields that have the same data type for sort criteria options.


2.Sort on the Sort-Criteria field.


3.When you run Report Engine, choose a sort criteria from the four choices (Name,
State, Postal-Code, or City), using the RB-OTHER-PARAMETERS parameter. For
example:

"SORTFIELD = NAME"


NOTE: If you override the sort order at run time, the sort will always be evaluated
by Report Builder.