44,39 €
IBM Cognos Report Studio is widely used for creating and managing business reports in medium to large companies. It is simple enough for any business analyst, power user, or developer to pick up and start developing basic reports. However, this book is designed to take the reader beyond the basics and into the world of creating more sophisticated, functional business reports.IBM Cognos 10 Report Studio Cookbook, Second Edition helps you understand and use all the features provided by Report Studio to generate impressive deliverables. It will take you from being a beginner to a professional report author. It bridges the gap between basic training provided by manuals or trainers and the practical techniques learned over years of practice.Written in a recipe style, this book offers step-by-step instructions for IBM Cognos Report Studio users to author reports effectively, allowing a reader to dip in and out of the chapters as they desire.
You will see a new fictional business case in each recipe that will relate to a real-life problem and then you will learn how to crack it in Report Studio.
This book covers all the basic and advanced features of Report Authoring. It introduces the fundamental features useful across any level of reporting. Then it ascends to advanced techniques and tricks to overcome Studio limitations. Develop excellent reports using dimensional data sources by following best practices that development work requires in Report Studio. You will also learn about editing the report outside the Studio by directly editing the XML specifications. You will discover how to build and use Cognos Active Reports, a new addition in IBM Cognos 10.
Provide richness to the user interface by adding JavaScript and HTML tags and using the different chart types introduced in IBM Cognos 10. The main focus is on the practical use of various powerful features that Report Studio has to offer to suit your business requirements.
Learn numerous techniques and hacks that will allow you to make the best out of your IBM Cognos 10 Report Studio.
Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:
Seitenzahl: 324
Veröffentlichungsjahr: 2013
Copyright © 2013 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: May 2010
Second edition: August 2013
Production Reference: 1200813
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-84968-820-8
www.packtpub.com
Cover Image by Vivek Sinha (<[email protected]>)
Authors
Ahmed Lashin
Abhishek Sanghani
Reviewers
Ramesh Parcha
João Patrão
Acquisition Editor
Joanne Fitzpatrick
Lead Technical Editor
Dayan Hyames
Technical Editors
Jalasha D'costa
Menza Mathew
Zafeer Rais
Amit Ramadas
Project Coordinators
Arshad Sopariwala
Venitha Cutinho
Proofreader
Paul Hindle
Indexers
Rekha Nair
Monica Ajmera Mehta
Production Coordinator
Shantanu Zagade
Cover Work
Shantanu Zagade
Ahmed Lashin is a highly motivated Information Technology (IT) professional with more than nine years of experience, most of it in the Business Intelligence and data warehousing domains. His core skills include a full set of BI tools, ETL, and data warehousing tools such as IBM Cognos, IBM DataStage, SAP BusinessObjects, Microsoft SQL Server BI SSIS, SSAS, and SSRS. Through his experience, he has been exposed to many industries such as banking and finance, oil and gas, education, and the automotive industry.
Currently, Ahmed is working as a Business Intelligence Lead in one of IBM's major global partners. He is also an IBM Certified Cognos Solution Expert.
This is Ahmed's first technical book. He is maintaining a technical blog at http://www.alashin.net. You can get in touch with him at <[email protected]>.
I would like to thank my beloved wife Esraa for all the encouragement and support she has given me. I would also like to thank my mother and my family.
I would like also to thank my partner Abhishek for his great work and his valuable comments. With your work, Cognos is much more fun.
A special thanks to Packt Publishing for their efforts. I am sure that I wouldn't have been able to complete this book without their support.
Abhishek Sanghani was born in India and attended Mumbai University, where he majored in Computer Engineering. He began his career in 2004 as a Business Intelligence and Cognos Consultant, and has worked with leading IT and financial services companies since then.
He pursued Finance Management along with his work in the field of Cognos and BI, successfully progressing and winning awards and certifications year-on-year. Presently, he is working in the United Kingdom, utilizing his skills of Cognos, SQL, BI, and data warehousing. In his free time, he writes technical blogs and also provides training/seminars on demand.
He first authored Packt Publishing's book IBM Cognos 8 Report Studio Cookbook, which was well received worldwide. He has recently composed a video course called IBM Cognos 10 Report Studio Fundamentals, which is available on the www.packtpub.com website for download as well as online streaming.
I would like to thank Ahmed for giving a new life and avatar to my Cookbook, making it suitable for Cognos v10.x. I am sure, this new book with its new content, easy-to-understand recipes, real-life examples, and v10 sample codes, will prove very useful to Report Studio users, project managers, developers, and business analysts.
I would also like to thank the whole Packt Publishing team for all the hard work and support. On a personal note, I would also like to thank my loving wife Dolly for the encouragement and for putting up with my IT nonsense at the dinner table.
Ramesh Parcha graduated with a degree in Mechanical Engineering from Gulbarga University and has been working in the IT industry for over 13 years now. He is presently working in NTTDATA as a Project Manager.
He has been working with IBM Cognos BI products since 2006.
Earlier in his career, he worked for SETKHAM, SIS Inoftech, and Dataformix Technologies, USA. He has worked on a few other books such as IBM Cognos Framework Manager, Video Course on IBM Cognos 10 Report Studio, and IBM Cognos 8 Report Studio Cookbook.
It was a great pleasure reviewing this book and I would sincerely like to thank Dayan and Arshad.
João Patrão is a technology leader with expertise in mobile development, application integration aligned with business and strategic goals, multi-disciplinary team management, and project delivery. As the IT Director of SUMA, he has built a responsive and proactive IT organization, with improvements to service delivery, standardization, and business/systems performance.
With a strong orientation to strategic and business objectives, he always looks for innovation and integration of different methods and technologies to create new solutions that can maximize the talent and the resources of the organization.
He has a background in Engineering and Computer Science at Instituto Superior Técnico (IST Lisbon) and has an Executive MBA from EGP-University of Porto Business School.
You might want to visit www.PacktPub.com for support files and downloads related to your book.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at <[email protected]> for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
http://PacktLib.PacktPub.com
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books.
If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access.
Get notified! Find out when new books are published by following @PacktEnterprise on Twitter, or the Packt Enterprise Facebook page.
I would like to dedicate this book to my beloved wife Esraa. Thank you for being you.
--Ahmed LashinI am dedicating this book to the smiling addition to my life, my daughter Siyara.
--Abhishek SanghaniIBM Cognos Report Studio is widely used for creating and managing business reports in medium to large-scale companies. It is simple enough for any business analyst, power user, or developer to pick up and start developing basic reports. However, when it comes to developing more sophisticated, fully functional business reports for wider audiences, report authors will need guidance.
This book helps you to understand and use all the features provided by the new version of IBM Cognos 10 Report Studio to generate impressive deliverables. It will take you from being a beginner to a professional report author. It bridges the gap between the basic training provided by manuals or trainers and the practical techniques learned over years of practice.
Chapter 1, Report Authoring Basic Concepts, introduces you to some fundamental components and features that you will be using in most of the reports. This is meant to bring all readers on the same page before moving on to advanced topics. It covers filters, sorting, aggregations, formatting and conditional formatting, and so on.
Chapter 2, Advanced Report Authoring, introduces you to the advanced techniques required to create more sophisticated report solutions that meet demanding business requirements. It covers cascaded prompts, master-detail queries, conditional blocks, defining drill links, and overriding the drill links. The most distinguishing recipe in this chapter is Writing back to the database.
Chapter 3, Using JavaScript Files – Tips and Tricks, explains how to manipulate the default selection, titles, visibility, and so on when the prompt page loads. It also explains how to add programmability like validating the prompt selection before submitting the values to the report engine. A favorite recipe in this chapter is Creating a variable width bar chart using JavaScript. The recipes in this chapter open a whole new avenue for you to progress on.
Chapter 4, The Report Page – Tips and Tricks, shows some techniques to break boundaries and provides some features in reports that are not readily available in the Studio. It also talks about showing images dynamically (traffic lights), handling missing images, dynamic links to external websites (for example, Google Maps), alternating drill links, showing tooltips on reports, minimum column width, and merged cells in Excel output.
Chapter 5, Working with XML, shows you how to edit the report outside the Studio by directly editing the XML specifications. The recipes in this chapter show you how to save time and quickly change references to old items, copy and paste the drill parameter mappings, and introduce you to important XML tags. The most intriguing recipe in this chapter is A hidden gem in XML – row level formatting.
Chapter 6, Writing Printable Reports, gives you tips and shows you the options available within the Studio to make the reports printable, as business reports need to be printed. This is often ignored during technical specification and development.
Chapter 7, Working with Dimensional Models, explains how when reports are written against a dimensional data source (or a dimensionally modeled relational schema), a whole new style of report writing is needed. You can use dimensional functions, slicers, and others. Also, filtering and zero suppression are done differently. This chapter talks about such options (as dimensional data sources are becoming popular again).
Chapter 8, Working with Macros, shows you that even though macros are often considered a framework modeler's tool, they can be used within Report Studio as well. These recipes will show you some very useful macros around security, string manipulation, and prompting.
Chapter 9, Using Report Studio Efficiently, shows you the Studio options and development practices to get the best out of Report Studio. It will include discussions about Studio options, setting time-outs, capturing the real query fired on a database, handling slow report validation, customizing classes, and so on.
Chapter 10, Working with Active Reports, introduces you to a new and powerful tool available in IBM Cognos 10 Report Studio called Active Reports. Active Reports allows you to create highly interactive and easy-to-use reports. You will learn some techniques that will change the way your reports look.
Chapter 11, Charts and New Chart Features, shows you how to use advanced features in charts available in IBM Cognos Report Studio. These features are based on the new charting engine that was introduced in IBM Cognos Version 10.
Chapter 12, More Useful Recipes, is an assorted platter of useful recipes, meant to show more workarounds, tricks, and techniques.
Chapter 13, Best Practices, shows you how to achieve code commenting, version controlling, regression testing, and so on. It will also show you some useful practices you should cultivate as standard during development.
Appendix, Recommendations and References, covers topics that are very useful for a Cognos report developer such as version controlling, Cognos mash-up service, and Cognos Go Office.
IBM Cognos Report Studio 10 (10.1 to 10.2) or any later version.
If you are a Business Intelligence or MIS Developer (programmer) working on Cognos Report Studio who wants to author impressive reports by putting to use what this tool has to offer, this book is for you. You could also be a Business Analyst or Power User who authors your own reports and who wants to look beyond the conventional features of Report Studio 10.
This book assumes that you can do basic report authoring, are aware of the Cognos architecture, and are familiar with Studio.
Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.
To send us general feedback, simply send an e-mail to <[email protected]>, and mention the book title via the subject of your message.
If there is a book that you need and would like to see us publish, please send us a note in the SUGGEST A TITLE form on www.packtpub.com or e-mail <[email protected]>.
If there is a topic that you have expertise in and you are interested in either writing or contributing to a book on, see our author guide on www.packtpub.com/authors.
Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.
Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the let us know link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.
Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.
Please contact us at <[email protected]> with a link to the suspected pirated material.
We appreciate your help in protecting our authors, and our ability to bring you valuable content.
You can contact us at <[email protected]> if you are having a problem with any aspect of the book, and we will do our best to address it.
In this chapter, we will cover the following:
In this chapter, we will cover some fundamental techniques that will be used in your day-to-day life as a Report Studio author. In each recipe, we will take a real-life example and see how it can be accomplished. At the end of the chapter, you will learn several concepts and ideas which you can mix-and-match to build complex reports. Though this chapter is called Report Authoring Basic Concepts, it is not a beginner's guide or a manual. It expects the following:
Based on my personal experience, I will recommend this chapter to new developers with two days to two months of experience. If you have more experience with Report Studio, you might want to jump to the next chapter.
In the most raw terminology, a report is a bunch of rows and columns. The aim is to extract the right rows and columns from the database and present them to the users. The selection of columns drive what information is shown in the report, and the selection of rows narrow the report to a specific purpose and makes it meaningful. The selection of rows is controlled by filters. Report Studio provides three types of filtering: detail,summary, and slicer. Slicers are used with dimensional models and will be covered in a later chapter (Chapter 7, Working with Dimensional Models). In the first recipe of this chapter, we will cover when and why to use the detail and summary filters.
Once we get the correct set of rows by applying the filters, the next step is to present the rows in the most business-friendly manner. Grouping and ordering plays an important role in this. The second recipe will introduce you to the sorting technique for grouped reports.
With grouped reports, we often need to produce subtotals and totals. There are various types of aggregation possible. For example, average, total, count, and so on. Sometimes, the nature of business demands complex aggregation as well. In the third recipe, you will learn how to introduce aggregation without increasing the length of the query. You will also learn how to achieve different aggregation for subtotals and totals.
The fourth recipe will build upon the filtering concept you have learnt earlier. It will talk about implementing the if-then-else logic in filters. Then we will see some techniques on data formatting, creating sections in a report, and hiding a column in a crosstab.
Finally, the eighth and last recipe of this chapter will show you how to use prompt's UseValue and DisplayValue properties to achieve better performing queries.
The examples used in all the recipes are based on the GO Data Warehouse (query) package that is supplied with IBM Cognos 10.1.1 installation. These recipe samples can be downloaded from the Packt Publishing website. They use the relational schema from the SalesandMarketing (query)/Sales (query) namespace.
The screenshots used throughout this book are taken from Cognos Version 10.1.1 and 10.2.
The output of the previous recipe brings the right information back on the screen. It filters the rows correctly and shows the highest selling product per product line for the selected shipment month.
For better representation and to highlight the best-selling product lines, we need to sort the product lines in descending order of quantity.
Open the report created in the previous recipe in Cognos Report Studio for further amendments.
In the report created in the previous recipe, we managed to show data filtered by the shipment month. To improve the reports look and feel, we will sort the output to highlight the best-selling products. To start this, perform the following steps:
The sort option by default works at the detailed level. This means the non-grouped items are sorted by the specified criteria within their own groups.
Here we want to sort the product lines that are grouped (not the detailed items). In order to sort the groups, we need to define a more advanced sorting using the Edit Layout Sorting options shown in this recipe.
You can also define sorting for the whole list report from the Edit Layout Sorting dialog box. You can use different items and ordering for different groups and details.
You can also choose to sort certain groups by the data items that are not shown in the report. You need to bring only those items from source (model) to the query, and you will be able to pick it in the sorting dialog.
