Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
IBM Cognos 10 Report Studio Cookbook, Second Edition

You're reading from   IBM Cognos 10 Report Studio Cookbook, Second Edition Getting the most out of IBM Cognos Report Studio is a breeze with this recipe-packed cookbook. Cherry-pick the ones you want or go through the tutorial step by step ‚Äì either way you'll end up with some highly impressive reports.

Arrow left icon
Product type Paperback
Published in Aug 2013
Publisher Packt
ISBN-13 9781849688208
Length 364 pages
Edition 2nd Edition
Arrow right icon
Toc

Table of Contents (21) Chapters Close

IBM Cognos 10 Report Studio Cookbook Second Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
1. Report Authoring Basic Concepts FREE CHAPTER 2. Advanced Report Authoring 3. Using JavaScript Files – Tips and Tricks 4. The Report Page – Tips and Tricks 5. Working with XML 6. Writing Printable Reports 7. Working with Dimensional Models 8. Working with Macros 9. Using Report Studio Efficiently 10. Working with Active Reports 11. Charts and New Chart Features 12. More Useful Recipes 13. Best Practices Recommendations and References Index

Creating sections


Users want to see the details of orders. They would like to see the order number and then a small table showing the details (product name, promotion, quantity, and unit sell price) within each order.

Getting ready

Create a simple list report with Sales order / Order number, Products / Product, Sales fact / Quantity, and Sales fact / Unit sale price as columns.

How to do it...

Creating sections in a report is helpful to show a data item as the heading of a section. When you run the report, separate sections appear for each value. There is a way to reconstruct the report, and this is how to do it:

  1. Click on the Order number column. Hit the Section button on the toolbar as shown in the following screenshot:

  2. You will see that Report Studio automatically creates a header for Order number and moves it out of the list.

  3. Notice that the Order number field is now grouped as shown in the following screenshot:

  4. Run the report to test it.

How it works...

The information we are trying to show in this report can also be achieved by normal grouping on order number. That will bring all the related records together. We can also set an appropriate group/level span and sorting for better appearance.

However, in this recipe, I want to introduce another feature of Report Studio called section.

When you create a section on a column, Report Studio automatically does the following:

  • It creates a new list object and moves the current report object (in our case, the existing list) inside that. This is report nesting. Both the inner and outer objects use the same query.

  • It creates grouping on the column selected for section, which is Order number in this case. It also creates a group header for that item and removes it from the inner list.

  • It formats the outer list appropriately. For example, hiding the column title.

There's more...

Some of the advantages of creating sections are as follows:

  1. As mentioned earlier, Report Studio does a lot of the work for you and gives you a report that looks more presentable. It makes the information more readable by clearly differentiating different entities; in our case, different orders. You will see mini-lists or tables, one for each Order number, as shown in the following screenshot:

  2. As the outer and inner queries are the same, there is no maintenance overhead.

See also

  • The Creating a nested report – defining the master-detail relationship recipe in Chapter 2, Advanced Report Authoring

You have been reading a chapter from
IBM Cognos 10 Report Studio Cookbook, Second Edition - Second Edition
Published in: Aug 2013
Publisher: Packt
ISBN-13: 9781849688208
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime