How to add a 'count' for the number of rows in a list report in the report header.
Resolving the problem
Add a Data Item in Query Explorer and a Layout Calculation in the report Header.
1. Open new list report in Report Studio (this example uses the GO Sales model).
2. Drag Retailer Name and Quantity to the work area.
3. Select Query Explorer, and from the toolbox, add data item to facts area
4. In the Expression Definition, select Functions,
5. From Query Items, paste Quantity, and edit the expression so that it looks like this:
6. Click OK.
7. Rename the data item to quantity_count.
8. In the Page Explorer, on Page1, from the toolbox, add a calculation (layout) to the header.
9. In the Expression Definition, drag quantity_count into the expression and then click OK.
10. 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: '
11. 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.</p>
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).
|Business Analytics||Cognos 8 Business Intelligence||Framework Manager|
|Business Analytics||Cognos 8 Business Intelligence||Report Studio|
|Business Analytics||Cognos ReportNet||ReportNet|