1. Open your report in Report Studio
2. Select any data item from your query (for example Quantity or Salesperson etc)
3. In the Expression Definition of selected data item , select Functions, Summaries, and then double-click count , and edit the expressionso that it looks like this:
count([Quantity]for report)
4. Click OK.
5. Rename the data item to quantity_count.
6. In the Page Explorer, on Page1, from the toolbox, add a calculation (layout) to the header.
7. In the Expression Definition, drag quantity_count into the expression and then click OK.
8. If desired, add a label for the count by adding a Text Item from the toolbox to the right of the quantity_count data item. Enter text: 'Row Count: '
9. Run the report.
Additional Step for Cognos 8
For the query calucation to have access to the value, we need to do two additional steps.
1. Select the Page object, and set the Query property to the query that contains the dataitem
2. Set the Properties property to expose the Quanity_count data item (by checking the box beside it).
good luck