Sie sind auf Seite 1von 6

Introduction

Purpose

This document describes an approach that can be used to dynamically sort on a


Numerical Column.

Applicability

This document was tested in IBM Cognos 8.4.

Back to top

Creating the Report

Creating a simple List report using ‘GO Sales (query)’ package

1. Open Report Studio using GO Sales (query) Package.


2. Select 'Create a new Report or Template'.
3. Select 'List' and Click OK.
4. Drag Staff name and Revenue from the package into List Report.

Creating Value Prompt

5. In the Insertable object pane, click on Toolbox Tab.


6. Drag a value prompt to the report page.
7. Name the parameter 'Sort' and click ‘Finish’.

8. Highlight the added prompt and add two static choices through the properties
pane of the value prompt. For the first static choice, display value will be
ascending and set the use value to 1. For the second static choice, set the display
value to descending, and the use value to -1.

9. Add a default selection in order to avoid being prompted on report load. This can
be done through the properties of the value prompt. Put value 1 in the default
selection for ascending.
10. In the properties of the value prompt, set Auto-Submit property to Yes.

Creating Data Item

11. Hover over Query Explorer and click on Query1. In the Insertable Object, click
on the toolbox tab and add a Data Item to the query.
12. Click on the Source tab and drag and drop Revenue from the Insertable object
pane to the expression definition. Then modify the expression to look like the
following:
[Sales (query)].[Sales].[Revenue]*?Sort?
13.
Click OK.
14. In the Data Item properties, name the data item sortkey and set the Pre-Sort
property to 'Sort ascending'.

15. Return to Page1. Select the in the properties window List.


16. In the List properties select Properties, have the sortkey checked.

17. Click the lock button on the toolbar to unlock the layout. The button should
change to look like the image below.
18. Drag value prompt in the column header near revenue.

19. Select Revenue and delete it. Drag a 'Block' from toolbox above the value prompt
and drag and drop 'Text Item' into the 'Block'. Type Revenue in the 'Text Item'.
Again, click on lock button to lock the report layout.

20. Run the report. Revenue is in Ascending order.


21. Select Descending from the drop down. Revenue in Descending order.

About the author

Das könnte Ihnen auch gefallen