Report Studio Guide
Report Studio Guide
User Guide
T H E N EX T L EVE L
TM
O F PER FO R M A N C E
Product Information
This document applies to Cognos ReportNet( T M ) Version 1.1 and may also apply to subsequent releases. To check for newer versions of this
document, visit the Cognos support Web site (http://support.cognos.com).
Copyright
Copyright (C) 2004 Cognos Incorporated
Architect is protected by one or more of the following U.S. Patents: 6,609,123B1; 6,611,838B1.
Cognos Query is protected by one or more of the following U.S. Patents: 6,609,123B1; 6,611,838B1.
Transformer is protected by one or more of the following U.S. Patents: 6,609,123B1; 6,611,838B1.
Impromptu is protected by one or more of the following U.S. Patents: 6,609,123B1; 6,611,838B1.
ReportNet is protected by one or more of the following U.S. Patents: 6,609,123B1; 6,611,838B1.
While every attempt has been made to ensure that the information in this document is accurate and complete, some typographical errors or
technical inaccuracies may exist. Cognos does not accept responsibility for any kind of loss resulting from the use of information contained in
this document.
This document shows the publication date. The information contained in this document is subject to change without notice. Any
improvements or changes to either the product or the document will be documented in subsequent editions.
U.S. Government Restricted Rights. The software and accompanying materials are provided with Restricted Rights. Use, duplication, or
disclosure by the Government is subject to the restrictions in subparagraph (C)(1)(ii) of the Rights in Technical Data and Computer Software
clause at DFARS 252.227-7013, or subparagraphs (C) (1) and (2) of the Commercial Computer Software - Restricted Rights at
48CFR52.227-19, as applicable. The Contractor is Cognos Corporation, 15 Wayside Road, Burlington, MA 01803.
This software/documentation contains proprietary information of Cognos Incorporated. All rights are reserved. Reverse engineering of this
software is prohibited. No part of this software/documentation may be copied, photocopied, reproduced, stored in a retrieval system,
transmitted in any form or by any means, or translated into another language without the prior written consent of Cognos Incorporated.
Cognos and the Cognos logo are trademarks of Cognos Incorporated in the United States and/or other countries. All other names are
trademarks or registered trademarks of their respective companies.
Information about Cognos Products and Accessibility can be found at www.Cognos.com
Table of Contents
Introduction 17
Additional Materials 19
Chapter 1: Cognos Report Studio 21
Planning Reports 21
Working in Cognos Report Studio 21
The User Interface 22
Basic Report Structure 23
Working with Objects 24
Set Options 25
Creating a Report 26
Specify the Package 26
Choose a Report Template 27
Add Data to a Report 27
Save a Report 28
Run a Report 28
Running a Report Against an SAP BW Data Source 29
Producing a Report in CSV Format 30
Print a Report 30
Creating Your Own Report Templates 30
Managing Your Reports 31
The ReportNet SDK 31
Chapter 2: Types of Reports 33
List Reports 33
Group Data 33
Set the Level Span for a Column 34
Example - Remove Identical Values in a List 34
Example - Repeat a Column Value in a List 35
Crosstab Reports 36
Create a Nested Crosstab Report 37
Change a List into a Crosstab 37
Example - Add Aggregate Data to a Crosstab Report 38
Charts and Chart Types 39
Creating Charts using an SAP BW Data Source 39
Modify the Properties of a Chart 39
Example - Modify the Properties of a Combination Chart 40
Example - Create a Progressive Column Chart 41
Repeaters 42
Convert a List into a Repeater 42
Example - Create Mailing Labels 42
Chapter 3: Formatting a Report 45
Laying Out a Report 45
Report Layout Guidelines 46
The Page Structure View 46
Add a Header or Footer 46
Add Borders 47
Add Text 47
Add Color 47
User Guide 3
Insert an Image 48
Insert a Background Image 48
Add a Bookmark 49
Example - Add Bookmarks to a List Report 49
Inserting Other Objects 51
Example - Add a Multimedia File to a Report 51
Align an Object 52
Use Tables to Control Where Objects Appear 52
Apply Padding 52
Set Margins 53
Reuse an Object 53
Change a Referenced Object 53
Add a Page 54
Insert Page Breaks 54
Example - Insert Page Breaks in a List Report 55
Reorder Columns 56
Rename a Column 57
Swap Columns and Rows 57
Setting Object Properties 57
Pagination 58
Spacing and Breaking 58
Text Flow & Justification 58
Size & Overflow 59
Floating 59
Table Properties 59
Change the Default Class of a Report Object 60
Chapter 4: Working with Data 61
Filter Data 61
Filtering Considerations When Using an SAP BW Data Source 62
Filtering Date Columns 62
Sort Data 63
Create Sections 63
Remove Sections 64
Add a Summary 64
Create a Calculation 64
Format Data 65
Units of Measure Notation and Values in SAP BW Data Sources 66
Locale-sensitive Properties 66
Show Data for a Specific Time Period 66
Adding Prompts 67
Use the Build Prompt Page Tool 67
Build Your Own Prompt and Prompt Page 67
Create a Parameter to Produce a Prompt 69
Create a Prompt Directly in a Report Page 69
Modifying Prompts 70
Working with Queries 73
Relating Queries to Layouts 75
The Query Explorer 76
Chapter 5: Working with Existing Reports 83
Open and Save a Report Locally 83
Open a Report from the Clipboard 83
Open a Query Studio Report 84
Managing Changes in the Model 84
Update Name References 84
Change the Model Connection 84
User Guide 5
Product Revenue 109
Product Revenue - Lifetime/Q2 109
Product Summary 109
Products Ranked by Revenue 109
Progressive Column Chart 109
Quantity by Retailer 109
Regional Orders 110
Report with Totals 110
Retailer Contact 110
Returns by Order Method 110
Revenue by Date and Amount 110
Sales Representative Contact List 110
Sales Reps Performance 110
Union Crosstab 110
Current Assets 110
Current Liabilities 110
Employee Profile 111
Appendix C: Formatting Data With Patterns 113
Language Code: cs 114
Locale ID: cs 114
Locale ID: cs_CZ 115
Language Code: da 117
Locale ID: da 117
Locale ID: da_DK 118
Language Code: de 120
Locale ID: de 120
Locale ID: de_CH 121
Locale ID: de_DE, de_LU, de_AT 123
Language Code: el 124
Locale ID: el 124
Locale ID: el_GR 126
Language Code: en 127
Locale ID: en, en_AU, en_CA, en_GB, en_IE, en_NZ, en_SG, en_US, en_ZA,
en_ZW 127
Locale ID: en_BE 129
Locale ID: en_HK, en_IN, en_PH, en_BW 130
Language Code: es 132
Locale ID: es, es_AR, es_CL, es_ES, es_PE, es_PY, es_UY, es_VE 132
Locale ID: es_BO, es_CO, es_CR, es_DO, es_EC, es_GT, es_HN, es_MX, es_NI,
es_PA, es_PR, es_SV, es_US 133
Language Code: fi 135
Locale ID: fi, fi_FI 135
Language Code: fr 137
Locale ID: fr, fr_CA, fr_FR, fr_LU 137
Locale ID: fr_BE 138
Locale ID: fr_CH 140
Language Code: hu 141
Locale ID: hu 141
Locale ID: hu_HU 143
Language Code: it 144
Locale ID: it 144
Locale ID: it_IT 146
Locale ID: it_CH 147
Language Code: ja 149
Locale ID: ja 149
Locale ID: ja_JP 150
User Guide 7
Appendix D: Report Studio Object and Property Reference 171
Report Studio Objects 171
Arc Measure 171
Area Chart 171
Area Measure 171
Axis Labels 172
Axis 172
Axis Measure 172
Bar Chart 172
Baseline 172
Block 172
Bookmark 173
Bubble Chart 173
Bubble Size Measure 173
Caption 173
Category 173
Chart Body 173
Chart Footer 174
Chart Subtitle 174
Chart Title 174
Column Chart 174
Column Measure 174
Combination Chart 174
Conditional Block 175
Crosstab 175
Crosstab Cell 175
Crosstab Column Levels 175
Crosstab Corner 175
Crosstab Level 176
Crosstab Level Cells 176
Crosstab Level Footer 176
Crosstab Level Header 176
Crosstab Member 177
Crosstab Row Levels 177
Cube Data Item 177
Cumulative Line 177
Date & Time Prompt 177
Date Prompt 177
Dimension 178
Fact 178
Field Set 178
Generated Prompt 178
Group Filter 178
HTML Item 178
Hyperlink 178
Hyperlink Button 179
Image 179
Interval Prompt 179
Item 179
Layout Component Reference 179
Legend 179
Level 180
Line Chart 180
Line Measure 180
List 180
List Cell 180
List Column 181
User Guide 9
Report Studio Properties 189
3-D View 189
Across 189
Aggregate Function 189
Alias 190
Allow 45° Rotation 190
Allow 90° Rotation 190
Allow Skip 190
Allow Stagger 190
Allow Truncation 190
Allow Word Wrap 190
Application 190
Auto Group & Summarize 190
Auto-sort 190
Auto-Submit 191
Avoid Division by Zero 191
Axis Type 191
Background Color 191
Background Image 191
Baseline Value 191
Border 191
Box Type 191
Calendar Type 191
Cascade Source 191
Chart Subtype 191
Chart Type 191
Class 191
Column Titles 192
Combination Type Override 192
Combination Type Rotation 192
Component Overrides 192
Component Reference 192
Condition 192
Conditional Block 192
Conditional Style 192
Conditional Text 192
Connecting Lines 192
Connection 192
Content 192
Contents Height 193
Cross Product Allowed 193
Current Block 193
Data Format 193
Data Point Shape 193
Data Point Size 193
Default Selections 193
Depth 193
Description 193
Display Value 193
Display 193
Display 194
Display Milliseconds 194
Display Seconds 194
Down 194
Drill Throughs 194
Duplicate Rows 194
Expression 194
User Guide 11
Plot Measures As 199
Position 199
Positive Value Color 199
Pre-Sort 199
Processing 199
Push To Bottom 199
Query Item 199
Query Item 199
Query Item 200
Query 200
Range 200
Repeater Direction 200
Repeater Scope 200
Report Expression 200
Report Expression 200
Report Expression 200
Required 200
Resolution Height 201
Resolution Width 201
Rollup Processing 201
Rows Per Page 201
Scale Interval 201
Select UI 201
Show Axis Line 201
Show Baseline 201
Show Caption 201
Show Cumulative Line 201
Show Grid Lines 201
Show Labels 201
Show Labels 201
Show Total Column 202
Show Values 202
Show Values 202
Size & Overflow 202
Sort 202
Sort 202
Spacing & Breaking 202
Spider Effects 202
SQL 202
Static Choices 202
Suppress Top Parent Labels 202
Syntax 202
Table Properties 202
Text 202
Text Flow & Justification 203
Tool Tips 203
Total Column Color 203
Truncation Text 203
Type 203
Type 203
URL 203
Usage 203
Use SQL With Clause 203
Use Thousands Separator 203
Use Value 203
Values as Percentages 203
Vertical Alignment 204
User Guide 13
Browse the Data of a Query Item 211
Using Quotation Marks in Literal Strings 212
Functions Not Available When Creating a Report or Layout Expression 212
Operators 212
Summaries 217
Constants 222
Constructs 223
Business Date/Time Functions 223
Macro Functions 227
Common Functions 229
DB2 234
DB2 Cast 241
DB2 Math 242
DB2 Trigonometry 243
MS Access 244
MS Access Cast 248
MS Access Math 249
MS Access Trigonometry 249
Oracle 250
Oracle Math 255
Oracle Trigonometry 255
Red Brick 256
SAP BW 260
SAP BW OLAP 260
SAP BW Trigonometry 260
SAP BW Math 261
SQL Server 262
SQL Server Cast 264
SQL Server Math 265
SQL Server Trigonometry 265
Teradata 266
Teradata Trigonometry 270
OLAP 271
OLAP Member 271
OLAP Set 272
OLAP Numeric 274
Report functions 275
Appendix F: Drilling Through from Cognos Series 7 to ReportNet 281
Setting Up Drill-through Access from PowerPlay Web 281
Configure Cognos Series 7 for ReportNet 281
Prepare the Transformer Model and Cube 281
Copy the Search Path 282
Enable the Cube for Drill-through access to ReportNet 282
Decide Which Filters to Create in the Target Report 283
Create and Test the Target Report 283
Disable the Drill Through Assistant 284
Setting Up Drill-through Access from Cognos Visualizer 284
Configure Cognos Visualizer for ReportNet 284
Copy the Folder Search Path 284
Specify a ReportNet Target Report 285
Decide Which Filters to Create in the Target Report 285
Create and Test the Target Report 286
Disable the Drill Through Assistant 286
User Guide 15
16 Cognos ReportNet( T M ) Cognos Report Studio
Introduction
This document is available as online help and as an online book. For information about related
documents, see "Additional Materials" (p. 19).
User Guide
This document includes step-by-step procedures and background information to help you create
standard and complex reports.
To use this guide, you should have
• knowledge of your business requirements
• experience using a Web browser and developing Web applications
• knowledge of databases and data modeling concepts
Questions or Comments?
For additional technical information about using this product, visit the Cognos support Web site
(http://support.cognos.com).
User Guide 17
Introduction
In this guide, we refer to other documents. Their locations are listed below.
Topic Location
How to create and publish models Framework Manager User Guide
using Framework Manager
Formats
Our documentation includes user guides, tutorial guides, reference books, and other materials
to meet the needs of our varied audience.
Online Help
All information is available in online help. Online help is available from the Help button in a Web
browser, or the Help menu and Help button in Windows products. All online help is also available
from the Windows Start menu (Start, Programs, Cognos ReportNet, Documentation).
User Guide 19
Additional Materials
Cognos Report Studio is a Web-based tool that professional report authors use to build
sophisticated, multiple-page, multiple-query reports against multiple databases. With Cognos
Report Studio, you can create any report that your company requires, such as invoices,
statements, and weekly sales and inventory reports.
Planning Reports
Before you use Cognos Report Studio to design and create a report, some information is
required. For each report, answer the following questions:
• Who is the target audience?
• What business question do you want to answer?
• Which type of report will best answer the business question?
• What are the data sources, and where are they?
• Which query items and calculations are needed?
• What are the security needs?
• How will the report be distributed?
Answering some of these questions involves working with other ReportNet components. For
example, Framework Manager is the metadata tool used to model your enterprise data. Models
created in Framework Manager provide the query items that you use in reports.
User Guide 21
Chapter 1: Cognos Report Studio
Insertable
Objects
pane
Properties
pane
Work area
Properties Pane
The Properties pane lists the properties that you can set for an object in a report.
You can obtain additional information about a property by selecting it and clicking F1.
Tip: View a description of the currently selected property at the bottom of the pane. From the
View menu, click Property Descriptions.
Explorer Bar
Use the following buttons on the Explorer bar to work with different parts of a report:
• Pause the pointer on the page explorer button to go to a specific report page or prompt
page.
Tip: You can also add a new report page or add a prompt page.
• Pause the pointer on the query explorer button to work with queries.
You use the Query Explorer to create or modify queries and to perform complex tasks, such
as defining union joins and writing SQL statements.
• Pause the pointer on the condition explorer button to work with variables.
You use variables to add conditional formatting to a report.
Work Area
The work area is where you design reports.
Layout
A layout is a set of pages that defines the appearance and formatting of a report. When you
design the layout of a report, you
• present the data in a meaningful way by using lists, crosstabs, and charts
• give the report the appearance you want by adding formatting, such as borders, color,
images, and page numbers
• specify how the data flows from one page to the next
Pages
Pages are containers for the layout objects that you use to build a report. A page is made up of
the following mandatory and optional components:
• page header (optional)
• page body (mandatory)
• page footer (optional)
When you run a report, the amount of data queried often exceeds one page. As a result, a page
will repeat until all of the data is shown. You have control over how data flows from one page to
the next. For example, here are alternative representations of a report that contains a chart and
a lengthy list.
(1) The chart appears on its own page. The list begins on the next page and fills subsequent
pages until all rows are displayed.
(2) The chart and the first few rows of the list appear on the first page. The rest of the data in
the list appears on the subsequent pages.
User Guide 23
Chapter 1: Cognos Report Studio
Objects
You add layout objects to a page when you create a report. Below are objects that you will use
often when building reports in Cognos Report Studio:
• list
Add a list to show data in rows and columns.
• crosstab
Add a crosstab to show data in a grid, with dimensions along the rows and columns, and
measures in the cells or intersection points.
• chart
Add a chart to show data in a graphical format.
• repeater
Add a repeater to show each instance of a certain column or query item in a separate
frame.
• text
Add a text item to show textual information.
• block
Add a block to hold text or other information. Blocks are often used to lay out horizontal
bands of information.
• table
Add a table to arrange or align layout objects in a left to right, top to bottom fashion.
For information about other layout objects you can add to a report, see "Inserting Other
Objects" (p. 51).
Queries
Queries determine what data items appear in the report. Sometimes you want detail rows of
data, which you obtain by using a simple SELECT statement. Other times you must calculate
totals or averages using aggregate functions and grouped columns, or must apply filters to show
only the data you want.
Cognos Report Studio automatically creates the queries you need as you build reports.
However, you can modify these queries or create your own custom queries to get the results you
want.
For more information about queries, see "Working with Queries" (p. 73).
Object Types
In Cognos Report Studio, layout objects are either inline or block. You can insert other objects
on the same line as an inline object, but not on the same line as a block object. When you insert
an object to the left or to the right of a block object, the object appears on the line above or
below the block object respectively. Examples of inline objects include graphics and text items.
Examples of block objects include any report type (list, crosstab, or chart) and tables.
Note: You can also use an object’s floating property to define how other objects flow around the
object. For example, you can specify how text flows around an image.
Objects as Containers
Objects, such as tables, blocks, and any report frame, are containers in which you can insert
other objects. For example, you can insert a list in one cell of a table and a chart in another.
Tip: You can also nest objects to create a sophisticated layout. For example, you can insert a
table in a cell of another table.
Hierarchy of Objects
In Cognos Report Studio, objects are organized hierarchically. For example, a list contains list
columns, and each list column contains a text item, which is the name of the inserted query
item.
The hierarchy of objects is useful to remember when you apply formatting because formatting is
applied to the child objects of the object. For example, you can specify that all list column titles in
a list have red as the background color. The formatting is automatically applied to any new
columns you add to the list, since the formatting is applied to the list and is therefore applied to
the objects in the list.
Tip: Select a column title in the list, and in the Properties pane, click the select ancestor button
and click List Column Titles. Then specify the background color you want in the Background
Color property.
Set Options
Set the options you want before you begin creating reports.
Option Description
Show startup dialog Shows the Welcome dialog box at startup
User Guide 25
Chapter 1: Cognos Report Studio
Option Description
Delete unreferenced Automatically deletes query objects linked to
query objects another object.
For example, if you delete a list, the query
linked to the list is deleted as well.
Steps
1. From the Tools menu, click Options.
2. In the General tab, set the options you want.
3. In the Layout width and Layout height boxes, specify the width and height of the area
where you will create reports.
4. Click OK.
Creating a Report
When you create a report, you are actually creating a report specification. The report
specification defines the queries and prompts that are used to retrieve data, as well as the
layouts and styles used to present the data. For simplicity, the report specification is called the
report.
You can also modify an existing report. Open the report, make the required changes, and save
the report.
Before creating a report, ensure that you have the planning information you need.
Creating a new report involves
❑ specifying the package
❑ choosing a report template
❑ adding query items
❑ saving the report
❑ running the report
You can then manipulate the data that will appear in the report (p. 61) and format the report
(p. 45). For information about other tasks that are specific to a report type, see "Types of
Reports" (p. 33).
The packages that you use to generate reports are based on models that are created in the
modeling tool, Framework Manager. A model is a set of related query subjects and other
objects, such as filters and calculations. When you open a package in ReportNet, these model
objects are visible in the left frame.
The package must be previously created and published to the Cognos Connection portal. For
more information, see the Framework Manager User Guide.
Steps
1. In the Cognos Connection Welcome page, click the Report Studio link.
If there is more than one package available, the Select a package page appears.
Otherwise, Cognos Report Studio starts.
2. If more than one package exists, click the one you want to use.
3. In the Welcome dialog box, choose whether to open a new or existing report:
• To create a new report, click Create a new report and choose a report template.
• To open an existing report, click Open an existing report and select a report.
Objects from the selected package, such as query items, appear in the Model tab of the
Insertable Objects pane.
Tip: You can later change packages (p. 84).
Steps
1. From the File menu, click New.
2. Choose a report template:
• To create an empty report, click one of the predefined report templates and click OK.
• To open an existing report as a template, double-click Existing, click a report, and click
Open.
Tip: You are actually opening a copy of the report, and the original report remains
unchanged.
The report template appears in the report page.
User Guide 27
Chapter 1: Cognos Report Studio
Tips: For more information about a query item, right-click the query item and click Properties.
Other ways to select query items are to double-click each query item, or right-click each query
item and click Insert.
A flashing black bar indicates where you can drop a query item. Query items inserted in the
report appear on the Query Items tab.
If you are using an SAP BW data source, you can use only a single hierarchy, or query subject,
of a characteristic at a time in a report. In the default model created by Framework Manager,
each query subject represents a single hierarchy of an SAP BW characteristic.
Tip: If you want to remove a query item from the report, select it and click the delete button. To
remove the query item from the report but keep it in the Query Items tab, click the cut button
instead.
Save a Report
Save your report to preserve the modifications you made.
You can also save your report on your computer instead of on the ReportNet server (p. 83).
Steps
1. From the File menu, click Save , or click Save As to save a copy of the report under a
different name.
2. If you are saving the report for the first time, specify where you want to save the report and
type a file name.
For information on setting up folders in Cognos Connection for your reports, see the
ReportNet User Guide.
3. Click Save.
Run a Report
Run your report to see the data that is retrieved. Save time by validating it first to check for
errors.
You can also run a report or a group of reports in Cognos Connection. For more information, see
the ReportNet User Guide.
Steps
1. Open the report that you want to run.
2. From the Tools menu, click Validate Report.
A message box appears indicating whether any errors were found in the report.
3. If you want to enable Design Mode Only filters defined in the package, from the File menu,
click Use Model Design Filters.
Use these filters to limit the amount of data retrieved so that you can see results more
quickly.
For more information, see the Framework Manager User Guide.
4. If you want to view only the tabular data, from the Run menu, click View Tabular Data.
Use this command to ensure that the right results appear. For example, you create a
calculation and you want to ensure it is giving you the results you want.
5. If you want to set run options, from the Run menu, click Run Options.
The default value is the value of the selected corresponding run option in Cognos
Connection.
The run options you set apply only to the current session. When you close Cognos Report
Studio, the options return to the default settings.
6. Change any values you want for the current session and click OK.
Option Notes
Output format None
7. From the Run menu, click one of the options to produce the report in the format you want.
You can produce a report in HTML, PDF, CSV, XLS, or XML. You cannot produce a report in
CSV or XML format if you have more than one query defined in the report, unless the
additional queries are used for prompts.
The report runs in the Cognos Report Viewer window. Once the report has finished running,
you can run the report again in the same format or in a different format. If you run the report
again in CSV or XLS format, the report will appear in a new browser window.
Limitations exist when producing reports in XLS format. For more information, see "Producing
Reports in Microsoft Excel Format" (p. 291).
User Guide 29
Chapter 1: Cognos Report Studio
If you want to cancel a report that is running against SAP BW, you can do so only during the
initial portion of the report’s execution. After this time, the report runs to completion on the SAP
BW server.
If you run a report that uses functions or features not supported by SAP BW, an error message
appears that explains why the action is not supported with SAP. We recommend that you test
your reports on an ongoing basis while you author them in Cognos Report Studio to ensure that
you do not encounter multiple error messages when you run the report.
Print a Report
Print your report to obtain a paper copy.
You can also print a report from Cognos Connection. For more information, see the ReportNet
User Guide.
Steps
1. If you are producing the report in PDF, from the File menu, click Page Setup and set the
page options you want.
2. Run the report.
3. From the File menu, click Print.
4. Select the print options you want and click OK.
User Guide 31
Chapter 1: Cognos Report Studio
You use different report types to look at data in different ways or to answer different business
questions. For example, you create a list report to show your entire customer base, but you
create a crosstab report to show which sales representative has the highest sales for each
product line. You can create a chart to present data graphically.
In Cognos Report Studio, you can create the following types of reports:
• list
• crosstab
• chart
• repeater
You can also combine one or more of these in a single report.
List Reports
Use list reports to show detailed information from your database, such as product lists and
customer lists.
A list report is a report that shows data in rows and columns. Each column shows all the values
for a query item in the database or a calculation based on query items in the database.
For information about how to create a list report, see the Cognos Report Studio Tour.
Group Data
Group query items in a list report to remove duplicate values. For example, you have a report
that shows products purchased. For each product, the product type is also shown. You group
the Product type column to show only one instance of each product type in the list.
User Guide 33
Chapter 2: Types of Reports
When creating group list reports using an SAP data source, you can group or sort in the order of
the existing hierarchy only. If you change the order, an error occurs. You can omit columns from
the grouping. For example, if one query subject represents a hierarchy with the levels Country,
State, and City, and another query subject represents a hierarchy with the level Product:
• Country, State, City is valid.
• Country, Product, and State is not valid because a query item from another query subject
was inserted between two query items from another query subject.
• Country, City, and Product is valid even though State is omitted.
After you group a column, you can control when its values are displayed by setting the level
span.
Steps
1. Open the report that you want.
2. Click the column you want to group on.
You can click either the column heading or one of the column cells.
Tip: To perform multiple groupings at once, use Ctrl+click or Shift+click.
3. From the Structure menu, click Group/Ungroup.
A symbol appears indicating that the column is grouped. The column appears in the list of
headers and footers that you can add to the report (p. 46).
Steps
1. Open the report that you want.
2. Click the column for which you want to set the level span.
3. In the Properties pane, double-click the Level Span property.
The Choose Level dialog box appears.
4. Click the column you want to span and click OK.
Steps
1. In the Cognos Connection Welcome page, click the Public Folders link.
2. Click the GO Sales and Retailers link, and then click the Report Studio link at the top right
corner of the page.
3. In the Welcome dialog box, click Create a new report.
4. In the New dialog box, click List and click OK.
5. In the Insertable Objects pane, on the Model tab, add the following query items to the list
by double-clicking them:
• Order number
• Order date
• Product name
• Quantity
• Revenue
Tip: You can find these query items in the Orders and Products folders.
6. Group the Order number column.
7. Click the Order date column.
8. In the Properties pane, double-click the Level Span property.
9. Click Order number and click OK.
When you run the report, the first row of the Order date column appears for each Order number
row.
Steps
1. In the Cognos Connection Welcome page, click the Public Folders link.
2. Click the GO Sales and Retailers link, and then click the Report Studio link at the top right
corner of the page.
3. In the Welcome dialog box, click Create a new report.
4. In the New dialog box, click List and click OK.
User Guide 35
Chapter 2: Types of Reports
5. In the Insertable Objects pane, on the Model tab, add the following query items to the list
by double-clicking them:
• Product line
• Product type
• Product name
• Description
• Production cost
Tip: You can find these query items in the Products folder.
6. Group the Product line and Product type columns.
7. Click the Product line column.
8. In the Properties pane, double-click the Level Span property.
9. Click Product type and click OK.
10. Click any part of the list and then click the select ancestor button in the title bar of the
Properties pane.
11. Click List.
12. In the Properties pane, double-click the Font property.
13. In the Size box, click 8pt and click OK.
When you run the report, the product line appears whenever the product type changes.
Crosstab Reports
Use crosstab reports to show information in a more compact form than in a grouped list. For
example, create a crosstab report to show total sales by product line generated by each sales
representative.
Like list reports, crosstab reports are reports that show data in rows and columns. However, the
values at the intersection points of rows and columns show summarized information rather than
detailed information.
For information about how to create a crosstab report, see the Cognos Report Studio Tour.
Steps
1. Open the report that you want.
2. In the Insertable Objects pane, on the Model tab, click the query item you want to add to
the report.
3. Drag the query item to the location where you want it to appear as a nested column or
nested row.
A black bar indicates where you can drop the query item.
4. Repeat steps 2 to 3 to add other nested columns or rows.
Tip: If you add more than one measure to a crosstab, all measures appear as columns. You
cannot have one measure appear as a row and another as a column. To make all measures
appear as rows, swap columns and rows.
Steps
1. Open the report that you want.
2. Click the columns that you want to appear as columns or nested columns in the crosstab.
3. From the Structure menu, click Pivot List to Crosstab.
The list becomes a crosstab, with the columns you selected in step 2 appearing as columns and
nested columns. The unselected columns, except for measures, appear as rows and nested
rows. If you have one measure, it becomes the cells of the crosstab. If you have more than one
measure, they appear as columns.
Tip: To make all measures appear as rows, swap columns and rows.
User Guide 37
Chapter 2: Types of Reports
Steps
1. In the Cognos Connection Welcome page, click the Public Folders link.
2. Click the GO Sales and Retailers link, and then launch Cognos Report Studio by clicking
the Report Studio link at the top right of the page.
3. In the Welcome dialog box, click Create a new report.
4. In the New dialog box, click Crosstab and then click OK.
5. In the Insertable Objects pane, on the Model tab, add the following query items to the
crosstab:
• Double-click Order method to add it as columns.
• Double-click Product line to add it as rows.
• Click Product type and drag it just to the right of Product line.
Product type is now nested in Product line.
• Double-click Quantity to add it as a measure.
• Double-click Revenue to add it as a second measure.
Tip: You can find these query items in the Orders and Products folders.
6. Click any part of the crosstab and then click the select ancestor button in the title bar of the
Properties pane.
7. Click Crosstab.
8. In the Properties pane, double-click the Font property.
9. In the Size box, click 8pt and click OK.
10. Click one of the measures.
11. Click the aggregate button and click Maximum.
When you run the report, you can see that for the Special order method, the personal accessory
Knives generated the highest sales volume, and Watches generated the most revenue. When
you scroll to the right, you can see that for all personal accessories, knives sold by sales visits
generated the largest sales volume. Watches ordered by telephone generated the largest
revenue.
User Guide 39
Chapter 2: Types of Reports
Steps
1. Click the chart or a chart component, such as a label, data marker, or background, whose
property you want to modify.
2. In the Properties pane, click the property you want, and then select the desired value from
the list.
Ellipsis points (...) indicate that a dialog box provides further options.
Steps
1. In Cognos Connection, go to the GO Sales and Retailers model.
2. Click the Report Studio link.
Cognos Report Studio opens.
3. From the File menu, click New.
4. In the New dialog box, click Chart, and then click OK.
5. In the Chart Grouping pane, click Combination.
6. In the Chart Type pane, click Combination.
7. Click OK.
8. In the Insertable Objects pane, on the Model tab, click the Orders folder.
9. Drag Quantity to the Measures drop zone.
10. In the Chart Type for Measure box, click the column icon, and then click OK.
11. Drag Return quantity from the Returned item table to the Measures drop zone.
12. In the Chart Type for Measure box, click the line icon, and then click OK.
13. In the Insertable Objects pane, on the Model tab, click the Products folder.
14. Drag Product line to the Categories drop zone.
15. Click the run button on the toolbar, and view the report.
Because the figures for returned items are much lower than quantity sold, it is difficult to
distinguish the amount of returns.
16. Close the Cognos Report Viewer to return to Cognos Report Studio.
17. Click the background of the chart.
18. In the Properties pane, click the Axis Type property, and then click Dual.
19. Click the background of the Return Quantity drop zone.
20. In the Properties pane, click the Measure Axis property, and then click Y2.
21. Click the run button on the toolbar, and view the report.
Steps
1. In Cognos Connection, go to the GO Sales and Retailers model.
2. Click the Report Studio link.
Report Studio opens.
3. From the File menu, click New.
4. In the New dialog box, click Chart, and then click OK.
5. In the Chart Grouping pane, click Column.
6. In the Chart Type pane, click Progressive Column.
7. Click OK.
8. In the Insertable Objects pane, on the Model tab, click the Orders folder.
9. Drag Quantity to the Measures drop zone.
10. In the Insertable Objects pane, on the Model tab, click the Products folder.
11. Drag Product line to the Categories drop zone.
12. Click the background of the chart.
13. In the Properties pane, click the Positive Value Color property, and then click the ellipsis
points (...) to bring up the Progressive Chart Column Color box.
14. In the Progressive Chart Column Color box, click the color icon.
15. On the Named Color tab, click green, then click OK.
16. In the Progressive Chart Column Color box, click OK.
You can also show the total column.
17. In the Properties pane, click the Show Total Column property, and then click Yes.
You can change the color of total column.
18. In the Properties pane, click the Total Column Color property, and then click the ellipsis
points (...) to bring up the Progressive Chart Column Color box.
User Guide 41
Chapter 2: Types of Reports
Repeaters
Repeaters are tables in which you can insert items that are repeated when you run the report.
For example, use repeaters to create mailing labels.
To build a repeater, drop the items you want in the repeater object. Then modify the properties of
the repeater to obtain the results you want. For example, you can specify how many repeater
frames appear per page by typing values in the Across and Down properties.
Steps
1. Create a list with the columns that you want, or open an existing report.
2. Click any part of the list.
3. From the Structure menu, click Convert List to Repeater.
Steps
1. In the Cognos Connection Welcome page, click the Public Folders link.
2. Click the GO Sales and Retailers link, and then launch Cognos Report Studio by clicking
the Report Studio link at the top right of the page.
3. In the Welcome dialog box, click Create a new report.
4. In the New dialog box, click Repeater and then click OK.
5. Click the repeater, click the select ancestor button in the Properties pane title bar, and click
Repeater.
6. In the Properties pane:
• In the Across property, type 2.
• In the Down property, type 5.
• Double-click the Table Properties property, select the Fixed size check box, and click
OK.
7. In the Insertable Objects pane, on the Toolbox tab, drag the Table object to the repeater.
The Insert Table dialog box appears.
8. In the Number of columns box, type 1 and click OK.
9. Click the table, ensure you see Table Cell in the Properties pane title bar, and modify the
following properties:
• Double-click Background Image.
Click Browse, click logo.jpg, and click OK.
In the Position box, click the align top right button.
In the Tiling box, click Do not tile.
Click OK.
• Double-click Size & Overflow, and in the Height box, type 175, and click OK.
10. Click the table, click the select ancestor button in the Properties pane title bar, and click
Table.
11. In the Properties pane:
• Double-click Borders.
In the Color box, click Black.
In the Style box, click Solid line.
In the Width box, click 1 pt.
Under Preview, click the all borders button.
Click OK.
• Double-click Font, and under the Size box, click 8pt, and click OK.
12. In the Insertable Objects pane, on the Toolbox tab, drag the Block object to the repeater 8
times to create 8 blocks:
13. In the Insertable Objects pane, on the Toolbox tab, drag the Text Item object to the first
block:
• In the Text dialog box, type To:, and click OK.
• Click the text item.
• Click the font button , click Bold, and click OK.
14. Click the first block, and in the Properties pane:
• Double-click Padding, type 35 in the right box, click mm as the unit, and click OK.
• Click Horizontal Alignment and click Center.
15. In the Insertable Objects pane, on the Model tab, expand Retailers.
16. Expand the Mailing address folder and drag the seven query items to the remaining seven
blocks.
17. Shift-click the seven blocks to select them, and in the Properties pane:
• Double-click Padding, type 25 in the left box, click mm as the unit, and click OK.
• Click Horizontal Alignment and click Left.
User Guide 43
Chapter 2: Types of Reports
When you run the report, each page will contain 10 mailing labels in two columns.
Format your report to make it more readable and to reflect company standards. When you
format a report in Cognos Report Studio, the formatting is stored in a layout.
You can also format a report based on conditions (p. 87).
When formatting a report, you can
• add a header or footer
• add borders
• add text
• add color
• insert an image
• add a bookmark
• insert other objects
• align an object
• use tables to control where objects appear
• apply padding
• set margins
• reuse an object
• add a page
• reorder columns
• rename a column
• swap columns and rows
• set object properties
• change the default class of an object
User Guide 45
Chapter 3: Formatting a Report
Steps
1. Open the report that you want.
2. Click a column.
If you have a list and you grouped one or more columns, you can also add grouped columns
as headers and footers.
3. To add a header, click the Create Header button.
4. To add a footer, click the Create Footer button.
5. To add or remove overall headers or footers in a list, from the Structure menu, click List
Headers & Footers , and select or clear the appropriate check boxes.
Add Borders
You can add borders to objects in a report such as a column, a header, a footer, or to the whole
report to improve appearance.
Steps
1. Open the report that you want.
2. Click the object to which you want to add a border.
Tip: To quickly select the parent of an object, click the object, and then click the select
ancestor button in the title bar of the Properties pane.
3. In the Properties pane, double-click the Border property.
4. Select the values you want in the Color, Style, and Width boxes.
5. Apply the selected values to the top, bottom, left side, right side, or all sides of the object by
clicking the appropriate button in the Preview section.
Tip: To clear the border applied, click the clear button.
6. Click OK.
Add Text
You can add text to a report. You can insert text in other objects, such as a block or table cell, or
directly in the report page.
You can also add multilingual text to a report (p. 89).
Steps
1. Open the report that you want.
2. In the Insertable Objects pane, click the Toolbox tab.
3. Drag the Text Item object to the report.
The Text dialog box appears.
4. Type the text that you want.
You can also paste text from another part of the report.
5. Click OK.
If you click OK without typing any text, Cognos Report Studio inserts the string Double click
to edit text.
You can now format the text by changing the font, color, size, and so on. Select the text and
make the appropriate changes in the Properties pane.
Add Color
You can add background and foreground color to objects in the report.
User Guide 47
Chapter 3: Formatting a Report
Steps
1. Open the report that you want.
2. Select the object to which you want to add color.
Tip: To quickly select the parent of an object, click the object, and then click the select
ancestor button in the title bar of the Properties pane.
3. In the Properties pane, select Background Color or Foreground Color, and then click the
ellipsis button.
4. To apply an existing color, click the Web Safe Colors tab or Named Colors tab and choose
one of the available colors.
Use a named color when you want to select a color from a small set of colors. Use Web safe
colors to select from 216 available colors.
5. To apply a custom color, click the Custom Color tab and type values in the Red, Green,
and Blue boxes.
The values must be in hexadecimal.
6. Click OK.
Insert an Image
You can insert an image in a report. You can insert images in other objects, such as a block or
table cell, directly in the report page, or as the background image of another object.
Steps
1. Open the report that you want.
2. In the Insertable Objects pane, click the Toolbox tab.
3. Drag the Image object to the report and then select it.
4. In the Properties pane, double-click the URL property.
5. In the Image URL dialog box, type the URL of the image you want to insert or click the
Browse button to go to the location containing the image.
6. Click OK.
Steps
1. Select the object for which you want to add a background image.
2. In the Properties pane, double-click the Background Image property.
3. In the Image URL box, type the URL of the image you want to insert or click the Browse
button to go to the location containing the image.
The image appears in the Preview box.
4. In the Position box, choose how you want to align the image in the object.
5. In the Tiling box, click the tiling option you want.
6. If the object has scroll bars and you do not want the background image to move while
scrolling, select the Keep background from scrolling check box.
7. Click OK.
Add a Bookmark
Add a bookmark so that users can quickly move from one part of a report to another. For
example, a list report contains many rows of data. You can use bookmarks so that users can
move to specific rows.
Bookmarks work only for reports produced in HTML format.
1. Open the report that you want.
2. In the Insertable Objects pane, click the Toolbox tab.
3. Drag Bookmark to the location you want and then click it.
4. In the Properties pane, define the bookmark source:
• If you want to use static text, double-click Label and type a text value.
• If you want to use a query item, double-click Query Item and click a query item.
• If you want to use a report expression, double-click Report Expression and define the
report expression.
5. Create the object that you want to use as the bookmark reference.
For example, if the bookmark source is a label, create a text item.
6. Right-click the object and click Drill Throughs.
7. Click the new drill through button.
8. Select the Bookmark Reference check box.
9. Under Bookmark Reference, define the bookmark reference:
• If the bookmark source is a label, click Label and type the text value you specified in
step 4.
• If the bookmark source is a query item, click Query item and choose the query item you
specified in step 4.
• If the bookmark source is a report expression, click Report expression button and
define the expression you specified in step 4.
10. Click OK.
Steps
1. In the Cognos Connection Welcome page, click the Public Folders link.
2. Click the GO Sales and Retailers link, and then click the Report Studio link at the top right
corner of the page.
3. In the Welcome dialog box, click Create a new report.
4. In the New dialog box, click List and click OK.
5. In the Insertable Objects pane, on the Model tab, add the following query items to the list
by double-clicking them:
• Product line
• Product type
• Product name
• Description
• Production cost
Tip: You can find these query items in the Products folder.
6. Click the Product line column and then click the create section button.
User Guide 49
Chapter 3: Formatting a Report
7. Click a column in the list, and in the Properties pane, click the select ancestor button and
click List.
8. In the Properties pane, click the Rows Per Page cell and type
1000
9. Click another property to save the rows per page value.
10. In the Insertable Objects pane, on the Toolbox tab, drag Bookmark to the left of Product
line.
11. Click the bookmark, and in the Properties pane, click the Query Item cell and click
Product line.
12. In the Insertable Objects pane, on the Toolbox tab, drag List to the report header.
13. Click OK to create the list in a new query.
14. In the Insertable Objects pane, on the Model tab, drag Product line to the new list.
15. Right-click Product line and click Drill Throughs.
16. Click the new drill through button.
17. Select the Bookmark Reference check box.
18. Under Bookmark Reference, click Query item and then click Product line from the
drop-down list.
19. Click OK.
20. In the Insertable Objects pane, on the Toolbox tab, drag Text Item to the left of the
Product line bookmark.
21. In the Text dialog box, type Top and click OK.
22. Right-click the Top text item and click Drill Throughs.
23. Select the Bookmark Reference check box.
24. Under Bookmark Reference, click Label and then click the ellipsis (...) button.
25. Type Top and click OK.
26. In the Insertable Objects pane, on the Toolbox tab, drag Bookmark to the report header.
27. Click the bookmark, and in the Properties pane, double-click Label and type
Top
28. Click OK.
When you run the report, a list appears in the report header containing all product lines as links.
Clicking a product line brings you to the corresponding product line section in the second list.
You can return to the top of the report by clicking the Top link next to the section.
Object Description
Calculation Adds a calculated column (p. 64).
Row Number Numbers each row of data returned when the report
is run.
For information about each report type, see "Types of Reports" (p. 33). For information about
each prompt control and prompt buttons, see "Adding Prompts" (p. 67).
Steps
1. In the Cognos Connection Welcome page, click the Public Folders link.
2. Click the GO Sales and Retailers link, and then click the Report Studio link at the top right
corner of the page.
User Guide 51
Chapter 3: Formatting a Report
Align an Object
You can specify an alignment for objects in a report to determine where it appears.
Tables can also be used to determine where objects appear in a report.
Steps
1. Open the report that you want.
2. Select the object that you want to align.
Tip: To quickly select the parent of an object, click the object, and then click the select
ancestor button in the title bar of the Properties pane.
3. Click the container alignment button , and then click one of the available alignment options.
Steps
1. Open the report that you want.
2. In the Insertable Objects pane, click the Toolbox tab.
3. Drag Table to the report.
The Insert Table dialog box appears.
4. In the Number of columns and Number of rows boxes, type the number of columns and
rows you want the table to have.
5. To have the table span the width of the report page, select the Maximize width check box.
6. To add borders to the table, select the Show borders check box.
7. Click OK.
Apply Padding
Apply padding to an object to add white space between the object and its margin or, if there is a
border, between the object and its border.
Steps
1. Open the report that you want.
2. Select the object to which you want to apply padding.
3. In the Properties pane, double-click the Padding property.
4. Specify top, bottom, left, and right padding by typing values in the corresponding boxes and
choosing the unit of measure you want.
5. Click OK.
Set Margins
You can set margins for objects in a report.
Steps
1. Open the report that you want.
2. Select the object for which you want to set margins.
3. In the Properties pane, double-click the Margin property.
4. Specify the top, bottom, left, and right margins by typing values in the corresponding boxes
and choosing the unit of measure you want.
5. Click OK.
Reuse an Object
You can save time by reusing objects that you add to a report instead of recreating them. For
example, you have a multiple-page report and you want the same header to appear on each
page. Create the header once and reuse it on all other pages.
You can only reuse objects within the same report.
Steps
1. Open the report that you want.
2. Click the object that you want to reuse.
Tip: To quickly select the parent of an object, click the object, and then click the select
ancestor button in the title bar of the Properties pane.
3. In the Properties pane, in the ID property, type a value beginning with a letter to uniquely
identify the object.
4. In the Insertable Objects pane, on the Toolbox tab, drag the Layout Component
Reference object to the location where you want to reuse the object.
5. In the Layout Component Reference dialog box, click the object.
6. Click OK.
A copy of the object appears where you placed the Layout Component Reference object. If
you later change the source object, copies of the object are automatically updated.
Steps
1. Open the report that you want.
2. In the parent object that you want to reuse, click the child object you want to change.
User Guide 53
Chapter 3: Formatting a Report
3. In the Properties pane, in the ID property, type a value beginning with a letter to uniquely
identify the object.
4. Select the copy of the parent object you created with the Layout Component Reference
object.
5. In the Properties pane, double-click the Component Overrides property.
6. In the Layout Component Overrides dialog box, click the child object you want to change
and click OK.
The child object in the copy of the parent object is replaced by the following text:
Drag & drop object to override component child.
7. Drag the object that you want to replace the child object.
You can replace the child object with any other object, not just an object of the same type.
For example, if the child object is a text item, you can replace it with an image.
Add a Page
Add pages that contain different content to create a multiple-page report. You may want to do
this for a variety of reasons. For example, you are creating a sales report and you want to
include general information about the company. You decide to create an introduction page to
show this information. When you run the report, page one of the report is the introduction page.
The following pages contain data.
When you have a multiple-page report, you can insert page breaks to organize the pages and
control what data appears on each page.
Steps
1. Open the report that you want.
2. From the File menu, click Pages.
3. In the Report Pages tab, click the add button.
To add a prompt page (p. 67), click the Prompt Pages tab.
4. Type the name of the page you want to add.
5. To set pagination properties for the page, select the page and click the properties button.
6. Click OK.
A new page appears in the Pages dialog box. You can now use the arrow buttons to change the
page order in the report.
Steps
1. From the File menu, click Pages.
2. In the Report Pages tab, click the page breaks button.
3. Click the Break pages using this query drop down list and select the query that you want
to use.
You must select a query that contains only one dimension.
4. If you want to specify default page breaking, click Default page breaks. Go to step 7.
5. If you want to insert page breaks using grouping levels, click Page breaks by grouping
level (recommended).
6. In the box below Page breaks by grouping level (recommended), select the levels for
which you want to create page sets.
A level exists for each grouped column in the query.
Tip: If you want to define an overall header or footer page for the report, select Overall.
7. Click OK.
In the Pages dialog box, folders appear for each grouping level. If you insert more than one
page break, Header Page and Footer Page folders are created for each level, except for
the innermost level.
8. In the Pages dialog box, organize the pages in the report by dragging each page to the
folder you want.
Tip: Insert the page containing details in the innermost folder.
9. Click OK.
Steps
1. In the Cognos Connection Welcome page, click the Public Folders link.
2. Click the GO Sales and Retailers link, and then launch Cognos Report Studio by clicking
the Report Studio link at the top right of the page.
3. In the Welcome dialog box, click Create a new report.
4. In the New dialog box, click List and then click OK.
5. In the Insertable Objects pane, on the Model tab, add the following query items to the list
by double-clicking them:
• Product line
• Product type
• Product name
• Description
• Production cost
Tip: You can find these query items in the Products folder.
6. Group the Product line and Product type columns.
7. From the File menu, click Pages.
8. In the Pages dialog box, click the add button and create the following pages:
• Title page
• End page
• Product Line Header
• Product Line Footer
9. For each page just created, add the objects you want to uniquely identify each one.
10. Rename the Page1 page, which contains the list:
• Click Page1.
• Click the rename button.
• In the Rename dialog box, delete Page1 and type List.
• Click OK.
11. In the Pages dialog box, click the page breaks button.
12. Click the Break pages using this query drop down list and click Query1.
13. Click Page breaks by grouping level (recommended).
User Guide 55
Chapter 3: Formatting a Report
14. In the box below Page breaks by grouping level (recommended), select the Overall,
Product line, and Product type check boxes, and click OK.
15. Drag the following pages:
• Title page to the Overall folder’s Header Pages folder.
• Product Line Header to the Product line folder’s Header Pages folder.
• List to the Product type folder.
• Product Line Footer to the Product line folder’s Footer Pages folder.
• End page to the Overall folder’s Footer Pages folder.
Reorder Columns
Change the order of columns in a report to rearrange information.
Steps
1. Click the column you want to reorder in the report.
You can click the column heading or a column.
2. Drag the column to a new location.
A black bar indicates where you can drop the column.
Rename a Column
Change the column heading to provide a more meaningful name. When you add a query item to
a report, the query item name is initially used as the column heading.
Steps
1. Click the column heading you want to change.
Tip: For charts, you must click the chart first.
2. In the Properties pane, double-click the Name property.
3. Type a new name and click OK.
Steps
1. Open the report that you want.
2. From the Structure menu, click Swap Rows and Columns.
In the report, the rows become the columns and the columns become the rows.
User Guide 57
Chapter 3: Formatting a Report
Pagination
The Pagination property defines pagination rules you can set for a list, crosstab, or report page.
The Pagination dialog box contains the following options:
• Keep with header
Keeps all headers on the same page with the number of detail rows specified.
• Keep with footer
Keeps all footers on the same page with the number of detail rows specified.
• Reset page count
Resets the page count after a page break to the value specified.
• Reset page number
Resets the page number after a page break to the value specified.
• Repeat every page
When an object contains more rows than can be shown on a page, the object is repeated on
the next page.
Floating
The Floating property defines how other objects flow around the object. The Floating property
contains the following options:
• Float
Sets how other objects flow around the object.
• Allow floating objects on both sides
Allows other objects to flow on both sides. The Float property must be set.
• Move below any floating object on the left side
If there are other objects to the left of the object, the object moves below those objects. The
Float property must be set.
• Move below any floating object on the right side
If there are other objects to the right of the object, the object moves below those objects.
The Float property must be set.
• Move below any floating object
Moves the object below any other object in which the Float property was set.
Table Properties
The Table Properties property sets borders and the size for table cells. This property is available
only for objects that are tables, such as lists, crosstabs, and the table object. The Table
Properties dialog box contains the following options:
• Collapse borders
Collapses adjacent cell borders into a single border.
• Cell spacing
If borders are not collapsed, sets the amount of space between cell borders.
• Show empty cell borders
If borders are not collapsed, shows borders of cells that are empty.
• Fixed size
Makes all cells the same fixed, size.
User Guide 59
Chapter 3: Formatting a Report
Make a report easier to read and easier to understand by specifying what data appears in the
report and how the data looks. In Cognos Report Studio, you can
• filter data
• sort data
• create sections
• add a summary
• create a calculation
• format data
• show data for a specific time period
• define a prompt
• work with queries
Filter Data
Add a filter to focus a report and minimize processing time by excluding unwanted data. For
example, you can filter data to show customers who placed purchase orders valued at over
$1000 during the past year. When you run the report, you see only the filtered data.
You can also add filters to the package. If an expression is used in multiple reports, or by
different report authors, ask your modeler to create the expression as a model object and
include it in the relevant package.
Steps
1. Open the report that you want.
2. If you want to add a filter that was created in the package, from the Insertable Objects
pane, in the Model tab, drag the filter you want to the report.
3. From the Data menu, click Filters.
If you have more than one query defined in the report, you must first click an object linked to
the query in which you want to define the filter.
4. In the Filters dialog box, decide what type of filter you want to create:
• To add a filter that will apply to detailed rows, click the Tabular Filters tab.
• To add a filter that will apply to aggregated values for a grouped column, click the Group
Filters tab.
5. Click the add button.
6. In the Available Components box, define the filter expression:
• If you want to include query items not shown in the report, in the Model tab, double-click
query items.
• If you want to include query items that are in the report but not necessarily in the model,
such as calculations, in the Query Items tab, double-click query items.
• If you want to add functions, summaries, and operators to the filter expression, in the
Functions tab, double-click elements.
Tip: You can also type the filter expression directly in the Expression Definition box. When
typing date values, the date must be in the YYYY-MM-DD format.
For more information about creating expressions, see "Using the Expression
Editor" (p. 211).
7. Click the validate expression button , and click OK.
User Guide 61
Chapter 4: Working with Data
8. In the Usage box, specify whether the filter is required, optional, or not to be used.
9. If you created a tabular filter, in the Application box, decide whether to apply the filter
before or after aggregation.
For more information about this option, see the Information box.
10. If you created a group filter, click the ellipsis button (...) beside the Level box and choose the
grouping level for which you want to apply the filter.
For example, a revenue report is grouped on product line and product type. You can choose
to filter total revenue for either the product line or product type level.
Tip: If you want to filter at the overall level, choose None. For example, if a report has an
overall footer that shows the total revenue for all products, choose None to apply filter to the
footer.
11. Click OK.
creates the derived column DATEONLY from COL1, where COL1 contains the values as stored
by the application while DATEONLY contains the dates with the default time of 12:00:00 AM.
Tip: You can change the data format of the column to only show the date value by specifying
Short for the Date Style property.
You can then apply filters to the DATEONLY column that would return the correct results. If you
create a parameter in Cognos Report Studio that filters on this column, the default prompt will
present a date and time control because the data type is still a timestamp.
Sort Data
Organize data values in a report by specifying a sort order. Data can be organized in ascending
or descending order based on the values in any column.
If you are using an SAP BW data source, you cannot sort query items from different dimensions
that are intermixed. For example, you cannot sort on Query_Item1_Dimension1,
Query_Item1_Dimension2, Query_Item2_Dimension1. If you do, an exception error occurs.
Steps
1. Open the report that you want.
2. Click the column on which you want to sort.
3. From the Data menu, click Sort Ascending or Sort Descending.
An up arrow or down arrow appears beside the column to indicate that a sort order has been
set.
Tip: To remove a sort order, from the Data menu, click Don’t Sort.
Create Sections
Create sections in a report to show a query item as the heading of a section. When you run the
report, separate sections appear for each value.
Creating sections is similar to grouping on a query item (p. 33). The difference is that section
headers appear outside the list, crosstab, chart, or repeater.
Steps
1. Open the report that you want.
2. Click the column that you want to show as a section heading.
3. From the Structure menu, click Create Section.
User Guide 63
Chapter 4: Working with Data
Remove Sections
To remove a section, do the following:
Steps
1. Delete the section header.
2. From the View menu, click Page Structure.
3. Expand Page Body until you see the data container in which you added the section.
The data container is nested in the List object that is created when you add a section.
4. Drag the data container to Page Body.
The data container appears as a node of Page Body.
5. Delete the List object.
In the Query Explorer, the query that is created when you add a section is also deleted.
6. From the View menu, click Page Design.
7. In the Insertable Objects pane, click the Query Items tab.
8. Drag the query item that was used as a section header back into the data container.
For information about the page structure view, see "The Page Structure View" (p. 46).
Add a Summary
Add a summary to provide an overview of data in a report. An example of a summary is the total
amount billed on an invoice. You can add the following summaries to a report:
• total
• minimum
• maximum
• average
• count
Steps
1. Open the report that you want.
2. Click the column to which you want to add a summary.
3. From the Data menu, click the kind of summary you want.
The summary appears in the report as a footer (p. 46).
Create a Calculation
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.
Steps
1. Open the report that you want.
2. In the Insertable Objects pane, click the Toolbox tab.
3. Drag the Calculation object to the location where you want to create a calculation.
The Create Calculation dialog box appears.
4. In the Name field, type the name of the calculation.
Format Data
Format data in a report to improve readability. For example, you can show all date values in the
order year, month, and day. If you do not set properties here, data is formatted according to the
properties set in the model. If the properties were not set in the model, data is formatted
according to the International Components for Unicode (ICU) formats.
You can also format data based on a condition (p. 87).
Steps
1. Open the report that you want.
2. From the Data menu, click Layout Data Format.
3. In the Format type box, click a format type.
The properties that you can set for the selected format type appear in the Properties box.
4. If you clicked the Currency format type and require different currencies in the report, click
the add button. In the Currencies dialog box, select the currencies you want and click OK.
For example, you may have one column whose values are in euros and another column
whose values are in US dollars.
5. Set the properties that you want.
For each currency, select it and then specify the properties you want.
For properties in which you type meta-characters that represent certain types of
information, such as yyyy-mm-dd for dates, the meta-characters required depend on the
authoring language specified for the report. For more information, see "Formatting Data
With Patterns" (p. 113).
Some properties are language-sensitive and should only be changed with caution.
6. Click OK.
The data formatting properties you set are applied to objects only in the current layout.
If you are not getting the results you want for a particular object, the format type of the object
may not be what you expected.
Tip: In the report, click the object. In the Properties pane, double-click the Data Format
property and select the format type you want from the Format type list.
You can also override data formatting properties for the object by setting different properties.
User Guide 65
Chapter 4: Working with Data
Locale-sensitive Properties
Cognos Report Studio contains an extensive library of customized properties adapted to users
from different regions who speak different languages. If, for example, a modeler specifies that a
given query item is a currency, only the proper currency symbol must be specified. When
reports are created, Cognos Report Studio automatically adapts the format of the currency
numbers to each user according to the content language specified in Cognos Connection.
When modelers or report authors specify properties, these properties override user preferences
and risk creating inconsistent formatting for users of other cultures. It is usually much easier and
safer to let Cognos Report Studio take care of formatting. For example, for the date format type,
different regions use different characters to represent the date separator. If you specify a date
separator, you may confuse users in other regions.
The following data formatting properties are locale-sensitive.
• Currency Symbol Position
• Date Separator
• Date Ordering
• Calendar Type
• Time Separator
• Display AM/PM Symbols
• Clock
• Decimal Symbol
• Negative Sign Position
• Thousands Separator
• Group Size (digits)
• Secondary Group Size (digits)
• Missing Value Characters
• Zero Value Characters
• Pattern
• Negative Pattern
Steps
1. From the File menu, click As of Time.
2. In the Expression Definition box, define the expression you want.
3. Click OK.
When you run the report, data is retrieved according to the expression you defined. The report
functions AsOfDate() and AsOfTime() are changed to return the result of the expression. When
no expression is specified, these two functions will return the report execution date and time.
Adding Prompts
You can add prompts to a report to add interactivity for users. Prompts act as questions that help
users to customize the information in a report to suit their own needs. For example, you create a
prompt so that users can select a product type. Only products belonging to the selected product
type are retrieved and shown in the report.
Prompts are composed of three interrelated components. Parameters form the questions you
want to ask users. Prompt controls provide the user interface in which the questions are asked.
Finally, parameter values provide the answers to the questions.
Cognos Report Studio provides several ways to create prompts. You can
• use the Build Prompt Page tool
• build your own prompt and prompt page
• create a parameter to produce a prompt
• insert prompts directly into the report page
You can also create prompts in the package. For more information, see the Framework Manager
User Guide.
Steps
1. Open the report that you want.
2. Click the column you want users to be prompted on.
If you want to create multiple prompts or a cascading prompt, click more than one column.
3. From the Tools menu, click Build Prompt Page.
A prompt page is created that has:
• a page header
• a prompt control for each selected column
• a page footer containing Cancel, Back, Next, and Finish prompt buttons
You can add more objects or modify existing elements. For example, you can change the prompt
control chosen by Cognos Report Studio (p. 70).
Steps
1. Open the report that you want.
2. From the File menu, click Pages.
3. Click the Prompt Pages tab, and click the add button.
4. Type the name of the prompt page, and click OK.
The new prompt page appears in the work area.
User Guide 67
Chapter 4: Working with Data
5. In the Insertable Objects pane, on the Toolbox tab, drag one of the following prompt
controls to the prompt page.
Date & Time Retrieves data based on a date and time you
Prompt select.
Steps
1. Open the report that you want.
2. From the Data menu, click Filters.
3. In the Tabular Filters tab, click the add button.
The Tabular Model Filter dialog box appears.
4. In the Available Components box, click the Model or Query Items tab to select the query
item you want to use for the prompt:
• To filter data based on query items not shown in the report, double-click a query item in
the Model tab.
• To filter data that appears in the report but not necessarily in the model, such as
calculations, double-click a query item in the Query Items tab.
The query item appears in the Expression Definition box.
5. In the Expression Definition box, type an operator after the query item, or select an
operator from the Functions tab.
For more information about creating expressions, see "Using the Expression
Editor" (p. 211).
6. Type a name after the operator to define the prompt parameter. A question mark must
precede and follow the name.
7. Click OK twice.
Tip: If you do not want to use a parameterized filter when the report is run, in the Filters dialog
box, click the filter to select it, and in the Usage box, click the Disabled option.
User Guide 69
Chapter 4: Working with Data
Steps
1. Open the report that you want.
2. In the Insertable Objects pane, on the Toolbox tab, drag a prompt control to the location
where you want it to appear.
The Prompt Wizard dialog box appears.
3. Provide the information necessary to create the prompt.
Tip: Make the prompt optional by clicking it and, in the Properties pane, setting the
Required property to No. Otherwise, when you run the report, the prompt will appear in a
generated prompt page rather than in the report page.
The prompt control is added to the report page. You can modify its properties by clicking it and
making changes in the Properties pane.
Modifying Prompts
For each prompt you create, you can modify its properties by specifying values in the Properties
pane. For example, you can
• change the prompt control interface
• specify that a prompt requires user input
• allow users to select multiple values
• show or hide prompt graphics
• specify default selections
• specify prompt values
• create a cascading prompt
Some properties you set for a prompt may be overridden under some conditions. For example,
some properties set for the filter associated with a prompt may override the corresponding
prompt property.
Steps
1. Open the report that you want.
2. Click the prompt control you want to modify.
3. In the Properties pane, click the Select UI property and click the interface you want.
Steps
1. Open the report that you want.
2. Click the prompt control you want to modify.
3. In the Properties pane, click the Required property and click Yes.
4. Pause the pointer on the page explorer button and go to a report page.
5. From the Data menu, click Filters.
6. Click the filter associated with the prompt.
7. In the Usage box, click Required and then click OK.
When you run the report, a star appears next to the prompt indicating that the user must select
or type a value.
Steps
1. Open the report that you want.
2. Click the prompt control you want to modify.
3. In the Properties pane, choose whether to have users specify more than one value or
specify a range of values:
• To specify more than one value, click the Multi-Select property, click Yes, and proceed
to step 4.
• To specify a range of values, click the Range property, click Yes, and skip steps 4 to 8.
4. Pause the point on the page explorer button and go to a report page.
5. From the Data menu, click Filters.
6. Double-click the filter associated with the prompt.
7. Change the operator to in.
For example, [gosales_goretailers].[Products].[Product line] in ?Product line? allows
you to select multiple product lines.
8. Click OK twice.
9. To allow users to specify a range of values, in the Properties pane, click the Range
property and from the drop-down list, click Yes.
Steps
1. Open the report that you want.
2. Click the prompt control you want to modify.
3. In the Properties pane, click the Hide Adornments property and click Yes to hide the
prompt characters or No to show them.
Steps
1. Open the report that you want.
2. Click the prompt control that you want to modify.
3. In the Properties pane, double-click the Default Selections property.
4. Click the add button and type the value you want as the default selection.
The value you type must exactly match the corresponding value in the database.
5. Click OK.
6. Repeat steps 4 to 5 to specify other default selections.
You can specify other default selections only if the Multi-Select property for the prompt is
set to Yes.
7. Click OK.
User Guide 71
Chapter 4: Working with Data
Steps
1. Open the report that you want.
2. Click the prompt control that you want to modify.
3. In the Properties pane, double-click the Static Choices property.
4. Click the add button.
5. In the Use box, type the prompt value you want to add.
6. In the Display box, type the value that will appear in the prompt.
7. Click OK.
8. Repeat steps 4 to 7 to add other prompt values.
9. If you want to link a prompt value to a condition, do the following:
• Click Variables.
• Choose an existing variable or create your own, and click OK.
• In the Static Choices dialog box, click Variable and click the variable you want to use.
• Click Value and click one of the possible values for the variable.
• Click the static value you want to link to the variable and click the edit button.
• In the Display box, type the value that you want to appear in the prompt for that
particular value of the variable.
• Repeat this procedure for each additional value.
10. Click OK.
Steps
1. Open the report that you want.
2. Click the prompt control that you want to use as a cascading prompt.
3. In the Properties pane, double-click the Cascade Source property.
4. Click the parameter that represents the cascade source, and click OK.
5. If the prompt allows users to select multiple values, add a prompt button to provide the next
prompt with the appropriate values:
• In the Insertable Objects pane, on the Toolbox tab, drag Prompt Button to the report.
• Click the prompt button and in the Properties pane, click the Type property and click
Reprompt.
• If you want to change the text in the prompt button, in the Insertable Objects pane, on
the Toolbox tab, drag Text Item to the prompt button and type the text you want.
For more information about how to create cascading prompts, see the Cognos Report Studio
Tour.
Unsummarized Data
Unsummarized results can look like the following.
This is equivalent to using the following SQL code. The SELECT statement shown here uses
Microsoft SQL Server syntax. Note, however, that you do not need to create SELECT
statements to create queries.
SELECT T1.RETAILER_NAME AS RETAILER_NAME, T2.PRODUCT_NUMBER AS PRODUCT_NUMBER,
T2.QUANTITY AS QUANTITY
FROM ORDER_HEADER T1 INNER JOIN ORDER_DETAILS T2 ON T1.ORDER_NUMBER = T2.ORDER_NUMBER
ORDER BY T1.RETAILER_NAME, T2.PRODUCT_NUMBER
Summarized Data
Summarized results can look like the following. By default, Cognos Report Studio summarizes
the data.
This is equivalent to using the following SQL code. The SELECT statement shown here uses
Microsoft SQL Server syntax. Note, however, that you do not need to create SELECT
statements to create queries.
SELECT T1.RETAILER_NAME AS RETAILER_NAME, T2.PRODUCT_NUMBER AS PRODUCT_NUMBER,
SUM(T2.QUANTITY) AS 'TOTAL QUANTITY'
FROM ORDER_HEADER T1 INNER JOIN ORDER_DETAILS T2 ON T1.ORDER_NUMBER = T2.ORDER_NUMBER
GROUP BY RETAILER_NAME, PRODUCT_NUMBER
ORDER BY RETAILER_NAME, PRODUCT_NUMBER
User Guide 73
Chapter 4: Working with Data
When you group the data, the query results include data at different levels of summarization.
The SQL equivalent is to use a GROUPING function and ROLLUP operator. Summaries use
aggregate functions, such as SUM, COUNT, MIN, and MAX.
Cognos Report Studio uses cube elements to create one or more dimensions, and to calculate
the aggregate values for the levels you define. Cognos Report Studio calculates the values from
the data already retrieved by the tabular elements.
Grouped results can look like the following. In this example, there is only one dimension,
RETAILER_NAME. This dimension has two levels of grouping, RETAILER_NAME and
PRODUCT_NUMBER. The new summary rows are shown in bold.
This is equivalent to using the following SQL code. The SELECT statement shown here uses
Microsoft SQL Server syntax. Note, however, that you do not need to create SELECT
statements to create queries.
SELECT CASE WHEN (GROUPING(T1.RETAILER_NAME) = 1) THEN 'ALL RETAILERS'
ELSE T1.RETAILER_NAME
END AS RETAILER_NAME,
CASE WHEN (GROUPING( T2.PRODUCT_NUMBER) = 1) THEN NULL
ELSE T2.PRODUCT_NUMBER
END AS PRODUCT_NUMBER,
SUM(T2.QUANTITY) AS 'TOTAL QUANTITY'
FROM ORDER_HEADER T1 INNER JOIN ORDER_DETAILS T2 ON T1.ORDER_NUMBER = T2.ORDER_NUMBER
GROUP BY T1.RETAILER_NAME, T2.PRODUCT_NUMBER
WITH ROLLUP
The summary rows for each unique combination of retailer and product number appear. They
are followed by a summary row that shows the total quantity of products ordered for those levels
of grouping.
Pivoted results can look like the following. The new summary rows are shown in bold.
This is equivalent to using the following SQL code. The SELECT statement shown here uses
Microsoft SQL Server syntax. Note, however, that you do not need to create SELECT
statements to create queries.
SELECT CASE WHEN (GROUPING(T1.RETAILER_NAME) = 1) THEN 'ALL RETAILERS'
ELSE T1.RETAILER_NAME
END AS RETAILER_NAME,
CASE WHEN (GROUPING(T2.PRODUCT_NUMBER) = 1) THEN NULL
ELSE T2.PRODUCT_NUMBER
END AS PRODUCT_NUMBER,
SUM(T2.QUANTITY) AS 'TOTAL QUANTITY'
FROM ORDER_HEADER T1 INNER JOIN ORDER_DETAILS T2 ON T1.ORDER_NUMBER = T2.ORDER_NUMBER
GROUP BY T1.RETAILER_NAME, T2.PRODUCT_NUMBER
WITH CUBE
To make these results easier to interpret, you can pivot the data in two different directions to
produce a result such as the following. It emphasizes the fact that certain products are ordered
by both customers.
Although Cognos Report Studio uses the cube element to pivot multidimensional data, the
summary element is used to identify which level in a dimension is the column, and which level is
the row.
Note: The number 99999 appears where column totals are normally displayed. However, a
value such as N/A, Product number, or Total might be more appropriate. Text values cannot
easily be shown in a column whose data type is number using SQL SELECT statements.
However, Cognos Report Studio shows more appropriate values in crosstab reports by default.
User Guide 75
Chapter 4: Working with Data
Cognos Report Studio automatically links query and layout. For example, when you use Cognos
Report Studio and the list report template, query and layout are automatically linked.
Cognos Report Studio creates a cube element for you when you use the list report template.
With an ungrouped list report, the cube contains only a fact list, which references each data item
in the tabular model. The cube element isn’t relevant until you want to start grouping data into a
hierarchy of levels.
When working with queries in the Query Explorer, there are four boxes in the work area that you
must be familiar with. The Dimensions, Facts, and Filters boxes make up the cube structure of a
query, which adds summarized information to the tabular structure. The Tabular Data box makes
up the tabular structure of a query, which is used to extract data.
Dimensions
A dimension defines a grouping hierarchy composed of one or more levels. Each level has a key
that identifies unique values within the level.
In the above example, the query item Product line is grouped. The Product line dimension has
one level that is also named Product line. Finally, the key for the level is also Product line.
Facts
A fact is a reference to a query item in the tabular model.
Filters
Filters eliminate groups of rows from the tabular structure before aggregates in the cube
structure are computed.
Tabular Data
Tabular data are objects that are used to extract data from the data source. The objects you can
add to this box are tabular model, tabular SQL, tabular set, and tabular reference.
User Guide 77
Chapter 4: Working with Data
Object Description
Dimension Adds a dimension to the Dimension box.
Tabular Model Adds a tabular model to the Tabular Data box. Use
this object to specify the query items and detail
filters to include in a report.
Tabular SQL Adds tabular SQL to the Tabular Data box. Use this
object to edit or type your own SQL statements.
You cannot use tabular SQL with SAP BW data
sources.
Tabular Set Adds a tabular set to the Tabular Data box. Use this
object to merge data from two or more tabular
elements, usually tabular models. It produces a
single result set by using union, intersect, or except
(minus) joins.
You cannot use tabular sets with SAP BW data
sources.
First-Rows Optimization
For each query in a report, you can see the SQL that is generated at runtime by clicking the
query property Generated SQL. The SQL depends on the report format you choose. For
example, if you run a report in HTML, first-rows optimization is requested while all-rows is
requested for PDF.
It is important for database administrators and programmers to remember that ReportNet does
not always use first-rows optimization, as this assumption can cause the RDBMS optimizer to
do things differently.
Mandatory
Argument /Optional Description
Name Mandatory Name of the prompt. Can also refer to the name of an
existing prompt page, in which case the prompt page
appears when the report is run.
Datatype Optional Prompt value data type. The default value is string.
Values include
• xsdstring
• string
• xsddate
• date
• xsddatetime
• datetime
• timestamp
• xsdtime
• time
• xsdduration
• timeinterval
• interval
• xsdshort
• short
• xsdint
• int
• integer
• xsdlong
• long
• xsdfloat
• float
• xsddouble
• double
• real
• numeric
• xsddecimal
• decimal
• boolean
• token
A token is a way to pass SQL; a token does not pass
values. Token is not an actual data type.
Prompt values are validated. In the case of strings, the
provided value is enclosed in single quotes and any
embedded single quotes are doubled.
User Guide 79
Chapter 4: Working with Data
Mandatory
Argument /Optional Description
DefaultText Optional If a value is specified, then the prompt is optional. Use a
space to provide a fully optional prompt.
If you use a space and no values are provided in the
Prompt Value dialog box, a Where clause is usually not
generated.
If you use text and no values are provided in the Prompt
Value dialog box, a Where clause is usually generated
using the default value.
Ensure that the text you provide will result in a valid
SQL statement.
TextFollowing Optional Provides the closing parenthesis. Used most often for
the promptmany function. Is also useful when the
prompt is optional and is followed by hard-coded filters
in the SQL statement.
Support for query macros in Cognos Report Studio includes the same capabilities as macros used in Framework Manager, including support for parameter maps defined within the Framework Manager model. However, Cognos Report Studio query macros do not extend to the layout. Therefore, when making changes to the query using macros, you must bear in mind the side-effects on the layout. For example, were a macro to remove a column from the query that the layout
User Guide 81
Chapter 4: Working with Data
After you have created a report, you may need to make changes for various reasons, such as
limiting the data retrieved when a report is run.
Before you modify an existing report, ensure that you have the proper security permissions. For
information, see the ReportNet User Guide.
You can
• open and save reports locally
• open a report from the clipboard
• open a Query Studio report
• manage changes in the model
• burst a report
• add conditional formatting
• drill through to another report
• create a master-detail query
Steps
1. Obtain the LFA.dll from your ReportNet administrator.
The DLL is located in the bin directory where ReportNet is installed.
2. Open a command prompt window.
3. Register the LFA.dll file by typing
regsvr32 LFA.dll
4. In Internet Explorer, set localhost as a trusted site:
• From the Tools menu, click Internet Options.
• In the Security tab, click Trusted sites.
• Click the Sites button.
• In the Add this Web site to the zone box, type http://localhost and click Add.
Tip: You may need to clear the Require server verification (https:) for all sites in
this zone check box.
• Click OK twice.
5. In Cognos Report Studio, from the Tools menu, click Options.
6. Select the Allow local file access check box and click OK.
The menu items (Local) Open and (Local) Save As appear in the File menu.
User Guide 83
Chapter 5: Working with Existing Reports
Although Cognos Report Studio attempts to validate the report specification, it is your
responsibility to ensure that it is correct. For more information, see the ReportNet Developer
Guide.
To open a report from the clipboard, do the following:
• From the Tools menu, click Open Report From Clipboard.
Steps
1. From the File menu, click Open.
2. Click the Query Studio report you want.
3. Click Open.
The Query Studio report opens as a new report.
Steps
1. Open the report that you want.
2. To update a query item name reference:
• Click the query item.
• In the Properties pane, double-click the Expression property.
• In the Expression Definition box, update the query item name reference, and click OK.
3. To update a model filter name reference:
• From the Data menu, click Filters.
• Double-click the model filter.
• In the Expression Definition box, update the namespace name, and click OK.
Steps
1. Open the report that you want.
2. From the File menu, click Model Connection.
3. In the Model box, click the package to which you want to link the report.
4. If you want to change the authoring language, in the Language box, click a different choice.
You may need to update the report to reflect the change. For example, any filter expressions
in the report must be modified to reflect the syntax rules of the new language.
5. Click OK.
If errors are found, the Validation Errors dialog box appears, showing what elements must
be updated to reflect the package change.
6. Click Close.
7. Make any required changes in the report to support the new package.
For example, you may need to link the query items in the report to the new package.
Tip: You can use the Query Explorer (p. 73) to make all the changes.
Bursting Reports
Bursting is the process of running a report once and then dividing the results for distribution to
recipients who each view only a subset of the data. For example, salespeople in different
regions each need a report showing the sales target for each country. You use burst reports to
send each salesperson the information they need. Burst reports can be distributed by email or
saved to a directory.
To create a burst report, you
❑ create a burst table in the source database
❑ import the database metadata into Framework Manager
❑ create the report and set burst options in Cognos Report Studio
Create the Report and Set Burst Options in Cognos Report Studio
After the Framework Manager model is published to Cognos Connection, use it to build your
report. Ensure that the report contains the query item that represents the list of recipients, and
group it. Then set the burst options you want. In the burst options, two pieces of information, a
burst key and a burst recipient, are required. The burst key defines how the data should be
filtered and divided. The burst recipient determines who receives the subset of data.
User Guide 85
Chapter 5: Working with Existing Reports
Steps
1. Open the report that you want.
2. From the File menu, click Burst Options.
3. Select the Make report available for bursting check box.
4. Under Burst Key, in the Query box, click the query that contains the query item to be
distributed.
5. In the Level box, click the query item to be distributed in each burst report.
6. In the Label box, click the query item to be used to label each burst report.
7. Under Burst Recipient, in the Query box, click the query that contains the query item to be
used as the distribution list.
8. In the Item box, click the query item that contains the list of recipients.
9. In the Type box, select the type of recipients specified via the Item box.
• Click Email if the recipients are email addresses.
• Click Directory if the recipients are users, groups, roles, contacts, or distribution lists.
• Click Automatic to let ReportNet determine whether the recipients are email addresses
or directory entries.
10. Click OK.
After you set burst options for a report, enable the report for bursting in Cognos Connection. For
more information, see the ReportNet Administration and Security Guide.
In Cognos Report Studio, you must create a master-detail report in which the master query
drives the report of interest and the detail query contains the burst information.
The master report must be grouped by a characteristic for which exists a corresponding
presentation hierarchy in the burst InfoCube.
The detail report is authored against the burst InfoCube and contains two columns, the query
item corresponding to the one used in the master report for bursting, and the query item that
contains the value on which bursting is performed. The value can be an email address or an
expression used to obtain address information based on the underlying authentication
mechanism used by Cognos Access Manager.
The detail report must not be visible, but must be evaluated by ReportNet when the report is
executed. Do the following:
• Place the detail report in a conditional block for which the box type is set to None.
• Link the master and detail reports with the expression [Master Burst Key] = [Detail Burst
Key].
When setting the burst options for the report, the master query provides the query items for the
burst key and the detail report provides the query items for the burst recipients.
Steps
1. Open the report that you want.
2. From the File menu, click Variables.
3. Create a variable by clicking the add button below the Variables box.
4. In the Name box, type a name for the variable.
5. In the Type box, click Boolean.
6. Click OK.
The Layout Expression dialog box appears.
7. In the Expression Definition box, define the condition.
For information about creating expressions, see "Using the Expression Editor" (p. 211).
8. Click OK twice.
9. From the Insertable Objects pane, in the Toolbox tab, drag the Conditional Block List
object to the work area.
10. Select the conditional block.
11. In the Properties pane, double-click the Conditional Block property.
12. In the Variable dialog box, click the Variable box.
13. Click the boolean variable you just created.
14. In the Values box, select the Yes value and click OK.
Tip: A default value exists for each variable you define, and it is always selected.
User Guide 87
Chapter 5: Working with Existing Reports
Highlight Data
Highlight data in your report to better identify exceptional results. For example, you want to
identify sales representatives who have exceeded their quota. You create a condition that
checks whether each representative’s sales for the year is greater than their quota for the year.
Steps
1. Open the report that you want.
2. From the File menu, click Variables.
3. Create a variable by clicking the add button below the Variables box.
4. In the Name box, type a name for the variable.
5. In the Type box, select the type of variable you want to create:
• To create a variable that has only two possible values, yes and no, click Boolean.
• To create a variable whose values are string-based, click String.
6. Click OK.
7. Click the Edit button below the Expression box.
8. In the Expression Definition box, define the condition.
For information about creating expressions, see "Using the Expression Editor" (p. 211).
9. Click OK twice.
10. In the work area, click the column that you want to highlight based on the condition you just
created.
11. Click the Condition Explorer button.
The Condition Explorer dialog box appears.
12. Click the variable you just created.
13. In the Properties pane, click the Conditional Style property.
14. In the Variable dialog box, click the Variable box.
15. Click the variable you want to assign to the object.
16. In the Values box, select the values you want the condition to support.
Tip: A default value exists for each variable you define, and it is always selected.
17. Open the Condition Explorer dialog box again, and click one of the possible values for the
variable other than the default value.
For example, if you created a boolean variable, click the Yes value.
18. In the Properties pane, specify the formatting that you want to highlight the column with
when the condition is satisfied.
For example, click the Border property to create a thicker border around the column.
19. Repeat steps 17 to 18 for other possible values defined for the variable.
20. Repeat steps 10 to 19 for other objects that you want to highlight.
Tip: In the Condition Explorer dialog box, click (No variable) to view how the report looks
when no variable is applied.
When you run the report, the report objects to which you applied the variable are highlighted
when the condition is satisfied. For example, if you created a boolean variable, the objects are
highlighted when the condition is met.
Steps
1. Open the report that you want.
2. From the File menu, click Variables.
3. Create a variable by clicking the add button below the Variables box.
4. In the Name box, type a name for the variable.
5. In the Type box, select the type of variable you want to create:
• To create a variable that has only two possible values, yes and no, click Boolean.
• To create a variable whose values are string-based, click String.
• To create a variable whose values are different languages, click Language.
6. Click OK.
7. If you created a boolean or string variable, in the Expression Definition box, define the
condition.
For information about creating expressions, see "Using the Expression Editor" (p. 211).
8. If you created a language-specific variable, in the Languages dialog box, select the
languages you want to support and click OK.
9. Click OK twice.
10. From the File menu, click Conditional Layouts.
11. In the Variable drop-down list, click the variable you just created.
The possible values for the variable appear in the Layouts box. For example, if you created
a boolean variable, the values Yes and No appear.
12. In the Layouts box, select the values for which you want to create a layout and click OK.
Tip: A default value exists for each variable you define, and it is always selected.
A layout is created for each value you selected. Click the Page Explorer button to navigate the
different layouts. For each layout, click the Report Pages link to create a report page or click the
Prompt Pages link to create a prompt page, and add the report objects you want.
Steps
1. Open the report that you want.
2. From the File menu, click Variables.
3. Create a variable by clicking the add button below the Variables box.
4. In the Name box, type a name for the variable.
5. In the Type box, select Language, and click OK.
6. Click the Add button below the Values box.
The Languages dialog box appears.
7. Select the languages you want to support, and then click OK.
Tip: You can create language groups by clicking two or more languages and then clicking
the Group Values button.
8. In the work area, click the object that you want to modify based on the condition you just
created.
User Guide 89
Chapter 5: Working with Existing Reports
Steps
1. Open the child report.
2. Create a parameter using the column that will serve as the drill-through column.
For example, to drill through to a column named Product line, you must create a parameter
that would look like this:
[Product line]=?prodline_p?
3. Repeat steps 1 to 2 for other target reports.
4. Open the parent report.
5. Click the column that will serve as the drill-through column.
6. Click the drill throughs button.
7. Click the add button.
8. In the Target report box, click the ellipsis button (...) and select the drill-through or target
report.
A parameter is created in the Drill Throughs box using the column previously selected.
9. If you want the child report to appear in a new window when the report is run, select the
Open in new window check box.
10. Select the parameter.
11. In the Source query item box, click the query item whose values will be used to drill
through to the target report.
12. Repeat steps 7 to 11 to drill through to another target report.
13. Click OK.
The column that contains the drill-through values appears as a link with a plus sign (+) next to it.
When you run the report, you can click any value to drill through to a target report.
Steps
1. Create a new report.
2. In the Insertable Objects pane, on the Toolbox tab, drag a list, crosstab, chart, or repeater
to the report.
3. Click OK to create a new query.
4. Add a second data container to the object you previously inserted.
5. Click OK to create a second query.
6. Add the query items you want in each data container.
7. If you want to link a query item in the master query to a parameter in the detail query instead
of to another query item, create the parameter in the detail query.
Use parameters when you want to filter values at a lower level in the detail query.
• Pause the pointer on the query explorer button and click the query that will become the
detail query.
• In the Insertable Objects pane, on the Toolbox tab, drag the Filter object to the Filters
box.
• In the Expression Definition box, create the parameter.
• Click OK.
8. From the Data menu, click Master/Detail Relationships.
9. In the Master Query box, click the query that will provide the primary information.
10. Click the add button.
11. Choose which type of query you want to add for the detail query:
• If you will link the master query to a parameter in the detail query, click Parameterized
detail query.
• If you will link the master query to query item in the detail query, click Filtered detail
query.
12. Click OK.
13. In the Choose Detail Query dialog box, click the query that will provide the detailed
information, and click OK.
14. If you added a filtered detail query:
• In the Master Detail Link Filter dialog box, define the expression that links the two
queries.
• Click OK twice.
User Guide 91
Chapter 5: Working with Existing Reports
If you have some experience with Report Studio and want to improve your skills in report writing,
this chapter is for you. Each topic gives you some guidelines on how to create each sample
report. If you need help, links to more detailed instructions are available.
If you have not used Report Studio before, see the Report Studio Tour first to learn basic skills.
Steps
❑ Create a new list report that uses the sample model named GO Sales and Retailers and
the sample template named GO-list.
❑ Add the following query items to the report:
• Order number (in Orders)
• Order date (in Orders)
• Product type (in Products)
• Product name (in Products)
• Quantity (in Orders)
Tip: Use the Model tab in the Insertable Objects pane.
User Guide 93
Chapter 6: Try It Yourself Exercises
Steps
❑ Create a new crosstab that uses the sample model named GO Sales and Retailers and the
sample template named GO-crosstab.
❑ Add the following query items to the report:
• Order year (in Orders) in the columns
• Product line (in Products) in the rows
• Revenue (in Orders) as the first measure
• Gross profit (in Orders) as the second measure
Tip: Use the Model tab in the Insertable Objects pane.
❑ Nest Product type (in Products) after Product line in the rows.
❑ Nest Order month (in Orders) under Order year in the columns.
❑ Change the Expression property for Order month to:
mod([gosales_goretailers].[Orders].[Order month],4)+1
Tip: Use the Toolbox tab in the Insertable Objects pane.
❑ Create this detail calculation named Cost of Goods Sold:
[Revenue]-[Gross Profit]
❑ Change the Data Format property for Revenue, Gross profit, and Cost of Goods Sold to
currency.
❑ Change the blue text placeholder to this text:
Profitability by Product Line
❑ Run the report to view what it will look like for your users.
User Guide 95
Chapter 6: Try It Yourself Exercises
It should take 10 to 15 minutes to complete this topic, and your report will look like this.
Steps
❑ Create a column chart that uses the sample model named GO Sales and Retailers and the
sample template named GO-chart.
❑ Add the following query items to the report:
• Quantity (in Orders) as the axis measure
• Order method (in Orders) as the category
• Product line (in Products) as the series
Tip: Use the Model tab in the Insertable Objects pane.
❑ Change the chart title to:
Sales Volume by Customer Order Method
❑ Run the report to view what it will look like for your users.
❑ Insert a 3-D pie chart that uses a new query.
❑ Add the following query items to the chart:
• Margin (in Products) as the axis measure
• Product line (in Products) as the series
❑ Change the chart title to:
Margin by Product Line
❑ Insert another 3-D pie chart that uses a new query.
❑ Add the following query items to the chart:
• Quantity (in Orders) as the axis measure
• Product line (in Products) as the series
❑ Change the chart title to:
Quantity by Product Line
❑ Insert another 3-D pie chart that uses a new query.
❑ Create a detail calculation named Revenue and add it as the axis measure:
[gosales_goretailers].[Orders].[Quantity]*[gosales_goretailers].[Orders].[Unit sale
price]
❑ Add Product line (in Products) as the series.
❑ Change the chart title to:
Revenue by Product Line
❑ Run the report to view what it will look like for your users.
Steps
❑ Open the sample report named Product Line by Year.
❑ Add a value prompt to the report that uses Product line code for the model item. Use
Product line as the values to display. This is an optional filter.
Tip: Use the Toolbox tab in the Insertable Objects pane.
❑ Add a value prompt to the report that uses Year for the model item and the values to display.
This is an optional filter.
❑ Change the Required property for both prompts to No.
❑ Change the Data Format property for the Year prompt to be a number.
❑ Change the blue text placeholder to this text:
Product Line by Year
❑ Run the report to view what it will look like for your users.
User Guide 97
Chapter 6: Try It Yourself Exercises
In this topic, you learn how to create a multiple-page report that shows several sales
performance reports.
It should take 15 to 20 minutes to complete this topic, and your report pages will look like this.
Steps
❑ Open the sample report named Global Sales (1). This sample contains several reports.
❑ Add a page.
❑ Add a 3-D column chart to the new page as a new query.
❑ Add these query items to the chart:
• Revenue (in Orders) as the axis measure
• Order method (in Orders) as the category
• Sales territory (in Countries) as the series
Tip: Use the Model tab in the Insertable Objects pane.
❑ Add a list report to the page as a new query.
❑ Add these query items to the list report:
• Sales territory (in Countries)
• Country (in Countries)
• Planned revenue (in Orders)
• Revenue (in Orders)
• Gross profit (in Orders)
❑ Group the Sales territory column to make the report easier to read. Then group the
Country column.
❑ Make the Sales territory column appear as a list header in the report.
❑ Bold Sales territory in the body of the report.
❑ Remove the Sales territory column title without removing Sales territory from the body of
the report.
❑ Change the blue text placeholder to this text:
Performance by Sales Territory
❑ Run the report to view what it will look like for your users.
Steps
❑ Create a new blank report, but do not add data to it.
❑ Add a page header.
❑ Add a border to the bottom of the header. Make the border 2-1/4 pixels and apply the
Web-safe color #6699CC.
❑ Add a table that has two columns and two rows.
Tip: Use the Toolbox tab in the Insertable Objects pane.
❑ Add a title placeholder to the top-left cell of the table, and format it as Tahoma, 14 pt, bold,
and apply the Web-safe color #6699CC.
❑ Add the date to the bottom-left cell of the table, and format it as Tahoma, 9 pt, gray.
❑ Add this sample image to the top-right cell and align the image to the right:
..\samples\images\logo.jpg
❑ Add this text item to the bottom-right cell:
Great Outdoors
❑ Format the Great Outdoors text as Tahoma, 11 pt, bold. Apply the Web-safe color
#6699CC. Align the text to the right.
❑ Add a page footer.
❑ Add the same border to the top of the footer as you added to the header.
❑ Add a table that has two columns and three rows. Add a cell to the middle row.
❑ Add the time to the top-right cell of the table, and align it to the right.
❑ Add the page number to the middle-center cell of the table, and align it to the center.
❑ Format the time and page number as Tahoma, 9 pt, gray.
❑ Add this sample image to the middle-left cell:
..\samples\images\banner_cogsquare.jpg
❑ Add a list report to the report body, and center the list report.
❑ Save the template, and use it as the starting point for a report.
User Guide 99
Chapter 6: Try It Yourself Exercises
Get Started
❑ Create a new blank report that uses the sample model named GO Sales and Retailers.
❑ Change the font for the entire report to Arial.
This chapter describes some common problems you may encounter. For more troubleshooting
problems, see the ReportNet Troubleshooting Guide.
When you republish a model, you are adding a new version of the model to the package. When
you run a report, the report uses the model that it was initially created with or last edited with.
To correct the problem, do one of the following:
• Edit the report and then save it.
The report is set to the latest version of the model.
• Before you republish the model in Framework Manager, in the Publish wizard, select the
option Delete all previous model versions.
All reports linked to the model are moved to the latest version of the model.
• Before you republish the model in Framework Manager, in the Publish wizard, set the
model version limit to 1.
• Model versioning is disabled.
3. In the Print Range section, click Pages from and Pages to, type only the page number of
the nonprinting page, and then click OK.
You can print the rest of the PDF by resending the job starting on the next page.
4. Clear the Print as image check box.
5. In the Print Range section, click Pages from and Pages to, type the page range for the
remaining pages, and then click OK.
Although you can use the Print as image option to print the file, this setting does not
resolve the original printing problem. For more information, see the Adobe Web site.
Steps
1. From the Data menu, click Filters.
2. Select the prompt you wish to delete, then click Delete.
3. Click OK.
4. Run the report.
ReportNet includes sample reports. You can find them in the Report Studio Report Samples
folder on the Public Folders tab of Cognos Connection.
The following reports are based on the GO Sales and Retailers package.
Banded Report
Banded report that shows Product name, Quantity, and Revenue with sales opportunities for
each Product line category.
Consumer Trends
Complex report that shows a list chart, bar chart and product images to illustrate revenue by
product type.
Cost of Goods
Crosstab report illustrating conditional formatting.
Custom Grouping
Report showing the ability to group products with conditional statements. For example, show all
products that start with the letter S.
Customer Invoice
Report illustrating The Great Outdoors Company invoice statement.
Global Sales
Book style report that uses multiple pages and charts to show global sales results.
GO Business View
Two-page business report showing a combination of metrics across the Great Outdoors
company. Multiple charting types are used.
GO Media
Report that uses a media file in combination with multiple charting types.
Mailing Labels
Template style report illustrating a multilingual mailing list for retailers of the Great Outdoors
company.
Multi-Grain Fact
Report that reads two fact tables, each at different levels of granularity, and combines them.
Bookmarks are used to permit easy navigation within the report.
Multiple Charts
Report showing similar information on one page using multiple chart types. Visual
representation of metrics.
Order Analysis
Pairing analysis report that prompts the user for two products, and shows the orders that they
both appear in.
Product Revenue
Group list report that uses a list header. For more information, see Try It Yourself - Create a List
Report (p. 93).
Product Summary
Report that uses a prompt page to query a list.
Quantity by Retailer
Grouped list report that drills through to the Retailer Contact report. Part of the Report Studio
Tour.
Regional Orders
Report showing order quantity by country, using bookmarks for navigation. The report is the
drill-through target report for the Margin Cost and Volume report.
Retailer Contact
List report that uses a prompt page. It is also used as a drill-through report.
Union Crosstab
Report using tabular table joins to create a complex crosstab.
The following reports are based on the GO Data Warehouse package.
Current Assets
Multiple-page report showing the assets of the Great Outdoors Company. From this report, you
can drill through to the Current Liabilities report.
Current Liabilities
Shows the payables of the Great Outdoors Company for the year 2004.
Employee Profile
Human resources report showing data for each employee.
You can format data so that it matches any pattern of text and numbers when default formats are
not appropriate. For example, you can format dates to use full text including the era, or you can
format them to only use numbers and display the last two digits of years to save space.
Using symbols and patterns can provide similar results as basic data formatting tasks. For
example, you can set how many digits are displayed after the decimal point. You can achieve
these types of results with a pattern, or you can set the No. of Decimal Places property. Patterns
allow flexibility for more complex requirements.
Each supported content language code requires a specific set of symbols to be used in
patterns. For each language code, there are two tables; one for date and time symbols, and one
for decimal symbols. The language codes are listed in alphabetical order.
To define patterns, open the Data Format dialog box, and edit the Pattern property for each
format type. Use the symbols that are defined in the language code tables, and follow these
guidelines.
Pattern Guidelines
When you define a pattern, the number of symbols you use affects how the data will be shown.
There are different rules for text, numbers, and values that can take the form of text or numbers.
Text
You can specify whether text is produced in full or abbreviated form.
Number of
symbols Meaning Example
4 or more Full text form EEEE produces Monday
Numbers
The number of symbols you use in a pattern sets the minimum number of digits that are
produced in a report. Numbers that have fewer digits than specified are zero-padded. For
example, if you specify mm for minutes, and the database value is 6, the report will display 06.
Note: The year value is handled differently. If you specify two symbols for year, the last two digits
of the year value is produced. For example, yyyy produces 1997, and yy produces 97.
Number of
symbols Meaning Example
3 or more Text MMMM produces January
MMM produces Jan
Language Code: cs
Locale ID: cs
Date and Time Symbols
Symbol Meaning
, A digit that is shown even if the value is zero.
Symbol Meaning
, A digit that is shown even if the value is zero.
Symbol Meaning
X Other characters that can be used in the prefix or suffix.
Language Code: da
Locale ID: da
Date and Time Symbols
Symbol Meaning
, A digit that is shown even if the value is zero.
Symbol Meaning
, A digit that is shown even if the value is zero.
Symbol Meaning
X Other characters that can be used in the prefix or suffix.
Language Code: de
Locale ID: de
Date and Time Symbols
Symbol Meaning
, A digit that is shown even if the value is zero.
Symbol Meaning
, A digit that is shown even if the value is zero.
Symbol Meaning
X Other characters that can be used in the prefix or suffix.
Symbol Meaning
, A digit that is shown even if the value is zero.
Language Code: el
Locale ID: el
Date and Time Symbols
Symbol Meaning
, A digit that is shown even if the value is zero.
Symbol Meaning
\uFFFD The international currency sign. It will be replaced by an
international currency symbol. If it is present in a
pattern, the monetary decimal separator is used
instead of the decimal separator.
Symbol Meaning
, A digit that is shown even if the value is zero.
Language Code: en
Locale ID: en, en_AU, en_CA, en_GB, en_IE, en_NZ, en_SG, en_US, en_ZA,
en_ZW
Date and Time Symbols
Symbol Meaning
0 A digit that is shown even if the value is zero.
Symbol Meaning
¤¤ The international currency sign. It will be replaced by an
international currency symbol. If it is present in a
pattern, the monetary decimal separator is used
instead of the decimal separator.
Symbol Meaning
, A digit that is shown even if the value is zero.
Symbol Meaning
. A digit that is shown even if the value is zero.
Symbol Meaning
\uFFFD The international currency sign. It will be replaced by an
international currency symbol. If it is present in a
pattern, the monetary decimal separator is used
instead of the decimal separator.
Language Code: es
Locale ID: es, es_AR, es_CL, es_ES, es_PE, es_PY, es_UY, es_VE
Date and Time Symbols
Symbol Meaning
, A digit that is shown even if the value is zero.
Locale ID: es_BO, es_CO, es_CR, es_DO, es_EC, es_GT, es_HN, es_MX,
es_NI, es_PA, es_PR, es_SV, es_US
Date and Time Symbols
Symbol Meaning
. A digit that is shown even if the value is zero.
Symbol Meaning
\u221E The currency symbol. If this symbol is present in a
pattern, the monetary decimal separator is used
instead of the decimal separator.
Language Code: fi
Locale ID: fi, fi_FI
Date and Time Symbols
Symbol Meaning
, A digit that is shown even if the value is zero.
Language Code: fr
Locale ID: fr, fr_CA, fr_FR, fr_LU
Date and Time Symbols
Symbol Meaning
0 A digit that is shown even if the value is zero.
Symbol Meaning
, A digit that is shown even if the value is zero.
Symbol Meaning
X Other characters that can be used in the prefix or suffix.
Symbol Meaning
. A digit that is shown even if the value is zero.
Language Code: hu
Locale ID: hu
Date and Time Symbols
Symbol Meaning
, A digit that is shown even if the value is zero.
Symbol Meaning
\uFFFD The international currency sign. It will be replaced by an
international currency symbol. If it is present in a
pattern, the monetary decimal separator is used
instead of the decimal separator.
Symbol Meaning
, A digit that is shown even if the value is zero.
Language Code: it
Locale ID: it
Date and Time Symbols
Symbol Meaning
, A digit that is shown even if the value is zero.
Symbol Meaning
\uFFFD The international currency sign. It will be replaced by an
international currency symbol. If it is present in a
pattern, the monetary decimal separator is used
instead of the decimal separator.
Symbol Meaning
, A digit that is shown even if the value is zero.
Symbol Meaning
. A digit that is shown even if the value is zero.
Symbol Meaning
\uFFFD The international currency sign. It will be replaced by an
international currency symbol. If it is present in a
pattern, the monetary decimal separator is used
instead of the decimal separator.
Language Code: ja
Locale ID: ja
Date and Time Symbols
Symbol Meaning
. A digit that is shown even if the value is zero.
Symbol Meaning
. A digit that is shown even if the value is zero.
Symbol Meaning
\uFFFD The international currency sign. It will be replaced by an
international currency symbol. If it is present in a
pattern, the monetary decimal separator is used
instead of the decimal separator.
Language Code: ko
Locale ID: ko, ko_KR
Date and Time Symbols
Symbol Meaning
0 A digit that is shown even if the value is zero.
Language Code: nl
Locale ID: nl, nl_BE, nl_NL
Date and Time Symbols
Symbol Meaning
, A digit that is shown even if the value is zero.
Symbol Meaning
\u2030 Multiplied by 1000, as per mille.
Language Code: no
Locale ID: no, no_NO
Date and Time Symbols
Symbol Meaning
, A digit that is shown even if the value is zero.
Language Code: pl
Locale ID: pl, pl_PL
Date and Time Symbols
Symbol Meaning
, A digit that is shown even if the value is zero.
Language Code: pt
Locale ID: pt, pt_BR, pt_PT
Date and Time Symbols
Symbol Meaning
, A digit that is shown even if the value is zero.
Symbol Meaning
\uFFFD The international currency sign. It will be replaced by an
international currency symbol. If it is present in a
pattern, the monetary decimal separator is used
instead of the decimal separator.
Language Code: ro
Locale ID: ro, ro_RO
Date and Time Symbols
Symbol Meaning
, A digit that is shown even if the value is zero.
Language Code: ru
Locale ID: ru, ru_UA, ru_RU
Date and Time Symbols
Symbol Meaning
, A digit that is shown even if the value is zero.
Symbol Meaning
\u2030 Multiplied by 1000, as per mille.
Language Code: sk
Locale ID: sk, sk_SK
Date and Time Symbols
Symbol Meaning
, A digit that is shown even if the value is zero.
Language Code: sv
Locale ID: sv, sv_FI, sv_SE
Date and Time Symbols
Symbol Meaning
, A digit that is shown even if the value is zero.
Language Code: tr
Locale ID: tr, tr_TR
Date and Time Symbols
Symbol Meaning
, A digit that is shown even if the value is zero.
Symbol Meaning
\uFFFD The international currency sign. It will be replaced by an
international currency symbol. If it is present in a
pattern, the monetary decimal separator is used
instead of the decimal separator.
Language Code: zh
Locale ID: zh, zh_CN, zh_HK, zh_MO, zh_SG, zh_TW
Date and Time Symbols
Symbol Meaning
0 A digit that is shown even if the value is zero.
This chapter contains definitions of properties and objects found in Report Studio. They are
available contextually, by pressing F1 when a property or object is active in the Report Studio
authoring environment.
These objects and properties are referenced:
Report Studio Objects
These objects are visible in the Report Studio work area. They can be inserted from the
Toolbox.
Report Studio Properties
These properties can be set on Report Studio objects. They are available in the lower left pane
of Report Studio.
Data Formatting Properties
These properties can be set on data values, by selecting Layout Data Format from the Data
menu, or by editing the Data Format property for Report Studio objects.
Arc Measure
The values along the arc or polar axis against which each data series is plotted. The location of
values on the arc of the circle determines the scale of one measure.
Area Chart
A chart in which each data series appears as a colored area.
Area Measure
A measure that is represented by an area chart within a combination chart. Measures can be
represented by a line chart, a column chart, or an area chart; this determined by the Type
property.
Axis Labels
Axis labels that describe the values measured on the axis.
Axis
A line that provides a frame of reference for measurement or comparison in a chart.
Properties of Axis
Conditional Style, Font, Foreground Color, Horizontal Alignment, Logarithmic Scale, Maximum
Value, Minimum Value, Scale Interval, Show Axis Line
Axis Measure
The values along a Y-axis against which each data series is plotted.
Bar Chart
A bar chart that uses horizontal bars to plot measures. The end of each bar represents the value
of the data series.
Baseline
A line drawn on a chart that represents a constant value. It establishes a baseline against which
all other data markers can be compared. You can use any numeric value that is between the
minimum and maximum values for the chart.
Properties of Baseline
Aggregate Function, Alias, Baseline Value, Conditional Style, Conditional Text, Content,
Expression, Expression, Foreground Color, Key, Line Style, Measure Axis, Name, Query Item,
Report Expression, Sort, Sort, Text
Block
A container in which you can insert other objects.
Properties of Block
Background Color, Background Image, Border, Box Type, Class, Conditional Style, Floating,
Font, Foreground Color, Horizontal Alignment, ID, Margin, Padding, Size & Overflow, Spacing &
Breaking, Text Flow & Justification, Visible, White Space
Bookmark
A link to another area within the same report. The link can be defined either as a static value, a
query item, or as the result of a report expression.
Bubble Chart
A point chart that plots 1 or more data series against 3 measures: a Y-value, an X-value, and a
bubble whose relative size represents the third measure. Multiple points are plotted for each
category.
To help distinguish values, set the Tool Tips property of this object to Yes.
Caption
The caption of a field or field set.
Properties of Caption
Background Color, Background Image, Border, Class, Conditional Style, Font, Foreground
Color, ID, Margin, Padding
Category
The values along the X-axis against which each data series is plotted.
Properties of Category
Aggregate Function, Alias, Conditional Style, Conditional Text, Content, Data Format,
Expression, Expression, Key, Name, Query Item, Report Expression, Sort, Sort, Text
Chart Body
The main body of a chart. This includes the axes, and the area in between the axes where data
values are plotted.
Chart Footer
The text that appears at the bottom of a chart. The source of the text can be static text, a query
item value or caption, or a report expression.
Chart Subtitle
The text that appears as a subtitle in a chart. The source of the text can be static text, a query
item value or caption, or a report expression.
Chart Title
The text that appears as the title of a chart. The source of a chart title can be static text, a query
item value or caption, or a report expression.
Column Chart
A chart that uses columns as data markers to plot one or more data series.
Column Measure
A measure that is represented by a column chart within a combination chart. Measures can be
represented by a line chart, a column chart, or an area chart; this determined by the Type
property.
Combination Chart
A chart that uses combinations of column charts, area charts, and line charts as data markers
to plot multiple data series.
Conditional Block
A block that can be used for conditional display.
Crosstab
A layout object used to render the results of a query that aggregates data, and arranges it in a
two-dimensional grid.
Properties of Crosstab
Background Color, Background Image, Border, Box Type, Class, Conditional Style, Fact Cell
Style Precedence, Floating, Font, Foreground Color, Horizontal Alignment, ID, Margin,
Pagination, Query, Rows Per Page, Size & Overflow, Table Properties, Text Flow & Justification,
Vertical Alignment, Visible
Crosstab Cell
A set of cells in the crosstab as identified by the referenced levels.
Crosstab Corner
The top-left corner of a crosstab, on top of the row labels and to the left of the column labels. It
is typically used to represent crosstab members.
Crosstab Level
A level in a crosstab. Any style settings on this object are applied to all components of the level.
The content of this object describes the labels on the rows or columns.
Crosstab Member
A measure in a crosstab. Any style settings on this object are applied only to the identified
member; styles for all other members of the level are defined by the parent object. The contents
of this object describe the labels on the rows, columns or sections for this specific member.
Cumulative Line
A line that shows the cumulative contributions of data markers on a Pareto chart, as they sum
up to 100 percent.
Date Prompt
A prompt control that allows you to select a date value.
Dimension
A grouping of descriptive information about an aspect of a business. Dimensions contain levels,
whose order defines the hierarchy of organizational structures and data. Dimensions and levels
are values by which measures can be viewed, filtered, or aggregated.
Properties of Dimension
Name, Overall
Fact
A fact in a query.
Properties of Fact
Aggregate Function, Alias, Expression, Name, Sort
Field Set
A container with a caption, in which you can insert other objects. It is similar to a block object,
but it also has a caption.
Generated Prompt
A control that acts as a placeholder. The report server will replace this control with an
appropriate generated prompt control. The generated prompt will be the same as if it was on a
generated prompt page.
Group Filter
Filter that is applied to grouped data in a query. Specifically, it filters the input tabular structure
result set on the values in the cells defined by a level. Level specifications define the scope of
values within the conditional expression. The filter expressions are based on the items in the
cube structure or the input tabular structure.
HTML Item
A container in which you can add HTML, such as a link to a multimedia file. HTML items will only
appear when you run the report in HTML format.
Hyperlink
A hyperlink that can be defined either as a static value, a query item, or as the result of a report
expression. If a report expression is used, then the other values are ignored.
Properties of Hyperlink
Background Color, Background Image, Border, Box Type, Class, Conditional Style, Conditional
Text, Floating, Font, Foreground Color, ID, Margin, Padding, Query Item, Query Item, Report
Expression, Report Expression, Size & Overflow, Spacing & Breaking, Text, Text Flow &
Justification, URL, Vertical Alignment, Visible
Hyperlink Button
A hyperlink that is formatted as a button. The hyperlink can be defined either as a static value, a
query item, or as the result of a report expression. If a report expression is used, then the other
values are ignored
Image
A link to an image file. The link can be a static value, or it can come from a report expression or
query item. Use the URL Source properties of the image object to define the link.
Properties of Image
Background Color, Background Image, Border, Box Type, Class, Conditional Style, Drill
Throughs, Expression, Expression, Floating, ID, Margin, Query Item, Report Expression, Size &
Overflow, URL, Vertical Alignment, Visible
Interval Prompt
An advanced prompt control that allows you to enter time duration values.
Item
A query item using its Name property.
Properties of Item
Aggregate Function, Alias, Expression, Key, Name, Sort
Legend
A key to the patterns or colors assigned to the data series in a chart.
Properties of Legend
Allow Truncation, Background Color, Background Image, Conditional Style, Conditional Text,
Data Format, Display, Fill Effects, Font Auto-sizing, Font, Foreground Color, Horizontal
Alignment, Maximum Characters, Position, Show Values, Suppress Top Parent Labels,
Truncation Text
Level
A collection of similar values at the same position in a hierarchy. Levels may have a set of
properties. Like dimensions, levels are values by which measures can be viewed, filtered, or
aggregated.
Properties of Level
Name
Line Chart
A chart that uses lines as data markers to plot one or more data series.
Line Measure
A measure that is represented by a line chart within a combination chart. Measures can be
represented by a line chart, a column chart, or an area chart; this determined by the Type
property.
List
A layout object that is used to present query results in a list fashion.
Properties of List
Background Color, Background Image, Border, Box Type, Class, Column Titles, Conditional
Style, Contents Height, Floating, Font, Foreground Color, Horizontal Alignment, ID, Margin,
Pagination, Query, Rows Per Page, Size & Overflow, Table Properties, Text Flow & Justification,
Vertical Alignment, Visible
List Cell
A cell in a row for a list header or footer.
List Column
A column in a list. Typically, it will contain a query item, but may contain any number of layout
objects. For example, the To column in a statement list may present the address in a table
format. If the column only contains a query items, then the column will automatically span the
group if the query item is grouped.
List Columns
The columns that make up the list. Styles that are applied to this object are also applied to each
child List Column object.
List Footer
The footer that appears at the end of a list on each page that the list is rendered. It is useful for
presenting page totals.
List Header
The header that appears at the start of a list on each page that the list is rendered. It is useful for
presenting carry forward totals.
Marker
An additional marker that can be placed on a chart at a static point.
Properties of Marker
Aggregate Function, Alias, Conditional Style, Conditional Text, Content, Data Point Shape, Data
Point Size, Expression, Expression, Foreground Color, Key, Measure Axis, Name, Query Item,
Report Expression, Sort, Sort, Text, X Position, Y Position
Note
A note on a chart. Useful for describing information about a chart. The source of note text can
be static text, a query item, or a report expression.
Properties of Note
Aggregate Function, Alias, Background Color, Conditional Style, Conditional Text, Content,
Expression, Expression, Font, Foreground Color, Horizontal Alignment, Key, Line Style, Name,
Note Height, Note Left, Note Top, Note Width, Query Item, Report Expression, Sort, Sort, Text
Page
A page in a layout
Properties of Page
Background Color, Background Image, Border, Class, Conditional Style, Font, Foreground
Color, Horizontal Alignment, ID, Margin, Name, Padding, Pagination, Query, Size & Overflow,
Text Flow & Justification
Page Body
The main body of a page.
Page Footer
The footer of a page.
Page Header
The header of a page.
Pareto Chart
A chart in which data series appear as colored sections stacked in columns or bars. The
maximum of each column or bar represents the series total as a percentage of the overall total
of all data series in the chart.
Negative values are not supported in pareto charts.
Pie Chart
A chart that uses sections of a circle as data markers to plot one or more data series. The size
of each section is proportional to the value of each data series for a given category value. Each
pie corresponds to a category value.
Polar Chart
A point chart that plots one or more data series against two measures. The radius of a data
series is determined by one measure, and the arc is determined by the other measure. Multiple
points are plotted for each category. They can be distinguished with the help of tooltips if the
Tool Tip property is set to Yes.
Progressive Chart
A chart that uses columns as data markers to plot one category across a single measure. The
top of the first column represents the starting value for the second column. Emphasizes the
positive or negative contribution of each value to the total.
Prompt Button
A predefined button used in prompt pages. Its usage changes according to its Type property,
which can be set to Cancel, Back, Next, Finish, or Reprompt.
Quadrant Chart
A bubble chart which is divided into four equal sections based on points on the x-axis and
y-axis.
Queries
The set of all queries that provide data for the report.
Query
A query that are used to produce a report.
Properties of Query
Auto-sort, Avoid Division by Zero, Cross Product Allowed, Generated SQL, Maximum Execution
Time (Warn), Maximum Execution Time, Maximum Rows Retrieved (Warn), Maximum Rows
Retrieved, Maximum Tables (Warn), Maximum Tables, Maximum Text Blob Characters, Name,
Outer Join Allowed, Processing, Rollup Processing, Use SQL With Clause
Radar Chart
A chart that integrates multiple axes into a single radial figure as lines or stacked areas.
Radius Measure
The values along the radial axis of a polar chart against which each data series is plotted. The
radius of the circle determines the scale of one measure. The location of values around the
degrees of the circle, the arc, determines the scale of the second measure.
Repeater
A table in which you can insert items that will be repeated. Useful for creating mailing labels.
Properties of Repeater
Across, Background Color, Background Image, Border, Box Type, Class, Conditional Style,
Down, Floating, Font, Foreground Color, Horizontal Alignment, ID, Margin, Pagination, Query,
Repeater Direction, Repeater Scope, Size & Overflow, Table Properties, Text Flow &
Justification, Vertical Alignment, Visible
Repeater Cell
A cell in a repeater.
Scatter Chart
A point chart that plots one or more data series against two measures. Multiple points are
plotted for each category.
Series
A group of related data points known as a data series. Each data series has a unique color or
pattern and is represented in the legend by the legend key and series name.
Properties of Series
Aggregate Function, Alias, Conditional Style, Conditional Text, Content, Data Format,
Expression, Expression, Key, Name, Query Item, Report Expression, Sort, Sort, Text
Table
A collection of cells in which objects can be organized in a grid fashion.
Properties of Table
Background Color, Background Image, Border, Box Type, Class, Conditional Style, Floating,
Font, Foreground Color, Horizontal Alignment, ID, Margin, Size & Overflow, Table Properties,
Text Flow & Justification, Vertical Alignment, Visible
Table Cell
The cells within a row.
Table Row
The rows in a table.
Tabular Model
A simple list query against a Framework Manager model. You use it to identify the data items
(columns) to include in the query.
Tabular Reference
The tabular data of another query that will be reused as this query's tabular data.
Tabular Set
A relational set expression that combines two or more tabular structures. To specify a relational
set expression using SQL, use the tabular SQL object instead.
Tabular SQL
A SQL statement that is declared as a derived table whose items may be reused within the
tabular structure. Relationships between multiple derived tables will be determined by the query
engine.
Text Item
A text item in a report. The content can be static text, or it can come from a query item or report
expression.
Time Prompt
An advanced prompt control that allows you to select a time value.
Title
The title that describes the report.
Properties of Title
Display
Title
Text that appears beside an axis or legend. The source of the text can be static text, a query
item value or caption, or a report expression.
Properties of Title
Aggregate Function, Alias, Conditional Style, Conditional Text, Content, Display, Expression,
Expression, Font, Foreground Color, Horizontal Alignment, Key, Name, Query Item, Report
Expression, Sort, Sort, Text
Title
A title in a report. The source of a title can be static text, a query item value or caption, or a
report expression.
Properties of Title
Aggregate Function, Alias, Background Color, Background Image, Border, Box Type,
Conditional Style, Conditional Text, Content, Expression, Expression, Floating, Font,
Foreground Color, Key, Margin, Name, Padding, Query Item, Report Expression, Size &
Overflow, Sort, Sort, Spacing & Breaking, Text, Text Flow & Justification, Vertical Alignment,
Visible
Total Column
A column added to a progressive column chart that represents the total value. The query item
that defines the categories determines the label for the Total column.
Value Prompt
A prompt control that allows you to select one or more values from a list.
X-axis Measure
A measure on a point chart. The values along the x-axis against which each data series is
plotted.
Y-axis Measure
A measure on a point chart. The values along the y-axis against which each data series is
plotted.
3-D View
Specifies the 3-D viewing angle of the chart.
Across
Sets the number of times across, or horizontally, that the contents of the object will be rendered.
The default value depends on the setting of the Repeater Direction property. If it is set to Left to
right, top to bottom, the default is one. If it is set to Top to bottom, left to right, the default is 20.
Aggregate Function
Specifies the type of aggregation to apply. The Automatic setting means that the application
groups or aggregates based on the data type. The Aggregate setting means that any setting
found in the model will be used to determine the type of aggregation.
When set to Aggregate, the query item determines the aggregation that occurs. If the query item
is defined by a calculation, then the data type determines the aggregation. If the query item
refers to only one query item in the model, then the aggregation defined for that model item is
used. If that model item has no aggregation defined, then its data type determines the
aggregation.
When set to Automatic, if the data type of the query item is numeric, the query item is
summarized. If the data type is non-numeric, the query item is grouped. If the query item refers
to only one query item in the model, then the aggregation defined for that model item is used.
Alias
Specifies an alternate name for the item.
Allow Skip
Specifies whether or not the application will remove or skip certain category labels if space is
limited in the rendered report.
Allow Stagger
Specifies whether or not the application will stagger category labels if space is limited in the
rendered report.
Allow Truncation
Specifies whether or not truncation is allowed. If this property is set to No, then the Truncation
Text and Maximum Characters properties are ignored.
Application
Specifies whether to apply the filter before or after aggregation.
Auto-sort
Specifies whether or not to be sorted automatically based on data type when the report runs.
Auto-Submit
Specifies whether or not the application will submit the prompt page automatically as soon as a
value is changed.
Axis Type
Specifies how to show multiple axes when a chart is designed to show multiple measures or
sets of values. The chart can contain two axes, or an axis can be shared.
Shared means that there is only one y-axis. Dual means that there are two y-axes. Bipolar
means that values are plotted below the x-axis.
Background Color
Specifies the background color for the object.
Background Image
Specifies an image to be used as the background for the object.
Baseline Value
Specifies a constant numeric value to be drawn as a baseLine value.
Border
Specifies the width, style, and color for the object's borders.
Box Type
Specifies whether or not to override the default box type for the object.
Calendar Type
Specifies the type of calendar to be displayed. The date values will be mapped to the selected
calendar before being formatted. The default value is inherited from the user's content
language.
Cascade Source
Specifies the parameter value that will cascade to the prompt item.
Chart Subtype
Specifies the subtype of the chart.
Chart Type
Specifies the type of chart.
Class
Specifies a class to apply to the object. A class provides a default style.
Column Titles
Specifies where or whether column titles should be displayed.
Component Overrides
Specifies whether or not to allow the override of objects within referenced components. To be
able to override objects, they must first have an ID.
Component Reference
Specifies the layout component reference object that was used to create the selected object. An
object is a reusable component only if it has an ID.
Condition
Specifies a variable based on which text can be conditionally displayed.
Conditional Block
Specifies a variable and specific values based on which the block will be conditionally displayed.
Conditional Style
Specifies a variable whose values will determine conditional rules.
Conditional Text
Specifies a variable based on which text can be conditionally displayed.
Connecting Lines
Specifies whether or not to draw a line for each series from column to column.
Connection
Specifies the model connection.
Content
Specifies whether to display the data item's value or its label.
Contents Height
Specifies the relative height of list rows. This property is used only when a list has a height
defined in the Size and Overflow property.
Stretched means that the rows will be evenly sized to fit in the list's height. This is default HTML
behavior.
Minimal means that rows will take up only as much space as they need, and be compressed at
the top of the list. You can position a footer at the bottom of the list by setting the Push To Bottom
property to Yes on a footer object inside the list.
Current Block
Specifies which block is currently being authored.
Data Format
Specifies the data format of the object.
Default Selections
Specifies the collection of default selections for a prompt control.
Depth
Specifies the depth of the chart. The higher the value, the greater the 3-D effect. The value is
the number of virtual pixels divided by 10. For example, a setting of 50 is equivalent to 500
virtual pixels. Charts with no 3-D effect have a default of 0. Most charts with 3-D effects have a
default of 50.
Description
Specifies a description for the object, used to assist authoring.
Display Value
Specifies the values that will be shown to the report user when this prompt is used. These
values can be different than the ones that are actually used by the report.
Display
Specifies whether or not to render the object.
Display
Specifies whether or not to render the title.
Display Milliseconds
Specifies whether or not to display the milliseconds. The format of the milliseconds can be
controlled, by selecting one of the specific formats. This property is ignored if seconds are not
displayed. The default value is inherited from the user's content language.
Display Seconds
Specifies whether or not to display the seconds. The format of the seconds can be controlled, by
selecting one of the specific formats. The default value is inherited from the user's content
language.
Down
Specifies the number of times down (rows) that the frame contents should be rendered.
The default value depends on the setting of the Repeater Direction property. If it is set to Left to
right, top to bottom, the default is 20. If it is set to Top to bottom, left to right, the default is one.
Drill Throughs
Specifies a drill-through target for the object.
Duplicate Rows
Specifies whether duplicate rows will be preserved or removed in the rendered report.
Expression
Specifies the expression used to populate the item.
Expression
Specifies the expression used to populate the data item.
Fill Effects
Specifies the properties for the background of a chart. You can specify a pattern or gradient, and
choose which colors to use.
First Date
Specifies the earliest date to show in the control, and the earliest date allowed to be selected.
Floating
Specifies how objects flow around this object.
Float controls the way content that follows the selected object will flow around or below it.
Clear controls where the selected object is positioned relative to other floating objects.
Font Auto-sizing
Specifies whether or not the application will automatically reduce the size of the font if space is
limited in the rendered report.
Font
Specifies the font family, size, weight, style, and effects to display the object's text.
Foreground Color
Specifies the color of the object's text.
Generated SQL
Displays the generated SQL.
Hide Adornments
Specifies whether or not to hide the * character on required prompts and -> on type in prompts
that are in an error state.
Hide Text
Specifies whether or not to replace characters entered in the prompt control with * characters.
Horizontal Alignment
Specifies how the contents of the cells of a table column will be aligned.
HTML
Specifies the static text used to define the HTML object.
ID
Specifies a unique identifier that allows layout objects to be reused, usually to take advantage of
any applied formatting.
Key
Identifies this item as the unique key for the level. If more than one item is identified as key for a
level, their values are concatenated to form that level's unique key.
Last Date
Specifies the latest date shown in the control, and the earliest date allowed to be selected.
Level
Specifies the level to which this filter is applied. Item references in the filter condition are scoped
to the indicated level. If no level is specified, the filter is applied to the overall level.
Level Span
Specifies the level that this cell should visually span. Such cells appear to be grouped.
Level
Refers to a level from the query.
Line Style
Specifies whether or not to draw a border around the container box, and the type of line to be
used.
Logarithmic Scale
Specifies whether or not to display a logarithmic scale.
Margin
Specifies the margin properties for the object.
Maximum Characters
Specifies the maximum number of characters to display.
Maximum Characters
Specifies the maximum number of characters to display. Default - 48.
Maximum Characters
Specifies the number of characters after which the application will truncate category labels if
space on the chart is limited. This property is only used if the Allow Truncation property of
Category Labels is set to Yes.
If the Allow Truncation property is set to Yes and no value is specified in this property, the
application will automatically determine the optimum number of characters after which to
truncate. Use this property only if you want explicit control over the truncation level. Note that,
regardless of this property's setting, no truncation will occur If there is sufficient space.
Maximum Tables
Specifies the maximum number of tables that the query can retrieve.
Maximum Value
Specifies the maximum value for the manual axis scale. If omitted, the axis scale will be
computed automatically from plotted values.
Measure Axis
Specifies which axis the selected object will use to plot its values.
Two axes are available in a combination chart.
Minimum Value
Specifies the minimum value for the manual axis scale. If omitted, the axis scale will be
computed automatically from plotted values.
Mode
Specifies whether or not the arms of the clock actually move.
Multi-Line
Specifies whether or not multi-line editing is allowed in the text control.
Multi-Select
Specifies whether or not the control allows selection of multiple values. Note that an associated
parameterized filter expression will override this object’s setting. If you edit this property, but are
not getting the expected results, check the associated expression for the presence of an
operator that specifies how many items can be selected. Examples of multiple selection
operators are "in" and "not in"; examples of single selection operators are "=", "<" and ">".
For example, if you used the prompt wizard to create a parameterized filter expression, and
selected one of the operators that specify selection rules, changing the value of this property is
not sufficient to change this restriction. You must also edit the filter’s expression to remove the
offending operator.
To edit a filter expression, you must select the filter, which is accessible from the Query view,
using the Explorer bar.
Name
Specifies the name of the object.
New Marker
Creates a new marker in the chart.
New Note
Creates a new note.
Note Height
Specifies the height of the note in pixels.
Note Left
Specifies the position of the note from the left side, in pixels.
The position is measured from the left edge of the note.
Note Top
Specifies the position of the note from the bottom, in pixels.
The position is measured from the top edge of the note
Note Width
Specifies the width of the note, in pixels.
Numbers Only
Specifies whether or not the Text Box Prompt will allow numbers only.
Overall
Specifies a summarization level for the entire dimension. Aggregate data items will be
summarized across all members of the dimension, thereby generating one aggregate amount
for the entire dimension or query.
Padding
Specifies the space between the object and its margin or, if there is a border, between the object
and its border.
Pagination
Specifies pagination rules, such as page breaks, keep-with properties, page counts and
numbering.
Palette
Specifies the colors and gradients, in order, that will be used when data series are charted.
Parameter
Specifies the parameter that will be satisfied by values chosen in the prompt control.
Plot Measures As
Specifies how to plot the measures in the chart.
Position
Specifies where to position the legend.
Pre-Sort
Specifies the desired sort sequence for the item.
Processing
Specifies whether or not the query engine will pick up a minimal amount of processing. Local
processing only occurs if the database cannot handle the load.
Push To Bottom
Specifies whether or not to position the footer as low as possible inside the parent object.
Query Item
Specifies the URL object using a query item.
Query Item
Specifies the query item that defines the text to display.
Query Item
Specifies the query item that defines the object.
Query
Specifies the name of a query that is defined in the same report.
Range
Specifies whether or not this control will accept ranges. Note that an associated parameterized
expression will override this object’s setting. If you edit this property and are not getting the
expected results, check the associated expression for the presence or absence of an in_range
operator.
For example, if you created this prompt control with the prompt wizard, and set up an associated
parameterized filter that accepts ranges, changing the value of this property is not sufficient to
change this restriction. You must also edit the filter’s expression and remove the in_range
operator.
To edit a filter expression, you must select the filter, which is accessible from the Query view,
using the Explorer bar.
Repeater Direction
Specifies the direction in which to populate the rendered repeater cells.
Repeater Scope
Specifies which level to repeat.
Report Expression
Specifies the URL object using a report expression.
Report Expression
Specifies the report expression that defines the text to display.
Report Expression
Specifies the report expression used to define the HTML object.
Required
Specifies whether the prompt is required or optional. If this property is set to required, the
prompt must have a value entered before the report can be run. Note that the associated
parameterized filter’s setting for this property will override this object’s setting. If you edit this
property, but are not getting the expected results, check the associated filter’s setting for the
Required property.
For example, if you created this prompt control with the prompt wizard, and set the associated
parameterized filter to be optional, changing the value of this property is not sufficient to change
this setting. You must also edit the filter’s Required property to match the setting for this object’s
Required property.
To edit a filter expression, you must select the filter, which is accessible from the Query view,
using the Explorer bar.
Resolution Height
Specifies the height of the chart in pixels. If this property does not contain a value, the chart's
height will grow dynamically based on the container object. Default - 350 pixels.
Resolution Width
Specifies the width of the chart in pixels. If this property does not contain a value, the chart's
width will grow dynamically based on the container object. Default - 500 pixels.
Rollup Processing
Specifies where to compute aggregates. The Extended setting means that aggregates are
computed using an extended aggregate operation. The Database setting means that
aggregates are computed by the database software. The Local setting means that aggregates
are computed by the data retrieval software in the report server using a running aggregate.
Scale Interval
Specifies the size of the interval between ticks. If omitted, the axis scale will be computed
automatically from plotted values.
Select UI
Specifies which interface the prompt control will show.
Show Baseline
Specifies whether or not the chart will contain a baseline.
Show Caption
Specifies whether or where to display the caption.
Show Labels
Specifies whether or where to display the value labels in the chart.
Show Labels
Specifies whether or where to display the labels.
Show Values
Specifies whether and how to show legend values.
Show Values
Specifies whether or where to display the values in the chart.
Sort
Specifies the desired sort sequence for the item.
Sort
Specifies the desired sort sequence for the object.
Spider Effects
Specifies whether or not to enable spider effects.
SQL
Specifies a SQL query, described as a SELECT statement or a CALL to a stored procedure.
Static Choices
Represents a collection of static choices to be used by the prompt object.
Syntax
Specifies the syntax of the SQL in the query. A value of Cognos indicates that Cognos extended
SQL-92 syntax is used. Alternatively, a value of Native indicates that native database SQL is
used.
Table Properties
Specifies the properties for the table object.
Text
Specifies the static text to display.
Tool Tips
Specifies whether or not tooltips will be generated with the charts when rendered to HTML.
Truncation Text
Specifies how to indicate that the text has been truncated. For example, an ellipsis ( ...) is a
common way to indicate this.
Type
Specifies the chart subtype.
Type
Specifies the behavior of this prompt control.
URL
Specifies the URL using static text.
Usage
Specifies whether the usage of this object is Optional, Required, or Disabled. When Optional,
this condition will be applied if all parameters referenced by the expression have been provided
with values. If the expression does not refer to any parameters, then this condition will always be
applied. When Disabled, this condition will never be applied, which is useful for authoring and
testing purposes.
Use Value
Specifies the values that will be used by the prompt object. These values can be different than
the ones that are displayed to the user.
Values as Percentages
Specifies the values as a percentage of the total. The Show Values property must be set at
something other than None for this property to be used.
Vertical Alignment
Specifies how to vertically align this object relative to its siblings.
Vertical Alignment
Specifies how objects contained in this object are vertically aligned.
Visible
Specifies whether or not the object will be displayed.
Visual Angle
Specifies the angle, in degrees, in which the chart elements will display when it has 3-D effects.
White Space
Specifies how white space inside the object is handled.
X Position
Specifies the position along the x-axis.
If the selected object is a marker, this property specifies where the marker is placed in terms of
the labels along the x-axis. For example, if you enter 1.5, the marker will be positioned between
the first and second label along the x-axis.
If the selected object is a quadrant chart, this property specifies the origin of the quadrant
dividers in terms of the values plotted along the x-axis.
Y Position
Specifies the position along the y-axis.
If the selected object is a marker, this property specifies where the marker is placed in terms of
the values plotted along the y-axis.
If the selected object is a quadrant chart, this property specifies the origin of the quadrant
dividers in terms of the values plotted along the y-axis.
Calendar Type
Specifies the type of calendar to be displayed. The date values will be mapped to the selected
calendar before being formatted. The default value is inherited from the user's content
language. Note that the Japanese Imperial setting is only applicable for Japanese languages.
Clock
Specifies whether to display the time in 12-hour or 24-hour format. The default value is inherited
from the user's content language.
Currency
Specifies the currency to be used. The default currency symbol will be displayed unless the
values of the Currency Display and Currency Symbol properties are changed. The default value
is inherited from the model.
Currency Display
Specifies whether to display the international or local currency symbol. By default, the local
currency symbol is displayed.
Currency Symbol
Specifies a character or characters as a symbol to identify the local currency. This symbol will
precede the number and any sign, even if it is a leading sign. A space between the symbol and
the numeric value can be specified by entering it in this property, after the symbol. The default
value is inherited from the user's content language.
Date Ordering
Specifies the order in which to display the day, month, and year. The default value is inherited
from the user's content language.
Date Separator
Specifies the character to be displayed between the year, month and day. The default value is
inherited from the user's content language.
Date Style
Specifies the style of date to be used. The results that will be rendered are determined by the
language. Typically, Short uses only numbers, Medium uses some abbreviated words, Long
uses complete words, and Full includes all available details.
Decimal Separator
Specifies the character that will separate non-decimal numbers from decimals. This property is
ignored if no decimals are displayed. The default value is inherited from the user's content
language.
Display AM / PM Symbols
Specifies whether or not to display the AM or PM symbols. The default value is inherited from
the user's content language.
Display As Exponent
Specifies whether or not to render values in scientific notations, using exponents. If this property
is set to No, no scientific notations will be used. If it is not specified, scientific notations will be
used only when values exceed the maximum number of digits. The default value is inherited
from the user's content language.
Display Days
Specifies whether or not the day will be displayed. The format of the day can be controlled, by
selecting one of the specific formats. Selecting Julian means that the 3 digit day of the year will
be displayed. The default value is inherited from the user's content language.
Display Eras
Specifies whether or not the era will be displayed. The default value is inherited from the user's
content language.
Display Hours
Specifies whether or not to display the hours. The default value is inherited from the user's
content language.
Display Milliseconds
Specifies whether or not to display the milliseconds. The format of the milliseconds can be
controlled, by selecting one of the specific formats. This property is ignored if seconds are not
displayed. The default value is inherited from the user's content language.
Display Minutes
Specifies whether or not to display the minutes. The format of the minutes can be controlled, by
selecting one of the specific formats. The default value is inherited from the user's content
language.
Display Months
Specifies whether or not the month will be displayed. The format of the month can be controlled,
by selecting one of the specific formats. The default value is inherited from the user's content
language.
Display Months
Specifies whether the month will be displayed.
Display Seconds
Specifies whether or not to display the seconds. The format of the seconds can be controlled, by
selecting one of the specific formats. The default value is inherited from the user's content
language.
Display Weekdays
Specifies whether or not the weekday will be displayed. The format of the weekday can be
controlled, by selecting one of the specific formats. The default value is inherited from the user's
content language.
Display Years
Specifies whether or not the year will be displayed. The first two digits of the year (century) can
be controlled, by selecting one of the associated property values. The default value is inherited
from the user's content language.
Display Years
Specifies whether the year will be displayed.
Exponent Symbol
Specifies the character to be displayed to identify exponents if the scientific notation is used.
The symbol will be rendered after the number, separated by a space. The default value is
inherited from the user's content language.
Mantissa (digits)
Specifies the number of digits to be displayed following the exponent symbol if the scientific
notation is used.
Negative Pattern
Specifies a presentation format that is based on patterns, for negative numbers. Some
restrictions exist for negative patterns.
Padding Character
Specifies the character that will be used to pad values that have fewer digits than the minimum
number of digits. The default value is inherited from the user's content language.
Pattern
Specifies a presentation format that is based on patterns.
Percentage Symbol
Specifies whether to display the values per hundred (percent) or per thousand. The symbol will
be appended to the number and any trailing sign. A space between the numeric value and the
symbol can be specified by entering it in this property, after the symbol. The default value is
inherited from the user's content language.
Scale (integer)
Specifies how many digits to move the decimal delimiter for formatting purposes. For example,
move the decimal three spaces to present values in thousands. The default value is inherited
from the database field.
Thousands Separator
Specifies how to delimit digit groups, such as thousands. This property is only used if the Use
Thousands Separator property is set to Yes. The default value is inherited from the user's
content language.
Time Separator
Specifies the character to be displayed between hour, minute and second. The default value is
inherited from the user's content language.
Time Style
Specifies the style of time to be displayed. The exact results that will be rendered are
determined by the language. Typically, Short means that the minimum details will be displayed,
Long adds seconds, and Full means that all details are displayed, including the time zone. The
default value is inherited from the user's content language.
Time Unit
Specifies the values' unit of measure. This property will be ignored if any day or time
components are shown. The default value is inherited from the user's content language.
An expression is any combination of operators, constants, functions, and other components that
evaluates to a single value. You build expressions to create calculation and filter definitions. A
calculation is an expression that you use to create a new value from existing values contained
within a data item. A filter is an expression that you use to retrieve a specific subset of records.
The Expression Editor UI displays the expression components that are supported by the data
source in which the metadata is stored. For example, if you import metadata from an Oracle
data source, the Expression Editor displays only the elements that are supported in Oracle.
Note that SAP BW does not support any of the summary functions, constructs, and common
functions, nor many of the operators and constants, that are listed in this appendix.
Steps
1. In the Model or Query Items tab, click the query item you want to browse.
2. If you want to insert a single value, click the select value button.
3. If you want to insert multiple values, click the select multiple values button.
4. In the Values box, click the value you want to insert in the expression.
Tip: Use the Keywords box to quickly locate a specific value.
5. If you clicked multiple values, click the right arrow button to add them to the Selected
values box.
6. Click Insert.
Tip: To control where the values appear in the Expression Definition box, click the copy
button instead. The values are copied to the clipboard, and you can then paste them where
you want.
Operators
Operators specify what happens to the values on either side of the operator. Operators are
similar to functions, in that they manipulate data items and return a result.
(
Inserts an open parenthesis in your expression.
Syntax
(expression)
)
Inserts a closed parenthesis in your expression.
Syntax
(expression)
*
Multiplies two numeric values.
Syntax
value1 * value2
,
Separates expression components.
Syntax
expression(param1, param2)
/
Divides two numeric values.
Syntax
value1 / value2
||
Concatenates strings.
Syntax
string1 || string2
+
Adds two values.
Syntax
value1 + value2
-
Subtracts two numeric values or negates a numeric value.
Syntax
value1 - value2 or - value
<
Compares values against a defined value and retrieves the values that are less than the defined
value.
Syntax
value1 < value2
<=
Compares values against a defined value and retrieves the values that are less than or equal to
the defined value.
Syntax
value1 <= value2
<>
Compares values against a defined value and retrieves the values that are not equal to the
defined value.
Syntax
value1 <> value2
=
Compares values against a defined value and retrieves the values that are equal to the defined
value.
Syntax
value1 = value2
>
Compares values against a defined value and retrieves the values that are greater than the
defined value.
Syntax
value1 > value2
-->
Use with the Lookup operator to replace one value with another.
Syntax
Lookup (name) in (value1 --> value2) default (name)
>=
Compares values against a defined value and retrieves the values that are greater than or equal
to the defined value.
Syntax
value1 >= value2
and
Returns true if the conditions on both sides of the expression are true.
Syntax
arg1 AND arg2
auto
Use with summary expressions to define the scope to be adjusted based on the grouping
columns in the query.
Syntax
aggregate_function ( expression AUTO )
between
Determines if a value falls in a given range.
Syntax
name BETWEEN value1 and value2
case
Use with When, Then, Else, and End.
Syntax
CASE expression { WHEN expression THEN expression } [ ELSE expression ] END
contains
Determines if a string contains another string.
Syntax
string1 CONTAINS string2
default
Inserts a default value when the conditions are not met.
Syntax
expression DEFAULT(value)
distinct
Includes only distinct occurrences within a data item in a calculation.
Syntax
DISTINCT dataItem
else
Use with If or Case constructs.
Syntax
IF (condition) THEN .... ELSE (expression) , or CASE .... ELSE expression END
end
Use with Case When construct.
Syntax
CASE .... END
for
Use with summary expressions to define the scope of the aggregation in the query.
Syntax
aggregate_function ( expression FOR expression { , expression } )
for all
Use with summary expressions to define the scope to be all the specified grouping columns in
the query. See also FOR clause.
Syntax
aggregate_function ( expression FOR ALL expression { , expression } )
for any
Use with summary expressions to define the scope to be adjusted based on a subset of the
grouping columns in the query. Equivalent to FOR clause.
Syntax
aggregate_function ( expression FOR ANY expression { , expression } )
for report
Use with summary expressions to define the scope to be the whole query. See also FOR
clause.
Syntax
aggregate_function ( expression FOR REPORT )
if
Use with Then and Else.
Syntax
IF (condition is true) THEN (action) ELSE (alternate action)
in
Determines if a value exists in a given list of values.
Syntax
exp1 IN (exp_list)
in_range
Determines if an item exists in a given list of constant values or ranges.
Syntax
expression IN_RANGE { constant : constant [ , constant : constant ] }
is missing
Determines if a value is undefined in the data.
Syntax
value IS MISSING
is null
Determines if a value is undefined in the data.
Syntax
value IS NULL
is not missing
Determines if a value is defined in the data.
Syntax
value IS NOT MISSING
is not null
Determines if a value is defined in the data.
Syntax
value IS NOT NULL
like
Determines if a string matches the pattern of another string.
Syntax
string1 LIKE string2
lookup
Finds and replaces data with a value you specify.
Syntax
LOOKUP (name) in (value1 --> value2) default (name)
not
Returns true if the condition is false, otherwise returns false.
Syntax
NOT arg
or
Returns true if either of the two conditions on both sides of the expression is true.
Syntax
arg1 OR arg2
prefilter
Performs a summary calculation before applying the summary filter.
Syntax
summary ([expression] PREFILTER)
rows
Counts the number of rows output by the query. Use with Count().
Syntax
count(ROWS)
starts with
Determines if a string starts with a given string.
Syntax
string1 STARTS WITH string2
then
Use with If or Case constructs.
Syntax
IF (condition) THEN ...., or CASE expression WHEN expression THEN .... END
when
Use with Case construct.
Syntax
CASE [expression] WHEN .... END
Summaries
A summary executes a predefined function and returns a summary value.
average
Returns the average value of selected data items.
Syntax
average ( [ distinct ] expr [ auto ] ) average ( [ distinct ] expr for [ all | any ] expr
{ , expr } ) average ( [ distinct ] expr for report )
Example
average ( Sales )
Result: The average of all Sales values.
count
Returns the number of selected data items excluding NULL values.
Syntax
count ( [ distinct ] expr [ auto ] ) count ( [ distinct ] expr for [ all | any ] expr {
, expr } ) count ( [ distinct ] expr for report )
Example
count ( Sales )
Result: The total number of entries under Sales.
maximum
Returns the maximum value of selected data items.
Syntax
maximum ( [ distinct ] expr [ auto ] ) maximum ( [ distinct ] expr for [ all | any ] expr
{ , expr } ) maximum ( [ distinct ] expr for report )
Example
maximum ( Sales )
Result: The maximum value of all Sales values.
minimum
Returns the minimum value of selected data items.
Syntax
minimum ( [ distinct ] expr [ auto ] ) minimum ( [ distinct ] expr for [ all | any ] expr
{ , expr } ) minimum ( [ distinct ] expr for report )
Example
minimum ( Sales )
Result: The minimum value of all Sales values.
moving-average
Returns a moving average by row for a specified set of values of over a specified number of
rows.
Syntax
moving-average ( [ distinct ] expr , expr [ auto ] ) moving-average ( [ distinct ] expr
, expr for [ all | any ] expr { , expr } ) moving-average ( [ distinct ] expr , expr for
report )
Example
moving-average ( Qty, 3 )
Result: For each row, this displays the quantity and a moving average of the current row and the
preceding two rows.
moving-total
Returns a moving total by row for a specified set of values over a specified number of rows.
Syntax
moving-total ( [ distinct ] expr , expr [ auto ] ) moving-total ( [ distinct ] expr ,
expr for [ all | any ] expr { , expr } ) moving-total ( [ distinct ] expr , expr for
report )
Example
moving-total ( Qty, 3 )
Result: For each row, this displays the quantity and a moving total of the current row and the
preceding two rows.
percentage
Returns the percent of the total value for selected data items.
Syntax
percentage ( [ distinct ] expr [ auto ] ) percentage ( [ distinct ] expr for [ all | any
] expr { , expr } ) percentage ( [ distinct ] expr for report )
Example
percentage ( sales 98 )
Result: Shows the percentage of the total sales for 1998 that is attributed to each sales
representative.
percentile
Returns a value, on a scale of one hundred, that indicates the percent of a distribution that is
equal to or below the selected data items.
Syntax
percentile ( [ distinct ] expr [ auto ] ) percentile ( [ distinct ] expr for [ all | any
] expr { , expr } ) percentile ( [ distinct ] expr for report )
Example
percentile ( Sales 98 )
Result: For each row, displays the percentage that the current sales value represents when
compared to the highest sales value.
quantile
Returns the rank of a value in terms of a range that you specify. It returns integers to represent
any range of ranks, such as 1 (highest) to 100 (lowest).
Syntax
quantile ( [ distinct ] expr , expr [ auto ] ) quantile ( [ distinct ] expr , expr for [
all | any ] expr { , expr } ) quantile ( [ distinct ] expr , expr for report )
Example
quantile ( Qty, 4 )
Result: The quantity, the rank of the quantity value, and the quantity values broken down into 4
quantile groups (quartiles).
quartile
Returns the rank of a value, represented as integers from 1 (highest) to 4 (lowest), relative to a
group of values.
Syntax
quartile ( [ distinct ] expr [ auto ] ) quartile ( [ distinct ] expr for [ all | any ]
expr { , expr } ) quartile ( [ distinct ] expr for report )
Example
quartile ( Qty )
Result: This displays the quantity and the quartile of the quantity value represented as integers
from 1 (highest) to 4 (lowest).
rank
Returns the rank value of selected data items.
Syntax
rank ( [ distinct ] expr [ auto ] ) rank ( [ distinct ] expr for [ all | any ] expr { ,
expr } ) rank ( [ distinct ] expr for report )
Example
rank ( Sales 98 )
Result: For each row, this displays the rank value of sales for 1998 that is attributed to each
sales representative.
running-average
Returns the running average by row (including the current row) for a set of values.
Syntax
running-average ( [ distinct ] expr [ auto ] ) running-average ( [ distinct ] expr for [
all | any ] expr { , expr } ) running-average ( [ distinct ] expr for report )
Example
running-average ( Qty )
Result: For each row, this displays the quantity and a running average of the current and the
previous rows.
running-count
Returns the running count by row (including the current row) for a set of values.
Syntax
running-count ( [ distinct ] expr [ auto ] ) running-count ( [ distinct ] expr for [ all
| any ] expr { , expr } ) running-count ( [ distinct ] expr for report )
Example
running-count ( Qty )
Result: For each row, this displays the quantity and a running count of the position of current
row.
running-difference
Returns a running difference by row, calculated as the difference between the value for the
current row and the preceding row, (including the current row) for a set of values.
Syntax
running-difference ( [ distinct ] expr [ auto ] ) running-difference ( [ distinct ] expr
for [ all | any ] expr { , expr } ) running-difference ( [ distinct ] expr for report )
Example
running-difference ( Qty )
Result: For each row, this displays the quantity and a running difference between the value for
the current row and the preceding row.
running-maximum
Returns the running maximum by row (including the current row) for a set of values.
Syntax
running-maximum ( [ distinct ] expr [ auto ] ) running-maximum ( [ distinct ] expr for [
all | any ] expr { , expr } ) running-maximum ( [ distinct ] expr for report )
Example
running-maximum ( Qty )
Result: For each row, this displays the quantity and a running maximum of the current and
previous rows.
running-minimum
Returns the running minimum by row (including the current row) for a set of values.
Syntax
running-minimum ( [ distinct ] expr [ auto ] ) running-minimum ( [ distinct ] expr for [
all | any ] expr { , expr } ) running-minimum ( [ distinct ] expr for report )
Example
running-minimum ( Qty )
Result: For each row, this displays the quantity and a running minimum of the current and
previous rows.
running-total
Returns a running total by row (including the current row) for a set of values.
Syntax
running-total ( [ distinct ] expr [ auto ] ) running-total ( [ distinct ] expr for [ all
| any ] expr { , expr } ) running-total ( [ distinct ] expr for report )
Example
running-total ( Qty )
Result: For each row, this displays the quantity and a running total of the current and previous
rows.
standard-deviation
Returns the standard deviation of selected data items.
Syntax
standard-deviation ( [ distinct ] expr [ auto ] ) standard-deviation ( [ distinct ] expr
for [ all | any ] expr { , expr } ) standard-deviation ( [ distinct ] expr for report )
Example
standard-deviation ( ProductCost )
Result: A value indicating the deviation between product costs and the average product cost.
standard-deviation-pop
Computes the population standard deviation and returns the square root of the population
variance.
Syntax
standard-deviation-pop ( [ distinct ] expr [ auto ] ) standard-deviation-pop ( [ distinct
] expr for [ all | any ] expr { , expr } ) standard-deviation-pop ( [ distinct ] expr for
report )
Example
standard-deviation-pop ( ProductCost )
Result: A value of the square root of the population variance.
tertile
Returns the rank of a value as High, Middle, or Low relative to a group of values.
Syntax
tertile ( [ distinct ] expr [ auto ] ) tertile ( [ distinct ] expr for [ all | any ] expr
{ , expr } ) tertile ( [ distinct ] expr for report )
Example
tertile ( Qty )
Result: Shows quantity, the quantile of the quantity value as broken down into tertiles, and the
quantity values broken down into tertiles.
total
Returns the total value of selected data items.
Syntax
total ( [ distinct ] expr [ auto ] ) total ( [ distinct ] expr for [ all | any ] expr {
, expr } ) total ( [ distinct ] expr for report )
Example
total ( Sales )
Result: The total value of all Sales values.
variance
Returns the variance of selected data items.
Syntax
variance ( [ distinct ] expr [ auto ] ) variance ( [ distinct ] expr for [ all | any ]
expr { , expr } ) variance ( [ distinct ] expr for report )
Example
variance ( Product Cost )
Result: A value indicating how widely product costs vary from the average product cost.
variance-pop
Returns the population variance of a set of numbers after discarding the nulls in this set.
Syntax
variance-pop ( [ distinct ] expr [ auto ] ) variance-pop ( [ distinct ] expr for [ all |
any ] expr { , expr } ) variance-pop ( [ distinct ] expr for report )
Example
variance-pop ( Qty)
Result: For each row, this displays the population variance of a set of numbers after discarding
the nulls in this set.
Constants
A constant is a fixed value that you can use in an expression.
date
Inserts the current system date.
date-time
Inserts the current system date and time.
interval
Inserts a zero interval.
null
Inserts a null value if the expression conditions are not met.
number
Inserts the number 0, which you can replace with a new numeric value.
string
Inserts an empty string.
time
Inserts the current system time.
Constructs
if then else
Syntax
example: IF ([Country] = 'Canada') THEN ([List Price] * 0.60) ELSE ([List
Price])
in_range
Specify one or more constants or ranges. A range can be open ended.
Example
[gosales].[CONVERSIONRATE].[COUNTRYCODE] IN_RANGE { :30 , 40, 50, 999: }
search case
Syntax
example: CASE WHEN [Country] = 'Canada' THEN ([List Price] * 0.60) WHEN
[CountryCode] > 100 THEN [List Price] * 0.80 ELSE [List Price] END
simple case
Syntax
example: CASE [Country] WHEN 'Canada' THEN ([List Price] * 0.60) WHEN
'Australia' THEN [List Price] * 0.80 ELSE [List Price] END
Syntax
_add_days ( date_exp, integer_exp )
Example 1
_add_days ( 2002-04-30 , 1 )
Result: 2002-05-01
Example 2
_add_days ( 2002-04-30 12:10:10.000, 1 )
Result: 2002-05-01 12:10:10.000
_add_months
Returns the date or datetime dependent on the first argument resulting from adding integer_exp
months to date_exp.
Syntax
_add_months ( date_exp, integer_exp )
Example 1
_add_months ( 2002-04-30 , 1 )
Result: 2002-05-30
Example 2
_add_months ( 2002-04-30 12:10:10.000, 1 )
Result: 2002-05-30 12:10:10.000
_add_years
Returns the date or datetime dependent on the first argument resulting from adding integer_exp
years to date_exp.
Syntax
_add_years ( date_exp, integer_exp )
Example 1
_add_years ( 2002-04-30 , 1 )
Result: 2003-04-30
Example 2
_add_years ( 2002-04-30 12:10:10.000 , 1 )
Result: 2003-04-30 12:10:10.000
_age
Returns a number that is obtained from subtracting date_exp from today’s date. This value has
the form YYYYMMDD, where YYYY represents the number of years, MM represents the
number of months, and DD represents the number of days.
Syntax
_age (date_exp )
Example
Today's date=2003-02-05 _age ( 1990-04-30 )
Result: 120906 that is 12 years, 9 months and 6 days
_day_of_week
Returns the day of week (between 1 and 7), where 1 is the first day of the week as indicated by
the second parameter (between 1 and 7, 1 being Monday and 7 being Sunday). Note that in ISO
8601 standard, a week begins with Monday being day 1. In North America where Sunday is the
first day of the week being day 7.
Syntax
_day_of_week ( date_exp, integer )
Example
_day_of_week ( 2003-01-01, 1 )
Result: 3
_day_of_year
Returns the ordinal for the day of the year in date_ exp (1 to 366). Also known as Julian day.
Syntax
_day_of_year ( date_exp )
Example
_day_of_year ( 2003-03-01 )
Result: 61
_days_between
Returns a positive or negative number representing the number of days between the two date
expressions. If date_exp1 < date_exp2 then the result will be a negative number.
Syntax
_days_between ( date_exp1, date_exp2 )
Example
_days_between ( 2002-04-30 , 2002-06-21 )
Result: -52
_days_to_end_of_month
Returns a number representing the number of days remaining in the month represented by the
date expression date_exp.
Syntax
_days_to_end_of_month ( date_exp )
Example
_days_to_end_of_month ( 2002-04-20 14:30:22.123 )
Result: 10
_first_of_month
Returns a date or datetime dependent on the argument obtained from converting date_exp to a
date with the same year and month but the day set to 1.
Syntax
_first_of_month ( date_exp )
Example 1
_first_of_month ( 2002-04-20 )
Result: 2002-04-01
Example 2
_first_of_month ( 2002-04-20 12:10:10.000 )
Result: 2002-04-01 12:10:10.000
_last_of_month
Returns a date or datetime dependent on the argument that is the last day of the month
represented by date_exp.
Syntax
_last_of_month ( date_exp )
Example 1
_last_of_month ( 2002-01-14 )
Result: 2002-01-31
Example 2
_last_of_month ( 2002-01-14 12:10:10.000 )
Result: 2002-01-31 12:10:10.000
_make_timestamp
Returns a timestamp constructed from integer_exp1 (the year), integer_exp2 (the month) and
integer_exp3 (the day).
Syntax
_make_timestamp ( integer_exp1, integer_exp2, integer_exp3 )
Example
_make_timestamp ( 2002 , 01 , 14 )
Result: 2002-01-14 00:00:00.000
_months_between
Returns a positive or negative integer number representing the number of months between
date_exp1 to date_exp2. If date_exp1 < date_exp2, then a negative number is returned.
Syntax
_months_between ( date_exp1, date_exp2 )
Example
_months_between ( 2002-01-30, 2002-04-03 )
Result: 2
_round
Returns the numeric expression rounded to the integer_exp places right of the decimal point.
NOTE: integer_exp MUST be a non-negative integer.
Syntax
_round ( numeric_exp, integer_exp )
Example
_round ( 1220.42369, 2 )
Result: 1220.42
_week_of_year
Returns the number of the week of the year of the date_exp according to ISO 8601, in which
week 1 of the year is the first week of the year to contain a Thursday, which is equivalent to the
first week containing January 4th.
Syntax
_week_of_year ( date_exp )
Example
_week_of_year ( 2003-01-01 )
Result: 1
_years_between
Returns a positive or negative integer number representing the number of years from date_exp1
to date_exp2. If date_exp1 < date_exp2 then a negative value is returned.
Syntax
_years_between ( date_exp1, date_exp2 )
Example
_years_between ( 2003-01-30, 2001-04-03 )
Result: 1
_ymdint_between
Returns a number representing the difference between the date expressions D1 and D2. This
value has the form YYYYMMDD, where YYYY represents the number of years, MM represents
the number of months, and DD represents the number of days.
Syntax
_ymdint_between ( date_exp1, date_exp2 )
Example
_ymdint_between ( 1990-04-30 , 2003-02-05 )
Result: 120906 that is 12 years, 9 months and 6 days
Macro Functions
This list contains functions that can be used within a macro. A macro may contain one or more
macro functions. A macro is delimited by a number sign (#) at the beginning and at the end.
Everything between the number signs is treated as a macro expression, which is executed at
run time.
sb
Surround the passed string with square brackets.
Syntax
sb ( string_exp )
Example
#sb ( 'abc' )#
Result: [abc]
sq
Surround the passed string with single quotes.
Syntax
sq ( string_exp )
Example
#sq ( 'zero' )#
Result: 'zero'
dq
Surround the passed string with double quotes.
Syntax
sq ( string_exp )
Example
#sq ( 'zero' )#
Result: "zero"
CSVIdentityName
Use the identity information of the current authenticated user to lookup values in the specified
parameter map. Each individual piece of the user's identity (account name, group names, role
names) is used as a key into the map. The unique list of values that is retrieved from the map is
then returned as a string, where each value is surrounded by single quotes and where multiple
values are separated by commas.
Syntax
CSVIdentityName ( %parameter_map_name [ , separator_string ] )
Example
#CSVIdentityName ( %security_clearance_level_map )#
Result: 'level_500' , 'level_501' , 'level_700'
CSVIdentityNameList
Returns the pieces of the user's identity (account name, group names, role names) as a list of
strings. The unique list of values is returned as a string, where each value is surrounded by
single quotes and where multiple values are separated by commas.
Syntax
CSVIdentityNameList ( [ separator_string ] )
Example
#CSVIdentityNameList ( )#
Result: 'Everyone' , 'Report Administrators' , 'Query User'
+
Concatenates two strings.
Syntax
value1 + value2
Example
# '{' + $runLocale + '}'#
Result: {en-us}
prompt
Prompt the user for a single value. Only the prompt_name argument is required.
Syntax
prompt ( prompt_name , datatype , defaultText , text , queryItem , trailing_text )
Example
select . . . where COUNTRY_MULTILINGUAL.COUNTRY_CODE > #prompt('Starting CountryCode',
'integer', '10' )#
Result: select . . . where COUNTRY_MULTILINGUAL.COUNTRY_CODE > 150
promptmany
Prompt the user for one or more values. Only the prompt_name argument is required.
Syntax
promptmany ( prompt_name , datatype , defaultText , text , queryItem , trailing_text )
Example
select . . . where COUNTRY_MULTILINGUAL.COUNTRY IN ( #promptmany ( 'CountryName' ) # )
Common Functions
abs
Returns the absolute value of numeric_exp. The sign of negative values is changed to positive.
Syntax
abs ( numeric_exp )
Example 1
abs ( 15 )
Result: 15
Example 2
abs ( -15 )
Result: 15
cast
Converts an expression to a specified data type. Some data types allow for a length and
precision to be specified.
Syntax
cast ( expression, datatype_specification )
Example 1
cast ( '123' , integer )
Result: 123
Example 2
cast ( 12345 , VARCHAR ( 10 ) )
Result: a string containing 12345
Notes
• You can specify the following datatypes: CHARACTER, VARCHAR, CHAR, NUMERIC,
DECIMAL, INTEGER, SMALLINT, REAL, FLOAT, DATE, TIME, TIMESTAMP, and
INTERVAL.
• When you convert a value of type TIMESTAMP to type DATE, the time portion of the
timestamp value is ignored.
• When you convert a value of type TIMESTAMP to type TIME, the date portion of the
timestamp is ignored.
• When you convert a value of type DATE to type TIMESTAMP, the time components of the
timestamp are set to zero.
• When you convert a value of type TIME to type TIMESTAMP, the date component is set to
the current system date.
• When you convert a value of type INTERVAL to type CHAR, CHARACTER, or VARCHAR,
the resulting string is in the format DDD HH:MM:SS.S, where DDD is the number of days,
HH the number of hours, MM the number of minutes, and SS.S the number of seconds and
parts of a second.
ceiling
Returns the smallest integer greater than or equal to numeric_exp.
Syntax
ceiling ( numeric_exp )
Example 1
ceiling ( 4.22 )
Result: 5
Example 2
ceiling ( -1.23 )
Result: -1
character_length
Returns the number of characters in string_exp.
Syntax
character_length ( string_exp )
Example
character_length ( 'Canada' )
Result: 6
coalesce
Returns the first non-null argument (or null if all arguments are null). The Coalesce function
takes two or more arguments.
Syntax
coalesce ( exp_list )
current_date
Returns a date value representing the current date of the computer that the database software
runs on.
Syntax
current_date
Example
current_date
Result: 2003-03-04
current_time
Returns a time value, representing the current time of the computer that runs the database
software.
Syntax
current_time
Example
current_time
Result: 16:33:11
current_timestamp
Returns a datetime value, representing the current timestamp of the computer that runs the
database software.
Syntax
current_timestamp
Example
current_timestamp
Result: 2003-03-03 16:40:15.535000
exp
Returns e raised to the power of numeric_exp. The constant e is the base of the natural
logarithm. See also log.
Syntax
exp ( numeric_exp )
Example
exp ( 2 )
Result: 7.389056
extract
Returns an integer representing the value of datepart (year, month, day, hour, minute, second)
in datetime_exp.
Syntax
extract ( datepart , datetime_exp )
Example 1
extract ( year , 2003-03-03 16:40:15.535 )
Result: 2003
Example 2
extract ( hour , 2003-03-03 16:40:15.535 )
Result: 16
floor
Returns the largest integer less than or equal to numeric_exp.
Syntax
floor ( numeric_exp )
Example 1
floor ( 3.22 )
Result: 3
Example 2
floor ( -1.23 )
Result: -2
ln
Returns the natural logarithm of the numeric_exp.
Syntax
ln ( numeric_exp )
Example
ln ( 4 )
Result: 1.38629
lower
Returns string_exp with all uppercase characters shifted to lowercase.
Syntax
lower ( string_exp )
Example
lower ( 'ABCDEF' )
Result: 'abcdef'
mod
Returns the remainder (modulus) of integer_exp1 divided by integer_exp2. The integer_exp2
must not be zero or an exception condition is raised.
Syntax
mod ( integer_exp1, integer_exp2 )
Example
mod ( 20 , 3 )
Result: 2
octet_length
Returns the number of bytes in string_exp.
Syntax
octet_length ( string_exp )
Example 1
octet_length ( 'ABCDEF' )
Result: 6
Example 2
octet_length ( '' )
Result: 0
position
Returns integer value representing the position of the first string_exp in the second string_exp
or 0 when the first string_exp is not found.
Syntax
position ( string_exp , string_exp )
Example 1
position ( 'C' , 'ABCDEF' )
Result: 3
Example 2
position ( 'H' , 'ABCDEF' )
Result: 0
power
Returns numeric_exp1 raised to the power numeric_exp2. If numeric_exp1 is negative then
numeric_exp2 must result in an integer value.
Syntax
power ( numeric_exp1, numeric_exp2 )
Example
power ( 3 , 2 )
Result: 9
sqrt
Returns the square root of numeric_exp. numeric_exp must be non-negative.
Syntax
sqrt ( numeric_exp )
Example
sqrt ( 9 )
Result: 3
substring
Returns the substring of string_exp that starts at position integer_exp1 for integer_exp2
characters or to the end of string_exp if integer_exp2 is omitted. The first character in string_exp
is at position 1.
Syntax
substring ( string_exp , integer_exp1 [ , integer_exp2 ] )
Example
substring ( 'abdefg', 3, 2)
Result: 'de'
trim
Returns a string_exp trimmed of leading and/or trailing blanks or trimmed of a certain character
specified in match_character_exp. BOTH is implicit when first argument is not stated and blank
is implicit when second argument is not stated.
Syntax
trim ( [ [ TRAILING | LEADING | BOTH ] [ match_character_exp ] , ] string_exp )
Example 1
trim ( TRAILING 'A' , 'ABCDEFA' )
Result: 'ABCDEF'
Example 2
trim ( BOTH ' ABCDEF ' )
Result: 'ABCDEF'
upper
Returns string_exp with all lowercase characters shifted to uppercase.
Syntax
upper ( string_exp )
Example
upper ( 'abcdef' )
Result: 'ABCDEF'
DB2
ascii
Returns the ASCII code value of the leftmost character of the argument as an integer.
Syntax
ascii ( string_exp )
ceiling
Returns the smallest integer greater than or equal to numeric_exp.
Syntax
ceiling ( numeric_exp )
char
Returns a string representation of a date/time value or a decimal number.
Syntax
char ( exp )
chr
Returns the character that has the ASCII code value specified by integer_exp. integer_exp
should be between 0 and 255.
Syntax
chr ( integer_exp )
concat
Returns a string that is the result of concatenating string_exp1 with string_exp2.
Syntax
concat ( string_exp1, string_exp2 )
date
Returns a date from a single input value. exp can be a string or integer representation of a date.
Syntax
date ( exp )
day
Returns the day of the month (1-31) from date_exp. date_exp can be a date value or a string
representation of a date.
Syntax
day ( date_exp )
dayname
Returns a character string containing the data source_specific name of the day (for example,
Sunday through Saturday or Sun. through Sat. for a data source that uses English, or Sonntag
through Samstag for a data source that uses German) for the day portion of date_exp. date_exp
can be a date value or a string representation of a date.
Syntax
dayname ( date_exp )
dayofweek
Returns the day of the week in date_exp as an integer in the range 1 to 7, where 1 represents
Sunday. date_exp can be a date value or a string representation of a date.
Syntax
dayofweek ( date_exp )
dayofweek_iso
Returns the day of the week in date_exp as an integer in the range 1 to 7, where 1 represents
Monday. date_exp can be a date value or a string representation of a date.
Syntax
dayofweek_iso ( date_exp )
dayofyear
Returns the day of the year in date_exp as an integer in the range 1 to 366. date_exp can be a
date value or a string representation of a date.
Syntax
dayofyear ( date_exp )
days
Returns an integer representation of a date. exp can be a date value or a string representation
of a date.
Syntax
days ( exp )
decimal
Returns decimal representation of string_exp1 with precision numeric_exp1, scale
numeric_exp2 and decimal character string_exp2. String_exp1 must be formatted as a SQL
Integer or Decimal constant.
Syntax
decimal ( string_exp1 [ , numeric_exp1 [ , numeric_exp2 [ , string_exp2 ] ] ] )
difference
Returns an integer value representing the difference between the values returned by the data
source_specific soundex function for string_exp1 and string_exp2. The value returned ranges
from 0 to 4, with 4 indicating the best match. Note that 4 does not mean that the strings are
equal.
Syntax
difference ( string_exp1, string_exp2 )
digits
Returns the character string representation of a non-floating point number.
Syntax
digits ( numeric_exp )
double
Returns the floating-point representation of an expression. 'exp' can be either a numeric or
string expression.
Syntax
double ( exp )
event_mon_state
Returns the operational state of a particular state monitor.
Syntax
event_mon_state ( string_exp )
float
Returns the floating-point representation of a number.
Syntax
float ( numeric_exp )
hex
Returns the hexadecimal representation of a value.
Syntax
hex ( exp )
hour
Returns the hour (an integer from 0, which is midnight, to 23, which is 11:00 pm) from time_exp.
time_exp can be a time value or a string representation of a time.
Syntax
hour ( time_exp )
insert
Returns a string where length (integer_exp2) characters have been deleted from string_exp1
beginning at start (integer_exp1) and where string_exp2 has been inserted into string_exp1 at
start. The first character in a string is at position 1.
Syntax
insert ( string_exp1, integer_exp1, integer_exp2, string_exp2 )
integer
Returns the integer representation of an expression. exp can be a numeric value or a string
representation of a number.
Syntax
integer ( exp )
julian_day
Returns an integer value representing the number of days from January 1, 4712 BC (the start of
the Julian date calendar) to the date value specified in exp. exp can be a date value or a string
representation of a date.
Syntax
julian_day ( exp )
lcase
Returns string_exp with all uppercase characters shifted to lowercase.
Syntax
lcase ( string_exp )
left
Returns the leftmost integer_exp characters of string_exp.
Syntax
left ( string_exp, integer_exp )
length
Returns the length of the operand in bytes (except for double byte string types which return the
length in characters).
Syntax
length ( exp )
locate
Returns the starting position of the first occurrence of string_exp1 within string_exp2. The
search starts at position start (integer_exp) of string_exp2. The first character in a string is at
position 1. If string_exp1 is not found then zero is returned.
Syntax
locate ( string_exp1, string_exp2 [ , integer_exp ] )
long_varchar
Returns a long string.
Syntax
long_varchar ( string_exp )
ltrim
Returns string_exp with leading spaces removed.
Syntax
ltrim ( string_exp )
microsecond
Returns the microsecond (time-unit) part of a value. exp can be a timestamp or a string
representation of a timestamp.
Syntax
microsecond ( exp )
midnight_seconds
Returns an integer value in the range 0 to 86400 representing the number of seconds between
midnight and time value specified in the argument. exp can be a time value, a timestamp or a
string representation of a time.
Syntax
midnight_seconds ( exp )
minute
Returns the minute (an integer from 0-59) from time_exp. time_exp can be a time value, a
timestamp or a string representation of a time.
Syntax
minute ( time_exp )
month
Returns the month (an integer from 1-12) from date_exp.
Syntax
month ( date_exp )
monthname
Returns a character string containing the data source_specific name of the month (for example,
January through December or Jan. through Dec. for a data source that uses English, or Januar
through Dezember for a data source that uses German) for the month portion of date_exp.
Syntax
monthname ( date_exp )
quarter
Returns the quarter in date_exp as a number in the range 1 to 4, where 1 represents January 1
through March 31.
Syntax
quarter ( date_exp )
radians
Returns the number of radians converted from numeric_exp degrees.
Syntax
radians ( numeric_exp )
repeat
Returns a string consisting of string_exp repeated integer_exp times.
Syntax
repeat ( string_exp, integer_exp )
replace
Replaces all occurrences of string_exp2 in string_exp1 with string_exp3.
Syntax
replace ( string_exp1, string_exp2, string_exp3 )
right
Returns the rightmost integer_exp characters of string_exp.
Syntax
right ( string_exp, integer_exp )
round
Returns numeric_exp rounded to the nearest value integer_exp places right of the decimal
point. If integer_exp is negative, numeric_exp is rounded to the nearest value absolute
(integer_exp) places to the left of the decimal point, e.g., round-near (125, -1) rounds to 130.
Syntax
round ( numeric_exp, integer_exp )
rtrim
Returns string_exp with trailing spaces removed.
Syntax
rtrim ( string_exp )
second
Returns the second (an integer from 0-59) from time_exp.
Syntax
second ( time_exp )
sign
Returns an indicator of the sign of numeric_exp: +1 if numeric_exp is positive, 0 if zero or -1 if
negative.
Syntax
sign ( numeric_exp )
smallint
Returns the small integer representation of a number.
Syntax
smallint ( exp )
soundex
Returns a 4 character string code obtained by systematically abbreviating words and names in
string_exp according to phonetics. Can be used to determine if two strings sound the same,
e.g., does sound-of ('SMITH') = sound-of ('SMYTH').
Syntax
soundex ( string_exp )
space
Returns a string consisting of integer_exp spaces.
Syntax
space ( integer_exp )
substring
Returns the substring of string_exp that starts at position integer_exp1 for integer_exp2
characters. The first character in string_exp is at position 1.
Syntax
substring ( string_exp, integer_exp1 [ , integer_exp2 ] )
table_name
Returns an unqualified name of a table or view based on the object name in string_exp1 and the
schema name given in string_exp2. It is used to resolve aliases.
Syntax
table_name ( string_exp1 [ , string_exp2 ] )
table_schema
Returns the schema name portion of the two part table or view name based on the object name
in string_exp1 and the schema name in string_exp2. It is used to resolve aliases.
Syntax
table_schema ( string_exp1 [ , string_exp2 ] )
time
Returns a time from a value.
Syntax
time ( exp )
timestamp
Returns a timestamp from a value or a pair of values. exp1 must represent a date value, and
exp2 must represent a time value.
Syntax
timestamp ( exp1 [ , exp2 ] )
timestamp_iso
Returns a datetime in the ISO format (yyyy-mm-dd hh:mm:ss.nnnnnn) converted from the IBM
format (yyyy-mm-dd-hh.mm.ss.nnnnnn). If the exp is a time, it inserts the value of the
CURRENT DATE for the date elements and zero for the fractional time element.
Syntax
timestamp_iso ( exp )
timestampdiff
Returns an estimated number of intervals of type exp1 based on the difference between two
timestamps. Exp2 is the result of subtracting two timestamp types and converting the result to
CHAR. Valid values of exp1 are: 1 Fractions of a second; 2 Seconds; 4 Minutes; 8 Hours; 16
Days; 32 Weeks; 64 Months; 128 Quarters; 256 Years
Syntax
timestampdiff ( exp1, exp2 )
translate
Returns string_exp1 in which characters from string_exp3 are translated to the equivalent
characters in string_exp2. string_exp4 is a single character that is used to pad string_exp2 if it is
shorter than string_exp3. If only string_exp1 is present, then this function translates it to
uppercase characters.
Syntax
translate ( string_exp1 [ , string_exp2, string_exp3 [ , string_exp4 ] ] )
truncate
Returns numeric_exp1 truncated to numeric_exp2 places RIGHT of the decimal point. If
numeric_exp2 is negative, numeric_exp1 is truncated to the absolute value of numeric_exp2
places to the LEFT of the decimal point.
Syntax
truncate ( numeric_exp1, numeric_exp2 )
ucase
Returns string_exp with all lowercase characters shifted to uppercase.
Syntax
ucase ( string_exp )
value
Returns the first non-null argument (or null if all arguments are null). The Value function takes
two or more arguments.
Syntax
value ( exp_list )
varchar
Returns a VARCHAR representation of exp, with length numeric_exp.
Syntax
varchar ( exp [ , numeric_exp ] )
week
Returns the week of the year in date_exp as an integer value in the range 1 to 53.
Syntax
week ( date_exp )
year
Returns the year from date_exp.
Syntax
year ( date_exp )
DB2 Cast
cast_char
Returns the first numeric_exp characters of the value of exp cast as a string. The whole string is
returned when the second argument is not specified.
Syntax
cast_char ( exp [ , numeric_exp ] )
cast_date
Returns the value of the expression cast as a date.
Syntax
cast_date ( exp )
cast_decimal
Returns the value of exp cast as a decimal with the precision of numeric_exp1 and scale of
numeric_exp2.
Syntax
cast_decimal ( exp [ , numeric_exp1, numeric_exp2 ] )
cast_double
Returns the value of the expression cast as a double.
Syntax
cast_double ( exp )
cast_double_precision
Returns the value of the expression cast as a double.
Syntax
cast_double_precision ( exp )
cast_float
Returns the value of the expression cast as a float.
Syntax
cast_float ( exp )
cast_integer
Returns the value of the expression cast as a integer.
Syntax
cast_integer ( exp )
cast_longvarchar
Returns the value of the expression cast as a longvarchar.
Syntax
cast_longvarchar ( string_exp )
cast_smallint
Returns the value of the expression cast as a smallint.
Syntax
cast_smallint ( exp )
cast_time
Returns the value of the expression cast as a time value
Syntax
cast_time ( string_exp )
cast_timestamp
Returns the value of the expression cast as a datetime.
Syntax
cast_timestamp ( exp )
cast_varchar
Returns the value of the expression cast as a varchar with length.
Syntax
cast_varchar ( exp, integer_exp )
DB2 Math
log
Returns the natural logarithm of numeric_exp.
Syntax
log ( numeric_exp )
log10
Returns the base ten logarithm of numeric_exp.
Syntax
log10 ( numeric_exp )
rand
Generates a random number using integer_exp as a seed value.
Syntax
rand ( integer_exp )
DB2 Trigonometry
acos
Returns the arccosine of numeric_exp in radians. The arccosine is the angle whose cosine is
numeric_exp.
Syntax
acos ( numeric_exp )
asin
Returns the arcsine of numeric_exp in radians. The arcsine is the angle whose sine is
numeric_exp.
Syntax
asin ( numeric_exp )
atan
Returns the arctangent of numeric_exp in radians. The arctangent is the angle whose tangent is
numeric_exp.
Syntax
atan ( numeric_exp )
atan2
Returns the arctangent of the x and y coordinates specified by numeric_exp1 and
numeric_exp2, respectively, in radians. The arctangent is the angle whose tangent is
numeric_exp2 / numeric_exp1.
Syntax
atan2 ( numeric_exp1, numeric_exp2 )
cos
Returns the cosine of numeric_exp where numeric_exp is an angle expressed in radians.
Syntax
cos ( numeric_exp )
cot
Returns the cotangent of numeric_exp where numeric_exp is an angle expressed in radians.
Syntax
cot ( numeric_exp )
degrees
Returns numeric_exp radians converted to degrees.
Syntax
degrees ( numeric_exp )
sin
Returns the sine of numeric_exp where numeric_exp is an angle expressed in radians.
Syntax
sin ( numeric_exp )
tan
Returns the tangent of numeric_exp where numeric_exp is an angle expressed in radians.
Syntax
tan ( numeric_exp )
MS Access
ascii
Returns a number representing the ascii code value of the leftmost character of string_exp.
Syntax
ascii(string_exp)
ceiling
Returns the smallest integer greater than or equal to numeric_exp.
Syntax
ceiling(numeric_exp)
char
Returns the character that has the ASCII code value specified by integer_exp. integer_exp
should be between 0 and 255.
Syntax
char(integer_exp)
concat
Returns a string that is the result of concatenating string_exp1 to string_exp2.
Syntax
concat(string_exp1, string_exp2)
curdate
Returns a date value representing the current date of the computer that the database software
runs on.
Syntax
curdate()
curtime
Returns a time value representing the current time of the computer that the database software
runs on.
Syntax
curtime()
dayname
Returns a character string containing the data source_specific name of the day (for example,
Sunday through Saturday or Sun. through Sat. for a data source that uses English, or Sonntag
through Samstag for a data source that uses German) for the day portion of date_exp.
Syntax
dayname(date_exp)
dayofmonth
Returns the day of the month (1-31) from date_exp. Returns the days field (a signed integer)
from interval_exp.
Syntax
dayofmonth(date_exp|interval_exp)
dayofweek
Returns the day of the week in date_exp as an integer in the range 1 to 7, where 1 represents
Monday.
Syntax
dayofweek(date_exp)
dayofyear
Returns the day of the year in date_exp as an integer in the range 1 to 366.
Syntax
dayofyear(date_exp)
downshift
Returns string_exp with all uppercase characters shifted to lowercase.
Syntax
downshift(string_exp)
hour
Returns the hour (an integer from 0, which is midnight, to 23, which is 11:00 pm) from time_exp.
Syntax
hour(time_exp)
lcase
Returns string_exp with all uppercase characters shifted to lowercase
Syntax
lcase(string_exp)
left
Returns the leftmost integer_exp characters of string_exp.
Syntax
left(string_exp, integer_exp)
length
Returns the number of characters in string_exp, excluding trailing blanks and the string
termination character.
Syntax
length(string_exp)
locate
Returns the starting position of the first occurrence of string_exp1 within string_exp2. The
search starts at position start (integer_exp) of string_exp2. The first character in a string is at
position 1. If string_exp1 is not found then zero is returned.
Syntax
locate(string_exp1, string_exp2 [ , integer_exp ] )
ltrim
Returns string_exp with leading spaces removed.
Syntax
ltrim(string_exp)
minute
Returns the minute (an integer from 0-59) from time_exp.
Syntax
minute(time_exp)
month
Returns the month (an integer from 1-12) from date_exp.
Syntax
month(date_exp)
monthname
Returns a character string containing the data source_specific name of the month (for example,
January through December or Jan. through Dec. for a data source that uses English, or Januar
through Dezember for a data source that uses German) for the month portion of date_exp.
Syntax
monthname(date_exp)
now
Returns a datetime value representing the current date and time of the computer that the
database software runs on.
Syntax
now()
position
Returns the starting position of string_exp1 in string_exp2. The first character in a string is at
position 1.
Syntax
position(string_exp1, string_exp2)
quarter
Returns the quarter in date_exp as a number in the range 1 to 4, where 1 represents January 1
through March 31.
Syntax
quarter(date_exp)
right
Returns the rightmost integer_exp characters of string_exp.
Syntax
right(string_exp, integer_exp)
round
Returns numeric_exp rounded to the nearest value integer_exp places right of the decimal
point. If integer_exp is negative, numeric_exp is rounded to the nearest value absolute
(integer_exp) places to the left of the decimal point.
Syntax
round(numeric_exp, integer_exp)
rtrim
Returns string_exp with trailing spaces removed.
Syntax
rtrim(string_exp)
sign
Returns an indicator of the sign of numeric_exp: +1 if numeric_exp is positive, 0 if zero or -1 if
negative.
Syntax
sign(numeric_exp)
space
Returns a string consisting of integer_exp spaces.
Syntax
space(integer_exp)
substr
Returns the substring of string_exp that starts at position integer_exp1 for integer_exp2
characters. The first character in string_exp is at position 1.
Syntax
substr(string_exp, integer_exp1, integer_exp2)
substring
Returns the substring of string_exp that starts at position integer_exp1 for integer_exp2
characters. The first character in string_exp is at position 1.
Syntax
substring(string_exp, integer_exp1, integer_exp2)
truncate
Returns string_exp with trailing spaces removed.
Syntax
truncate(string_exp)
ucase
Returns string_exp with all lowercase characters shifted to uppercase.
Syntax
ucase(string_exp)
upshift
Returns string_exp with all lowercase characters shifted to uppercase.
Syntax
upshift(string_exp)
week
Returns the week of the year in date_exp as an integer value in the range 1 to 53.
Syntax
week(date_exp)
year
Returns the year from date_exp.
Syntax
year(date_exp)
MS Access Cast
cast_decimal
Returns the value of the expression cast as a decimal.
Syntax
cast_decimal(exp)
cast_float
Returns the value of the expression cast as a float.
Syntax
cast_float(exp)
cast_integer
Returns the value of the expression cast as a integer.
Syntax
cast_integer(exp)
cast_numeric
Returns the value of string_exp cast as a numeric value.
Syntax
cast_numeric(string_exp)
cast_real
Returns the value of the expression cast as a real.
Syntax
cast_real(exp)
cast_smallint
Returns the value of the expression cast as a smallint.
Syntax
cast_smallint(exp)
cast_varchar
Returns the value of the expression cast as a varchar.
Syntax
cast_varchar(exp)
MS Access Math
log
Returns the natural logarithm of numeric_exp.
Syntax
log(numeric_exp)
rand
Generates a random number using integer_exp as a seed value.
Syntax
rand(integer_exp)
MS Access Trigonometry
atan
Returns the arctangent of numeric_exp in radians. The arctangent is the angle whose tangent is
numeric_exp.
Syntax
atan(numeric_exp)
cos
Returns the cosine of numeric_exp where numeric_exp is an angle expressed in radians.
Syntax
cos(numeric_exp)
sin
Returns the sine of numeric_exp where numeric_exp is an angle expressed in radians.
Syntax
sin(numeric_exp)
tan
Returns the tangent of numeric_exp where numeric_exp is an angle expressed in radians.
Syntax
tan(numeric_exp)
Oracle
add_months
Returns the datetime resulting from adding integer_exp months to date_exp.
Syntax
add_months ( date_exp, integer_exp )
ascii
Returns a number representing the ascii code value of the leftmost character of string_exp, e.g.
ascii('A') is 65.
Syntax
ascii ( string_exp )
chr
Returns the character that has the ASCII code value specified by integer_exp. integer_exp
should be between 0 and 255.
Syntax
chr ( integer_exp )
concat
Returns a string that is the result of concatenating string_exp1 to string_exp2.
Syntax
concat ( string_exp1, string_exp2 )
decode
DECODE compares expr to each search value one by one. If expr is equal to a search, then
returns the corresponding result. If no match is found, then returns default. If default is omitted,
then returns null.
Syntax
decode ( expr , search , result [, search , result]... [, default] )
dump
Returns internal representation of 'expr' with the format of numeric_exp1 starting from position
numeric_exp2 for numeric_exp3.
Syntax
dump ( expr [ , numeric_exp1 [ , numeric_exp2 [ , numeric_exp3 ] ] ] )
greatest
Returns the greatest value in a list of expressions.
Syntax
greatest ( exp_list )
initcap
Returns string_exp, with the first letter of each word in uppercase, all other letters in lowercase.
Words are delimited by white space or characters that are not alphanumeric.
Syntax
initcap ( string_exp )
instr
Searches string_exp1 from the integer_exp1 position for the (integer_exp2)th occurance of
string_exp2. If integer_exp1 is negative then the search is backwards from the end of
string_exp1. Returns an integer indicating the position of string_exp2.
Syntax
instr ( string_exp1, string_exp2 [ , integer_exp1 [ , integer_exp2 ] ] )
instrb
Searches string_exp1 from the integer_exp1 position for the (integer_exp2)th occurance of
string_exp2. If integer_exp1 is negative then the search is backwards from the end of
string_exp1. The result returned indicates the position (byte number) where search was found.
Syntax
instrb ( string_exp1, string_exp2 [ , integer_exp1 [ , integer_exp2 ] ] )
least
Returns the least value in a list of expressions.
Syntax
least ( exp_list )
length
Returns the number of characters in string_exp.
Syntax
length ( string_exp )
lengthb
Returns the number of bytes in string_exp.
Syntax
lengthb ( string_exp )
lpad
Returns string_exp1 padded to length integer_exp with occurrences of string_exp2. If
string_exp1 is longer than integer_exp then returns the appropriate portion of string_exp1.
Syntax
lpad ( string_exp1, integer_exp [ , string_exp2 ] )
ltrim
Returns string_exp1, with leading characters removed up to the first character not in
string_exp2, e.g. ltrim('xyxXxyAB', 'xy') returns 'XxyAB'.
Syntax
ltrim ( string_exp1 [ , string_exp2 ] )
months_between
Returns the number of months from date_exp1 to date_exp2. If date_exp1 is later than
date_exp2 then the result will be a positive number. The days and time portion of the difference
are ignored, i.e. the months are not rounded, except if date_exp1 and date_exp2 are the last
days of a month.
Syntax
months_between ( date_exp1, date_exp2 )
new_time
Returns the Datetime in timezone 'new_tz' for 'datetime' in 'old_tz' timezone. 'Old_tz' and
'new_tz' can be one of 'AST', 'ADT', 'BST', 'BDT', 'CST', 'CDT', 'EST', 'EDT', 'HST', 'HDT', 'MST',
'MDT', 'NST', 'PST', 'PDT', 'YST' or 'YDT'.
Syntax
new_time ( datetime_exp, old_tz, new_tz )
next_day
Returns the datetime of the first weekday named by string_exp that is later than datetime_exp.
The return value has the same hours, minutes, and seconds as datetime_exp.
Syntax
next_day ( datetime_exp, string_exp )
nls_initcap
Returns string_exp1 with the first letter of each word in uppercase, all other letters in lowercase.
Words are delimited by white space or characters that are not alphanumeric. string_exp2
specifies the sorting sequence.
Syntax
nls_initcap ( string_exp1 [ , string_exp2 ] )
nls_lower
Returns string_exp1 with all letters in lowercase. string_exp2 specifies the sorting sequence.
Syntax
nls_lower ( string_exp1 [ , string_exp2 ] )
nls_upper
Returns string_exp1 with all letters in uppercase. string_exp2 specifies the sorting sequence.
Syntax
nls_upper ( string_exp1 [ , string_exp2 ] )
nvl
If exp is null (missing) returns constant. If exp is not null returns exp. Valid for numeric_exp,
string_exp, date_exp, and time_exp
Syntax
nvl ( exp, constant )
replace
Replaces all occurrences of string_exp2 in string_exp1 with string_exp3. If string_exp3 is not
specified then it replaces all occurrences with null (ie: removes all occurances of string_exp2).
Syntax
replace ( string_exp1, string_exp2 [ , string_exp3 ] )
round
Returns numeric_exp rounded to the nearest value integer_exp places right of the decimal
point. If integer_exp is negative, numeric_exp is rounded to the nearest value absolute
(integer_exp) places to the left of the decimal point, e.g., round (125, -1) rounds to 130.
Syntax
round ( numeric_exp [ , integer_exp ] )
rpad
Returns string_exp1 right-padded to length integer_exp with occurrences of string_exp2. If
string_exp1 is longer than integer_exp then returns the appropriate portion of string_exp1. If
string_exp2 is not specified then spaces are used.
Syntax
rpad ( string_exp1, integer_exp [ , string_exp2 ] )
rtrim
Returns string_exp1, with final characters removed after the last character not in string_exp2,
e.g. rtrim('ABxXxyx', 'xy') returns 'ABxX'. If string_exp2 is not specified it removes th final space
characters.
Syntax
rtrim ( string_exp1 [ , string_exp2 ] )
sign
Returns an indicator of the sign of numeric_exp: +1 if numeric_exp is positive, 0 if zero or -1 if
negative.
Syntax
sign ( numeric_exp )
soundex
Returns a character string containing the phonetic representation of string_exp.
Syntax
soundex ( string_exp )
substr
Returns the substring of string_exp that starts at position integer_exp1. The first character in
string_exp is at position 1. integer_exp2 can be used to select fewer characters, by default it
selects character to the end of the string
Syntax
substr ( string_exp, integer_exp1 [ , integer_exp2 ] )
substrb
Same as substr, except that the arguments are expressed in bytes (not characters).
Syntax
substrb ( string_exp, numeric_exp1 [ , numeric_exp2 ] )
{sysdate}
Returns a datetime value representing the current date and time of the computer that the
database software runs on.
Syntax
{ sysdate }
to_char
Returns the string representation of exp with the format of string_exp. exp can either be a date
value or a numeric value.
Syntax
to_char ( exp [ , string_exp ] )
to_date
Converts string_exp1 to a datetime value as specified by the format string_exp2. string_exp3
specifies format elements such as language.
Syntax
to_date ( string_exp1 [ , string_exp2 [ , string_exp3 ] ] )
to_number
Converts string_exp1 to a numeric value as specified by the format string_exp2. string_exp3
specifies format elements such as currency information.
Syntax
to_number ( string_exp1, string_exp2, string_exp3 )
translate
Returns string_exp1, with all occurrences of each character in string_exp2 replaced by its
corresponding character in string_exp3.
Syntax
translate ( string_exp1, string_exp2, string_exp3 )
trunc
Truncates the date_exp using the format specified by string_exp. For example, if string_exp is
'YEAR' then date_exp is truncated to the first day of the year.
Syntax
trunc ( date_exp, string_exp )
trunc
Truncates digits from numeric_exp1 using numeric_exp2 as the precision.
Syntax
trunc ( numeric_exp1, numeric_exp2 )
{user}
Returns the username of the current Oracle user.
Syntax
{ user }
vsize
Returns the number of bytes in the internal representation of 'exp'. 'exp' must be a string
expression.
Syntax
vsize ( exp )
Oracle Math
log
Returns the logarithm of numeric_exp2 to the base numeric_exp1.
Syntax
log ( numeric_exp1, numeric_exp2 )
Oracle Trigonometry
acos
Returns the arccosine of numeric_exp in radians. The arccosine is the angle whose cosine is
numeric_exp.
Syntax
acos ( numeric_exp )
asin
Returns the arcsine of numeric_exp in radians. The arcsine is the angle whose sine is
numeric_exp.
Syntax
asin ( numeric_exp )
atan
Returns the arctangent of numeric_exp in radians. The arctangent is the angle whose tangent is
numeric_exp.
Syntax
atan ( numeric_exp )
atan2
Returns the arctangent of the x and y coordinates specified by numeric_exp1 and
numeric_exp2, respectively, in radians. The arctangent is the angle whose tangent is
numeric_exp2 / numeric_exp1.
Syntax
atan2 ( numeric_exp1 ,numeric_exp2 )
cos
Returns the cosine of numeric_exp where numeric_exp is an angle expressed in radians.
Syntax
cos ( numeric_exp )
cosh
Returns the hyperbolic cosine of numeric_exp where numeric_exp is an angle expressed in
radians.
Syntax
cosh ( numeric_exp )
sin
Returns the sine of numeric_exp where numeric_exp is an angle expressed in radians.
Syntax
sin ( numeric_exp )
sinh
Returns the hyperbolic sine of numeric_exp where numeric_exp is an angle expressed in
radians.
Syntax
sinh ( numeric_exp )
tan
Returns the tangent of numeric_exp where numeric_exp is an angle expressed in radians.
Syntax
tan ( numeric_exp )
tanh
Returns the hyperbolic tangent of numeric_exp where numeric_exp is an angle expressed in
radians.
Syntax
tanh ( numeric_exp )
Red Brick
concat
This function concatenates character strings and returns the concatenated string of characters.
Syntax
concat ( string_exp1 , string_exp2 )
current_user
Returns the database username (authorization ID) of the current user.
Syntax
current_user
date
This function creates a date value from a character string or a timestamp expression and returns
a date data type. The expression can be either characters or timestamp.
Syntax
date ( expression )
dateadd
This function adds an interval to a datetime value and returns a result that is the same datetime
data type as that of datetime_expression. The datepart refers to year, month, day, hour, minute,
second. The interval must be an integer and datetime_exp can be date, time or timestamp.
Syntax
dateadd ( { datepart }, interval, datetime_exp )
datediff
This function finds the difference between two datetime expressions and returns an integer
result in datepart units. The datepart refers to year, month, day, hour, minute, second. The
datetime_exp can be date, time or timestamp.
Syntax
datediff ( { datepart }, datetime_exp, datetime_exp )
datename
This function extracts the specified datepart component and returns its value as a character
string. The datepart refers to year, month, day, hour, minute, second. The datetime_exp can be
date, time or timestamp
Syntax
datename ( { datepart }, datetime_exp )
dec
This function converts a specified value to a decimal value and returns a value with the data
type decimal (precision, scale). The default value of precision is 9. The default value of scale is
0.
Syntax
dec ( expression, [precision, scale] )
decode
This function compares and converts an expression to another value. If the expression matches
target, it is replaced by the corresponding replacement; otherwise the expression is replaced by
default or by NULL if no default is specified. The expressions can be any data type and all
expressions must be the same data type.
Syntax
decode ( expression, target, replacement [,default] )
float
This function converts a specified value into a double-precision floating-point value.
Syntax
float ( numeric_exp )
ifnull
This function tests an expression for missing values and replaces each one with a specified
value. If expression is NULL, this function returns substitute; otherwise it returns the value of the
expression. The expressions can be any data type and all expressions must be the same data
type.
Syntax
ifnull ( expression , substitute )
int
This function converts a specified numeric string into an integer valueand returns an integer
value. If the argument is null, this function returns NULL.
Syntax
int ( numeric_exp )
length
If the argument is not null, this function returns an integer result specifying the number of
characters in the string; otherwise the result is NULL.
Syntax
length ( string_exp )
lengthb
If the argument is not null, this function returns an integer result specifying the number of bytes
in the string. If the argument is null, the result is NULL.
Syntax
lengthb ( string_exp )
ltrim
If the argument is not null, this function removes leading blanks from the character string;
otherwise the result is NULL.
Syntax
ltrim ( string_exp )
nullif
This function returns NULL if both expressions have the same value. If the expressions have
different values, the value of the first expression is returned. The exp1 and exp2 can be any data
type and must be the same data type.
Syntax
nullif ( exp1, exp2 )
positionb
If the first string_exp is located, this function returns an integer that is relative to the beginning
byte position of the first string_exp in the second string_exp. If the first string_exp is not located,
the result is 0. If the first string_exp is of zero length, the result is 1. If the first string_exp is null,
an error message is returned. If the second string_exp is null, the result is 0.
Syntax
positionb ( string-exp, string_exp )
real
This function returns a real value. If the argument is null, this function returns NULL.
Syntax
real ( numeric_exp )
rtrim
If the argument is not null, this function removes trailing blanks from the character string;
otherwise the result is NULL.
Syntax
rtrim ( string_exp )
sign
This function calculates the sign of the expression, and returns 1 for a positive value, –1 for a
negative value, and 0 for zero.
Syntax
sign ( numeric_exp )
string
This function converts numeric or datetime values to character strings. The expression can be
numeric or datetime.
Syntax
string ( expression [, length [, scale]] )
substr
If the first argument is not null, this function returns the substring that begins at position start
and continues for length characters. If length is not specified, this function returns a substring
from start to the end of string_exp.
Syntax
substr ( string_exp, start_integer, length_integer )
substrb
If the first argument is not null, this function returns the substring that begins at position start
and continues for length bytes. If length is not specified, this function returns a substring from
start to the end of string_exp.
Syntax
substrb ( string_exp, start_integer, length_integer )
time
This function creates a time value from a character string or a time-stamp data type expression.
Syntax
time ( expression )
timestamp
This function creates a time-stamp value from a character string.
Syntax
timestamp ( timestamp_exp )
timestamp
This function creates a time-stamp value from time and date values. If there are two arguments,
the first must be a date expression and the second must be a time expression, separated by a
comma (,). If either the date expression or the time expression is null, the resulting time-stamp
expression is also null.
Syntax
timestamp ( date_exp, time_exp )
to_char
This function is a datetime scalar function that operates on a date, time, or timestamp data type
and returns the character string specified by a given format.
Syntax
to_char ( source_date, format_str )
SAP BW
SAP BW OLAP
characteristicValue
Creates the unique SAP BW identifier for a query item value that represents an SAP BW key
value. Useful for identifying leaf-level query item values in unbalanced hierarchies.
Syntax
characteristicValue( [ query_subject, ] query_item_value)
SAP BW Trigonometry
arccos
Returns the arccosine of numeric_exp in radians. The arccosine is the angle whose cosine is
numeric_exp.
Syntax
arccos ( numeric_exp )
arcsin
Returns the arcsine of numeric_exp in radians. The arcsine is the angle whose sine is
numeric_exp.
Syntax
arcsin ( numeric_exp )
arctan
Returns the arctangent of numeric_exp in radians. The arctangent is the angle whose tangent is
numeric_exp.
Syntax
arctan ( numeric_exp )
cos
Returns the cosine of numeric_exp where numeric_exp is an angle expressed in radians.
Syntax
cos ( numeric_exp )
sin
Returns the sine of numeric_exp where numeric_exp is an angle expressed in radians.
Syntax
sin ( numeric_exp )
tan
Returns the tangent of numeric_exp where numeric_exp is an angle expressed in radians.
Syntax
tan ( numeric_exp )
coshyp
Returns the hyperbolic cosine of numeric_exp where numeric_exp is an angle expressed in
radians.
Syntax
coshyp ( numeric_exp )
sinhyp
Returns the hyperbolic sine of numeric_exp where numeric_exp is an angle expressed in
radians.
Syntax
sinhyp ( numeric_exp )
tanhyp
Returns the hyperbolic tangent of numeric_exp where numeric_exp is an angle expressed in
radians.
Syntax
tanhyp ( numeric_exp )
SAP BW Math
log10
Returns the base ten logarithm of numeric_exp.
Syntax
log10 ( numeric_exp )
ln
Returns the natural logarithm of the numeric_exp.
Syntax
ln ( numeric_exp )
exp
Returns e raised to the power of numeric_exp. The constant e is the base of the natural
logarithm. See also log.
Syntax
exp ( numeric_exp )
sqrt
Returns the square root of numeric_exp. numeric_exp must be non-negative.
Syntax
sqrt ( numeric_exp )
SQL Server
ascii
Returns a number representing the ascii code value of the leftmost character of string_exp, e.g.
ascii('A') is 65.
Syntax
ascii(string_exp)
char
Returns the character that has the ASCII code value specified by integer_exp. integer_exp
should be between 0 and 255. For example, char(65) has the value 'A'.
Syntax
char(integer_exp)
datalength
Returns the length of the string.
Syntax
datalength(string_exp)
dateadd
Returns the date resulting from adding integer_exp units indicated by datepart(e.g. day, month,
year) to date_exp.
Syntax
dateadd({datepart}, integer_exp, date_exp)
datediff
Returns the number of units indicated by datepart(e.g. day, month, year) between date_exp1
and date_exp2.
Syntax
datediff({datepart}, date_exp1, date_exp2)
day
Returns the day portion of date_exp. Same as extract(day from date_exp)
Syntax
day(date_exp)
difference
Returns an integer value representing the difference between the values returned by the data
source_specific soundex function for string_exp1 and string_exp2. The value returned ranges
from 0 to 4, with 4 indicating the best match. Note that 4 does not mean that the strings are
equal.
Syntax
difference(string_exp1, string_exp2)
getdate
Returns a datetime value representing the current date and time of the computer that the
database software runs on.
Syntax
getdate()
ltrim
Returns string_exp with leading spaces removed.
Syntax
ltrim(string_exp)
month
Returns the month portion of date_exp. Same as extract(month from date_exp)
Syntax
month(date_exp)
replicate
Returns a string consisting of string_exp repeated integer_exp times.
Syntax
replicate(string_exp, integer_exp)
right
Returns the rightmost integer_exp characters of string_exp.
Syntax
right(string_exp, integer_exp)
round
Returns numeric_exp rounded to the nearest value integer_exp places right of the decimal
point.
Syntax
round(numeric_exp,integer_exp)
sign
Returns an indicator of the sign of numeric_exp: +1 if numeric_exp is positive, 0 if zero or -1 if
negative.
Syntax
sign(numeric_exp)
soundex
Returns a four character string representing the sound of the words in string_exp.
Syntax
soundex(string_exp)
space
Returns a string consisting of integer_exp spaces.
Syntax
space(integer_exp)
str
Returns a string representation of numeric_exp. integer_exp1 is the length of the string
returned. integer_exp2 is the number of decimal digits.
Syntax
str(numeric_exp [ , integer_exp1 [ , integer_exp2 ] ] )
stuff
Returns a string where length (integer_exp2) characters have been deleted from string_exp1
beginning at start (integer_exp1) and where string_exp2 has been inserted into string_exp1 at
start. The first character in a string is at position 1.
Syntax
stuff(string_exp1, integer_exp1, integer_exp2, string_exp2)
year
Returns the year portion of date_exp. Same as extract(year from date_exp)
Syntax
year(date_exp)
Syntax
cast_char(exp)
cast_float
Returns the value of the expression cast as a float
Syntax
cast_float(exp)
cast_integer
Returns the value of the expression cast as an integer
Syntax
cast_integer(exp)
cast_real
Returns the value of the expression cast as a real
Syntax
cast_real(exp)
cast_smallint
Returns the value of the expression cast as a small integer
Syntax
cast_smallint(exp)
cast_timestamp
Returns the value of the expression cast as a datetime
Syntax
cast_timestamp(exp)
cast_varchar
Returns the value of the expression cast as a varchar
Syntax
cast_varchar(exp)
Syntax
log(numeric_exp)
log10
Returns the base ten logarithm of numeric_exp.
Syntax
log10(numeric_exp)
pi
Returns the constant value of pi as a floating point value.
Syntax
pi()
rand
Generates a random number using integer_exp as a seed value.
Syntax
rand(integer_exp)
Syntax
acos(numeric_exp)
asin
Returns the arcsine of numeric_exp in radians. The arcsine is the angle whose sine is
numeric_exp.
Syntax
asin(numeric_exp)
atan
Returns the arctangent of numeric_exp in radians. The arctangent is the angle whose tangent is
numeric_exp.
Syntax
atan(numeric_exp)
atn2
Returns the arctangent of the x and y coordinates specified by numeric_exp1 and
numeric_exp2, respectively, in radians. The arctangent is the angle whose tangent is
numeric_exp1.
Syntax
atn2(numeric_exp1, numeric_exp2)
cos
Returns the cosine of numeric_exp where numeric_exp is an angle expressed in radians.
Syntax
cos(numeric_exp)
cot
Returns the cotangent of numeric_exp where numeric_exp is an angle expressed in radians.
Syntax
cot(numeric_exp)
degrees
Returns numeric_exp radians converted to degrees.
Syntax
degrees(numeric_exp)
radians
Returns the number of radians converted from numeric_exp degrees.
Syntax
radians(numeric_exp)
sin
Returns the sine of numeric_exp where numeric_exp is an angle expressed in radians.
Syntax
sin(numeric_exp)
tan
Returns the tangent of numeric_exp where numeric_exp is an angle expressed in radians.
Syntax
tan(numeric_exp)
Teradata
account
This function returns the account string for the current user.
Syntax
account
bytes
This function returns the number of bytes contained in the specified byte string.The byte_exp
are restricted to BYTE or VARBYTE.
Syntax
bytes ( byte_exp )
case_n
This function evaluates a list of conditions and returns the position of the first condition that
evaluates to TRUE, provided that no prior condition in the list evaluates to UNKNOWN. The NO
CASE is an optional condition that evaluates to TRUE if every conditional_expression in the list
evaluates to FALSE. The NO CASE OR UNKNOWN condition evaluates to TRUE if every
conditional_expression in the list evaluates to FALSE, or if a conditional_expression evaluates to
UNKNOWN and all prior conditions in the list evaluate to FALSE. The UNKNOWN is an optional
condition that evaluates to TRUE if a conditional_expression evaluates to UNKNOWN and all
prior conditions in the list evaluate to FALSE.
Syntax
case_n ( condition_exp_list [, NO CASE | UNKNOWN | NO CASE OR UNKNOWN [, UNKNOWN ]] )
char2hexint
This function returns the hexadecimal representation for a character string.
Syntax
char2hexint ( string_exp )
characters
This function returns an integer value representing the number of logical characters or bytes
contained in the specified operand string.
Syntax
characters ( string_exp )
database
This function returns the name of the default database for the current user.
Syntax
database
date
This function returns the current date.
Syntax
date
format
This function returns the declared format for the named expression. The data type returned by a
FORMAT phrase is a variable character string of up to 30 characters.
Syntax
format ( expression )
index
This function returns the position in string_exp1 where string_exp2 starts.
Syntax
index ( string_exp1, string_exp2 )
log
Computes the base 10 logarithm of an argument. The numeric_exp is a non-zero, positive
numeric expression.
Syntax
log ( numeric_exp )
nullif
This function returns NULL if scalar_exp1 and scalar_exp2 are equal. Otherwise, it returns its
first argument, scalar_exp1. The scalar_exp1 and scalar_exp2 can be any data type.
Syntax
nullif ( scalar_exp1, scalar_exp2 )
nullifzero
This function converts data from zero to null to avoid problems with division by zero.
Syntax
nullifzero ( numeric_exp )
profile
This function returns the current profile for the session or NULL if none.
Syntax
PROFILE
random
This function returns a random integer number for each row of the results table. The
lower_bound and upper_bound are integer constants. The limits for lower_bound, upper_bound
range from -2147483648 to 2147483647, inclusive. The upper_bound must be greater than or
equal to lower_bound.
Syntax
random ( lower_bound, upper_bound )
range_n
This function evaluates a test_exp and maps the result into a list of specified ranges and returns
the position of the range in the list. start_exp and end_exp are constants or constant
expressions and must be the same data type as test_exp. Use an asterisk ( * ) for the starting
boundary of the first range to indicate the lowest possible value. Use an asterisk ( * ) for the
ending boundary of the last range to indicate the highest possible value. An asterisk is
compatible with any data type. The range_size is a constant or constant expression. A range
that specifies an EACH phrase is equivalent to a series of ranges. The value of range_size must
be greater than zero. NO RANGE is an optional range to handle a test_exp that does not map
into any of the specified ranges. The NO RANGE OR UNKNOWN option handles a test_exp
that does not map into any of the specified ranges, or a test_exp that evaluates to NULL when
RANGE_N does not specify the range BETWEEN * AND *. UNKNOWN is an option to handle a
test_expression that evaluates to NULL when RANGE_N does not specify the range BETWEEN
* AND *.
Syntax
range_n ( test_exp BETWEEN start_exp | start_exp_list | * AND end_exp | * [ EACH
range_size [, NO RANGE [ OR UNKNOWN | , UNKNOWN ] | UNKNOWN ] ])
role
This function returns the current role for the session or NULL if none.
Syntax
role
session
This function returns the number of the session for the current user.
Syntax
session
soundex
This function returns a character string that represents the Soundex code for string_exp.
Syntax
soundex ( string_exp )
time
This function returns the current time based on a 24-hour day..
Syntax
time
type
This function returns the data type defined for an expression.
Syntax
type ( expression )
user
This function returns the user name of the current user.
Syntax
user
vargraphic
This function Returns a character string that represents the vargraphic code for string_exp.
Syntax
vargraphic ( string_exp )
zeroifnull
This function converts data from null to 0 to avoid cases where a null result creates an error. If
the numeric_exp is not null, it returns the value of the numeric_exp, if numeric_exp is a
character string, it is converted to a numeric value of FLOAT data type. If the numeric_exp is null
or zero, it returns zero.
Syntax
zeroifnull ( numeric_exp )
Teradata Trigonometry
acos
Returns the arccosine of numeric_exp in radians. The arccosine is the angle whose cosine is
numeric_exp.The values of numeric_exp must be between -1 and 1, inclusive.
Syntax
acos ( numeric_exp )
acosh
Returns the inverse hyperbolic cosine of an argument. The numeric_exp can be any real
number equal to or greater than 1.
Syntax
acosh ( numeric_exp )
asin
Returns the arcsine of numeric_exp in radians. The arcsine is the angle whose sine is
numeric_exp. The values of numeric_exp must be between -1 and 1, inclusive.
Syntax
asin ( numeric_exp )
asinh
Returns the inverse hyperbolic sine of an argument. The numeric_exp can be any real number.
Syntax
asinh ( numeric_exp )
atan
Returns the arctangent of numeric_exp in radians. The arctangent is the angle whose tangent is
numeric_exp.
Syntax
atan ( numeric_exp )
atan2
Returns the arctangent of the x and y coordinates specified by numeric_exp1 and
numeric_exp2, respectively, in radians. ATAN2(x,y) equals ATAN(y/x), except that x can be 0 in
ATAN2(x,y).The returned angle is between - and π radians, excluding π.
Syntax
atan2 ( numeric_exp1, numeric_exp2 )
atanh
Returns the inverse hyperbolic tangent of an argument. The numeric_exp can be any real
number between 1 and -1, excluding 1 and -1.
Syntax
atanh (numeric_exp )
cos
Returns the cosine of numeric_exp where numeric_exp is an angle expressed in radians.
Syntax
cos ( numeric_exp )
cosh
Returns the hyperbolic cosine of an argument. The numeric_exp can be any real number.
Syntax
cosh ( numeric_exp )
sin
Returns the sine of numeric_exp where numeric_exp is an angle expressed in radians.
Syntax
sin ( numeric_exp )
sinh
Returns the hyperbolic sine of an argument. The numeric_exp can be any real number.
Syntax
sinh ( numeric_exp )
tan
Returns the tangent of numeric_exp where numeric_exp is an angle expressed in radians.
Syntax
tan ( numeric_exp )
tanh
Returns the hyperbolic tangent of an argument. The numeric_exp can be any real number.
Syntax
tanh ( numeric_exp )
OLAP
OLAP Member
ancestor
Returns the value of query_item that represents the ancestor of query_item_value. If
query_item_value has multiple ancestors, the provider elects which parent to return.
Syntax
ancestor(query_item_value, query_item)
closingPeriod
Returns the last value of query_item that is a descendant of query_item_value. Typically applied
to query subjects associated with time.
Syntax
closingPeriod(query_item, query_item_value )
openingPeriod
Returns the first value of query_item that is a descendant of query_item_value. Typically applied
to query subjects associated with time.
Syntax
openingPeriod(query_item, query_item_value )
parallelPeriod
Obtains the value of query_item that represents the ancestor of query_item_value. Then
identifies the sibling of that value that lags by index positions, then returns the equivalent of
query_item_value for that sibling. Typically applied to query subjects associated with time.
Syntax
parallelPeriod(query_item, index, query_item_value)
OLAP Set
bottomCount
Sorts the query item values contained in set_exp on numeric_value_exp and returns the bottom
index_exp values.
Syntax
bottomCount(set_exp, index_exp, numeric_value_exp)
bottomPercent
Sorts the query item values contained in set_exp on numeric_value_exp and returns the
bottommost values with a cumulative total of at least index_exp.
Syntax
bottomPercent(set_exp, index_exp, numeric_value_exp)
bottomSum
Sorts the query item values contained in set_exp on numeric_value_exp and returns the
bottommost values such that their sum is at least index_exp.
Syntax
bottomSum(set_exp, index_exp, numeric_value_exp)
descendants
Returns all values of query_item that represent descendants of query_item_value.
Syntax
descendants(query_item_value,query_item)
distinct
Removes all duplicates from the specified set. The remaining items remain in their original
order.
Syntax
distinct(set_expr)
except
Returns the difference between the query item values contained in set_exp1 and set_exp2.
The result removes duplicates.
Syntax
except(set_exp1, set_exp2)
exceptAll
Returns the difference between the query item values contained in set_exp1 and set_exp2. The
result retains duplicates.
Syntax
exceptAll(set_exp1, set_exp2)
filter
Filters the query item values contained in set_exp based on search_condition_exp.
Syntax
filter(set_exp, search_condition_exp)
intersect
Returns the intersection of the query item values contained in set_exp1 and set_exp2. The
result removes duplicates.
Syntax
intersect(set_exp1, set_exp2)
intersectAll
Returns the intersection of the query item values contained in set_exp1 and set_exp2. The
result retains duplicates
Syntax
intersectAll(set_exp1, set_exp2)
lastPeriods
Returns the set of index_exp query item values ending with query_item_value and starting with
the query item value lagging index_exp - 1 from query_item_value. Typically applied to query
subjects associated with time.
Syntax
lastPeriods(index_exp, query_item_value)
periodsToDate
Within the scope of query_item, returns the set of values of the query item associated with
query_item_value, starting with the first query item value of the query item associated with
query_item_value. Typically applied to query subjects associated with time, such as obtaining
the set of days within the quarter in which a particular day occurs.
Syntax
periodsToDate(query_item, query_item_value)
topCount
Sorts the query item values contained in set_exp on numeric_value_exp and returns the top
index_exp values.
Syntax
topCount(set_exp, index_exp, numeric_value_exp)
topPercent
Sorts the query item values contained in set_exp on numeric_value_exp and returns the
topmost values with a cumulative total of at least index_exp.
Syntax
topPercent(set_exp, index_exp, numeric_value_exp)
topSum
Sorts the query item values contained in set_exp on numeric_value_exp and returns the
topmost values such that their sum is at least index_exp.
Syntax
topSum(set_exp, index_exp, numeric_value_exp)
union
Returns the union of the query item values of set_exp1 and set_exp2. The result removes
duplicates.
Syntax
union(set_exp1, set_exp1)
unionAll
Returns the union of the query item values of set_exp1 and set_exp2. The result retains
duplicates.
Syntax
unionAll(set_exp1, set_exp)
OLAP Numeric
avg
Computes the average of the query item values in set_exp based on numeric_value_exp.
Syntax
avg(set_exp, numeric_value_exp)
countSet
Counts all of the query item values contained in set_exp, excluding empty values.
Syntax
countSet(set_exp)
countSetAll
Counts all of the query item values in set_exp, including empty values.
Syntax
countSetAll(set_exp)
max
Computes the maximum of the tuples in set_exp based on numeric_value_exp.
Syntax
max(set_exp, numeric_value_exp)
median
Computes the median of the tuples in set_exp based on numeric_value_exp.
Syntax
median(set_exp, numeric_value_exp)
min
Computes the minimum of the tuples in set_exp based on numeric_value_exp.
Syntax
min(set_exp, numeric_value_exp)
stddev
Computes the standard deviation of the tuples in set_exp based on numeric_value_exp.
Syntax
stddev(set_exp, numeric_value_exp)
sum
Computes the sum of the tuples in set_exp based on numeric_value_exp.
Syntax
sum(set_exp, numeric_value_exp)
var
Computes the variance of the tuples in set_exp based on numeric_value_exp.
Syntax
var(set_exp, numeric_value_exp)
Report functions
Today
Returns current system date.
Syntax
Today()
Now
Returns current system time.
Syntax
Now()
AsOfDate
Returns report execution date.
Syntax
AsOfDate()
AsOfTime
Returns report execution time.
Syntax
AsOfTime()
ReportDate
Returns report execution date and time.
Syntax
ReportDate()
ReportName
Returns report name.
Syntax
ReportName()
ReportPath
Returns report path.
Syntax
ReportPath()
ReportDescription
Returns report description.
Syntax
ReportDescription()
ReportLocale
Returns run locale.
Syntax
ReportLocale()
GetLocale
Returns run locale (deprecated).
Syntax
GetLocale()
Locale
Returns run locale.
Syntax
Locale()
ReportProductLocale
Returns product locale.
Syntax
ReportProductLocale()
ReportAuthorLocale
Returns author locale.
Syntax
ReportAuthorLocale()
ReportSaveDate
Returns the date when the report was last saved.
Syntax
ReportSaveDate()
ReportCreateDate
Returns the date when the report was created.
Syntax
ReportCreateDate()
ReportID
Returns the report id.
Syntax
ReportID()
ReportOutput
Returns the name of the output format. Possible return values: CSV, HTML, HTMLFragment,
PDF, XHTML, XML.
Syntax
ReportOutput()
ReportLayout
Returns the name of the report layout.
Syntax
ReportLayout()
ReportOption
Returns the value of run option variable identified by optionName. Possible values for
optionName: attachmentEncoding, burst, connection, cssURL, email, emailAsAttachment,
emailAsURL, emailBody, emailSubject, emailTo, emailToAddress, history, metadataModel,
outputEncapsulation, outputFormat, outputLocale, outputPageDefinition,
outputPageOrientation, primaryWaitThreshold, print, printer, printerAddress, prompt,
promptFormat, saveAs, saveOutput, secondaryWaitThreshold, verticalElements, xslURL.
Syntax
ReportOption(optionName)
ServerName
Returns server name.
Syntax
ServerName()
ServerLocale
Returns server locale.
Syntax
ServerLocale()
ModelPath
Returns model path.
Syntax
ModelPath()
BurstKey
Returns burst key.
Syntax
BurstKey()
BurstRecipients
Returns the distribution list of burst recipients.
Syntax
BurstRecipient()
IsBursting
Returns boolean 1 (TRUE) when report will be distributed to given recipient; otherwise, 0
(FALSE).
Syntax
IsBursting(recipientName)
ParamNames
Returns all parameter names.
Syntax
ParamNames()
ParamName
Returns parameter name of the variable identified by parameterName.
Syntax
ParamName(parameterName)
ParamDisplayValue
Returns parameter display value of the variable identified by parameterName.
Syntax
ParamDisplayValue(parameterName)
ParamValue
Returns parameter value of the variable identified by parameterName.
Syntax
ParamValue(parameterName)
ParamCount
Returns parameter count of the variable identified by parameterName.
Syntax
ParamCount(parameterName)
RowNumber
Returns current row.
Syntax
RowNumber()
PageNumber
Returns current page number.
Syntax
PageNumber()
PageCount
Returns the current page count.
Syntax
PageCount()
PageName
Returns the current page name.
Syntax
PageName()
You can set up drill-through access from Cognos Series7 MR1 to ReportNet. Specifically, you
can drill through from:
• Cognos PowerPlay Web
• Cognos Visualizer
• Third party cubes
Steps
1. If Configuration Manager is running, close it.
2. Open the cer3.ini file in a text editor.
The file is located in the \bin directory where Cognos Series 7 is installed.
3. Scroll down to the [NGC] section and change the value for Drill_enable to 1.
4. Save the file.
5. Start Configuration Manager.
6. On the Start tab, click Open the current configuration.
7. In the Explorer pane, right-click the highest-level object and click Apply Selection.
8. Exit Configuration Manager.
Steps
1. In PowerPlay Transformer, open the model you want.
2. In the PowerCubes window, right-click the cube you will use for drill-through access and
click Properties.
3. On the Output tab, enter the location where you want to save the cube.
Save the cube in another location or change its name to keep the original cube unchanged.
4. In the Drill Through tab, select the Allow drill through for this PowerCube check box.
5. Click Add.
6. Click the Files of type box and click All files (*.*).
7. In the File name box, type name of target report.crr.
The name of the ReportNet target report must be identical to the name you type here.
8. Click Open.
9. Click OK.
10. From the Run menu, click Update Selected PowerCube.
Steps
1. Click the Public Folders or My Folders link.
2. If you want to create a new folder, do the following:
• Click the new folder button.
• In the Name box, type the name of the folder and click Finish.
3. Click the set properties button for the folder.
4. Click the View the search path link.
5. Copy the search path to the clipboard and click Close.
You can now use the search path when enabling the cube for drill-through to ReportNet.
Steps
1. From the Insert menu, click Cube.
2. On the General tab, click the ellipsis button (...) next to the Cube source box and add the
Transformer cube.
3. Click the Settings tab.
4. Expand the Drill Through folder.
5. Click the Cognos ReportNet box and click Enabled.
6. In the Cognos ReportNet server box, type the URL to ReportNet.
7. In the Cognos ReportNet folder box, paste the Cognos Connection folder search path
from the clipboard.
8. Click OK.
Steps
1. In PowerPlay Enterprise - Server Administration, right-click the cube and click Properties.
2. On the Settings tab, expand the Drill Through folder.
3. Click the Cognos ReportNet Assistance box and click Enabled.
4. Click OK.
5. With the cube selected, from the Tools menu, click Open with Browser.
The cube opens in PowerPlay Web Explorer, and the dimensions appear as hyperlinks.
6. Drill down in each dimension to the level you want to filter on when drilling through to
ReportNet.
7. Click the drill through button.
The Assist Drill Through Web page appears.
The PowerPlay cube metadata section lists the items in the cube that are available for
drill-through access. The items you want to use for drill-through access must also exist in
the ReportNet package. Using these items, the Drill Through Assistant provides the
parameterized filters in the ReportNet filter expressions section that you can create in the
target report. When you create the target report, ensure that the names of the filters you add
are identical to the parameter names listed in the Assist Drill Through Web page.
Tip: For each parameterized filter listed, the Drill Through Assistant also provides
parameter values so that report authors can see what values PowerPlay supplies.
8. After you finish viewing the Assist Drill Through Web page, click Cancel to return to
PowerPlay.
Steps
1. Start Cognos Report Studio and create a new report.
2. Add the query items and other objects you want.
3. From the Data menu, click Filters.
4. Click the add button.
5. In the Tabular Model Filter dialog box, in the Expression Definition box, create the
parameterized filter you want by typing the filter expression.
The parameter name must be identical to one of the parameter names listed in the Assist
Drill Through Web page.
6. Click OK.
7. In the Usage box, click Optional.
If you do not make the filter optional, a prompt page appears when you drill through to the
report.
8. Repeat steps 4 to 7 for other parameterized filters you want to add.
Steps
1. In PowerPlay Enterprise - Server Administration, right-click the cube and click Properties.
2. On the Settings tab, expand the Drill Through folder.
3. Click the Cognos ReportNet Assistance box and click Disabled.
4. Click OK.
Steps
1. If Configuration Manager is running, close it.
2. Open the cer3.ini file in a text editor.
The file is located in the \bin directory where Cognos Series 7 is installed.
3. Scroll down to the [NGC] section and change the value for Drill_enable to 1.
4. Save the file.
5. Start Configuration Manager.
6. On the Start tab, click Open the current configuration.
7. In the Explorer pane, right-click the highest level object and click Apply Selection.
8. Exit Configuration Manager.
Steps
1. Click the Public Folders or My Folders link.
2. If you want to create a new folder, do the following:
• Click the new folder button.
• In the Name box, type the name of the folder and click Finish.
3. Click the set properties button for the folder.
4. Click the View the search path link.
5. Copy the search path to the clipboard and click Close.
You will need the search path when specifying a ReportNet target report.
Steps
1. Open the visualization you want.
2. From the File menu, click Properties.
3. On the Drill Through tab, click Add and then click Cognos ReportNet.
4. In the New Cognos ReportNet Target dialog box, specify the following properties:
Property Description
Report name The name of the ReportNet target report.
5. Click OK.
Steps
1. Start Cognos Visualizer and open the visualization you want.
2. From the File menu, click Properties.
3. On the Drill Through tab, click the target report and then click Properties.
4. Select the Assist Drill Through check box and click OK twice.
5. Save the visualization.
6. Start Cognos Server Administration and click Visualizations.
The Server Administration - Cognos Visualizer Web Edition window appears.
7. From the File menu, click Add Visualization.
8. Add the visualization you just saved.
9. For the visualization you added, click Client Processor, and then click Connect to
Visualization.
The visualization opens in Cognos Visualizer Web Edition.
10. Drill down in each dimension to the level you want to filter on when drilling through to
ReportNet.
11. From the Data menu, click Drill Through, and then click the target report label.
12. In the Drill Through Settings window, choose whether to drill through in a new browser
window or in an existing window, and click OK.
The Assist Drill Through Web page appears.
The Visualizer metadata section lists the items in the visualization that are available for
drill-through access. The items you want to use for drill-through access must also exist in
the ReportNet package. Using these items, the Drill Through Assistant provides the
parameterized filters in the ReportNet filter expressions section that you can create in the
target report. When you create the target report, ensure that the names of the filters you add
are identical to the parameter names listed in the Assist Drill Through Web page.
Tip: For each parameterized filter listed, the Drill Through Assistant also provides
parameter values so that report authors can see what values Cognos Visualizer supplies.
13. After you finish viewing the Assist Drill Through Web page, click Cancel to return to
Cognos Visualizer.
Steps
1. Start Cognos Report Studio and create a new report.
2. Add the query items and other objects you want.
3. From the Data menu, click Filters.
4. Click the add button.
5. In the Tabular Model Filter dialog box, in the Expression Definition box, create the
parameterized filter you want by typing the filter expression.
The parameter name must be identical to one of the parameter names listed in the Assist
Drill Through Web page.
6. Click OK.
7. In the Usage box, click Optional.
If you do not make the filter optional, a prompt page appears when you drill through to the
report.
8. Repeat steps 4 to 7 for other parameterized filters you want to add.
9. Save the report.
The report name must match what you specified in the New Cognos ReportNet Target
dialog box (p. 285).
10. In Cognos Visualizer, click OK to run the target report and observe the effects of the
drill-through parameter values on the report.
For more information about creating reports and filters, see the Cognos Report Studio User
Guide.
Steps
1. In Cognos Visualizer, open the visualization you want.
2. From the File menu, click Properties.
3. On the Drill Through tab, click the target report and then click Properties.
4. Clear the Assist Drill Through check box and click OK twice.
Steps
1. If Configuration Manager is started, close it.
2. Open the cer3.ini file in a text editor.
The file is located in the \bin directory where Cognos Series 7 is installed.
3. Scroll down to the [NGC] section and change the value for Drill_enable to 1.
4. Save the file.
5. Start Configuration Manager.
6. On the Start tab, click Open the current configuration.
7. In the Explorer pane, right-click the highest-level object and click Apply Selection.
8. Exit Configuration Manager.
Steps
1. Create a file and name it by typing name of target report.crr.
You can create the file using any application, such as Notepad.
The name of the ReportNet target report must be identical to the name you type here.
2. Start PowerPlay Connect.
3. From the Tools menu, click Drill-Through.
4. Click Add and add the file you previously created.
5. Click OK.
6. Save the cube.
Steps
1. Click the Public Folders or My Folders link.
2. If you want to create a new folder:
• Click the new folder button.
• In the Name box, type the name of the folder and click Finish.
3. Click the set properties button for the folder.
4. Click the View the search path link.
5. Copy the search path to the clipboard and click Close.
You will need the search path when enabling the cube for drill-through to ReportNet.
Steps
1. From the Insert menu, click Cube.
2. On the General tab, click the ellipsis button (...) next to the Cube source box and add the
third party cube.
3. Click the Settings tab.
4. Expand the Drill Through folder.
5. Click the Cognos ReportNet box and click Enabled.
6. In the Cognos ReportNet server box, type the URL to ReportNet.
7. In the Cognos ReportNet folder box, paste the Cognos Connection folder search path
from the clipboard.
8. Click OK.
Steps
1. In PowerPlay Enterprise - Server Administration, right-click the cube and click Properties.
2. On the Settings tab, expand the Drill Through folder.
3. Click the Cognos ReportNet Assistance box and click Enabled.
4. Click OK.
5. With the cube selected, from the Tools menu, click Open with Browser.
The cube opens in PowerPlay Web Explorer, and the dimensions appear as hyperlinks.
6. Drill down in each dimension to the level you want to filter on when drilling through to
ReportNet.
Steps
1. Start Cognos Report Studio and create a new report.
2. Add the query items and other objects you want.
3. From the Data menu, click Filters.
4. Click the add button.
5. In the Tabular Model Filter dialog box, in the Expression Definition box, create the
parameterized filter you want by typing the filter expression.
The parameter name must be identical to one of the parameter names listed in the Assist
Drill Through Web page.
6. Click OK.
7. In the Usage box, click Optional.
If you do not make the filter optional, a prompt page appears when you drill through to the
report.
8. Repeat steps 4 to 7 for other parameterized filters you want to add.
9. Save the report.
The report name must match the name of the file you created when you prepared the cube
(p. 287).
10. In PowerPlay Web Explorer, click OK to run the target report and observe the effects of the
drill-through parameter values on the report.
For more information about creating reports and filters, see the Cognos Report Studio User
Guide.
Steps
1. In PowerPlay Enterprise - Server Administration, right-click the cube and click Properties.
2. On the Settings tab, expand the Drill Through folder.
3. Click the Cognos ReportNet Assistance box and click Disabled.
4. Click OK.
The following limitations exist when producing reports in Microsoft Excel format.
Formatting Limitations
About 70% of the formatting functions available in ReportNet are supported in Microsoft Excel.
The following table shows which formatting functions are supported in Excel and which are not.
ReportNet Supported
format in Excel Notes
Currency ✔
Currency ✔
Symbol
Group Size ✔
International ✘
Currency
Symbol
Maximum ✔
Fraction Digits
Maximum ✔
Integer Digits
Minimum ✔
Exponent Digits
Minimum ✔
Fraction Digits
Minimum Integer ✔
Digits
Minus Sign ✔
Monetary ✘ Excel does not allow changing
Decimal the locale-dependent formatting
Separator attributes.
Negative Prefix ✔
Negative Suffix ✔
ReportNet Supported
format in Excel Notes
Pad Character ✔
Percent Symbol ✘ Not supported by Excel.
Plus Sign ✘
Positive Prefix ✔
Positive Suffix ✔
Scale ✘ Excel has a different scaling
formula than ReportNet.
Secondary ✔
Grouping Size
When Negative ✔
WhenZero ✔
Use Currency ✔
Symbol
Use Grouping ✔
Use Scientific ✔
Use Trailing ✔
Currency
Symbol
Date Separator ✔
Symbol
ReportNet Supported
format in Excel Notes
First Day Of ✘ Not supported by Excel.
Week
Symbol Display ✔
Order
Time Separator ✔
Symbol
Show AmPm ✔
Symbol
Show Century ✔
Show Clock ✔
Show Days ✔
Show Era ✘ Not supported by Excel.
Show Hours ✔
Show ✔
Milliseconds
Show Minutes ✔
Show Months ✔
Show Seconds ✔
Show Time Zone ✘ ReportNet does not use this
property.
Show Weekday ✔
Show Years ✔
ReportNet Limitations
The following ReportNet limitations exist when producing reports in Excel format.
Drill-Through Reports
ReportNet does not support drill-through for reports in Excel format.
Hyperlink Buttons
Microsoft Excel does not support hyperlink buttons.
About 70% of the chart types available in ReportNet are matched in Microsoft Excel. The
following table shows which chart types are supported in Microsoft Excel 2000 and later and
which are not.
Supported
Chart type Chart sub type in Excel Notes
Column Column ✔ Similar
Stacked ✔ Similar
Bar 3D ✔ Similar
Stacked ✔ Similar
Stacked 3D ✔ Similar
Stacked bar ✘
Stacked bar 3D ✘
Line Line with ✔ Similar
markers
Line ✔ Similar
Supported
Chart type Chart sub type in Excel Notes
Stacked line 3D ✔ Shows as a stacked
line
3D Axis ✔ Similar
3D Axis ✔ Similar
Quadrant ✘
Polar ✘
Supported
Chart type Chart sub type in Excel Notes
Radar Radar with ✔ Similar
markers
Stacked area ✘
radar
Combination Combination ✘
Combination 3D ✘
Stacked ✘
combination
Stacked ✘
combination 3D
100% stacked ✘
combination
100% stacked ✘
combination 3D
3D axis ✘
burst
To create many report results by running a single report once. For example, you can create a
report that shows sales for each employee, and run it once, sending different results to regional
managers by bursting on region.
You set up bursting in Cognos Report Studio and enable it in the portal.
burst key
The dimension or level of a query in the report specification that is used to create, or burst, a set
of report results.
For example, you can create a report that shows sales for each employee, and send different
results to regional managers by bursting on region.
cascading prompt
A prompt that uses values from a previous prompt to filter the values in the current prompt or
picklist.
Cognos Connection
The portal interface of ReportNet.
condition
An expression that yields a boolean value. Conditions are used in filters, alerts, and formatting
or styles.
expression
A mathematical or logical construct that is used in calculations and filters to derive values from
one or more columns in a database. An expression may be as simple as a reference to column,
or as complex as a long series of mathematical expressions that includes many operators,
parameters, and database functions. An expression that yields a boolean value is also known as
a condition. All other expressions are known as calculations.
group
In security, a list of users or other groups that you use as a single object for setting access
permissions. Groups are usually created in the authentication provider but may be created
within the administration portal.
Users are authenticated as members of the groups they belong to, unless the groups have also
been defined as roles. Users can choose one or more roles when they log on, to change what
data they have authorization for.
In reporting, grouping is the action of organizing common values of a column or query item
together. Grouped items are automatically sorted. Headers and footers often appear after each
instance of a common value in a grouped column.
layout
In reporting, layout defines the appearance of the report, including formatting, style, and design.
In report specifications, layout is also the name of an element that defines how the data returned
by queries is presented.
locale
A code that is used to set
• the language or dialect used for browsers, report text, and so on
• the regional preferences, such as formats for time, date, money, money expressions, and
time of day
In ReportNet, you can specify a locale for the product interface (product locale) and for the data
in the report (content locale). A locale is also stored to record what locale an author used to
create a report specification or a Framework Manager project.
namespace
In security, a collection of user accounts and user groups from an authentication provider.
In XML, namespaces uniquely identify element types and attributes. An XML namespace is
defined by a URI (Uniform Resource Identifier) whose purpose is to name the namespace, not
necessarily to identify a location from which to obtain information.
In Framework Manager, namespaces uniquely identify query items, query subjects and so on.
You import different databases into separate namespaces to avoid duplicate names.
package
A container for models, reports, and so on. Modelers create packages in Framework Manager to
publish models to the ReportNet server.
portal
A Web site or page that provides a single presentation and a single starting point for a set of
information. Also, the Cognos component that runs the Cognos portal site.
Cognos Web products may use a Cognos portal or may be integrated with other portals.
prompt
A report element that asks for parameter values before the report is run.
query
A description of the data to be retrieved from a database. Queries identify what columns or
query items to include or show in the result set, and what operations should be performed as the
data is retrieved.
Queries are expressed in a formal language, such as SQL, or by using ReportNet XML
specifications. In ReportNet, you use tools such as Query Studio and Report Studio to create
and execute queries.
query item
A representation of a column of data in a data source. It contains a reference to a database
column, a reference to another query item, or a calculation. Query items may appear in a model
or in a report.
query subject
One of the types of objects inside a model. A query subject can be
• defined as a collection of references to items of other query subjects
• expressed as an SQL expression that represents selected query items, which will be
retrieved from objects such as tables, synonyms, views, and so on
Query subjects contain query items. Query subjects may be part of folders in the model. The
query subject is the basis of a query in Report Studio and in report specifications.
report specification
An XML representation of the queries, prompts, layouts, and styles in a report. You create report
specifications by using Cognos Report Studio or Query Studio, or by writing your own report
specifications in XML.
summary
In reporting, summaries are aggregate values that are calculated for all the values of a particular
level or dimension. Examples of summaries include total, minimum, maximum, average, and
count.
tabular model
An object that you can use to select query items for a report. A tabular model defines a simple
list query.
In the XML code for report specifications, tabular model is represented by the tabularModel
element.
tabular reference
An object that you use to reference the tabular object of another query within the same report.
In report specifications, it is represented by the tabularReference element.
tabular set
An object that merges rows from two tabular objects, usually tabular models. A tabular set
produces a single result set using union, intersect or except (minus) set operators.
In report specifications, tabular set is represented by the tabularSet element.
tabular SQL
An object that you use to specify a SQL statement that returns a result set. The SQL statement
may be expressed by using syntax recognized by the native database, or by using Cognos SQL
syntax.
In report specifications, tabular SQL is represented by the tabularSQL element.
XML
A language that uses markup symbols or tags to create descriptions of the structure of data.
The XML standard is defined by the World Wide Web Consortium (W3C), and is related to
HTML and SGML. Unlike HTML, XML is extensible because the tags aren’t predefined or
limited.
Symbols B
.crr files, 281, 287 Background Color, 191
Background Image, 191
background image
Numerics inserting, 48
3-D View, 189 Bar Chart, 172
bar charts, 39
A Baseline, 172
Baseline Value, 191
Across, 189 Block, 172
adding blocks
bookmarks, 49 inserting, 51
borders, 47 not rendering properly, 106
calculations, 64 Bookmark, 173
conditional formatting, 87 bookmarks
data, 27 adding, 49
footers, 46 Border, 191
headers, 46 borders
languages, 89 adding, 47
layouts, 89 formatting, 47
multimedia files, 51 Box Type, 191
pages, 54 browsing data
prompt buttons, 72 in Expression Editor, 211
prompts, 67 Bubble Chart, 173
summaries, 64 Bubble Size Measure, 173
text, 47 burst keys
Aggregate Function, 189 definition, 301
aggregates burst reports
data summarization functions, 73 creating, 85
aggregations bursting
unnecessary, 103 definition, 301
Alias, 190 setting options, 85
aligning Business Date/Time Functions, 223
objects, 52
Allow 45° Rotation, 190
Allow 90° Rotation, 190 C
Allow Skip, 190 calculations
Allow Stagger, 190 adding, 64
Allow Truncation, 190 definition, 301
Allow Word Wrap, 190 inserting, 51
Application, 190 Calendar Type, 191, 204
applying Caption, 173
padding, 52 Cascade Source, 191
Arc Measure, 171 cascading prompts, 67
Area Chart, 171 adding, 72
Area Measure, 171 definition, 301
Assist Drill Through Web page, 283, 285, 288 cascading style sheets
Auto Group & Summarize, 190 classes, 60
automating Category, 173
ReportNet using the SDK, 31 changing
Auto-sort, 190 referenced objects, 53
Auto-Submit, 191 changing the model
average summaries, 64 reflecting in reports, 104
Avoid Division by Zero, 191 Chart Body, 173
Axis, 172 Chart Footer, 174
Axis Labels, 172 Chart Subtitle, 174
Axis Measure, 172 Chart Subtype, 191
Axis Type, 191 Chart Title, 174
data formatting patterns by locale ID (cont'd) data formatting patterns by locale ID (cont'd)
en_GB, 127 tr_TR, 166
en_HK, 130 zh, 168
en_IE, 127 zh_CN, 168
en_IN, 130 zh_HK, 168
en_NZ, 127 zh_MO, 168
en_PH, 130 zh_SG, 168
en_SG, 127 zh_TW, 168
en_US, 127 data items, 78
en_ZA, 127 data models
en_ZW, 127 definition, 301
es, 132 Data Point Shape, 193
es_AR, 132 Data Point Size, 193
es_BO, 133 Date & Time Prompt, 177
es_CL, 132 Date Ordering, 205
es_CO, 133 Date Prompt, 177
es_CR, 133 Date Separator, 205
es_DO, 133 Date Style, 205
es_EC, 133 dates
es_ES, 132 formatting, 65
es_GT, 133 DB2, 234
es_HN, 133 DB2 Cast, 241
es_MX, 133 DB2 Math, 242
es_NI, 133 DB2 Trigonometry, 243
es_PA, 133 deciding
es_PE, 132 which filters to create, 283, 285, 288
es_PR, 133 Decimal Separator, 205
es_PY, 132 Default Selections, 193
es_SV, 133 default selections
es_US, 133 specifying in prompts, 71
es_UY, 132 deleting prompts, 106
es_VE, 132 Depth, 193
fi, 135 Description, 193
fi_FI, 135 Dimension, 178
fr, 137 dimensions, 78
fr_CA, 137 creating nested levels, 73
fr_FR, 137 pivoting to show a different perspective, 74
fr_LU, 137 disabling
hu, 141 Drill Through Assistant, 284, 286, 289
hu_HU, 143 Display, 193, 194
it, 144 Display AM / PM Symbols, 205
it_CH, 147 Display As Exponent, 205
it_IT, 146 Display Days, 205
ja, 149 Display Eras, 206
ja_JP, 150 Display Hours, 206
ko, 152 Display Milliseconds, 194, 206
ko_KR, 152 Display Minutes, 206
nl, 153 Display Months, 206
nl_BE, 153 Display Seconds, 194, 206
nl_NL, 153 Display Time Zone, 206
no, 155 Display Value, 193
no_NO, 155 Display Weekdays, 206
pl, 157 Display Years, 206
pl_PL, 157 document
pt, 158 version, 2
pt_BR, 158 Down, 194
pt_PT, 158 Drill Through Assistant
ro, 160 definition, 283, 285, 288
ro_RO, 160 disabling, 284, 286, 289
ru, 161 enabling, 283, 285, 288
ru_RU, 161 Drill Throughs, 194
ru_UA, 161 drill-through
sk, 163 enabling cubes, 282, 288
sk_SK, 163 setting up from PowerPlay Web, 281-284
sv, 165 setting up from third party cubes, 287-289
sv_FI, 165 setting up from Visualizer, 284-287
sv_SE, 165 drill-through reports
tr, 166 creating, 90
N Parameter, 199
parameterized filters See filters
Name, 198 parameterized filtersSee filters
Negative Pattern, 207 Pareto Chart, 183
Negative Sign Position, 207 Pattern, 208
Negative Sign Symbol, 207 PDF
Negative Value Color, 198 producing a report, 28
nested crosstab reports, 37 PDFs
definition, 302 problems printing, 104
New Marker, 198 Percent Scale (integer), 208
New Note, 198 Percentage Symbol, 208
No. of Decimal Places, 208 Pie Chart, 184
Note, 182 pivoting
Note Height, 198 data to show a different perspective, 74
Note Left, 198 planning
Note Top, 198 reports, 21
Note Width, 198 Plot Measures As, 199
Numbers Only, 198 point charts, 39
Polar Chart, 184
O Position, 199
Positive Value Color, 199
objects PowerPlay cube metadata See metadata items
adding, 24 PowerPlay Cube MetadataSee metadata items
aligning, 52 PowerPlay Web
as containers, 25 setting up drill-through, 281-284
hiding, 87 preparing for drill-through
hierarchy, 25 cubes, 281, 287
inserting, 51 third party cubes, 287
reusing, 53 Transformer models, 281
setting properties, 57 Visualizer, 284
showing, 87 Pre-Sort, 199
types, 24 printing
OLAP, 271 reports, 30
OLAP Member, 271 printing PDFs
OLAP Numeric, 274 problems, 104
OLAP Set, 272 problems printing PDFs, 104
opening Processing, 199
Query Studio reports, 84 product
Operators, 212 version, 2
options Progressive Chart, 184
setting, 25 progressive column charts, 41
Oracle, 250 Prompt Button, 184
Oracle Math, 255 prompt buttons
Oracle Trigonometry, 255 adding, 72
Outer Join Allowed, 198 prompts, 67-72
Overall, 199 adding, 67
adding static choices, 72
P cascading, 67, 72
changing the interface, 70
package
creating using query macros, 78
refreshing, 27
customizing, 67
packages
definition, 302
specifying, 26
modifying, 70
Padding, 199
pages, 67
padding
requiring user input, 70
applying, 52
selecting multiple values, 71
Padding Character, 208
showing and hiding graphics, 71
Page, 183
specifying default selections, 71
Page Body, 183
unable to delete, 106
page breaks
properties
inserting, 54
charts, 39
Page Explorer, 22
language-sensitive, 66
Page Footer, 183
Properties pane, 22
Page Header, 183
Push To Bottom, 199
page structure views, 46
pages, 23
adding, 54 Q
Pagination, 58, 199 Quadrant Chart, 184
Palette, 199
W
Web server
errors when browsing images, 103
Web servers
errors when browsing images, 103
Web-safe
color palettes, 47
White Space, 204
work area, 22
X
X Position, 204
X-axis Measure, 189
XML
definition, 303
XML format
producing a report, 28
Y
Y Position, 204
Y-axis Measure, 189
Z
Zero Value Characters, 209