How to add a 'count' for the number of rows in a list report in the report header.

Technote (troubleshooting)


Problem(Abstract)

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.

Steps:
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:
count([Quantity]for report)
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).


Cross Reference information
Segment Product Component Platform Version Edition
Business Analytics Cognos 8 Business Intelligence Framework Manager
Business Analytics Cognos 8 Business Intelligence Report Studio
Business Analytics Cognos ReportNet ReportNet

Historical Number

1015034

Rate this page:

(0 users)Average rating

Document information


More support for:

Cognos 8 Business Intelligence
Report Studio

Software version:

1.1, 8.1, 8.2

Operating system(s):

Solaris, Windows

Reference #:

1339064

Modified date:

2009-12-17

Translate my page

Machine Translation

Content navigation