In this article, we will learn How to use Group in IBM Cognos 10 Reports?
For the demo report, we will use go sales query FM Model. If you are using IBM Cognos 10.2.1 Developer edition, you can find Go Sales query FM Model at Public Folders > Samples > Models > GO Sales (query) ?. Open report studio with Go Sales FM Model.
Create a new Blank report with a list in it. In List add Country, Product Line, Product brand, and Revenue data items. Add an ascending sorting for Country, Product Line, and Product Brand.
To apply group to any data item select it and apply group on it. You can also find Group and Ungroup option at Structure Menu -> Group / Ungroup.
Let's run the report.
All the grouped data item is not repeating itself. This is the default behavior for all the grouped data items. If you want to repeat the grouped data item, you can modify the Group Span property.
Group Span property control how grouped column displayed based on its subsequent column values. In the above example, we have multiple product lines in each country. When we applied a group on Country and Product line Country is not repeated for all the product lines available for a particular country. If you want to display country in front of each product line, you can change the Group Span Property.
For the demo, we changed the group span property for the country column. We changed it to Product Line. The options may vary based on the grouped column. It's time to run our report for new changes.
Revert the group span changes. Next, we will look at Group Summary.
Why we need Group? It is a good question. When we did not apply grouped on our List our list displays the query output. We are not able to find any useful information from it. Let's say we need to find answers What is the revenue for a particular country? Then we can use the group. We can apply group on Country and then we can add a Group summary on revenue column. It will add a total for each country. This way we can answer the revenue for the country Australia is "$ 123" for a particular year. So where is the year? For the time being ignored it. We didn't add the year in our report to reduce the complexity.
How to add the Group Summary?
We need a summary or total for revenue. Select it and from the toolbar, select Automatic Summary. From menu Data -> Summarize.
Please login to post your valuable comments.