Our Blog

Tip of the Week: Allow Users to Dynamically Sort on a Numerical Column

By Craig Harding, Consultant for PerformanceG2

To try this, build a real simple list report and add staff name and revenue.

Add a value prompt to the report page. Name the parameter sort, and click ‘finish’. Add two static choices through the properties pane of the value prompt. For the first static choice, display value will be ascending with a use value of 1. For the second static choice, set the display value to descending, and the use value to -1.

Static Choices

You must add a default selection in order to avoid being prompted on report load. This can be done through the properties of the prompt. I put a value of 1 in the default selections for ascending.

Also, set the auto submit property to yes.

Add a data item to the query. The expression should read [Revenue]*?sort? (no need to type this, drag and drop from the insert-able objects pane). Name the data item sortkey and set the presort property to ascending.


Return to page one and select the list. The properties property of the list must have the sortkey checked.


Run the report to test.



Contact the Blogger

This entry was posted in Technical Concepts and Ideas, Tips and tricks and tagged , , , , , , , , , . Bookmark the permalink.

Comments are closed.

PerformanceG2 Menu