Report Authoring Guide
Report Authoring Guide
Report Authoring Guide
January 2019
NOTICES
This information was developed for products and services offered in the USA.
IBM may not offer the products, services, or features discussed in this document in other countries. Consult your local IBM representative for
information on the products and services currently available in your area. Any reference to an IBM product, program, or service is not intended to
state or imply that only that IBM product, program, or service may be used. Any functionally equivalent product, program, or service that does not
infringe any IBM intellectual property right may be used instead. However, it is the user's responsibility to evaluate and verify the operation of any
non-IBM product, program, or service. IBM may have patents or pending patent applications covering subject matter described in this document.
The furnishing of this document does not grant you any license to these patents. You can send license inquiries, in writing, to:
IBM Director of Licensing
IBM Corporation
North Castle Drive, MD-NC119
Armonk, NY 10504-1785
United States of America
The following paragraph does not apply to the United Kingdom or any other country where such provisions are inconsistent with local law:
INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in
certain transactions, therefore, this statement may not apply to you.
This information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these
changes will be incorporated in new editions of the publication. IBM may make improvements and/or changes in the product(s) and/or the
program(s) described in this publication at any time without notice.
Any references in this information to non-IBM websites are provided for convenience only and do not in any manner serve as an endorsement of
those websites. The materials at those websites are not part of the materials for this IBM product and use of those websites is at your own risk.
IBM may use or distribute any of the information you supply in any way it believes appropriate without incurring any obligation to you. Information
concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available
sources. IBM has not tested those products and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM
products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products.
This information contains examples of data and reports used in daily business operations. To illustrate them as completely as possible, the
examples include the names of individuals, companies, brands, and products. All of these names are fictitious and any similarity to the names and
addresses used by an actual business enterprise is entirely coincidental.
TRADEMARKS
IBM, the IBM logo, ibm.com, and Cognos are trademarks or registered trademarks of International Business Machines Corp., registered in many
jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is
available on the web at “Copyright and trademark information” at www.ibm.com/legal/copytrade.shtml.
Adobe, and the Adobe logo, are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States, and/or other
countries.
Microsoft, Windows, and the Windows logo are trademarks of Microsoft Corporation in the United States, other countries, or both.
© Copyright International Business Machines Corporation 2019.
This document may not be reproduced in whole or in part without the prior written permission of IBM.
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
ACCESSIBILITY
Accessibility features assist users who have a disability, such as restricted mobility or limited vision, to use information technology content
successfully. Many IBM products include accessibility features for navigating the user interface, and for authoring reports so that they're accessible
for yourself or others. Please consult the product documentation for an overview of accessible product features. Online product documentation can
be accessed at the IBM Knowledge Center (http://www.ibm.com/support/knowledgecenter/).
Course information
Course overview
This course provides authors with an introduction to build reports using Cognos
Analytics. Techniques to enhance, customize, and manage reports will be explored.
Activities will illustrate and reinforce key concepts during this learning opportunity.
Intended audience
Authors
Course prerequisites
Participants should have:
• Knowledge of your business requirements
• Experience using IBM Cognos Analytics as a consumer
Course outline
• What is IBM Cognos Analytics - Reporting?
• Dimensionally modeled relational data
• Use personal data sources and data modules
• Examine list reports
• Aggregate fact data
• Multiple facts and repeated information
• Add repeated information to reports
• Create crosstab reports
• Create complex crosstab reports
• Work with crosstab data
• Create discontinuous crosstab reports
• Create visualization reports
• Focus reports using filters
• Focus reports using prompts
• Use calculations
• Customize reports with conditional formatting
• Drill-through definitions
• Enhance report layout
• Use additional report-building techniques
Recently modified data assets are displayed as tiles in the middle of the page.
Country Revenue
<Country> <Revenue>
• Author by using the actual data values in the report, in Page preview mode.
Country Revenue
• From the Side bar on the left, click New , and then click Report.
• From the Templates and themes page, click Blank, and then click OK.
Add a data source.
• From the Insertable objects pane on the left, click Select sources .
• On the Open file dialog window, browse in the Team content folder to Samples >
Models > GO Data warehouse (query), and then click Open.
• From the Application bar, click the Page design list , and then
from the list, click Page preview.
• If the Properties pane is open on the right, from the Application bar, click Show
Properties to close it and create more room on your report canvas.
The Properties icon works in toggle fashion to open and close the Properties pane.
• From Insertable objects, expand the Sales fact query subject, and then drag
Revenue to add it to the end of the list (you should see a flashing black bar inside
of a white bar, indicating the correct drop zone).
If you place the data item outside of the list, a message opens stating that IBM
Cognos Analytics - Reporting created a singleton. You want the new data item to
be added to the end of the list. If a singleton is created, undo your last action, and
then redo the previous step.
You would now like to modify the order of the columns.
• From the Insertable objects pane, click Data items , and then click Query1.
The data items that you added to the list appear under Query1. The names of the
data items correspond to the column titles in the report layout.
• From, the navigation menu, click Report to expand the Report list menu.
• Click Query1.
The Data Items pane is displayed in the middle section.
You want to view information about a data item, including how it retrieves data from
the data source.
• From the Data Items pane, double-click Position name.
The Data item expression dialog box opens.
Remove a column.
• In the list report object, click a data cell for Employee level (not the header), and
then from the on-demand toolbar, click Cut .
The column is removed from the list.
• From the navigation menu, click Report > Queries > Query1.
The Employee level data item that you cut still appears in the Data Items pane.
Although you removed it from the report layout in the Pages view, the data item is
not removed from the query. Keeping the data item in the query can be useful for
tasks such as creating a calculation. Examples of where you would keep a data
item in the query, but remove it from the report layout include: creating an
expression based on the data item, sorting, or formatting data in the list by using
the data item.
• From the navigation menu, click Report > Pages > Page1 to return to the work
area.
• From the on-demand toolbar, click Sort , and then click Descending.
Values for each of the attributes are sorted in descending order based on the
values of the measure data item.
• With the Revenue column still selected, from the on-demand toolbar, click
Data format .
• In the Data format dialog box, in the Format type list, click Currency.
• Under Properties, in the Currency property, scroll down the list, and then click
$ (USD) - United States of America, dollar.
The values for the measure data item are displayed in American dollars. By
default, this format uses a comma as a Thousands separator, and two decimal
places. The specific format that you choose should be based on the nature of the
measure data item that is used in the report. For example, a measure such as
revenue would be formatted as currency. A measure such as percentage of gross
revenue would be formatted as a percentage.
• Click OK to close the Data format dialog box.
• From the Application bar, click Run options , and then click Run HTML.
A new browser tab opens with the list report rendered and the measure data items
are sorted in descending order, and are formatted in currency.
• At the bottom of the page, click Page down several times to browse to some of the
additional pages of the report.
• In your browser, close the rendered New report tab.
• Click the Country column header, from the on-demand toolbar, click Filters ,
and then click Edit filters.
• In the Filters - Query1 dialog box, click Add , in the Create filter dialog box,
ensure that Custom based on data item is selected, and then click OK.
• In the Find box, point to Brazil, and then click the plus sign beside Brazil to
add the item to the pane on the right.
• Repeat for Germany, ensure that the Keep these values option is selected, and
then click OK.
• Click OK to close the Filters - Query1 dialog box.
• Run the report again in HTML.
The report now only contains data for Brazil and Germany.
• From the Application bar, click Run options , and then click Run Excel data.
You are prompted to Open or Save.
• Click Open.
The report renders in Microsoft Excel format, and includes all of the formatting and
filters previously applied.
• Close Microsoft Excel, and then close the browser tab that includes the rendered
report.
• At the top of the page, in the middle of the Application bar, expand the
Switcher menu list (the down arrow next to New report*).
The result appears as follows:
• Beside New report*, click Remove , and then click Close without saving.
• Leave IBM Cognos Analytics open for the next activity.
• In the center of the work area, click Add , click List, and then click OK to
accept the default options in the Object and query name dialog box.
• On the Sources tab, expand Sales and Marketing (analysis).
The folders in the Sales and Marketing (analysis) folder appear.
The Members folder and the Region code query item appear in the data
tree.
• Under Region, expand the Members folder (under Region) to see the five sales
regions.
The result appears as follows:
The member and measure data items are displayed in the list.
Drill up and drill down.
Because the report contains dimensionally modeled relational data, you can drill down
to a greater level of detail than in a relational model.
• From the Application bar, click Run options, and then click Run HTML.
• In the report, click 2011 in the first column (not the header), and in the on-demand
toolbar, click Explore , and then click Drill Down.
You navigated to a lower level of detail and displayed data for each quarter of
2011. In the 2011 column of data, you can click one of the values (for example,
Q3 2011), click Explore, and then click Drill Up to drill back up if you want.
• Click Page 1 1 so that the columns and data appear in the Preview data pane.
• In the Preview data pane, right-click the Retailer country column header, and
then click Create navigation path.
The Create navigation path dialog box appears.
• In the left pane, expand Page 1 1, and then drag Province Or State to the right
pane below Retailer country.
You can organize the columns in the right pane so that they appear in an
appropriate navigation order, such as from Country, to Province Or State, to City.
The Name box provides a default name for the path, but you can edit it if desired.
• Click OK.
• At the top of the Data module pane, click Identify navigation path members .
The columns that were added to the navigation path appear underlined in the Data
module pane.
• Click My content , in the Save as box, type Sales data module, and then
click Save.
• On the Application bar, expand the Switcher menu list and then remove all items
from the list.
Create a report from the data module.
• Create a new report that uses the Blank template.
• Under the Insertable objects pane, on the Sources tab, click Select sources
.
• Click My content , click Sales data module, and then click Open.
• In the work area, click Add , click List, and then click OK.
• In the Sources tab, expand Sales data module > Page 1 1, and then drag
Product, Retailer, and Retailer country, one at a time, to the list.
• Drag Revenue to the right of the last dimension type data item.
• Click the Sources tab , scroll to the bottom of the Insertable objects pane,
and then expand Navigation paths > Retailer Country - City.
The Navigation paths that were created in the data module are visible at the
bottom of the Data items list.
• From the Application bar, click Run options, and then click Run HTML.
The report is rendered containing data from the data module.
• Click the Retailer country column header.
The report updates to show data for Province Or State, rather than Retailer
country.
• Close the rendered New report tab.
• From the Application bar, expand the Switcher menu list.
• Beside New report, click Remove, and then click OK to close without saving.
• Leave IBM Cognos Analytics open for the next activity.
The data items are displayed in the list in the order in which they were added.
• From the Application bar, click Run options, and then click Run HTML.
• Click Bottom to view the final rows of the report, noting that no summary data is
available.
• Close the rendered New report tab.
• From the Side bar, click Toolbox , and then drag a Block to the left of and
above the list.
Note: Drop the block outside the list and not inside the list.
The block appears above the list.
• From the Toolbox, drag a Text item and drop it inside the Block.
• In the Text dialog box, type Product type Sales and Revenue by Product, and
then click OK.
• From the on-demand toolbar, click Font, and then under Family, click Arial.
• In the Size list, click 16pt, under Effects, select Underline, and then click OK.
In this example, Product type is spanned by Product. Every time the value for
Product changes the value for Product type is repeated.
• Close the rendered New report tab.
Add headers.
Add a page header for the report and an overall header to add additional information to
the report.
• With the list column body still selected, from the on-demand toolbar, click
Data format .
• In the Data format dialog box, in the Format type list, click Currency.
• Under Properties, click Currency, in the list, select
$ (USD) United States of America, dollar, and then click OK.
Format the list column body.
• Click the <Retailer type> list column body, and then from the on-demand toolbar,
click Font.
• In the Family list, click Arial, and then in the Style list, click Italic.
• Click Foreground color, and then under Basic colors, click Purple.
• Click OK, and then click OK again.
The font properties are applied to the body cells in the column.
• With Retailer type still selected, from the on-demand toolbar, click
Select ancestor , and then click List column.
• From the on-demand toolbar, click Font.
• In the Family list, click Arial, in the Size list, click 12pt, and then in the Weight list,
click Bold.
• Click Foreground color, and then under Custom color, click Green.
• Click OK, and then click OK again.
The color property is applied only to the column title because the column body
formatting overrides the column formatting. However, because you have not set
the size or weight for the column body, the value in the cells now appears in 12pt
bold font.
Add totals and sort.
• Click the <Revenue> column body.
• From the on-demand toolbar click Summarize, and then click Total.
• Click the container selector to select the entire list, and ensure that the
Properties pane shows List at the top.
The data items that were previously grouped appear under the Groups folder.
• In the Groups pane, expand Product line, and then from the Data items pane,
drag Revenue to the Sort list folder.
The affected portion of the Groups pane appears as follows:
The Product line column will now be sorted in ascending order based on the
revenue generated by each product line. The product line that generated the least
revenue will appear at the beginning of the report.
• Click OK, and then from the Application bar, run the report in HTML.
In the example above, the report displays Quantity and Revenue for each Retailer
type, for each Product, Product type, and Product line. Because you sorted the
Revenue column in descending order, Retailers with the highest revenue appear
first. Because you sorted Product line by Revenue in ascending order, the Product
line with the lowest revenue (in this case Outdoor Protection) appears first in the
list.
• Take a few moments if you like to Page down and scroll through the list and
examine the report.
• When you are finished examining the list, close the rendered New report tab.
• From the Application bar, click Show properties to close the Properties pane.
• From the Application bar, open the Switcher menu list and remove the new
report without saving.
• Leave IBM Cognos Analytics open for the next activity.
This example shows revenue for each product line for each employee, as well as the
total for all product lines for each employee. Depending on the type of measure that is
used in your report, you can also show minimum, maximum, average, total, count, or
calculated data.
In Framework Manager, used to create data models for Cognos Analytics - Reporting,
default data item properties can be set. Two of these properties are Rollup Aggregate
function and Aggregate function.
Rollup Aggregate Function specifies the type of aggregation to apply to summary
values. These values appear at the higher levels of lists and crosstabs. The default
setting is Automatic. The setting of Automatic indicates that the aggregation that is
applied is based on the data type of the query item. Therefore, an integer data type with
Rollup Aggregate set to automatic provides total aggregation. In the example, the
Rollup Aggregate function is set to Total on the Revenue data item.
The Aggregate function specifies the type of aggregation to apply to individual values
that appear as detail rows in lists or crosstabs.
Identify differences in aggregation
Data items that are selected from the source tab are calculated and summarized before
aggregation. Data items that are selected from the Data Items tab will be calculated and
summarized after aggregation.
Fact data items should be selected from the Data items tab if they are to be used
multiple times in a report or calculation, since they would not be re-aggregated based
on the entire query. This process prevents any double counting of the fact data item
and provides predictable results.
• From the navigational menu at the top , click Report > Queries >
Query1.
The three data items in the Data Items pane each correspond to an item in a
column in the list.
• In the Data Items pane, click Revenue, and then from the Application bar, click
Show properties (if the properties pane is not already visible for Revenue).
The Properties pane shows that the Detail aggregation property is set to Total.
Data in the query is grouped and summarized at the lowest level of detail, by
calculating the total revenue generated at that level. In the report, the lowest level
of detail is the last attribute item before the measure data item was added.
The report shows the revenue that is generated by each order method for each
product line.
• Close the rendered New report tab.
View individual records.
You want to review the individual records that make up the summary level totals. To
achieve this result, set the Auto Group & Summarize property for this query to No.
• In the navigation menu, click Query1 > Query 1.
• From the Properties pane, under DATA, click the Auto group & summarize
property, and then in the list, click No.
• Run the report in HTML again.
The report no longer displays a single row for the totals. In this example, the report
shows rows containing the individual measure values that make up the summary
totals that were previously displayed.
In this example, the data is grouped by the Product line (highest level data item).
For each Camping Equipment value at this level, there is a displayed aggregate
row showing the average value of all values for the Order method type.
• Close the rendered New report tab.
• On the Application bar, expand the Switcher menu list and remove the
New report without saving.
• Leave IBM Cognos Analytics open for the next activity.
In this example, these are two distinct aggregated totals, and were returned as a
result of two separate Select statements.
• Close the rendered New report tab.
Add context.
You want to include an attribute type data item to give context and meaning to the
measure type data items. For example, if the report contained Revenue and Sales
target, you could add the year in which the orders closed as a point in time to compare
Revenue to Sales target.
• From the Sales (query) namespace, add the following query item to the beginning
of the report:
• Time (close day): Year (close date)
• Run the report in HTML.
The Revenue values change with each year, but the Sales target values do not.
This is because the Time (close day) is not a conformed dimension. This
dimension is not shared by both the two facts: Sales fact and Sales target. The
Sales target fact has no relationship to Time (close day).
• Close the rendered New report tab.
Add a query item from a conformed dimension.
You will add a shared dimension to the report. This dimension will have a relationship to
both Revenue and Sales target.
• Examine the time-related query subjects under Sales (query) and
Sales target (query).
The Time (close day) query subject exists in the Sales (query) namespace, but not
in the Sales target (query) namespace. This tells you that Time (close day) is not
shared across the facts, and therefore is not a shared dimension.
The Time query subject exists in both the Sales (query) and Sales target (query)
namespaces; therefore, it is a shared dimension.
• Under Sales (query), expand Time, and then drag Year to the beginning of the
list.
• Run the report in HTML.
The Sales target numbers now change from year to year. In 2010, there was
7,060,666.21 worth of orders that were placed in that year, but did not close until
2011. The orders that were placed in 2010 and closed in that same year totaled
907,292,137.51. Because Sales target has no relationship to the non-conformed
dimension, Year (close date), it just repeats the value it knows for 2010. This is an
example of the inaccurate results that can occur when using non-conformed query
items with multi-fact reports. Therefore, it is best to use conformed query items.
• Close the rendered New report tab.
The values for the measure type data items now make sense and there are no
repeating values.
• Close the rendered New report tab.
• On the Application bar, expand the Switcher menu list, and then remove the
New report without saving.
• Leave IBM Cognos Analytics open for the next activity.
• Under Insertable objects, click the Toolbox tab , and then expand DATA
CONTAINER.
• Drag a Repeater table object to the report, and then click OK to accept the default
options.
• In the Toolbox pane, drag a Table object to the drop zone in the Repeater table
object, in the report.
• In the Insert table dialog box, change the number of columns to 1, the number of
rows to 7, and then click OK.
The work area now contains a two-column, three-row repeater table containing six
tables, each having one column and seven rows.
Add items to the table.
• One at a time, drag Address 1, Address 2, City, Province or State, Postal zone,
and again, Country into the Data Items pane.
When you add multiple instances of the same query item, subsequent items will be
numbered to show that it is a duplicate entry. Then they can be treated as two
separate data items. In the example above, the Country query item has been
added twice. The first instance appears as Country, while the second instance
appears as Country1.
• From the navigation menu, click Report > Pages > Page1.
All of the <Country> data items at the top of each table are selected.
• From the on-demand toolbar, click Sort, and then click Ascending.
A Sort Ascending icon appears beside the data item that represents country in the
first table.
• From the on-demand toolbar, click Font, and then in the Size list, click 12 pt.
• In the Weight list, click Bold, and then click OK.
Change the frequency and positioning of the tables.
• In the upper left corner of the Repeater table, click the container selector to
select the entire container.
• From the Application bar, click Show properties, if necessary.
• In the Properties pane, under GENERAL, change value for the Across property
to 3, change the value of the down property to 4, and then press Enter.
• In the Properties pane, under POSITIONING, double-click Table properties,
select the Fixed size check box, and then click OK.
• In the upper left corner of the first table, click the container selector to select all
of the tables.
You should only see the individual tables selected, not the Repeater table.
• In the Properties pane, under BOX, double-click Margin.
• In the Right margin and Top margin boxes, type 10, and then click OK.
This adds the appropriate space for the printed labels.
• From the Application toolbar, click Run options, and then click Run PDF.
The report is displayed in PDF format. PDF would be the appropriate run output for
mailing labels. Notice that the sort is in ascending order within each column of
tables.
• Close the rendered New report tab.
• On the Application bar, expand the Switcher menu list, and then remove the
New report without saving.
• Leave IBM Cognos Analytics open for the next activity.
This image shows the location of data items and measures in a crosstab format.
Crosstab edge cells have four drop zones: one on each side, one at the top of the cell,
and one at the bottom of the cell. Use the crosstab drop zones to add items as parents,
peers, or children of other items in the crosstab. Using crosstab drop zones, you can
quickly create crosstabs using drag-and-drop functionality.
Add measures to a crosstab
Any data item that can be aggregated can be added to the crosstab as the measure.
The measure defines the data in the report, such as revenue, quantity, or profit margin.
You can add measures to the body of the report or to either the row or column edges. A
measure added to the body of the report is known as the default measure. It is used in
cells where the measure is not defined on the row or column edge.
Regardless of where a measure is added, the crosstab fact cells contain the measure
values.
In crosstabs, you can show values as a percentage of a summary instead of the actual
values. For example, you can show the revenue that was generated by each product
line as a percentage of the total revenue.
The report shows yearly revenue for each order method on columns. If your report
contains numerous data item values on the rows or the columns, you can swap the
rows and columns to make it easier for consumers to read the report.
• Close the rendered New report tab.
• Click the container selector to select the entire crosstab.
Both measure data items are now nested in the rows of the crosstab.
• Close the rendered New report tab.
Country has no measure associated with it, since Revenue and Quantity are
children of Product line only.
Both revenue and quantity appear for each Product line, while only revenue
appears for each country, as expected. You can examine the values for the nested
child measure data items for two different peer data items on the crosstab rows
edge.
• Close the rendered New report tab.
Add an item as a column peer.
• Under Insertable objects, click Sources , expand Time, and then drag Year
to the left of <#Order method type#> in the Columns area of the crosstab.
The correct drop zone appears as follows:
A <#Year#> column now appears to the left of the <#Order method type#> column.
• Click the <#Year#> column header, and from the on-demand toolbar click Sort,
and then click Ascending.
You can examine revenue generated and quantity sold for your product lines as
well as by different order methods. You can also examine the revenue generated in
different countries by different order methods. For example, you can see that no
Mountaineering Equipment was sold in 2010.
• Close the rendered New report tab.
• On the Application bar, expand the Switcher menu list, and then remove the
New report without saving.
• Leave IBM Cognos Analytics open for the next activity.
• With <#Product line#> still selected, from the on-demand toolbar click More ,
and then click Select Member Fact Cells. (Hint: You may need to click Show
properties to hide the properties pane in order to see the More icon.)
• From the on-demand toolbar, click Font, click Foreground Color, and then
click Blue.
• Click OK to close the Foreground color dialog box, and then click OK again to
close the Font dialog box.
• Click <#Branch region#>, and then from the Application bar, click
Show properties.
• In the Properties pane, under DATA, double-click the Sorting property.
• In the Sorting dialog box, from the Data items pane, drag Revenue to the
Sort list pane.
• In the Sort List pane, double-click Revenue to change the sort order from
ascending to descending (arrow pointing down).
• Click OK.
Add aggregate data.
• Click <#Year#>, and from the on-demand toolbar, click Summarize, and then click
Total.
• From the Source tab, under Products, drag Product type to the Rows as a child
of <#Product line#>.
Product type appears to the right of Product line.
• Click <#Product type#>, from the on-demand toolbar, click Summarize, and then
click Total.
• In the list report, under <#Product type#>, click Total.
• Ensure the Total row header is selected, in the Properties pane, under
TEXT SOURCE, click the Source type property, and then from the list, click
Data item value.
The report shows that for Branch region, added to the Rows as a peer of Product
line, revenue is sorted in descending order.
• Close the rendered New report tab.
• On the Application bar, expand the Switcher menu list, and then remove the
New report without saving.
• Leave IBM Cognos Analytics open for the next activity.
You have created a report that shows the nested formatted measures by the data
items on the columns and rows edges. The rows edge also includes unrelated data
items.
• Close the rendered New report tab.
• From the Switcher menu list, remove the current report without saving it.
• Leave IBM Cognos Analytics open for the next activity.
• Categorical palettes are used for visualizations that support discrete colors, like pie
or bar charts.
• Continuous palettes are used for visualizations that support color transitions, like a
map or a heat map.
Visualizations use percentage size, so they resize based on-screen resolution.
See the Cognos Analytics Reporting documentation for more information on how to
create custom color palettes.
Client side visualizations
All 11.1 visualizations have client-side rendering capability. The visualizations can use
and interact with data stored on the browser side. Report authors can include extra data
to be stored on the browser side when you create visualizations. Report consumers can
filter visualizations directly on the report output using data that is already retrieved from
the database. For more information, see Visualizations version 11.x in the online
product documentation on www.ibm.com.
Enhanced Map visualizations
The Map visualization has been updated to allow adding multiple location categories to
a map to reduce or eliminate ambiguous location names. A point location option is also
available to show data for two location measures in two layers, one filled by regions,
and one by points. Latitude and Longitude option is available with zoom and focus
capabilities.
Report consumers can interact with different map layers to customize how a map is
displayed. Map clustering lets you group points on a map to help users better analyze
data at different zoom levels. Also, you can visualize data by location using a heatmap
layer on a map. For more information regarding enhanced mapping support, see the
Adding custom points or regions to a map in the product documentation.
• In the left pane, click Composite, in the right pane, click Simple line and column,
and then click OK two times.
• In the Sources tab of the Insertable objects pane, navigate to the Sales and
Marketing (query) > Sales (query) folder.
You might want to click Show properties to close the properties pane.
You want to compare quantity sold by product line and by region.
• Add the following data items to the visualization:
• Line value: Sales fact > Quantity
• Column value: Sales fact/Quantity (it will appear as Quantity1)
• X axis: Products/Product line
• Color line: Retailers/Region
The report shows that quantity sold is lowest for Golf Equipment, both for overall
sales as shown in the columns, and for all regions as shown in the line chart.
You want to customize the visualization to make it easier to read.
• Close the rendered New report tab.
Customize visualization properties.
You want to make the chart larger and change the color palette.
• In the work area, click the image of the chart, and then click Show properties.
The Properties pane appears showing data for the Simple line and column
visualization.
• Under COMMON, change the Width to 900 and the Height to 800.
• Under COMMON, click Column color palette, and then from the list, select the
fourth palette from the top.
The visualization now appears larger. All of the regions are visible in the legend.
The columns now appear gold which provides a better contrast against the colors
of the lines.
• Close the rendered New report tab.
• From the Application bar, remove the New report without saving.
• Leave IBM Cognos Analytics open for the next activity.
• Add Sales fact > Revenue to the Location color drop zone.
• Click the arrow beside Regions to open the list, and then select Points.
• Add Employee by region > City to the Locations drop zone.
• Add Sales fact > Revenue to the Point size drop zone.
• Add Sales fact > Quantity to the Point color drop zone.
If you had Latitude and Longitude data, you would select Latitude/Longitude from
the list and populate the appropriate fields:
• In the Properties pane, under COLOR PALETTE, click Regions > More .
• In the System list, scroll down and click the last palette, Red-blue inverse
divergent, and then click Back.
• In the Properties pane, under MAP, click Style, and then in the list,
click Outdoors.
• Run the report in HTML, and then move the cursor over the regions and points on
the map to view interactive messages.
Order method type appears on rows, and Revenue and Quantity appear nested
under Year on columns.
• Under Insertable objects, click Data items , and then ensure Query1 is
expanded.
• Drag Year to the Combination chart: Clustered column data > Categories >
Categories (x-axis) drop zone.
• Drag Year to the Combination chart: Line data > Categories > Categories (x-
axis) drop zone
• Drag Order method type to the Combination chart: Clustered column data >
Categories > Series drop zone.
• Drag Order method type to the Combination chart: Line data > Categories >
Series drop zone.
• Drag Revenue to the Combination chart: Clustered column data > Values >
Size drop zone.
• Drag Quantity to the Combination chart: Line data > Values > Size drop zone.
A combination chart appears next to the crosstab, both showing the same data.
• Close the rendered New report tab.
Add filters to focus the data.
• Click the Combination chart visualization to select it, from the on-demand toolbar,
click Filters , and then click Edit Filters.
• Click Add, ensure that Custom based on data item is selected, and that
Order method type is selected in the list.
• Click OK.
The Filter condition dialog box appears.
• Under Find, click Email, and then click the plus sign , being careful not to click
the green Add button.
• Repeat for Sales visit, Special, Telephone, and then click OK.
• In the Filters dialog box, under Application, ensure that
Before auto aggregation is selected, and then click OK.
You added a microchart to the crosstab for a quick overview of measure values for
the filtered data items on Columns.
• Close the rendered New report tab.
• From the Application bar, remove the New report without saving.
• Leave IBM Cognos Analytics open for the next activity.
The report is grouped on Country and City, with Country appearing as a header.
The report is sorted in descending order by revenue so that representatives with
the highest revenue appear first. Revenue is summarized by Total showing
grouped summaries at the City and Country levels.
• Close the rendered New report tab.
Add a filter for Year.
• Select the entire list data container.
• From the on-demand toolbar, click Filters, and then click Edit Filters.
The Filters - Query1 dialog box appears. There are two tabs: one for creating filters
at the detail level, and one for creating filters at the summary level.
• With the Detail Filters tab selected, click Add , click Advanced, and then click
OK.
• From the Time query subject, drag Year into the Expression Definition pane.
The x appears as [Sales (query)].[Time].[Year]. You want to show data for the year
2012 only.
• Click the end of the expression to place your cursor after [Year], and then type
=2012.
Filter on Country.
You want the report to only include data for Austria and Italy.
• Select the entire list data container, from the on-demand toolbar, click Filters, and
then click Edit Filters.
The Filters - Query 1 dialog box appears showing the detail filter you just created.
You will create another detail filter.
• Click Add, ensure that Country (the header) is selected under
Custom based on data item, and then click OK.
Advanced search options are also available.
• Under the Find list, click Austria, and then Ctrl+click Italy.
Below the Find list, a message appears indicating that two values have been
selected.
• To the right of 2 Selected message, click Add to add the values to the
right pane.
• Click OK to close the Filter condition dialog box, and then click OK to close the
Filters - Query1 dialog box.
This report now only contains data for Austria and Italy for the year 2012.
• Close the rendered New report tab.
• From the Switcher menu list, remove the current report without saving it.
• Leave IBM Cognos Analytics open for the next activity.
The data is grouped and an aggregate row displays the total value generated for
each Product type. Take note of one of the first grouped summarized totals, such
as Cooking Gear, which is $272,835,984.18. You will compare this number with
the values generated later.
• Close the rendered New report tab.
• On the navigation menu, click Report > Queries > Query1.
• In the Data Items pane, click Revenue, and then, from the Application bar, click
Show properties.
In the Properties pane, notice that the Detail property for Revenue is set to
Automatic.
• In the Data Items pane, click the Total(Revenue) query item.
In the Properties pane, notice that the Summary property is set to Total. This is
because, in the layout, you added an aggregate row displaying total revenue for
grouped items in the report.
• In the navigation menu, click Report > Queries, and then in the work area, click
Query1.
In the Properties pane, notice that the Auto group & summarize property for the
query is set to Yes. You want to view each individual data record, so you will
change this property to No.
• From the navigation menu, click Report > Queries > Query1 list, select Query1.
• On the properties pane, click the Auto group & summarize property, and then
select No from the list.
• Run the report in HTML.
The report now displays each individual record rather than a summary value for
each Product type.
Note: Do not click the Bottom navigation button because this report could return a
large amount of data and it will take a considerable amount of time to render the
last page. The order you see displayed in the results may vary because no sorting
has been applied.
• Close the rendered New report tab.
• Click OK, and then in the Application area, click Before auto aggregation.
• Click OK to close the Filters dialog box.
• Run the report in HTML.
The report now displays only data for individual sales of product types that
generated more than $100,000 in revenue.
• In the report, click Bottom.
The total revenue generated by product type orders of over $100,000 is
$496,713,003.20.
• Close the rendered New report tab.
• From the navigation menu, click Report > Queries > Query1.
The filter that you created appears in the Detail Filters pane.
There is only one row for each product type because the query will group and
summarize the data at the lowest level of detail.
The revenue generated by Cooking Gear is $1,863,445.82. When you ran this
report without the filter, the revenue generated by Cooking Gear was
$272,835,984.18. The value is different because it no longer includes individual
orders that generated less than one hundred thousand dollars in revenue.
The total revenue generated by all product lines is $496,713,003.20, which is the
same as when you ran the report with the Auto group & summarize property for the
query set to No.
Since you specified that the filter was to be applied before the query will group and
summarize retrieved data, the filter will exclude the same data regardless of
whether the query retrieves data that is summarized or not summarized.
• Close the rendered New report tab.
Apply a detail filter after auto aggregation.
You want the report to display only items for which the total value is greater than the
indicated value. To achieve this, you will create a detail filter and apply it after auto
aggregation.
• On the navigation menu, click Report > Pages > Page1.
• Select the List data container, from the on-demand toolbar click Filters, and then
click Edit Filters.
• Click Add, select Revenue from the Custom based on data item list, and then
click OK.
• Ensure that the Operator is >, and then in the Value text box, type 10000000 (10
million).
• Click OK, and then ensure that under the Application section,
After auto aggregation is selected.
• Click OK to close the Filters dialog box.
Examine the effects of the filters.
• Run the report in HTML.
Only the five product types that generated total revenue greater than ten million
display in the report.
• Close the rendered New report tab.
You have decided to include items in the report even if the aggregated revenue
generated is less than 10 million. However, in case you may want to use this filter
in the future, you will disable this filter instead of deleting it.
• Select the List data container.
• From the on-demand toolbar, click Filters, and then click Edit Filters.
• Click Revenue > 10000000, and then in the Usage area, click Disabled.
• Click OK to close the Filters dialog box.
All product types that generated over $100,000 in revenue (in at least one order),
again appear in the report, which indicates that the second filter you added has
been disabled.
• Close the rendered New report tab.
• On the navigation menu, click Report > Queries > Query1.
Notice that the Revenue > 10000000 filter still appears in the query, though the
icon beside it is grayed out, indicating that it is unavailable to the query.
• In the Detail Filters pane, click the Revenue > 10000000 filter.
In the Properties pane notice that, as specified, the Usage property for the filter is
set to Disabled.
• From the Switcher menu list, remove the current report without saving it.
• Leave IBM Cognos Analytics open for the next activity.
• Click Validate.
The expression validates with no errors.
• Click OK.
• In the Filters dialog box, to the right of the Scope text field, click the ellipsis.
• Select Product line, click OK to close the Scope dialog box, and then click OK to
close the Filters dialog box.
• Run the report in HTML.
Only two product lines generated total revenues greater than $1,000,000,000:
Camping Equipment and Personal Accessories.
• Close the rendered New report tab.
Navigate to the query explorer.
• From the navigation menu, click Report > Queries > Query1.
The summary filter you added appears in the Summary Filters pane.
• If the properties pane is not visible, click Show Properties.
• In the Summary Filters pane, click the filter.
In the Properties pane, the Scope property for this filter is set to Product line.
• From the Switcher menu list, remove the current report without saving it.
• Leave IBM Cognos Analytics open for the next activity.
The wizard will add a prompt control and a parameterized filter to the report by
performing the following tasks:
• Create a parameter.
• Add a filter to the data container with the parameter.
• Create a query for the prompt.
• Add the query and the parameter to the prompt.
If you add a prompt directly onto a report page, you will either need to set the prompt to
automatically submit the selection, or add a Finish prompt button to the report so that
the report will regenerate that uses the new criteria.
Identify a prompt type
Choose the appropriate prompt type for your reporting requirements. If you add prompt
items to a report or prompt page, you can choose from the different types of prompts
available in the Toolbox tab according to your needs. If you select items on a report and
then create a prompt page, Reporting will choose an appropriate prompt type for you.
Similarly, a generated prompt acts as a placeholder in the work area, but when the
report is run, Reporting selects the appropriate prompt type for that report.
If there are a large number of choices available (such as sales rep name), then Select &
Search is a good option. This saves time in scrolling to look for the desired option. If the
exact name or spelling of an item is unknown, then avoid using the Text Box prompt as
the value must be typed in exactly as it appears in the report.
Interval prompts are valuable for reporting on very specific time frames as they let you
choose lowest to highest time intervals in days, hours, and minutes.
Create a cascading prompt
You can use values from a previous prompt to filter the values in the current prompt or
picklist.
The selection that the user makes in one prompt determines what is populated in
another prompt.
When you create a series of prompts that have a hierarchical relationship, you can
define them as cascading, so that a prompt selection is determined by the choice of the
user in the previous prompt.
The report appears showing the revenue generate by each product in each sales
order, including the date for each order.
Notice that the earliest date shown at the top of the report is Jan 12, 2010.
• drag Date from the Data Items tab (second tab at the bottom of the
Available Components pane), and then type >?Date?
• validate for 2013-Jan-1
The report will only retrieve data where the order date is greater than the date
specified by the user.
• Click OK to close the Detail filter expression dialog box, and then click OK to
close the Filters dialog box.
• Run the report in HTML.
You are prompted to select a date and time.
• Select 2013-Jan-1, accept the default time, and then click OK.
• Under Insertable objects, click Toolbox , and then drag a Table object into the
page header block.
• On the Insert table dialog box, clear the Maximize width checkbox, and then click
OK to accept the default size of 2 columns and 1 row.
• Click the page header block (not the table), and then from the on-demand toolbar,
click Horizontal alignment , select Left .
The table header appears as follows:
Notice that there are two table cells in the header that represent your two columns
and one row.
Add a value prompt.
• From the Toolbox tab, expand PROMPTING, and then drag a Value prompt into
the left table cell.
You want the prompt to filter on product line code to make the query more efficient.
However, the prompt will display product line names, not codes, to make selections
easier.
• In the Prompt Wizard - Value prompt dialog box, change the parameter name to
ProductLineCode, and then click Next.
• On the Create Filter page, ensure that Create a parameterized filter is selected,
and then beside Package item, click the ellipsis.
• Expand the Sales and Marketing (query) folder, Sales (query) namespace,
Products, and then the Codes folder.
Product line code is used because it is an indexed field. Querying on an indexed
field is much faster and more efficient.
• Click Product line code, and then click OK.
• Select Make the filter optional.
• Click Next, and then beside Values to display, click the ellipsis.
• Expand the Sales and Marketing (query) folder, expand the Sales (query)
namespace, and then expand Products.
• Click Product line, click OK, and then click Finish.
• Type the following in the Default text box: Select the desired Product line:.
You can also add information here as well for localization.
• Click OK to close the Localized Text dialog box, and then OK to close the
Header Text dialog box.
Run the report.
• Run the report in HTML.
The report opens in the browser displaying data for all items. The Value prompt list
now displays the instruction to select the desired Product line.
• In the list, select Golf Equipment.
The report now displays data for Golf Equipment only. With the Auto-submit
property set to Yes, you can use the list to select the item data you want to display
without having to click an additional button to submit your selection.
• Close the rendered New report tab.
• From the Application bar, click Save , navigate to My content , and then
save the report as Prompt report.
• Keep this report open for the next activity.
• On the Create Filter page, ensure that Create a parameterized filter is selected,
and then beside Package item, click the ellipsis.
• Expand the Sales and Marketing (query) folder, Sales (query) namespace,
Products query subject, click Product, and then click OK.
• Select Make the filter optional.
• In the Operator list, select in, click Next, and then click Finish.
The Select & search prompt appears on the prompt page.
The in operator is used to allow for multiple selections. If the '=' operator is
selected, the prompt would allow for only a single selection.
Run the report.
• Run the report in HTML.
• On the prompt page, click Finish to accept the default of all product lines.
The report appears containing data for all Product lines. The report ran because
you made the prompt optional. Next, you will run the report again and search for a
specific value.
All product lines with Firefly in the title appear in the Results box.
• Below the Keywords search box, click the Select all check box, and then click
Add (blue arrow) to add the selected items to the Choices pane.
• Repeat the above steps with the keywords Butane Kerosene in a single search,
Select all of the results, and then add them to the Choices pane.
The report runs and is filtered to display only the data associated with the items
that you selected based on your search.
• Close the rendered New report tab.
• From the Switcher menu list, remove the current report without saving it.
• Leave IBM Cognos Analytics open for the next activity.
• Type ALL for both the Use and Display values, click OK to close the Edit dialog
box, and then click OK to close the Static choices dialog box.
The value entered for static choices is case sensitive and should be entered the
exact same way in your filter expression.
You will specify what values to return when ALL is selected in the Order method
type prompt.
• On the navigation menu, click Report > Pages > Page1.
• Click anywhere in the list, from the on-demand toolbar, click Filters, and then click
Edit Filters.
• Click the Order method type filter, and then click Edit .
The Detail filter expression dialog box appears.
• Replace and validate the existing expression with the following:
if (?Order method type?='ALL') then ([Order method type]=[Order method
type]) else([Sales (query)].[Order method].[Order method type] = ?Order
method type?)
Hint: Drag [Order method type] from the Data items tab, and drag [Sales
(query)].[Order method].[Order method type] from the Source tab.
• When prompted, choose Camping Equipment, Lanterns, and Web, and then
click OK to close the validation box.
• Click OK to close the Detail filter expression dialog box, and then click OK to
close the Filters - Query1 dialog box.
Create a cover page.
• If necessary, click Show properties so that the properties pane is visible, and
under MISCELLANEOUS, in the Name box, change the name from Page2 to
CoverPage, and then press Enter.
• In the Report pages pane, double-click CoverPage to open it.
• In the work area, click Add, click Table, and then click OK to accept the default
size of 2 columns and 1 row.
• Click the left table cell, and then Ctrl+click the right table cell.
• From the on-demand table toolbar, click the down arrow to the right of the
Horizontal alignment icon, and then click Center.
• Click anywhere on the page below the table, and then from the on-demand toolbar,
click Vertical alignment , and then click Middle.
Next you want to create a title for the cover page.
• In the left table cell, click Add, and then click Text item.
• In the Text dialog box, type GO Data Warehouse - Revenue Generated, and
then click OK.
• With the text item still selected, change the font to Arial, 16 pt.
• From Toolbox pane, expand LAYOUT, and then drag an Image object into the
right table cell.
• From the on-demand toolbar, click More, and then click Edit Image URL, ignoring
any messages that may appear.
• In the Image Picker dialog box, in the URL path beside the Browse button, delete
the existing path, and then type http://localhost:88/images/background3.png.
• Click OK to close the Image Picker dialog box.
If the OK button does not become active, try clearing the URL path and re-entering
the http address.
• With the image selected, in the Properties pane, under POSITIONING, double-
click the Size & overflow property.
• Set the Width to 75 pixels, the Height to 75 pixels, and then click OK.
The report renders, filtered by the values selected in the prompts and with a title at
the top.
Use calculations
What are calculations?
Calculations let you derive additional information from the data source. Create a layout
calculation to add information to your report. Create calculated columns based on
existing items in the model that uses query calculations.
Calculations can be added to a list, crosstab, or chart report, as well as to the body,
headers, and footers. Layout calculations can include run-time information such as
current date, current time, and user name.
Including calculated columns can help provide further insight into your data. You can
create a query or layout calculation by inserting a calculation in to your report and then
creating the expression in the Expression Editor.
Create a calculated column to make a report more meaningful by deriving additional
information from the data source. For example, you create an invoice report, and you
want to see the total sale amount for each product ordered. Create a calculated column
that multiplies the product price by the quantity ordered.
If an expression is used in multiple reports, or used by different report authors, ask your
modeler to create the expression as a standalone object in the model and include it in
the relevant package.
Add Date and Time functions
Use date and time functions in calculations and filters to query on specific dates and
times in your report. Date and Time functions can be used to build dates, modify
existing dates or to filter the report for specific dates.
A useful date/time function is the extract() function which returns an integer
representing the value of datepart (year, month, day, hour, minute, second).
Not all data sources support functions the same way. The data modeler can set a
quality of service indicator (icon appearing beside some functions) on functions to give
a visual clue about the behavior of the functions. Report authors can use the quality of
service indicators to determine which functions to use in a report.
• In the Format type list, select Percent, for Percentage symbol click the percent
symbol %, and then click OK.
• With the column still selected, from the on-demand toolbar click Summarize, and
then click Calculated.
The result appears as follows:
The report appears with revenue data sorted by date, including a header at the top
that displays the date when the report was run.
• Click Bottom to confirm that the report includes all of the months of the first
quarter, and the overall calculated percent of goal.
• Close the rendered New report tab.
The Percent of Goal calculation does not match the values from the initial report
because the timing of the aggregation is different.
• Close the rendered New report tab.
• With the <Percent of Goal> list column body still selected, in the Properties pane,
under the DATA ITEM section near the bottom of the pane, change the
Detail aggregation function to Calculated.
• Run the report in HTML.
Now the expression returns the same results as the previous expression, when
you first ran the report.
• Close the rendered New report tab.
• From the Switcher menu list, remove the current report without saving it.
• Leave IBM Cognos Analytics open for the next activity.
• In the Properties pane, under TEXT SOURCE, change Data item value to
Product line.
• In the crosstab, double-click <#Product line#>.
• Update and validate the existing expression to capitalize the query item as follows:
upper([Sales (query)].[Products].[Product line])
• Click OK.
The result appears as follows:
The report displays data only for the region selected in the prompt.
Notice that the Total line caption now reflects the data item that it summarizes and
that all of the Product line names are uppercase.
• Close the rendered New report tab.
Display the parameter value in the report title.
To give this report some context, you want the selected region to appear in the report
title. If no region is selected, you want the report title to indicate that the data displayed
represents quantity sold in all regions.
• On the report page, double-click the report title text, type Quantity Sold in, press
the spacebar, and then click OK.
• Left justify the report title within the block.
Next, create a layout calculation to display the prompt option selected in the report
title.
• Click Toolbox, expand TEXTUAL, and then drag a Layout calculation object to
the end of the report title.
You will create an expression that specifies that if a parameter value is selected,
the layout calculation should show the display value for the selected parameter
value. Otherwise, the layout calculation should show All Regions.
• Close the rendered report tab, and then run the report in HTML.
• On the prompt page, select Central Europe, and then click OK.
The report title explains that this report contains data about the quantity sold in
Central Europe.
• From the Application bar, run the report again and choose a different prompt
option.
The report title changes to indicate the prompt value chosen.
• Close the rendered New report tab.
• From the Switcher menu list, remove the current report without saving it.
• Leave IBM Cognos Analytics open for the next activity.
• From the navigation menu, click Report > Variables , and then drag Report
Language Variable to the Variables pane.
The Languages dialog box appears.
• Scroll through the list to locate and select the check boxes beside all of the
English, French, and German languages (there are multiples for each language),
and then click OK.
All of the languages you selected appear in the Values pane.
• In the Values pane, click English, Shift-click English (Zimbabwe), and then
underneath the Values list, click Group Values .
• Repeat the previous step to group all French languages together.
• Repeat the previous step to group all German languages together.
There are seventeen English languages, six French, and six German. You
selected all of these languages and grouped them together. That way you only
have to format the report for three grouped values, rather than for each individual
language.
The report now has one variable with three grouped values, one for each language
in which the report will be run. Because you created a language variable, the
expression is created for you.
• On the Application bar, click Show properties.
• In the Properties pane, under MISCELLANEOUS, in the Name box, replace
Report Language1 with Language, and then press Enter.
• From the navigation menu, click Report > Pages > Page1.
• From the Application bar, click the Conditional state icon , and then click
English.
• Change the title text to Product Report.
IBM Cognos Analytics cannot translate the data returned by the query. This must
be done as part of data modeling and must be included in the published package.
• Close the rendered New report tab.
Notice that the order of products is different because the default sorting of the
Product lines and Product types is now sorting differently rendered names.
• Close the rendered New report tab.
• Repeat the previous steps to run the report in English (Zimbabwe).
Again, notice that the default sorting causes the report names to appear in a
different order because they are translated differently. For example, what appears
as Accessoires personnels in French, now appears as Personal Accessories in
English.
• Close the rendered New report tab.
• Click Run options, and then click Show run options.
• Under Language, scroll up, select (Default), and then click OK.
• From the Switcher menu list, remove the current report without saving it.
• Leave IBM Cognos Analytics open for the next activity.
• Group the <Product line> column and then summarize the <Revenue> column
by Total.
Your report will contain several columns, including one measure (in this example,
Revenue). The Product description column will be the query item that will be visible
or hidden depending on the end user's choice of output, and the Revenue column
will highlight exceptionally high and low values.
Create the conditional variables.
Create a variable to define revenue as high if it is greater than 1 million, or low if it is
less than 500,000.
• From the Application bar, click Conditional state , and then click high.
• Ensure that the <Revenue> list column body is still selected, and then from the on-
demand toolbar, click Font.
• Set Foreground color to Green, set Weight to Bold, and then click OK to close
the Font dialog box.
• Click Conditional state, and then click low.
• Ensure that the <Revenue> list column body is still selected, from the on-demand
toolbar, click Font.
• Set Foreground color to Red, set Weight to Bold, and then click OK to close the
Font dialog box.
• Click Conditional state, and then click Clear conditional state to turn the
conditional formatting off.
• From the on-demand toolbar, click Select Ancestor , and then click
List column at the bottom of the list.
• In the Properties pane, under CONDITIONAL, double-click the Render variable
property.
The Render variable dialog box appears.
• From the Variable list, select New boolean variable.
• In the New variable dialog box, in the Name field, type vProduct_description,
and then click OK.
The Report expression dialog box appears.
• Create and validate the following expression that sets the report output to HTML:
ReportOutput ()='HTML'
Hint: Under Available Components, click the Functions tab, expand
Report Functions, and then double-click ReportOutput to add it to the
expression.
• Click OK until all dialog boxes are closed.
You can now run the report in different formats to test the output.
When the report is rendered in PDF format, the optional column is not rendered.
• Close the rendered New report tab.
• From the Switcher menu list, remove the current report without saving it.
• Leave IBM Cognos Analytics open for the next activity.
Drill-through definitions
Navigate to related data
Drill-through access lets users navigate between reports to view related data to help
them answer business questions.
In IBM Cognos Analytics, using a packaged based drill-through definition, report
authors can set up drill-through access to and from reports, queries, advanced queries,
and analyses that uses dimensional and relational data sources.
It is also possible to set up drill-through access to IBM Cognos Analytics targets from
third party sources and to third party targets from Cognos sources. Setting up drill-
through access to and from third-party sources and targets can be accomplished that
uses URL requests or by using the Software Development Kit.
The above illustration shows Guided report layout functions during the dropping of a
measure onto the report canvas. Notice that the shaded 12345 area is a visual indicator
to the user that the value being dropped onto the canvas is a measure. It also indicates
exactly where that value will be located on the canvas if the user drops it at that instant.
Some of the key features included with Guided report layout include:
• Visual indicators show where an object is going to be placed before you drop it on
to the canvas.
• When you drag a measure on to the canvas, you get a summarized text item with a
descriptive label and formatting.
• When you drag a column that is not a measure on to the canvas, you get a list with
a descriptive title.
• You can place objects on the left, center, right, top, or bottom of a container with
one gesture.
• Tables use percentage sizing which ensures that different screen resolutions are
supported.
• You can resize an object by dragging one of its grippers.
Guided report layout is enabled by default. You can disable it by accessing Manage >
Options > Report.
Guided report layout does not work with active reports.
Force page breaks
To force page breaks based on a data item, you must associate the page set with a
query and then define a grouping structure for the page set.
You can add multiple detail pages to a page set.
You can also create nested page sets, and can define a master-detail relationship
between them to see data in the nested page set that is related to the data in the parent
page set. For example, you have a page set that shows pages of product line
information. The page set contains a nested page set that shows pages of product type
information.
You can use a page set to create a report that contains detail pages displaying data for
each order method. Each order method type will begin on a new page.
A page break can also be created at the same time as a report section is created.
• Click OK.
• Run the report in HTML, and then page down several times to examine the data
placement.
• In the center of the new work area, click Add , click Table, set it to 1 column
and 3 rows, and then click OK.
• Ctrl+click each of the table cells, and then from the on-demand toolbar, click the
arrow beside Horizontal alignment, and then click Center.
• In the top table cell, click Add, click Text item, in the Text box, type
Total Revenue by Sales Representatives, and then click OK.
• In the bottom table cell, click Add, click Text item, in the Text box, type
Sales Report, and then click OK.
• Click the text only (not the cell) of the top cell, and then Ctrl+click the text of the
bottom cell.
• From the on-demand toolbar, change the font to Arial Black, the font size to 20pt,
and the foreground color to Navy.
• In the Properties pane, under FONT & TEXT, double-click the Font property.
• Change the font to Arial Black, 12pt, Italic, and then click OK.
• On the Application bar, click the Page view list , and then click
Page design.
The page view returns to Page design mode. The list column titles are changed to
reflect the modifications you made to the page structure.
• Run the report in HTML, and then click Page down to see the list.
The list column titles appear with the new font styles.
• Close the rendered New report tab.
• From the Switcher menu list, remove the current report without saving it.
• Leave IBM Cognos Analytics open for the next activity.
The report data spreads out across the page. You want to condense it so that
some of the data appears in a single column.
• Close the rendered New report tab.
• On the Application bar, click Lock Page objects to unlock the cells of the
report.
The icon displays an unlocked state.
Once cells are unlocked, query items can be added directly from the content tabs.
• From the Toolbox, drag a Table to the Work phone column, to the right of
<Work phone>.
The Insert table dialog box appear.
• Under Table size, choose 1 column and 3 rows, and then click OK.
The results appear as follows:
• Within the List data container, drag <Work phone> into the first row of the table.
Be careful to drag the Text item <Work phone>, not the table cell containing it.
• Drag <Email> into the second row, and then <Date hired> into the third row.
• Drag <Extension> into the top table cell, to the right of <Work phone>.
You can add text in front of the data items, to identify them.
• From the Toolbox, drag a Text item to the left of <Work phone>.
• In the Text box, type Work phone:, press the spacebar, and then click OK.
• On the Application bar, click Lock Page Objects to lock the cells of the report
again.
• Click the Extension column header, Ctrl+click the Email and Date hired column
headers, and then press Delete.
The page design appears as follows:
• In the list column, click the Work phone list column title.
• On the Application bar, click Show properties, in the Properties pane, under
DATA ITEM, in the Label box, type Contact Information, and then press Enter.
• Run the report in HTML.
Because you selected Year before you converted the list into a crosstab, years
now appears as columns. Product line appears on rows, and Revenue, because it
can be aggregated, appears as measures on the report. You can now interpret the
data more quickly.
• Close the rendered New report tab.
The footer now contains the same object and formatting as the header.
• Click the text in the footer.
In the Properties pane, you can only select the layout component reference object
and not the block or text item objects individually. This is because it is referencing
the block object in the header. Remember, the block object in the header also
contains the text item object.
You want to change the text in the footer to contain contact information.
• In the Properties pane, click Overrides, and then click the ellipsis.
• In the Overrides dialog box, select the Title Text check box, and then click OK.
The layout component reference object in the footer no longer contains text. Only
the referenced block object remains.
• Drag a Text item object into the component override area of the footer block, type
Please contact the Sales Manager for more details, and then click OK.
• Click the Text item object in the footer, and then change the font to Arial 12pt,
Bold, and Foreground color of White.
• Click OK to close the Foreground Color dialog box, and then click OK to close the
Font dialog box.
• Run the report in HTML, and then scroll to the bottom of the page to view the
footer.
Both the header and footer contain a teal block with white font.
This is a simplified example of reusing report objects. This technique might be best
for reusing an object with numerous format properties applied.
You can also reuse objects between different reports.
• Close the rendered New report tab.
• From the Switcher menu list, remove the current report without saving it.
• Leave IBM Cognos Analytics open for the next activity.
• In the Image Picker dialog box, beside the Browse button, delete the existing
path, type http://localhost:88/images/go_logo_small.jpg, and then click OK.
If the OK button does not become active, try clearing the URL path and re-entering
the http address.
A graphic now appears in the first table cell.
You want to add a text item in the middle of the page header that can be used to
add a report title.
• From the Toolbox tab, drag a Text item to the center cell of the table, and then
click OK to close the Text dialog box without adding any text.
You will not specify the text to be used yet, because this will be different for each
report. You will name this text object so that it can be overridden when the page
header is reused in other reports.
• With the new Text item selected, in the Properties pane, under
MISCELLANEOUS, for the Name property type ReportTitle, and then press
Enter.
Add details to the header.
You want to add date and time information to the report header.
• In the right table cell, click Add, and then click Table.
• Set Number of columns to 1, Number of rows to 2, and then click OK.
• From the Toolbox, from the TEXTUAL section, drag a Layout calculation object
to the top cell of the table you added in the previous step.
• In the Report expression dialog box, click the Functions tab, expand
Report Functions, and then drag AsOfDate to the Expression Definition pane.
• Validate the expression, and then click OK to close the Report expression dialog
box.
You want to add a time stamp, to appear in the bottom-right corner of the page
header.
• From the Toolbox, drag a second Layout calculation object to the bottom cell of
the table you added previously.
• Click the Functions tab, expand Report Functions, and then drag AsOfTime to
the Expression Definition pane.
• Validate the expression, and then click OK to close the Report expression
dialog box.
The header you created in the Layout Library report displays the title that you
added to this report.
• Close the rendered New report tab.
Modify the shared page header.
• In the Page header of the list report, click the Layout component reference
object (the entire block).
In the Properties pane, the Embed property is set to Reference. This means any
changes made to the shared page header in the Layout Library source report will
be automatically applied in this report. You will now modify the shared page header
in the source report.
• On the Application bar, expand the Switcher menu list.
• Click the Layout Library report to open it.
• In the Page header, click <%AsOfTime()%>, and then press Delete.
• On the Application bar, click Save.
• Expand the Switcher menu list.
• Click the Quantity by Order Method report to open it, and then run the report in
HTML.
The change that you made to the page header in the source report has
automatically been applied to this shared page header, as seen in the top right
corner. The AsOfTime is no longer there.
• Close the rendered New report tab.
• In the left cell of the Page header, drag the Image object to the right of the center
cell that contains the Text item so that they switch places.
• Remove the Quantity by Order Method report from the Switcher menu list, and
then open it from My content on the Welcome page.
Although you switched the order of the image and text objects in the source report,
this change is not reflected in the page header in this report because you changed
the Embed property to Copy. To make the page header in the target report
consistent with the standard page header you created in the Layout Library report,
you will now manually update the shared page header.
• Ensure the report is in Edit mode. (Hint: The Insertable objects are either visible
or its tab appears in the side bar.) If it is not in Edit mode, then on the
Applications bar, click Edit .
• In the Page header, click the Layout component reference object, from the on-
demand toolbar click More, and then Update Component Copy.
The header is updated to reflect the changes made in the Layout Library source
report, with the title on the left and the graphic in the middle.
• Save the report.
• Remove all reports from the Switcher menu list.
• Leave IBM Cognos Analytics open for the next activity.
• On the Object and Query name dialog box, from the Query Name list, click
Query1, and then click OK.
This allows the crosstab to use the same query items as the list.
• Under Insertable objects, click the Data items tab , and then add the
following query items and measure to the crosstab:
• Rows: Year
• Columns: Product line
• Measures: Revenue
• Under Insertable objects, click the Toolbox, and then drag a Table on to the
work area below the crosstab.
• Clear the Maximize width checkbox, and then click OK to accept the default size
of 2 columns and 1 row.
• Click inside the left table cell (but not the Add icon).
• On the Application bar, click Show properties, and then in the properties pane,
under BOX, double-click Padding.
• In the Right padding box, type 10, and then click OK.
The report layout contains an empty header, a list and a crosstab containing the
same data, a table, and a footer.
• Press Delete to delete this container, and on the Delete cell dialog box, ensure
that Delete the entire column is selected, and then click OK.
• From the Toolbox tab, drag a Text item to the left of the list, but within the left
table cell.
• Type List: and then click OK.
• From the Toolbox tab, drag a Text Item to the left of the crosstab, within the right
table cell.
• Type Crosstab: and then click OK.
• Click below the crosstab within the right table cell, from the on-demand toolbar,
click the arrow beside Vertical Alignment, and then click Top.
• Double-click the text in the header, type Page 1 - Default Behavior, and then
click OK.
• Select the Block containing the header text, and then left justify the text.
Add filters.
Both reporting objects are linked to Query1, so only one set of filters is needed.
• Click anywhere in the list, from the on-demand toolbar, click Filters, and then click
Edit Filters.
• Click Add, click Advanced, and then click OK.
The Detail filter expression dialog box appears.
• Create the following expression:
[Year] =?pyear?
• Validate the expression using 2011.
• Click OK to close the Detail filter expression dialog box.
• Create another detail filter expression as follows:
[Product line]=?ppline?
• Validate the expression using Camping Equipment.
• Click OK to close the Detail filter expression dialog box.
• Click OK to close the Filters dialog box.
The list now appears with a new No Contents Data tab. No Data Available is the
default message that appears if the list has no content. You want to customize this
message.
• Double-click the object showing No Data Available, update the text to
List contains no data., and then click OK.
• Select the Text item, and then change the font to Arial Black, 12pt, with a
Foreground Color of Blue.
Since all of the queries in this report are filtered by the same parameters, all lists
and crosstabs on the three report pages should look the same when data is
returned. The page numbers refer to the pages in Page Explorer and not in the
HTML view.
• Click Page down to see the Page 2 - Do Not Render Page if No Data is page.
The report appears the same as Page 1 except for the header which is customized
for Page 2.
• Click Page down to see the Page 3 - Show Custom Message When No Data is
Returned page.
The report appears the same as Pages 1 and 2 except for the header which is
customized for Page 3.
With the current prompt selections, all three pages appear with a list and crosstab.
• On the Application bar, click Run to run the report again.
• When prompted, select Mountaineering Equipment, select 2010, and then
click Finish.
Notice how the individual pages are affected in the report since there is no data for
2010 for the product line Mountaineering Equipment.
The first page shows default behavior for the list and crosstab when there is no
data returned. Both the list and crosstab are replaced with the default message of
No Data Available.