PacktLib: IBM Cognos 8 Report Studio Cookbook

IBM Cognos 8 Report Studio Cookbook


About the Author

About the Reviewers


Report Authoring Basic Concepts


Summary filter and detail filter

Sorting grouped values

Aggregation and rollup aggregation

Implementing IF THEN ELSE in filters

Data formatting options: Dates, numbers, and percentages

Creating sections

Hiding column in crosstab

Prompts: Display value versus use value

Advanced Report Authoring


Adding a cascaded prompt

Creating nested report: Defining master detail relationship

Writing back to the database

Adding conditional formatting

Running difference: Negative values in brackets and red

New conditional styling with v8.3 onwards

Conditional block: Many reports in one

Drill-through from crosstab intersection

Overriding crosstab intersection drill-through definition

Tips and Tricks: JavaScripts


Dynamic default value for prompt

Changing title of the dropdown box

Listbox: Applying Deselect All on rerun

Validating textbox prompts

Show/Hide prompt controls at runtime

Automatic selection and submission of values

Manipulating Date Time control

Variable width bar chart using JavaScript

Tips and Tricks: Report Page


Showing images dynamically (Traffic Light report)

Handling missing image issue

Dynamic links to external website (Google Map example)

Alternating drill link

Showing tool tip on reports

Achieving minimum column width

Merged cells in Excel output

Worksheet name in Excel output

Conditional column titles

XML Editing


Quickly changing drill targets

Copy-pasting drill link

Removing references to old package and namespaces

A hidden gem in XML—row level formatting

Writing Printable Reports


Container size and rows per page

Eliminating orphan rows

Defining page orientation and size (also override for one page)

Avoiding page title repetition

Horizontal pagination

Choosing output format from prompt

Choosing right colors

Defining page set

Caution about HTML items and JavaScript

Working with Dimensional Models


List report or crosstab report

Filtering rows or columns

Filtering whole report

Adding prompt into slicer and its limitation

New feature for zero suppression

Level independent MUN for parent child hierarchy

Aggregation versus pre-aggregated values

RoleValue() function

Swapping dimensions using string manipulation



Add data level security using CSVIdentityMap macro

Using prompt macro in native SQL

Making prompt optional

Adding token using macro

Using prompt and promptmany macros in query subject

Showing the prompt values in report based on security

String operations to get it right

Showing user name in footer

Using Report Studio Better


Report Studio environmental options

Copy-pasting partial or full report

Copy-pasting whole reports—8.2 to 8.4 possible

Setting execution time out

Setting maximum rows limit

Handle slow report validation

Capturing query

Browsing values from data expression window

Page structure view

Pick-up and apply style

Grab them all practice

Some More Useful Recipes


Timing report execution

Missing value versus zero value

Over-riding data formatting defined in database

Conditional drill-through

Dynamically switching reports using iFrame

Best Practices


Reducing number of query items

Highlighting hidden items

Relative path for images

Taming the JavaScripts

Customize classes for report-wide effect

Creating templates

Regression testing

Code comments

Recommendations and References

Recommendations and References

Recommendations and References

Recommendations and References

Recommendations and References

Recommendations and References

Recommendations and References

Recommendations and References

Recommendations and References