20.07.2014 Views

ug_fm

ug_fm

ug_fm

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

COGNOS (R) ENTERPRISE BUSINESS<br />

INTELLIGENCE<br />

COGNOS REPORTNET (TM)<br />

FRAMEWORK MANAGER<br />

USER GUIDE<br />

Framework Manager User Guide<br />

20-08-2003<br />

Framework Manager<br />

1.02 MR1<br />

Cognos ReportNet(TM) Readme<br />

Framework Manager User Guide<br />

Framework Manager Version 1.02 MR1<br />

Version 1.02<br />

User Guide<br />

THE NEXT LEVEL<br />

OF PERFORMANCE TM


Product Information<br />

This document applies to Framework Manager Version 1.02 MR1 and may also apply to subsequent releases. To check for newer versions of<br />

this document, visit the Cognos support Web site (http://support.cognos.com).<br />

This edition published 2003.<br />

Copyright<br />

Copyright (C) 2003 Cognos Incorporated<br />

While every attempt has been made to ensure that the information in this document is accurate and complete, some typographical errors or<br />

technical inaccuracies may exist. Cognos does not accept responsibility for any kind of loss resulting from the use of information contained in<br />

this document.<br />

This document shows the publication date. The information contained in this document is subject to change without notice. Any<br />

improvements or changes to either the product or the document will be documented in subsequent editions.<br />

U.S. Government Restricted Rights. The software and accompanying materials are provided with Restricted Rights. Use, duplication, or<br />

disclosure by the Government is subject to the restrictions in subparagraph (C)(1)(ii) of the Rights in Technical Data and Computer Software<br />

clause at DFARS 252.227-7013, or subparagraphs (C) (1) and (2) of the Commercial Computer Software - Restricted Rights at<br />

48CFR52.227-19, as applicable. The Contractor is Cognos Corporation, 15 Wayside Road, Burlington, MA 01803.<br />

This software/documentation contains proprietary information of Cognos Incorporated. All rights are reserved. Reverse engineering of this<br />

software is prohibited. No part of this software/documentation may be copied, photocopied, reproduced, stored in a retrieval system,<br />

transmitted in any form or by any means, or translated into another language without the prior written consent of Cognos Incorporated.<br />

Cognos and the Cognos logo are trademarks of Cognos Incorporated in the United States and/or other countries. All other names are<br />

trademarks or registered trademarks of their respective companies.<br />

Information about Cognos Products and Accessibility can be found at www.Cognos.com


Table of Contents<br />

Introduction 9<br />

Additional Materials 11<br />

Chapter 1: Framework Manager 13<br />

Structuring Metadata in the Framework Manager Environment 13<br />

The Framework Manager Environment 13<br />

Project Structure Best Practices 14<br />

Preparing Metadata for Use in Reports 15<br />

Chapter 2: Designing a Project 19<br />

Project Files 19<br />

Create or Open a Project 20<br />

The Project Page 21<br />

Naming Conventions for Objects in a Project 24<br />

Create a Namespace 25<br />

Importing Metadata 25<br />

Relational Databases 26<br />

SAP BW Data Source 27<br />

Import from a Cognos ReportNet Model 28<br />

Architect Models and Impromptu Catalogs 29<br />

Third-party Metadata Sources 29<br />

XML as a Data Source 30<br />

Create a Data Source Connection 31<br />

Parameterized XML Connection Strings 35<br />

Using a Project with Multiple Data Sets 35<br />

Modeling with Multilingual Data Sources 37<br />

Modeling with SAP BW Data Sources 37<br />

Export Metadata 42<br />

Managing Projects 43<br />

Repository Control 43<br />

Create a Segment 46<br />

Create a Link 47<br />

Functions 48<br />

Choose the Type of Query Processing 48<br />

Multiuser Modeling 49<br />

Action Logging 50<br />

Synchronize Projects 50<br />

User Guide 3


Chapter 3: Preparing a Model for Reporting 53<br />

Query Subjects 53<br />

Create a Query Subject 54<br />

Modify a Data Source Query Subject 55<br />

Conform SAP BW Query Subjects 57<br />

Deconform an SAP BW Query Subject 57<br />

Optimizing SAP BW Performance 58<br />

Modify a Model Query Subject 59<br />

Modify a Stored Procedure Query Subject 60<br />

Test a Query Subject 60<br />

SQL Type 61<br />

SQL Generation 64<br />

Merge Metadata To Create a New Query Subject 64<br />

Transform a Relationship into a Query Subject 65<br />

Relationships 65<br />

Recursive Relationships 66<br />

Refine Query Paths 66<br />

Resolve Ambiguous Relationships 67<br />

Create a Relationship 67<br />

Modify a Relationship 68<br />

Create a Relationship Shortcut 68<br />

Detect Relationships 69<br />

Query Items 70<br />

Format Query Items 70<br />

Define a Prompt Control 70<br />

Usage and Aggregate Properties 72<br />

Modify Usage and Aggregate Properties 73<br />

Adding Business Rules 75<br />

Create a Calculation 75<br />

Create a Filter 76<br />

Applying a Filter 77<br />

Example - Create and Apply a Filter 77<br />

Use a Prompt Value 78<br />

Create a Parameter Map 79<br />

Create a Session Parameter 80<br />

Using a Macro 81<br />

Example - Using Parameters 84<br />

Multilingual Support 85<br />

Use a Macro to Model Multilingual Data 85<br />

Define Languages 85<br />

Export a Translation Table 86<br />

Import a Translation Table 86<br />

Example - Create a Multilingual Project 87<br />

Managing the Project 88<br />

Modify Properties 88<br />

Create a Folder 89<br />

Create a Query Item Folder 89<br />

Check a Project 90<br />

Dimensional Metadata 91<br />

SAP BW Hierarchies 92<br />

Create a Star Schema Grouping 93<br />

Specify Dimension Information 93<br />

Chapter 4: Publishing a Project 95<br />

Set Governors 95<br />

Create or Modify a Package 97<br />

4 Cognos ReportNet (TM) Framework Manager


Security in Framework Manager 98<br />

Add a User, Group, or Role 99<br />

Add Data Security 100<br />

Adding Metadata Security 101<br />

Add or Remove Object-Based Security 101<br />

Specify Languages 103<br />

Publish a Package 103<br />

Analyze the Effects of Changes to a Package 104<br />

Managing Packages 105<br />

Modify Package Access 105<br />

Modify Package Administrative Access 105<br />

Explore Packages 105<br />

View Package Inclusion 106<br />

Appendix A: Troubleshooting 107<br />

Unable to See Test Results 107<br />

Errors in Queries That Use Macros 107<br />

Unable to View the Result Set of a Stored Procedure 107<br />

Error When Switching the Language in Reporting Application 107<br />

Required Currency Not Displayed 108<br />

XML Validation Error During the Import of Third-party Metadata Sources 108<br />

Expressions Imported from Business Objects Metadata Source Do Not Work 108<br />

Extended Characters in Names of SQL Objects Imported from ERWin Metadata Source are<br />

Lost 108<br />

Unable to Execute Stored Procedures Imported from ERWin Metadata Source 109<br />

Script Error Occurs When Testing Query Subjects in Framework Manager 109<br />

Outer Joins Created in SQL 109<br />

User Guide 5


Appendix B: Data Format Properties 113<br />

Data Formatting Properties 113<br />

Calendar Type 113<br />

Clock 113<br />

Currency 113<br />

Currency Display 113<br />

Currency Symbol 113<br />

Currency Symbol Position 113<br />

Date Ordering 114<br />

Date Separator 114<br />

Date Style 114<br />

Decimal Separator 114<br />

Display AM / PM Symbols 114<br />

Display As Exponent 114<br />

Display Days 114<br />

Display Eras 114<br />

Display Hours 114<br />

Display Milliseconds 114<br />

Display Minutes 115<br />

Display Months 115<br />

Display Seconds 115<br />

Display Time Zone 115<br />

Display Weekdays 115<br />

Display Years 115<br />

Exponent Symbol 115<br />

Group Size (digits) 115<br />

International Currency Symbol 115<br />

Mantissa (digits) 115<br />

Maximum No. of Digits 116<br />

Minimum No. of Digits 116<br />

Missing Value Characters 116<br />

Negative Pattern 116<br />

Negative Sign Position 116<br />

Negative Sign Symbol 116<br />

No. of Decimal Places 116<br />

Padding Character 116<br />

Pattern 116<br />

Percentage Symbol 116<br />

Percent Scale (integer) 116<br />

Scale (integer) 117<br />

Secondary Group Size (digits) 117<br />

Thousands Separator 117<br />

Time Separator 117<br />

Time Style 117<br />

Time Unit 117<br />

Use Thousands Separator 117<br />

Zero Value Characters 117<br />

Appendix C: Using the Expression Editor 119<br />

Operators 119<br />

Summaries 124<br />

Constants 129<br />

Constructs 130<br />

Business Date/Time Functions 130<br />

Common Functions 133<br />

6 Cognos ReportNet (TM) Framework Manager


DB2 138<br />

DB2 Cast 145<br />

DB2 Math 147<br />

DB2 Trigonometry 147<br />

MS Access 148<br />

MS Access Cast 153<br />

MS Access Math 153<br />

MS Access Trigonometry 154<br />

Oracle 154<br />

Oracle Math 159<br />

Oracle Trigonometry 159<br />

Red Brick 161<br />

SAP BW 164<br />

SAP BW OLAP 164<br />

SAP BW Trigonometry 164<br />

SAP BW Math 165<br />

SQL Server 166<br />

SQL Server Cast 168<br />

SQL Server Math 169<br />

SQL Server Trigonometry 170<br />

Teradata 171<br />

Teradata Trigonometry 174<br />

OLAP 176<br />

OLAP Member 176<br />

OLAP Set 176<br />

OLAP Numeric 178<br />

Appendix D: Formatting Data With Patterns 181<br />

Language Code: cs 182<br />

Locale ID: cs 182<br />

Locale ID: cs_CZ 183<br />

Language Code: da 185<br />

Locale ID: da 185<br />

Locale ID: da_DK 186<br />

Language Code: de 188<br />

Locale ID: de 188<br />

Locale ID: de_CH 189<br />

Locale ID: de_DE, de_LU, de_AT 191<br />

Language Code: el 192<br />

Locale ID: el 192<br />

Locale ID: el_GR 194<br />

Language Code: en 195<br />

Locale ID: en, en_AU, en_CA, en_GB, en_IE, en_NZ, en_SG, en_US, en_ZA,<br />

en_ZW 195<br />

Locale ID: en_BE 197<br />

Locale ID: en_HK, en_IN, en_PH, en_BW 198<br />

Language Code: es 200<br />

Locale ID: es, es_AR, es_CL, es_ES, es_PE, es_PY, es_UY, es_VE 200<br />

Locale ID: es_BO, es_CO, es_CR, es_DO, es_EC, es_GT, es_HN, es_MX, es_NI,<br />

es_PA, es_PR, es_SV, es_US 201<br />

Language Code: fi 203<br />

Locale ID: fi, fi_FI 203<br />

Language Code: fr 205<br />

Locale ID: fr, fr_CA, fr_FR, fr_LU 205<br />

Locale ID: fr_BE 206<br />

Locale ID: fr_CH 208<br />

User Guide 7


Language Code: hi 209<br />

Locale ID: hi 209<br />

Locale ID: hi_IN 211<br />

Language Code: hu 212<br />

Locale ID: hu 212<br />

Locale ID: hu_HU 214<br />

Language Code: it 215<br />

Locale ID: it 215<br />

Locale ID: it_IT 217<br />

Locale ID: it_CH 218<br />

Language Code: ja 220<br />

Locale ID: ja 220<br />

Locale ID: ja_JP 221<br />

Language Code: ko 223<br />

Locale ID: ko, ko_KR 223<br />

Language Code: nl 224<br />

Locale ID: nl, nl_BE, nl_NL 224<br />

Language Code: no 226<br />

Locale ID: no, no_NO 226<br />

Language Code: pl 228<br />

Locale ID: pl, pl_PL 228<br />

Language Code: pt 229<br />

Locale ID: pt, pt_BR, pt_PT 229<br />

Language Code: ro 231<br />

Locale ID: ro, ro_RO 231<br />

Language Code: ru 232<br />

Locale ID: ru, ru_UA, ru_RU 232<br />

Language Code: sk 234<br />

Locale ID: sk, sk_SK 234<br />

Language Code: sv 236<br />

Locale ID: sv, sv_FI, sv_SE 236<br />

Language Code: tr 237<br />

Locale ID: tr, tr_TR 237<br />

Language Code: zh 239<br />

Locale ID: zh, zh_CN, zh_HK, zh_MO, zh_SG, zh_TW 239<br />

Glossary 241<br />

Index 249<br />

8 Cognos ReportNet (TM) Framework Manager


Introduction<br />

This document is available as online help and as an online book. For information about related<br />

documents, see "Additional Materials" (p. 11).<br />

Framework Manager<br />

Framework Manager is a data modeling product. You can use Framework Manager to import<br />

metadata from one or more data sources and transform it into a business-oriented model that<br />

can be used to create reports.<br />

User Guide<br />

This document includes the procedures, examples, notes, tips, and other background<br />

information to help you<br />

• create a project<br />

• prepare a model for reporting<br />

• create and publish a package<br />

To use this product to create models for relational data sources, you should understand data<br />

modeling, and know how to write SQL statements. If you use Framework Manager to create<br />

models for an SAP BW data source you do not need to know how to write SQL.<br />

Questions or Comments?<br />

For additional technical information about using ReportNet, visit the Cognos support Web site<br />

(http://support.cognos.com).<br />

User Guide 9


Introduction<br />

10 Cognos ReportNet (TM) Framework Manager


Additional Materials<br />

In the guide, we refer to other documents. Their locations are listed below.<br />

Topic<br />

How to install and configure<br />

Framework Manager<br />

How to manage ReportNet<br />

security, services, and report<br />

properties<br />

How to author professional<br />

reports using Report Studio<br />

How to create ad hoc reports<br />

using Query Studio<br />

How to use the ReportNet<br />

software development kit<br />

How to migrate Architect models<br />

and Impromptu catalogs<br />

Location<br />

ReportNet Installation and<br />

Configuration Guide<br />

ReportNet Administration and<br />

Security Guide<br />

Report Studio User Guide<br />

Query Studio User Guide<br />

ReportNet Developer Guide<br />

ReportNet Metadata Migration<br />

User Guide<br />

Formats<br />

Our documentation includes user guides, tutorial guides, reference books, and other materials<br />

to meet the needs of our varied audience.<br />

Online Help<br />

All information is available in online help. Online help is available from the Help button in a Web<br />

browser, or the Help menu and Help button in Windows products. All online help is also available<br />

from the Windows Start menu (Start, Programs, Cognos ReportNet, Documentation).<br />

Books for Printing<br />

The information in each online help system is available in online book format (PDF). However,<br />

the information from a given help system may be divided into more than one online book. Use<br />

online books when you want to print a document or when you want to search the whole<br />

document.<br />

You can print selected pages, a section, or the whole book. Cognos grants you a non-exclusive,<br />

non-transferable license to use, copy, and reproduce the copyright materials, in printed or<br />

electronic format, solely for the purpose of providing internal training on, operating, and<br />

maintaining the Cognos software.<br />

Online books are available from the introduction to the online help for each component.<br />

All online books are available on the Cognos documentation CD.<br />

You can also read the product readme files and the installation guides directly from Cognos<br />

product CDs.<br />

User Guide 11


Additional Materials<br />

12 Cognos ReportNet (TM) Framework Manager


Chapter 1: Framework Manager<br />

Framework Manager is an application that runs in Microsoft Windows and provides a model<br />

development environment. A model in Framework Manager is a business presentation of the<br />

structure of the data from one or more databases. A model describes data objects, structure,<br />

and grouping, as well as relationships and security.<br />

When you work in Framework Manager, you work in a project. A project contains a model,<br />

namespaces, data sources, and packages. After you define a Framework Manager project and<br />

namespace, you can publish one or more packages containing metadata information to the<br />

ReportNet server for use by authors and query users.<br />

After a package is published to the ReportNet server, a report author uses the model to create<br />

reports and queries in the ReportNet server run-time environment.<br />

While we tend to use the term model regarding metadata, for ReportNet, a model refers to the<br />

metadata after it has been published to the ReportNet server.<br />

Structuring Metadata in the Framework Manager<br />

Environment<br />

The Framework Manager Environment<br />

Users of Framework Manager will interact with projects, namespaces, and packages. They will<br />

create query subjects to represent metadata to report authors.<br />

Query subjects are the most important object for modelers. In conjunction with relationships,<br />

you use query subjects to build the queries that get the answers you want.<br />

Query items are the most important object for report authors. Query items have more properties<br />

than query subjects. These properties are what the report authors use to build the reports they<br />

want.<br />

Projects<br />

Models<br />

A project is a set of models, packages, and related information for administration, and for<br />

sharing model information. Often a single project will span many more databases or tables than<br />

any set of users requires access to.<br />

A model is a set of related query subjects, and other objects (p. 19).<br />

The Framework Manager model is a metadata layer that adds value to a query database in<br />

several ways. Most importantly, it provides a business presentation of the information in the<br />

database to report authors and query users to simplify the building of reports and queries. The<br />

business presentation takes several forms:<br />

• organization of data items in folders that represent business areas for reporting<br />

• formatting of data items with numeric, currency, date, time, and other formats<br />

• presentation of multilingual folder and item names, description, tips, and data so that users<br />

can operate in their language of choice<br />

• automation of the generation of SQL queries sent to the database<br />

• specification of default prompting. This can include having ReportNet prompt the user with a<br />

descriptive name for ease of use while actually filtering on a code or key value for improved<br />

query performance.<br />

User Guide 13


Chapter 1: Framework Manager<br />

You can modify the Framework Manager model to ensure that queries sent to the database are<br />

efficient, well-formed, and secure. The Framework Manager modeler can do the following:<br />

• specify the rules governing query generation<br />

• restrict user access to specific rows or columns of data<br />

• model data relationships to hide the complexity of data from report authors<br />

Namespaces<br />

A namespace uniquely identifies query items, query subjects and other objects (p. 25). You<br />

import different databases into separate namespaces to avoid duplicate names.<br />

Packages<br />

A package is a subset of the query subjects and other objects defined in the project (p. 97). A<br />

package is what is actually published to the ReportNet server.<br />

Query Subjects<br />

The most important component of the Framework Manager project is the query subject. A<br />

project is built upon query subjects.<br />

When you model metadata from a relational database, there are several types of query<br />

subjects. When you model SAP BW metadata, all query subjects are data source query<br />

subjects.<br />

Data Source Query Subject<br />

The data source query subject is an SQL query that acts as a view into the underlying query<br />

database(s) (p. 53).<br />

During the initial metadata import operation, a default data source query subject is created for<br />

each table you select and creates the default relationships between query subjects for you<br />

automatically. The query subject uses the following general SQL syntax:<br />

select * from <br />

You can refine data source query subjects in various ways. For example, you can add<br />

calculations or filters, or you can add or modify relationships between query subjects to define<br />

the query generation rules for report authors.<br />

A single Framework Manager project may contain data source query subjects from one or more<br />

databases from one or more vendors. This provides true heterogeneous database access.<br />

The database columns and calculations returned by the SQL query in the data source query<br />

subject are referred to as query items.<br />

Model Query Subject<br />

The model query subject allows you to define the business presentation for the users (p. 54).<br />

Model query subjects can contain query items from an arbitrary set of data source query<br />

subjects. Model query subjects can be enhanced even further, perhaps by adding filters or<br />

calculations to create more query items. You can also use query subjects from other model<br />

query subjects.<br />

Stored Procedure Query Subject<br />

The stored procedure query subject operates much like a data source query subject in that it<br />

defines a set of data, query items, available to the model from the underlying query database<br />

(p. 54). Except for their source, these query items are no different from other query items.<br />

Project Structure Best Practices<br />

While OLAP data is inherently structured in a logical presentation that represent business<br />

requirements, relational data generally is not. You can structure projects that contain relational<br />

metadata in many ways in Framework Manager (p. 19). There are some best practices for<br />

structuring your Framework Manager projects to minimize complexity for report authors and to<br />

assist in model maintenance.<br />

14 Cognos ReportNet (TM) Framework Manager


Chapter 1: Framework Manager<br />

The basic structure we recommend is a 2-layer model with data source and stored procedure<br />

query subjects providing a physical query layer and model query subjects providing a<br />

presentation layer.<br />

The 2-layer model works well for both report authors and data modelers. The presentation layer<br />

makes it easier for report authors to find and understand their data, while the physical layer acts<br />

as the foundation for the presentation layer.<br />

Where appropriate, create calculations, filters, and other modifications in the physical layer to<br />

maximize reuse in the presentation layer.<br />

Example<br />

A good example of a model structured using this best practice approach is the Great Outdoors<br />

sample model, GO Sales and Retailers, which presents users a series of business related<br />

folders of data to create reports with.<br />

The presentation layer is made up of model query subjects, shortcuts, calculations, and filters<br />

organized into folders. Both folders and query subjects appear as folders to the report author.<br />

This organization of information into relevant business categories simplifies the user reporting<br />

experience as users can locate the information they require more easily. Query items have had<br />

default data formatting specified. The names and descriptions of query items have been<br />

translated into 26 different languages; each user will see automatically the folder and item<br />

names and description appear in their preferred language.<br />

Underlying this presentation layer is a series of data source query subjects that, while not visible<br />

to the report author, define the very essence of the model including:<br />

• Basic data access – SQL queries define the views into the query database<br />

• Calculations – so that each user does not have to perform the same basic business<br />

calculations in each report or query<br />

• Multilingual data access – the sample databases are in 26 languages. Each user sees only<br />

the data for the language they request. ReportNet is able to do this automatically based on<br />

the fashion in which the SQL queries are modified at run time according to the rules laid out<br />

by the Framework Manager modeler.<br />

• Heterogeneous database access – this model is built atop two databases<br />

While the sample model does not use all, or even most, of the features and capabilities of<br />

Framework Manager, it does present the basics of project design.<br />

Preparing Metadata for Use in Reports<br />

When you are preparing metadata for use in a reporting application, you must identify the<br />

relationships and aggregations that are necessary to generate efficient queries that deliver the<br />

required results. The report author uses the model structure that you provide to plan queries<br />

automatically, delivering the results expected by report authors with minimal training.<br />

Before report authors can create reports, you must follow a process in Framework Manager:<br />

User Guide 15


Chapter 1: Framework Manager<br />

❑ Analyze the problem.<br />

Before you start, it is essential to understand the reporting problem you are trying to solve,<br />

and what data is available to solve it.<br />

• Do you and the report users (the report authors who will use the published model in<br />

Report Studio and the business authors who will use it in Query Studio) agree on what<br />

the reporting requirements are? Issues to resolve include multilingualism, performance,<br />

security, and how to organize and combine query items and filters.<br />

• Does the data source contain the data and metadata you need? Without metadata such<br />

as primary keys, indexes, and foreign keys, your reports may take too long to run, or<br />

may produce incorrect results. If the data source does not contain the data and<br />

metadata you need, will it be changed, or will you work around it?<br />

• Is there more than one source for the data you need? If so, choose the one that most<br />

closely fits your reporting requirements. If a data warehouse is available, it is typically a<br />

better choice than an operational database. A data warehouse based on a star schema<br />

is ideal. If this does not exist, and you expect that your reporting application will be<br />

heavily used, consider arranging for one to be created.<br />

• Which data source tables are the fact tables, which are the dimensions, and which are<br />

both fact and dimension? What are the keys and attributes of each dimension? What<br />

are the required relationships?<br />

• Are any required tables denormalized (for example, contain embedded dimension<br />

information other than foreign keys)? You will need to decide if and where to present the<br />

denormalized data instead of the normalized data (if it exists).<br />

In most cases, you will find that even tho<strong>ug</strong>h the data source contains what you need, it has<br />

to be renamed, reorganized, and enhanced to meet your reporting requirements.<br />

Framework Manager makes it easy to handle simple changes like these. Some issues, such<br />

as the absence of certain derivable information, can be modeled by using Framework<br />

Manager’s more advanced features, such as custom SQL.<br />

In some cases, you may not have direct access to this information. You should talk to the<br />

report authors and business authors to determine the requirements.<br />

Once you have answered the questions that relate to your most important requirements, you<br />

are ready to start designing and building your model.<br />

❑ Create a new Framework Manager project (p. 19).<br />

❑ Import the required metadata as data source query subjects (p. 25). You should import only<br />

the smallest number of tables and relationships that you need in your project. This is even<br />

more important if you are importing SAP BW metadata, since you cannot delete query items<br />

that are based on SAP BW metadata.<br />

❑ For relational metadata, validate the model objects that were created. In particular:<br />

• resolve ambiguous relationships by ensuring that there are no redundant relationships<br />

(p. 66) that can result in incorrect results, and that the correct relationship path is used<br />

(p. 67).<br />

• verify the Usage and Regular Aggregate (p. 72) property values of each query item,<br />

especially if the usage is set to "fact".<br />

❑ For relational metadata, use star schema groups (p. 93) to isolate fact tables that share<br />

conformed dimension(s).<br />

By using shortcuts to separate fact tables into different folders, you can resolve any<br />

ambiguous relationships.<br />

16 Cognos ReportNet (TM) Framework Manager


Chapter 1: Framework Manager<br />

❑ For relational metadata, where possible, use shortcuts (p. 89) rather than copies. Shortcuts<br />

make it easier to maintain metadata in the physical layer by ensuring that changes to the<br />

target object are reflected in the shortcut.<br />

For SAP BW metadata, you can use copies to create distinct query subjects that you can<br />

modify without affecting the original query subject.<br />

When you use shortcuts, consider where you use them and what the impact is on<br />

relationships:<br />

• shortcuts in the same folder as the target query subject use the relationships of the<br />

target query subject<br />

• shortcuts in a different folder from the target query subject ignore the relationships of<br />

the target query subject and use the relationships specified for that shortcut<br />

❑ For relational metadata, edit data source (p. 55), stored procedure (p. 60), and model query<br />

subjects (p. 53). When you do this, consider the following:<br />

• It is helpful to create a folder that contains the model query subjects. This folder acts as<br />

a presentation layer that lets you organize model objects so that you can distinguish<br />

them from the data source objects.<br />

• It is best practice to create relationships only in the data-source layer.<br />

• Plan your filters carefully so that you can reuse them with multiple query subjects.<br />

❑ For SAP BW metadata, modify data source query subjects, use filters, group metadata into<br />

folders, or conform (p. 57) and deconform (p. 60) dimensions.<br />

❑ For relational metadata, specify dimensional information (p. 93).<br />

By grouping objects that are based on dimensions, Framework Manager can manage<br />

parallel-detail (two one-to-many) relationships properly to avoid double counting. You should<br />

define dimensional information in the presentation layer.<br />

❑ Define the package(s) to be published to the ReportNet server (p. 97), (p. 103).<br />

Each package contains the query subjects required to meet a reporting need. For example,<br />

if your database contains information on many aspects of your business, you might decide<br />

to create different packages for the HR, Finance, and Sales departments.<br />

Your packages should be designed to meet a broad but related reporting requirement. If<br />

packages are too narrow, report authors will have to work with too many packages and may<br />

be unable to build the reports they require; each report can contain information from a single<br />

package only.<br />

User Guide 17


Chapter 1: Framework Manager<br />

18 Cognos ReportNet (TM) Framework Manager


Chapter 2: Designing a Project<br />

Project Files<br />

A project is made up of query subjects, query items, relationships, folders, expressions,<br />

parameter maps, data sources, packages, and related information that is grouped together for<br />

security, administration, and for sharing information. You design a project in Framework<br />

Manager to structure and organize the metadata and data you want, in a format that will be the<br />

most meaningful to report authors.<br />

When you design a project, you might want to consider where to share and reuse information,<br />

and where to organize a project according to business needs. You can create segments (p. 46),<br />

or extend a project to other users by linking to other projects (p. 47), to share and reuse<br />

information. One way of organizing your project is to create namespaces (p. 25) to allow<br />

duplicate query subjects or query items in a project.<br />

After you have designed your project, you can then add and modify objects to better reflect your<br />

business and prepare for reporting (p. 53). You can also export your project in a Common<br />

Warehouse Metamodel (.cwm) format (p. 42).<br />

You can also use Framework Manager for multiuser modeling (p. 49).<br />

To design a Framework Manager project:<br />

❑ Create or open a project (p. 20).<br />

❑ Import metadata from one or more data sources (p. 25).<br />

❑ Set up project management (p. 43).<br />

When you work in Framework Manager, you work in the context of a project. The Framework<br />

Manager project contains objects that you organize for reporting authors according to the<br />

business model and business rules of your organization. You view these objects in the project<br />

page (p. 21).<br />

A Framework Manager project appears as a folder that contains a project file (.cpf) and the<br />

specific .xml files that define the project. The files in a project folder are unique to each project.<br />

Tip: The project and the project’s associated files are contained in a project folder. We<br />

recommend that you do not add any other files to this project folder.<br />

User Guide 19


Chapter 2: Designing a Project<br />

Project Folder<br />

These are the contents of a project folder.<br />

File name<br />

.cpf<br />

model.xml<br />

Preferences.xml<br />

customdata.xml<br />

repository.xml<br />

Description<br />

The Framework Manager project file, which<br />

references the .xsd and .xml files used to<br />

define a project<br />

The actual model data created by Framework<br />

Manager users<br />

The preferences for Framework Manager<br />

projects<br />

The stored diagram information. For example,<br />

the diagram layout, notation, font, color, etc.<br />

The logged version history for each project or<br />

segment that has been added to a repository<br />

Create or Open a Project<br />

Before you can import metadata, you must create a project. When you start Framework<br />

Manager, the Welcome page appears. You can use this page to create or open a project.<br />

Steps to Create a Project<br />

1. From the Welcome page, click Create a new project.<br />

2. In the New Project page, specify a name and location for the project.<br />

3. If you want to add the project to a source control repository, click Repository, and then<br />

select the Add to repository check box.<br />

For information about connecting to a new repository, see "Create a Repository<br />

Connection" (p. 43).<br />

4. In the Select Language page, click the default language for the project.<br />

The language you select cannot be changed after you click OK, but you can add others.<br />

For information about project languages, see "Define Languages" (p. 85).<br />

Note: If an SAP BW server does not support the selected language, it uses the content<br />

locale mapping in Cognos Configuration. If a mapping is not defined, Framework Manager<br />

connect in the default language of the BW server.<br />

5. Click OK.<br />

The Import wizard appears so that you can import your metadata (p. 25).<br />

6. To continue with the import click Next, otherwise, click Cancel.<br />

7. Save the project.<br />

You save the project (.cpf) file and all related XML files in a single folder. When you save a<br />

file with a different name or format, ensure that you save the project in a separate folder.<br />

Steps to Open a Project<br />

1. From the Welcome page, click Open a project.<br />

2. In the project folder, click the .cpf file, and click Open.<br />

3. If you want to add the project to a source control repository, click Repository.<br />

For information about connecting to a new repository, see "Create a Repository<br />

Connection" (p. 43).<br />

4. Type the path to new local project folder, or locate an existing folder.<br />

5. Click OK.<br />

20 Cognos ReportNet (TM) Framework Manager


Chapter 2: Designing a Project<br />

The Project Page<br />

After you create or open a project (p. 20), the project page appears. The project page is the<br />

environment in which you design, package, and publish project metadata. This page contains<br />

several panes and views that you can use to view and modify the objects in a project.<br />

Project Viewer<br />

The Project Viewer shows the objects in a project in a hierarchical view. You can use the Project<br />

Viewer to view, modify, and create these objects:<br />

• query subjects (p. 53)<br />

• data sources (p. 31)<br />

• namespaces (p. 25)<br />

• parameter maps (p. 79)<br />

• folders (p. 89)<br />

• segments (p. 46)<br />

• links (p. 47)<br />

• calculations (p. 75) and filters (p. 76)<br />

• packages (p. 97)<br />

Note: Relationships and imported functions are shown in both the Object Diagram View and<br />

Object Explorer Views.<br />

The Project Viewer uses the following icons to represent objects and states. A project may use<br />

some or all of the icons.<br />

Icon<br />

Description<br />

Represents the project.<br />

Represents the root namespace or any other<br />

namespace in the project.<br />

Represents a folder that contains one or more data<br />

sources.<br />

Represents a data source.<br />

Represents a folder that contains one or more parameter<br />

maps.<br />

Represents a parameter map.<br />

Represents a folder that contains one or more packages.<br />

Represents a package.<br />

Represents a query subject.<br />

Represents an invalid query subject. For more<br />

information about correcting invalid objects, see "Check<br />

a Project" (p. 90).<br />

Represents a query subject based on multidimensional<br />

data.<br />

Represents an invalid query subject based on<br />

multidimensional data. For more information about<br />

correcting invalid objects, see "Check a Project" (p. 90).<br />

User Guide 21


Chapter 2: Designing a Project<br />

Icon<br />

Description<br />

Represents a query subject that contains query items<br />

whose Usage property is set to Fact.<br />

Represents an invalid query subject that contains query<br />

items whose Usage property is set to Fact. For more<br />

information about correcting invalid objects, see "Check<br />

a Project" (p. 90).<br />

Represents a query item.<br />

Represents a calculation whose Usage property is set to<br />

Attribute.<br />

Represents a calculation whose Usage property is set to<br />

Identifier.<br />

Represents an embedded calculation.<br />

Represents an invalid embedded calculation.<br />

Represents a calculation with the Usage property set to<br />

Fact.<br />

Represents an invalid embedded filter.<br />

Represents a query item whose Usage property is set to<br />

Identifier.<br />

Represents a query item whose Usage property is set to<br />

Fact.<br />

Represents a query item that is located under a shortcut<br />

query subject.<br />

Represents a calculation.<br />

Represents an invalid calculation. For more information<br />

about correcting invalid objects, see "Check a<br />

Project" (p. 90).<br />

Represents a filter.<br />

Represents an invalid filter. For more information about<br />

correcting invalid objects, see "Check a Project" (p. 90).<br />

Represents a relationship.<br />

Represents an invalid relationship. For more information<br />

about correcting invalid objects, see "Check a<br />

Project" (p. 90).<br />

Indicates that the object is checked in to the repository.<br />

Indicates that the object is checked out of the repository.<br />

Indicates that the object is checked out of the repository<br />

by a different user.<br />

22 Cognos ReportNet (TM) Framework Manager


Chapter 2: Designing a Project<br />

Icon<br />

Description<br />

Indicates a package that has been published.<br />

Indicates that a linked segment or project has been<br />

updated.<br />

dimensional overlay icon<br />

This overlay icon indicates that the object is linked.<br />

This overlay icon indicates that the object is a shortcut.<br />

Tip: To view the corresponding object in the Object Diagram View, you must have the Object<br />

Diagram View open. In Project Viewer, right-click the object you want and click Locate in<br />

Object Diagram.<br />

Object Diagram and Object Explorer Views<br />

You can use both the Object Diagram and the Object Explorer Views to view, create, and modify<br />

objects and relationships. You can also create folders and namespaces that group objects.<br />

The Object Diagram View shows the relationships between objects in a project in a diagram.<br />

Relationships between query subjects are shown as lines with cardinality notation (p. 66). You<br />

can expand objects that are grouped in folders to show the hierarchy of the query subjects and<br />

relationships that it contains.<br />

In the Object Diagram View, you can also<br />

• organize objects<br />

Tip: From the Diagram menu, click Auto Layout.<br />

• center a query subject<br />

Tip: Click a query subject and, from the Diagram menu, click Set Focal Point.<br />

The Object Explorer View shows the contents of a project, similar to any file system. Objects<br />

can be arranged by name, class, or description. If you have a large number of objects in a<br />

project, it may be easier to locate them in the Object Explorer.<br />

Note: The best way to display SAP BW metadata is in the star layout.<br />

Properties Pane<br />

The Properties pane shows the properties of the objects you last selected in either the Object<br />

Explorer View, Object Diagram View, or Project Viewer. Object properties are set during import,<br />

and some property values can be modified during modeling. You can use the Properties pane to<br />

add, modify (p. 88), or delete the properties of objects.<br />

Summary Pane<br />

The Summary pane shows the statistics and tasks available for a selected object.<br />

Tip: To select an object, click the object in the Project Viewer, Object Explorer, or Object<br />

Diagram.<br />

The Statistics section shows the number of objects, by class, located in the currently selected<br />

object. If the selected object contains a folder, the contents of the folder are included in the<br />

number count. Selected objects include projects, namespaces, and folders. The default selected<br />

object is the project.<br />

The Tasks section shows actions that are applicable to the currently selected object, based on<br />

the object class. If you select a folder, actions for the folder are listed. If you select an object in<br />

that folder, the list includes actions for the object as well as for the folder.<br />

Note: You can find more information about the object classes in the CR1 Behaviors.xml file. For<br />

more information, see "Project Files" (p. 19).<br />

User Guide 23


Chapter 2: Designing a Project<br />

Search Pane<br />

When you are working with a large project it can become difficult to locate the objects that you<br />

need to complete a task. The Search pane lets you quickly find objects by applying different<br />

criteria that describe the object you want to search for. You can either search for the object name<br />

alone, or add addition criteria, such as the location, class, or a condition.<br />

Naming Conventions for Objects in a Project<br />

All objects in a project have an identifier that is used to reference them. The identifier can<br />

consist of one, two, or three parts, depending upon the type of object. The parts include<br />

• an object name, and<br />

• a location in the project hierarchy, as expressed in the default language of the project.<br />

If you want to have objects with the same name in a project, these objects need a unique<br />

identifier. To create a unique identifier for an object, you must create a namespace (p. 25).<br />

Two-part Identifiers<br />

Most of the objects in a Framework Manager project have a two-part identifier. The two-part<br />

identifier consists of the name of the containing namespace and the name of the object. The<br />

object name must be unique in the nearest containing namespace (p. 25).<br />

For example, you have a GoSales namespace that contains a query subject named Product.<br />

The Product query subject has the following name, where the square brackets and periods are<br />

the syntax Framework Manager uses for object identifiers.<br />

[Go Sales].[Product]<br />

One-part Identifiers<br />

Some objects in a project have a one-part identifier. The one-part identifier must be unique<br />

across the entire project, even if the namespace contains other namespaces. These are the<br />

objects that have a one-part identifier:<br />

• namespaces<br />

• functions<br />

• shortcuts to namespaces<br />

• shortcuts to folders<br />

Three-part Identifiers<br />

Some objects in a project have a three-part identifier. The three-part identifier is based on the<br />

identifier of the containing query subject. Each name must be unique in the containing query<br />

subject. These are the objects that have a three-part identifier:<br />

• query items<br />

• query item folders<br />

For example, you have a GoSales namespace that contains a query subject named Product,<br />

and a query item named Product Code. The Product Code query item has the following name,<br />

where the square brackets and periods are the syntax Framework Manager uses for object<br />

identifiers.<br />

[Go Sales].[Product].[Product Code]<br />

24 Cognos ReportNet (TM) Framework Manager


Chapter 2: Designing a Project<br />

Create a Namespace<br />

You create a namespace in Framework Manager if you want to have two objects that have the<br />

same name in a project. Objects in a Framework Manager project must be uniquely identifiable.<br />

If you have two objects that have the same name, they must reside in two separate<br />

namespaces.<br />

Namespaces are containers, like folders. If more than one namespace exists in a project, the<br />

object names consist of the namespace, and query subject (or folder) names. For more<br />

information, see "Naming Conventions for Objects in a Project" (p. 24).<br />

For example, you have a database that contains financial data. In the database, there is a set of<br />

tables that represent Forecast and Actual information. Both the Forecast and Actual information<br />

have tables named Accounts Payable and Accounts Receivable. In order to import these tables<br />

into Framework Manager and use the same table names in the project, you must create two<br />

namespaces. You can name one namespace Forecast, and the other namespace Actual.<br />

Note: For SAP BW metadata, shortcuts to namespaces are not supported.<br />

Steps<br />

1. Click the project or root namespace and, from the Actions menu, click Create,<br />

Namespace.<br />

2. To rename the namespace, right-click the namespace, and click Rename.<br />

Importing Metadata<br />

You can import metadata into a new project (p. 20), or an existing project. Importing metadata is<br />

an operation that can be performed many times to extend the project. You can also export your<br />

model in a Common Warehouse Metamodel (.cwm) format (p. 42).<br />

Framework Manager can use the metadata and data from external data sources to build a<br />

project.<br />

To import metadata, indicate which sources you want and where they are located. You can<br />

import metadata from<br />

• relational databases, such as Oracle, DB2, and Microsoft SQL Server<br />

• SAP BW data sources<br />

• existing Cognos ReportNet models<br />

• Architect models and Impromptu catalogs<br />

For more information about importing Architect models and Impromptu catalogs, see the<br />

ReportNet Metadata Migration User Guide on the Cognos support site<br />

(http://support.cognos.com).<br />

• third-party metadata sources<br />

• XML as a data source<br />

If you import a subset of a data source, you cannot reimport the same objects into Framework<br />

Manager. For example, if you import the query items SalesStaffCode, FirstName, and<br />

LastName, from the SalesStaff query subject and you want to re-import any objects from the<br />

SalesStaff query subject, you must do one of the following:<br />

• delete the previously imported query subject<br />

• rename the previously imported query subject<br />

• when you re-import, select the option to create unique name if a duplicate name is found.<br />

When you import relational data and a duplicate name is detected, you have the option of not<br />

importing the object, or importing and creating a unique name. The advantage of importing<br />

everything except these duplicate tables is that you can add new database objects to the<br />

project, without specifying them individually, and without going thro<strong>ug</strong>h synchronization (p. 50).<br />

To import data sources that have the same table names and keep them as the query subject<br />

names, you must import them into different namespaces (p. 25).<br />

User Guide 25


Chapter 2: Designing a Project<br />

When you import SAP BW data, Framework Manager assign a unique name to each object.<br />

Therefore, if you rename an object in the model and then re-import it, Framework Manager<br />

recognizes that it already exists. To re-import an object with a different unique name you can<br />

create a new namespace and re-import the object into this namespace.<br />

Before you can import metadata, there must be a connection to the data source (p. 31). For<br />

information about the data source types supported by Cognos, see the Cognos support site<br />

(http://support.cognos.com).<br />

If you want to add a project to a repository, you must set up the repository connection (p. 43).<br />

Relational Databases<br />

When you import from a relational database, you can import all the metadata or select the<br />

particular object types you want to import, such as tables, columns, views, synonyms, stored<br />

procedures, and functions.<br />

These database objects are mapped to the following Framework Manager objects<br />

Database Object<br />

table<br />

column<br />

view<br />

synonym<br />

procedure<br />

function<br />

Framework Manager Object<br />

query subject<br />

query item<br />

query subject<br />

query subject<br />

query subject<br />

project function<br />

Steps to Import from a Database<br />

1. Click the namespace, folder, or segment you want to import into and, from the Actions<br />

menu, click Import Metadata.<br />

2. Follow the instructions in the Import wizard.<br />

• If the data source connection you want is not listed, you must first create it (p. 31).<br />

• Select the check boxes for the objects you want to import.<br />

• When a duplicate name is detected, choose to either import and create a unique name,<br />

or do not import.<br />

If you choose to create a unique name, the imported object will appear with a number.<br />

For example, you will see QuerySubject and QuerySubject1 in your project.<br />

• If necessary, change the criteria to use to generate relationships (p. 65).<br />

3. Click Import.<br />

A list of objects that could not be imported appears along with counts of objects that were<br />

imported.<br />

4. Click Finish.<br />

After importing, you should verify usage and aggregation property values (p. 72). Fact<br />

tables can contain numeric columns that should not be aggregated, such as exchange<br />

rates.<br />

26 Cognos ReportNet (TM) Framework Manager


Chapter 2: Designing a Project<br />

SAP BW Data Source<br />

When you import from an SAP BW data source, you can import all the metadata or only import<br />

the objects you select. SAP BW objects are mapped to the following Framework Manager<br />

objects.<br />

SAP BW Object<br />

InfoQuery, InfoCube,<br />

RemoteCube,<br />

MultiCube<br />

characteristic<br />

characteristic with one<br />

or more presentation<br />

hierarchies<br />

dimension<br />

key figure<br />

presentation hierarchy<br />

level<br />

characteristic value<br />

SAP BW variable<br />

Framework Manager Object<br />

namespace<br />

dimension query subject with two query<br />

items that contain<br />

• the aggregation of all characteristic<br />

values<br />

• all characteristic values<br />

Note: By default, Framework Manager<br />

imports SAP BW Currency and Unit of<br />

Measure characteristic. You can remove<br />

these characteristics if you do not need<br />

them.<br />

folder containing a query subject for<br />

each characteristic and each of its<br />

presentation hierarchies<br />

folder containing a query subject for<br />

each characteristic in the dimension<br />

fact query subject<br />

Calculated key figures are not<br />

distinguished from other key figures.<br />

query item<br />

Note: Level names must be defined in<br />

the Administration Workbench in order<br />

to be meaningful.<br />

query item whose Usage property value<br />

is set to Attribute.<br />

data source property<br />

For information about the SAP BW<br />

variables that Framework Manager<br />

supports, see SAP BW Variables<br />

Steps to Access a Secured InfoCube<br />

1. Create an InfoQuery in BEx that accesses the InfoCube<br />

2. Create an authorization variable for each InfoObject in the underlying InfoCube for which<br />

there are authorizations.<br />

3. For each variable, ensure that the "ready for input" option is disabled.<br />

By default, this option is enabled.<br />

4. Enable the query for access thro<strong>ug</strong>h OLE DB for OLAP.<br />

5. Save the InfoQuery.<br />

6. In Framework Manager, reference the InfoQuery instead of the InfoCube.<br />

User Guide 27


Chapter 2: Designing a Project<br />

Steps to Import from an SAP BW Data Source<br />

1. Click the namespace, folder, or segment you want to import into and, from the Actions<br />

menu, click Import Metadata.<br />

2. Follow the instructions in the Import wizard.<br />

• If the data source connection you want is not listed, you must first create it (p. 31).<br />

• Select the check boxes for the objects you want to import.<br />

After they are imported, query items cannot be deleted without deleting the entire query<br />

subject.<br />

• Identify which name you want Framework Manager to display.<br />

• Indicate whether you want to create a folder for each level to further organize the<br />

imported objects.<br />

• Indicate whether you want to generate conformed dimensions.<br />

3. Click Import.<br />

A list of objects that could not be imported appears along with counts of objects that were<br />

imported.<br />

4. Click Finish.<br />

After importing, you should verify usage and aggregation property values (p. 72). Fact<br />

tables can contain numeric columns that should not be aggregated, such as exchange<br />

rates.<br />

Note: When you want to recreate an InfoQuery on another SAP BW system, use the SAP BW<br />

migration mechanism to transport the InfoQuery. This ensures that the technical name of each<br />

measure remains the same so that any project that references the InfoQuery can be directed to<br />

either system without any modifications to the project.<br />

Conformed Dimensions<br />

When you import metadata from more than one BW data source, Framework Manager lets you<br />

combine dimensions that have the same physical structure into one query subject. For the<br />

structure to match, both hierarchies must have the same levels and properties, however the<br />

order of the properties does not make a difference. By conforming dimensions, Framework<br />

Manager lets the report author create multi-cube reports without using an SAP BW<br />

MultiProvider.<br />

A conformed query subject is represented by a query subject with one or more shortcuts to that<br />

query subject. The query subject contains a list of data sources in which the dimension exists. If<br />

you want to retrieve data from a specific data source, ensure that you import the dimension from<br />

this data source before all others.<br />

After import, you can also use Framework Manager to conform dimensions within a project. For<br />

more information, see "Conform SAP BW Query Subjects" (p. 57).<br />

Note: Framework Manager does not create conformed dimensions for Time Dependent<br />

hierarchies, because the values of the two dimensions are based on the transactional data of<br />

the InfoCube.<br />

Import from a Cognos ReportNet Model<br />

You can import metadata from an existing Cognos ReportNet model.<br />

Steps<br />

1. Click the namespace, folder, or segment you want to import into and, from the Actions<br />

menu, click Import Metadata.<br />

2. Click Cognos ReportNet Model, and then click Next.<br />

3. Locate the Cognos ReportNet model (.cpf file) you want, and then click Next.<br />

28 Cognos ReportNet (TM) Framework Manager


Chapter 2: Designing a Project<br />

4. Follow the instructions in the Import wizard.<br />

• Select the check boxes for the objects you want to import.<br />

• When a duplicate name is detected, choose to either import and create a unique name,<br />

or do not import.<br />

If you choose to create a unique name, the imported object will appear with a number.<br />

For example, you would see QuerySubject and QuerySubject1 in your project.<br />

5. Click Next, and click Finish.<br />

Architect Models and Impromptu Catalogs<br />

To import metadata from an Architect model or an Impromptu catalog, you must first convert<br />

them to XML form. For more information, see the ReportNet Metadata Migration User Guide on<br />

the Cognos support site (http://support.cognos.com).<br />

Steps to Import an Architect or Impromptu XML File<br />

1. Ensure that you exported the Architect model or Impromptu catalog.<br />

For more information, see the ReportNet Metadata Migration User Guide on the Cognos<br />

support site (http://support.cognos.com).<br />

2. Click the namespace, folder, or segment you want to import into, and from the Actions<br />

menu, click Import Metadata.<br />

3. Click either Cognos Architect (.xml) or Cognos Impromptu (.xml), and click Next.<br />

4. Locate the Architect or Impromptu XML file that contains the metadata to import.<br />

A message in the XML Preview window confirms success.<br />

5. Click Next.<br />

A list of created objects appears.<br />

6. Click Finish.<br />

Third-party Metadata Sources<br />

You can use Framework Manager to import metadata from a third-party source.<br />

For information about troubleshooting third-party metadata sources, see Appendix A:<br />

Troubleshooting.<br />

Using Default Options<br />

When you import from a third-party metadata source, we recommend that you use the default<br />

options. These default options optimize the third-party metadata import. If you change the<br />

options, you may see unexpected results.<br />

Importing Third-party Metadata Sources Based on Multiple Databases<br />

Some third-party metadata sources might be based on multiple databases. The best way to<br />

import these multiple data sources into Framework Manager is to perform multiple imports. For<br />

each import, you select the items that correspond to that specific data source.<br />

For example, the first time you import from a third-party metadata source, you would select data<br />

source1 and all the items that correspond to that data source.<br />

From the project, you would import again. This time, you would select data source2 and the<br />

items that correspond to that data source. You would continue to import until you have imported<br />

all the data sources and their corresponding items.<br />

Steps to Import a Third-party Metadata Source<br />

1. Click the namespace, folder, or segment you want to import into, and from the Actions<br />

menu, click Import Metadata.<br />

2. Click the third-party data source you want to import, and then click Next.<br />

3. Click the metadata type to import, and locate the file that contains the metadata to import.<br />

4. Click Next.<br />

User Guide 29


Chapter 2: Designing a Project<br />

5. In the Third-Party Specific Import Options dialog box, click the options you want. For<br />

each option, from the available list, select a value.<br />

Tip: To accept the default options, select the Use Defaults check box.<br />

In the Option Description pane, you see a description of the options available. The options<br />

are based on the selected third-party data source. For more information, see the third-party<br />

data source vendor documentation.<br />

6. Click Next.<br />

7. In the Framework Manager Specific Import Options dialog box, click the options you<br />

want. For each option, from the available list, select a value.<br />

In the Option Description pane, you see a description of the options available. The options<br />

are based on the selected third-party data source.<br />

8. Click Next.<br />

9. Follow the instructions in the Import wizard.<br />

• From the list of available data sources, click the data source you want. If you do not<br />

have the data source you want referenced in the third-party metadata, you must create<br />

a data source connection (p. 31).<br />

• Select the check boxes for the objects you want to import.<br />

• When a duplicate name is detected, choose to either import and create a unique name,<br />

or do not import.<br />

If you choose to create a unique name, the imported object will appear with a number.<br />

For example, you would see QuerySubject and QuerySubject1 in your project.<br />

10. Click Next.<br />

A list of created objects appears.<br />

11. Click Finish.<br />

XML as a Data Source<br />

You can import XML as a tabular data source in Framework Manager. An XML data file can be<br />

consumed locally or from a remote site thro<strong>ug</strong>h a valid URL (via either file or http). You can<br />

import the XML data file into Framework Manager and use it to model metadata and create a<br />

package.<br />

The XML file will be validated and parsed at run time, when the query is processed by either<br />

Query Studio or Report Studio. If you add "VALIDATE=ON" option to the connection string,<br />

Framework Manager will partially validate the XML file within the tag that<br />

describes the metadata. If you use this option, the XML in the file will be partially validated.<br />

You must use the xmldata.xsd schema to validate the XML file. The schema is located in the<br />

\crn\bin folder. You do not need to specify the location of the schema in the XML file itself.<br />

Before you import XML as a data source, there must be a connection to the data source (p. 31).<br />

To use XML as a data source, you should understand XML, schemas, and other XML-related<br />

technology.<br />

Restrictions<br />

To use XML as a data source, ensure that you do not<br />

• use Native SQL to access data in an XML file<br />

• access Binary Large Objects (BLOB)<br />

You must ensure that<br />

• only sqlColumns() and sqlTables() metadata calls are used<br />

Other calls will return an unsupported function error<br />

• the XML file is well-formed and valid<br />

Steps to Import XML as a Data Source<br />

1. Click the namespace, folder, or segment you want to import into, and from the Actions<br />

menu, click Import Metadata.<br />

2. Click the XML data source you want to import, and then click Next.<br />

30 Cognos ReportNet (TM) Framework Manager


Chapter 2: Designing a Project<br />

Create a Data Source Connection<br />

Each data source can contain one or more physical connections to databases. The data source<br />

connection specifies the parameters needed to connect to the database, such as the location of<br />

the database and the timeout duration. A connection can include credential information and<br />

signons.<br />

Note: For SAP BW metadata, the isolation level is read-only.<br />

Multiple Data Source Connections<br />

If you have access to more than one data source connection in a data source, you will be<br />

prompted to select a data source connection when you open a Framework Manager project. You<br />

can use multiple data source connections in a single data source to facilitate the migration from<br />

one environment to another, and maintain the integrity of a project.<br />

For example, you can use multiple data source connections to work with metadata from a test<br />

data source. You create a new project, using the test data source connection for the GoSales<br />

data source. You create and modify the objects you want in the project, and you test that the<br />

project is modeled the way you want. When you close the session, and re-open the Framework<br />

Manager project, you can select the production data source connection. When you publish the<br />

package to the ReportNet server, report authors choose which data source connection they<br />

want to use in their report.<br />

When you create a data source, you also create a data source connection so that ReportNet<br />

has the connection and authentication information required to connect to the database.<br />

You can include authentication information for the database in the data source connection by<br />

creating a signon. This means that users need not enter database authentication information<br />

each time the connection is used. The authentication information is encrypted and stored on the<br />

ReportNet server. The signon produced when you create a data source is available to the<br />

Everyone group. You can later modify who can use this signon or create more signons.<br />

You can create data sources in the portal or in Framework Manager. Because they are stored on<br />

the server, data sources appear in both Framework Manager and the portal, regardless of<br />

where they were created.<br />

The ReportNet administrator can set up the data sources before any models are created in<br />

Framework Manager so that all connections are available in the Framework Manager Import<br />

wizard.<br />

Data sources are stored in the Cognos namespace and must have unique names. For example,<br />

you cannot use the same name for a data source and a group.<br />

Before creating data sources, you must have write permissions to the folder where you want to<br />

save the data source and to the Cognos namespace. You must also have execute permissions<br />

for the Administration secured function.<br />

Isolation Levels<br />

The isolation level specifies how transactions that modify the database are handled. By default,<br />

the default object gateway is used. You can select from the following isolation levels. Not all<br />

types of database support each isolation level. Some database vendors use different names for<br />

the isolation levels.<br />

User Guide 31


Chapter 2: Designing a Project<br />

In increasing order of isolation, the isolation levels are<br />

• Read uncommitted<br />

Changes made by other transactions are immediately available to a transaction.<br />

Database type<br />

Oracle<br />

DB2<br />

MS SQL Server<br />

Sybase Adaptive Server<br />

Informix<br />

Equivalent isolation level<br />

Not applicable<br />

Uncommitted read<br />

Read uncommitted<br />

Read uncommitted<br />

Dirty read<br />

• Read committed<br />

A transaction can access only rows committed by other transactions.<br />

Database type<br />

Oracle<br />

DB2<br />

MS SQL Server<br />

Sybase Adaptive Server<br />

Informix<br />

Equivalent isolation level<br />

Read committed<br />

Read stability<br />

Read committed<br />

Read committed<br />

Committed read<br />

• Cursor Stability<br />

Other transactions cannot update the row in which a transaction is positioned.<br />

Database type<br />

Oracle<br />

DB2<br />

MS SQL Server<br />

Sybase Adaptive Server<br />

Informix<br />

Equivalent isolation level<br />

Not applicable<br />

Cursor stability<br />

Not applicable<br />

Not applicable<br />

Cursor stability<br />

• Reproducible read<br />

Rows selected or updated by a transaction cannot be changed by another transaction until<br />

the transaction is complete.<br />

Database type<br />

Oracle<br />

DB2<br />

MS SQL Server<br />

Equivalent isolation level<br />

Not applicable<br />

Execute the statement, "SET<br />

TRANSACTION READ ONLY,"<br />

prior to starting a transaction<br />

Repeatable read<br />

Repeatable read<br />

32 Cognos ReportNet (TM) Framework Manager


Chapter 2: Designing a Project<br />

Database type<br />

Sybase Adaptive Server<br />

Informix<br />

Equivalent isolation level<br />

Repeatable read<br />

Repeatable read<br />

• Phantom protection<br />

A transaction cannot access rows inserted or deleted since the start of the transaction.<br />

Database type<br />

Oracle<br />

DB2<br />

MS SQL Server<br />

Sybase Adaptive Server<br />

Informix<br />

Equivalent isolation level<br />

Not applicable<br />

Not applicable<br />

Not applicable<br />

Not applicable<br />

Not applicable<br />

• Serializable<br />

A set of transactions executed concurrently produces the same result as if they were<br />

performed sequentially.<br />

Database Type<br />

Oracle<br />

DB2<br />

MS SQL Serve<br />

Sybase Adaptive Server<br />

Informix<br />

Equivalent isolation level<br />

Serializable<br />

Not applicable<br />

Serializable<br />

Serializable<br />

Not applicable<br />

XML Data Sources<br />

If you create an XML data source, you must use XML as the type of connection and specify the<br />

location of the XML document in the connection string.<br />

You can specify the connection string for an XML data source as<br />

• an HTTP URL that identifies the content store required to connect to the XML document,<br />

such as<br />

HTTP://xmltestserver.cognos.com/XML/country.xml<br />

• a file path, such as<br />

file:///C:/XML/country.xml<br />

• a local file, such as<br />

C:\XML\country.xml;VALIDATE=ON<br />

To access a local file, use a file path that uses platform-specific syntax.<br />

To use an HTTP URL, ensure that you create a Web alias for the directory that contains the XML<br />

file and that you enable directory browsing.<br />

To test an XML connection string, you must type the following code at the end of the string<br />

;VALIDATE=ON<br />

The text of this code is not case sensitive.<br />

User Guide 33


Chapter 2: Designing a Project<br />

ODBC Data Sources in a UNIX Environment<br />

Because ReportNet on UNIX does not support all ODBC drivers, when you create data source<br />

connections to IBM Red Brick, Microsoft SQL Server, or NCR Teradata databases, you cannot<br />

select ODBC as the type of data source connection. To create an ODBC connection to these<br />

database vendors, use the Other type instead.<br />

For the following database vendors, add the associated database codes when you type the<br />

connection string.<br />

Database vendor<br />

IBM Red Brick<br />

Microsoft SQL Server<br />

NCR Teradata<br />

Database code<br />

RB<br />

SS<br />

TD<br />

Type the data source connection using the following syntax:<br />

[^UserID:[^?Password:]];LOCAL;{RB|SS|TD};DSN=Data_Source[;<br />

UID=%s[;PWD=%s]][@ASYNC={0|1}][@Connection_Timeout/Reply_Timeout][@COLSEQ<br />

=[Collation_Sequence]]<br />

The following are examples of connection strings:<br />

• ^UserID:^?Password:;LOCAL;RB;DSN=DB62SALES;UID=%s;PWD=%s@ASYNC=0<br />

• ;LOCAL;SS;DSN=TESTSERVER<br />

To create data source connections to Microsoft SQL Server from UNIX, you must use the<br />

DataDirect ODBC driver for SQL Server.<br />

For information about parameterized XML connection strings, see Parameterized XML<br />

Connection Strings.<br />

Steps<br />

1. If you are not already using the Import wizard, click namespace, folder, or segment that you<br />

want to import into, and click Actions, Import Metadata.<br />

2. In the Select Data Source window, click New.<br />

3. In the name and description page, type a unique name for the data source and, if you want,<br />

a description and screen tip. Select the folder where you want to save it, and then click Next.<br />

4. In the connection page, click the type of database to which you want to connect, select an<br />

isolation level, and then click Next.<br />

The connection string page for the selected database appears.<br />

5. Specify any parameters that make up the database connection string, specify the timeout,<br />

and select whether to create a signon.<br />

Tip: To test whether parameters are correct, click Test. If prompted, type a user ID and<br />

password or select a signon, and then click OK.<br />

6. Click Finish.<br />

The data source appears as an entry in the Directory tool in the portal and appears in the Import<br />

wizard in Framework Manager.<br />

Notes: If you created a signon, you can now modify the properties of the signon or add more<br />

signons. You can also add more data source connections. For more information, see the<br />

Administration and Security Guide.<br />

Steps to Test a Data Source Connection<br />

1. In the Data Sources folder, right-click the data source you want to test.<br />

2. Click Test Data Source.<br />

A message tells you if test is successful.<br />

34 Cognos ReportNet (TM) Framework Manager


Chapter 2: Designing a Project<br />

Parameterized XML Connection Strings<br />

In an HTTP URL connection string for an XML data source, you can use parameters to send<br />

additional information. In the parameter component of a connection string, you can embed a<br />

prompt definition string. If the prompt definition is specified in the report, that value will be used.<br />

If the prompt definition is not specified in the report, then a user is prompted to supply a value.<br />

A URL has 6 components: addressing scheme, network location, path, parameters, query, and<br />

fragment identifier.<br />

An example of a URL components is<br />

:///;?#<br />

To send additional information with a parameter, you must encode the parameter component<br />

with two sets question marks, and embed the prompt definition string between the question<br />

mark sets. A prompt cannot cross a component boundary.<br />

An example of a parameterized XML string is<br />

http://MyNetworkLocation/MyPath/myxml.asp?countrysid=??CanadaPrompt??<br />

Restrictions<br />

• When a URL component is a prompt it can not contain other data.<br />

• Prompting will not be supported for other types of connection strings<br />

Limitations<br />

• Prompts embedded in XML connection strings do not work in Framework Manager. You can<br />

not import data from a parameterized xml connection string.<br />

• When you set up a parameterized XML connection string in Cognos Connection, the Test<br />

button will not work.<br />

• Validation of the query specification in Report Studio will not work if you are connected to a<br />

parameterized XML connection string.<br />

Using a Project with Multiple Data Sets<br />

You may have to use the same model and reports with different sets of actual data. The data<br />

sets may be different databases, accounts, or schemas within a single database. You may<br />

encounter multiple data sets<br />

• when you use a different data set than the production users<br />

• in large enterprises, where each division has it own data set<br />

• in OEM applications, which have no direct control over customer data<br />

The tables and columns used by the project must be logically the same across all data sets. You<br />

must also ensure that the correct data set is identified in each case.<br />

Data sources in Framework Manager contain information that identify the location of any data<br />

source tables needed for the query subjects that use those tables. This information is the<br />

mandatory name of the data source in the content store, as well as the optional catalog and<br />

schema names. You must ensure that the catalog and schema names use the desired data set.<br />

If different ReportNet content stores are in use, and a different version of the project is deployed<br />

to each content store, then you can specify the data source information in the project for each<br />

site. If you only have one content store, you can publish each specific project as a separate<br />

package. These approaches require a lot of manual maintenance. To reduce this level of<br />

maintenance, you can use one of the following options.<br />

Determining the Data Source Information<br />

The simplest approach is to decide the name of the data source in the ReportNet content store,<br />

the name of the catalog, if applicable, and the name of the schema in the database. Once these<br />

names are decided, you can use those names in all the data sets.<br />

User Guide 35


Chapter 2: Designing a Project<br />

If some data sets use the same content store, then create a separate connection for each data<br />

set under a single content store data source. For more information, see the Administration and<br />

Security Guide. For information about how Framework Manager handles multiple connections,<br />

see the Framework Manager User Guide.<br />

Since the data source name in the content store can differ from the name of the customer<br />

database, this option offers a lot of flexibility. However, this approach still requires that the<br />

catalog and schema names be identical across all data sets. Even if all the data sets use the<br />

same database type, this may be difficult to ensure. If different database types are involved, it<br />

may be impossible. For example, SQL Server has a catalog level, but Oracle doesn’t.<br />

Using User-based Default Data Set Identification<br />

Each database user has access to a default schema and catalog, if applicable. If the schema<br />

and catalog are not defined, or if they are blank in the Framework Manager project data source,<br />

the default is used. As in the option above, this option may be combined with multiple<br />

connections to allow different users to use different databases for the same ReportNet data<br />

source.<br />

However, when you edit a query subject, Framework Manager uses the catalog and schema<br />

names in the project’s data sources to match them to items that are dragged into the SQL<br />

windows from the data source tree. For this reason, the catalog and schema names cannot be<br />

blank in the project data source while you are modeling.<br />

Therefore, you must use a macro expression in the catalog and schema of each data source in<br />

the project. This ensures that the catalog or schema names are blank at runtime, but explicitly<br />

sets the desired catalog or schema while modeling.<br />

Steps<br />

1. Create a single session parameter whose value identifies whether you are in design-time<br />

mode. When you are in design mode, set the value of this session parameter to a specific<br />

value. For example, use design. Otherwise, leave the value empty.<br />

Notes:<br />

• If you use a project value, you must set it each time you open the model for editing.<br />

• If you use an override value, you must set it each time you open the model for editing.<br />

2. For each catalog and schema in each project data source, create a parameter map that<br />

contains<br />

• an empty default value<br />

• a key whose name is the design value of the session parameter above, for example<br />

design, and whose value is the name of the design-time catalog or schema for that<br />

data source.<br />

3. Select the data source, and replace the catalog and schema property values with a macro<br />

that uses the corresponding parameter map and session parameter. For example, use<br />

#$DBSchemaName ($DeployOrDesign) #<br />

36 Cognos ReportNet (TM) Framework Manager


Chapter 2: Designing a Project<br />

Modeling with Multilingual Data Sources<br />

To enable a project to work with multiple languages, you must set up data sources to support<br />

multiple languages.<br />

Multilingual Relational Data Sources<br />

For relational data bases, you can support multiple languages by using one or more of the<br />

following:<br />

• Language-specific database tables<br />

The database should contain the same tables for each supported language. For example, if<br />

the Product table supports English, French, and German, the database has tables named<br />

Product_en, Product_fr, and Product_de.<br />

• Language-specific columns<br />

A database table should contain the same column for each supported language. For<br />

example, if the Product table supports English, French, and German, the table has columns<br />

for ProductName_en, ProductName_fr, and ProductName_de.<br />

• Language-specific rows<br />

A database table should contain an additional column to identify the language of each row<br />

of data. For example, if the Product table supports English, French, and German, the table<br />

has a new column named LANG that identifies the language of each row.<br />

These solutions can make the multilingual data bases large and difficult to manage.<br />

You can model a single relational query subject to represent all possible data source languages<br />

by using parameter maps and session parameters in the query subject definition. For more<br />

information, see "Using a Macro" (p. 81) and "Multilingual Support" (p. 85).<br />

Multilingual Relational Data Sources<br />

For SAP BW metadata, you do not need to use parameters to support mulitlingual reporting,<br />

since SAP BW automatically provides data in the language that matches the logon settings for<br />

the current user. If there is no metadata for the current user’s language, Framework Manager<br />

retrieves data in the default language.<br />

Modeling with SAP BW Data Sources<br />

SAP BW Variables<br />

In Framework Manager, each dimension is assigned one hierarchy. If there are multiple<br />

hierarchies, the first hierarchy that is imported becomes the default characteristic and the others<br />

become presentation hierarchies. Level names in Framework Manager are only meaningful<br />

when they have been defined in the administrator workbench.<br />

SAP BW variable information is included in a single composite custom property called SAP BW<br />

Variables that only exists if a data source has one or more variables associated with it. The SAP<br />

BW Variables property contains one or more composite properties each of which must be<br />

assigned a unique name. Each property represents a description of a single SAP BW variable.<br />

Framework Manager supports three types of SAP BW variables: characteristic, formula, and<br />

hierarchy.<br />

Characteristic Variables<br />

There are two kinds of characteristic variables: characteristic value and hierarchy node.<br />

Characteristic value variables select characteristic values. Meanwhile, hierarchy nodes select<br />

values from any position in a presentation hierarchy.<br />

Formula Variables<br />

Formula variables accept typed-in numeric values. Formula variables are used when you want a<br />

formula component be entered during query execution. For example, you can use a formula<br />

variable for value-added tax (sales tax) rate to process the respective current tax rate when<br />

executing a query. You can change the default value for a formula variable and fix the value of<br />

the variable.<br />

User Guide 37


Chapter 2: Designing a Project<br />

Hierarchy Variables<br />

Variables for hierarchies function as place holders for the hierarchy of a characteristic. All of the<br />

values for hierarchy variables are read-only.<br />

The SAP BW variable information is obtained using the SAP BW BAPI<br />

MDDataProviderBW::GetVariables. The following is a list of properties and their SAP BW<br />

equivalents.<br />

• name<br />

Possible Values<br />

String value<br />

SAP BW Value<br />

VARIABLE_NAME<br />

Property is Read only.<br />

• fixedValue (Not applicable to hierarchy variables.)<br />

Possible Values<br />

Boolean<br />

Determines whether or not the value of the variable can be changed. If true, report authors<br />

will not be prompted for the associated variable and the default value will always be applied.<br />

Default value is false.<br />

• type<br />

Possible Values<br />

numeric<br />

characteristic<br />

hierarchy<br />

hierarchicalNode<br />

Property is Read only.<br />

38 Cognos ReportNet (TM) Framework Manager


Chapter 2: Designing a Project<br />

• caption<br />

Possible Values<br />

String value<br />

(composite,<br />

locale-dependent)<br />

The string value for this variable is locale-dependent. Each locale in the model should be<br />

represented by a custom property whose value is the locale name.<br />

For example, if the locales "en-ca" and "fr-fr" exist in the model, you would define two<br />

custom properties called "en-ca" and "fr-fr" .<br />

• selectionType<br />

The values and their corresponding SAP BW equivalents are<br />

Value<br />

value<br />

interval<br />

complex<br />

SAP BW Value<br />

SAP_VAR_SEL_TYPE_VALUE<br />

SAP_VAR_SEL_TYPE_INTERVAL<br />

SAP_VAR_SEL_TYPE_COMPLEX<br />

Property is Read only.<br />

• entryType<br />

The values and their corresponding SAP BW equivalents are<br />

Value<br />

optional<br />

mandatory<br />

SAP BW Value<br />

SAP_VAR_INPUT_TYPE_OPTIONAL<br />

SAP_VAR_INPUT_TYPE_MANDATORY<br />

mandatoryNoInitial SAP_VAR_INPUT_TYPE_MANDATORY_N<br />

OT_INITIAL<br />

Property is Read only.<br />

User Guide 39


Chapter 2: Designing a Project<br />

• dataType<br />

The values and their corresponding SAP BW equivalents are<br />

Value<br />

xsdString<br />

xsdDate<br />

xsdFloat<br />

SAP BW Value<br />

CHAR<br />

CHAR<br />

Note: The VAR_TYPE value is<br />

SAP_VAR_TYPE_MEMBER and reference<br />

dimension is based on 0CALDAY.<br />

FLTP<br />

Default value is xsdString.<br />

Property is Read only and hidden.<br />

• dimension (Only applies to characteristic variables.)<br />

Possible Values<br />

String value<br />

SAP BW Value<br />

REFERENCE_DIMENSION<br />

Property is Read only and hidden.<br />

• hierarchy (Only applies to characteristic variables.)<br />

Possible Values<br />

String value<br />

SAP BW Value<br />

REFERENCE_HIERARCHY<br />

Property is Read only and hidden.<br />

• defaultLow<br />

Possible Values<br />

Specifies a range of<br />

values.<br />

40 Cognos ReportNet (TM) Framework Manager


Chapter 2: Designing a Project<br />

• defaultLowCaption<br />

Possible Values<br />

String value<br />

(composite,<br />

locale-dependent)<br />

The string value for this variable is locale-dependent. Each locale in the model should be<br />

represented by a custom property whose value is the locale name.<br />

For example, if the locales "en-ca" and "fr-fr" exist in the model, you would define two<br />

custom properties called "en-ca" and "fr-fr" .<br />

• defaultHigh<br />

Possible Values<br />

Specifies a range of<br />

values.<br />

Note: Only applicable to variables with a selection type of interval.<br />

• defaultHighCaption<br />

Possible Values<br />

String value<br />

(composite,<br />

locale-dependent)<br />

The string value for this variable is locale-dependent. Each locale in the model should be<br />

represented by a custom property whose value is the locale name.<br />

For example, if the locales "en-ca" and "fr-fr" exist in the model, you would define two<br />

custom properties called "en-ca" and "fr-fr" .<br />

Note: Only applicable to variables with a selection type of interval.<br />

User Guide 41


Chapter 2: Designing a Project<br />

• promptType<br />

The values are<br />

Value<br />

typeIn<br />

pickList<br />

calendar<br />

hierarchyPickList<br />

notApplicable<br />

Restrictions<br />

Always for numeric variables.<br />

Optional for characteristic<br />

values.<br />

Optional for characteristic<br />

variables.<br />

Only for characteristic<br />

variables based on 0CALDAY<br />

Optional for all presentation<br />

hierarchies.<br />

Always for hierarchy variables.<br />

Property is read-only for characteristic and formula variables.<br />

• trimLevels (Only applicable to hierarchicalNode variables.)<br />

Possible Values<br />

Numeric<br />

Restrictions<br />

Requires promptType<br />

of hierarchyPickList.<br />

Default value is 1.<br />

Export Metadata<br />

You can export your Framework Manager model as a Common Warehouse Metamodel (.cwm)<br />

file. CWM is used for exchanging metadata between different data warehouse tools and<br />

repositories. Each instance of the CWM metamodel is exchanged via XMI (.xml metadata<br />

interchange) documents.<br />

You can export query subjects, query items, folders, namespaces, expressions and functions.<br />

When you export to CWM, we recommend that you use the default options. These default<br />

options optimize the metadata export. If you change the options, you may see unexpected<br />

results.<br />

Steps<br />

1. Right-click the root namespace of the metadata you want to export, and click Export Model.<br />

You are prompted to save the project.<br />

2. Click Yes to save the project, otherwise click No.<br />

3. Locate a file to use as the target and click Next.<br />

For example, GoSales_cwm.xml<br />

4. In the Framework Manager Specific Export Options dialog box, click the options you<br />

want. For each option, from the available list, select a value.<br />

In the Option Description pane, you see a description of the options available. The options<br />

are based on the selected third-party data source.<br />

5. Click Next.<br />

42 Cognos ReportNet (TM) Framework Manager


Chapter 2: Designing a Project<br />

6. In the Third-Party Specific Import Options dialog box, click the options you want. For<br />

each option, from the available list, select a value.<br />

Tip: To accept the default options, select the Use Defaults check box.<br />

In the Option Description pane, you see a description of the options available. The options<br />

are based on the selected third-party data source. For more information, see the third-party<br />

data source vendor documentation.<br />

7. Click Next.<br />

The input validation results from the export process appear.<br />

8. Click Next and click Finish.<br />

Managing Projects<br />

Repository Control<br />

You can manage your projects in Framework Manager using repository control (p. 43),<br />

segmenting (p. 46), and linking (p. 47). These project management features help maintain<br />

version control, organize a project according to business rules and organizational needs, set<br />

runtime processing options, and allow other users to access sections of the project.<br />

You can also identify the vendor specific functions (p. 48) that you want to use for each data<br />

source you imported into your project.<br />

Use repository control to help manage your projects in Framework Manager. You control<br />

versions of a project to ensure that each version of a file is recoverable. Repository control also<br />

ensures that users in a large organization have access to the most recent changes or versions<br />

of a project or segment. You can use Framework Manager to<br />

• connect to a Visual SourceSafe (VSS) or Concurrent Version System (CVS) repository<br />

• check in and check out a project<br />

• get the latest version of a project<br />

• view project history<br />

Note: The limitations set by the third-party repositories are incorporated into Framework<br />

Manager. For more information, see the third-party data source vendor documentation.<br />

Create a Repository Connection<br />

You can use one of these repositories to manage file versions for Framework Manager:<br />

• Concurrent Versions System (CVS)<br />

• Visual SourceSafe (VSS)<br />

If you use Visual SourceSafe as your repository, we recommend that you connect to Visual<br />

SourceSafe using your Windows user name and password. To do so, in Visual SourceSafe<br />

Administrator, create a user that has the same credentials as your Windows account. Then,<br />

from the Tools menu, click Options, and on the General tab, select the Use network name for<br />

automatic user log in check box.<br />

When you open a project stored in Visual SourceSafe, you automatically log on using your<br />

Windows user name and password.<br />

For more information about installing and configuring these products, see the documentation<br />

provided by the vendors.<br />

In Framework Manager, you can add a project, segment, link or namespace to one of the<br />

supported repositories.<br />

You can view an up-to-date version list of repositories supported by Cognos products on the<br />

Cognos support site (http://support.cognos.com). For more information about installing and<br />

configuring these repositories, see the documentation provided by the vendor.<br />

You must set up the path to the Source Control System in Cognos Configuration, before you<br />

create a repository connection in Framework Manager. For more information, see the Cognos<br />

Configuration User Guide.<br />

User Guide 43


Chapter 2: Designing a Project<br />

Steps to Create a VSS Database<br />

1. Start Visual SourceSafe Administrator.<br />

2. From the Tools menu, click Create Database.<br />

3. Specify where you want to create the database.<br />

4. Select the New 6.0 Database Format check box, and click OK.<br />

5. From the Users menu, click Open SourceSafe Database.<br />

6. Locate the srcsafe.ini file, and click Open.<br />

7. Click the database you just created, and click Open.<br />

A list of the users assigned to the database appears.<br />

8. Close Visual SourceSafe Administrator.<br />

9. Open the srcsafe.ini file, and type the following command at the end of the file:<br />

Update_No_Change=Update<br />

This command ensures the project is updated each time there is a check in.<br />

10. From the File menu, click Save, and click Exit.<br />

Steps to Create a VSS Repository Connection<br />

1. Create a Visual SourceSafe (VSS) database (p. 44).<br />

2. Start Framework Manager and, from the Welcome page, click Repository, Connection<br />

Manager.<br />

Tip: If you have Framework Manager open, from the Repository menu, click Connection<br />

Manager.<br />

3. Click the New button.<br />

4. In the Connection Name box, type a name for the connection.<br />

5. From the Type list, click SourceSafe://.<br />

6. In the Settings window, click in the Value pane, and type<br />

• the location of the srcsafe.ini file<br />

7. To test the connection, click Test.<br />

8. Click OK.<br />

Steps to Configure a CVS Repository<br />

1. Copy the CVS executable file to the \crn\bin directory.<br />

2. Create a directory for the CVS repository.<br />

An example is C:\cvs_repository.<br />

3. Create a subdirectory named CVSROOT.<br />

An example is C:\cvs_repository\CVSROOT.<br />

Steps to Create a CVS Repository Connection<br />

1. Start Framework Manager and, from the Welcome page, click Repository, Connection<br />

Manager.<br />

Tip: If you have Framework Manager open, from the Repository menu, click Connection<br />

Manager.<br />

2. Click the New button.<br />

3. In the Connection Name box, type a name for the connection.<br />

4. From the Type list, click SCCS://.<br />

5. In the Settings window, click in the Value pane, and type the path for the repository.<br />

Do not specify the CVSROOT in the path. The repository location must be different from the<br />

location where the new project is stored.<br />

An example is C:\cvs_repository.<br />

6. To test the connection, click Test.<br />

44 Cognos ReportNet (TM) Framework Manager


Chapter 2: Designing a Project<br />

7. Click OK.<br />

Check In and Check Out a Project<br />

Get the Latest Version<br />

You can also check your project in and out of one of the supported repositories.<br />

You must first<br />

• set up the Source Control System in Cognos Configuration.<br />

For more information, see the Cognos Configuration User Guide.<br />

• create a repository connection (p. 43)<br />

• either create a new project, or open an existing project (p. 20), and add the project to a<br />

repository<br />

• open an existing project that is connected to a repository. (p. 20)<br />

For information about installing and configuring third-party repositories, see the documentation<br />

provided by the vendors.<br />

If you have a project checked in to a repository and you make a change, you will be notified that<br />

you must check out the project or segment before you can make the change.<br />

Steps to Check In a Project<br />

1. In Framework Manager, in the Project Viewer, click the project or segment you want to<br />

check in.<br />

2. From the Repository menu, click Check In.<br />

Tip: To keep your project or segment checked out, select the Keep Checked Out check<br />

box.<br />

3. You must add a description in the Description box.<br />

4. Click OK.<br />

Steps to Check Out a Project<br />

1. In Framework Manager, in the Project Viewer, click the project or segment you want to<br />

check out.<br />

2. From the Repository menu, click Check Out.<br />

The icon of the project or segment reflects that the object is checked out.<br />

Steps to Undo Check Out<br />

1. Click the namespace or segment for which you want to undo the check out, and from the<br />

Repository menu, click Undo Check Out.<br />

A message warning about overwriting any edits made to the project appears.<br />

2. Click OK.<br />

When you use repository control in Framework Manager, you retrieve the most recent version of<br />

the project (.cpf), model.xml, and customdata.xml files. For more information, see "The Project<br />

Page" (p. 21).<br />

When you see an exclamation mark icon next to project or segment, it is an indication that the<br />

segment has been updated. On a regular basis, refresh the project or segment by using the<br />

refresh button (F5). If the project you are working in is checked out, you must first check in all<br />

projects and segments, in order to get the latest version.<br />

Steps<br />

1. Click the project or segment you want.<br />

2. From the Repository menu, click Get Latest Version.<br />

3. Click OK.<br />

User Guide 45


Chapter 2: Designing a Project<br />

View History<br />

Every project or segment that is connected to a repository has a detailed record of its history.<br />

You can see version information, comments, and details about the history of the project.<br />

The revision history of a project or segment is logged in the Repository.xml file. This file is<br />

located in the project folder. Each time you check a project in, a label is added to the<br />

Repository.xml file.<br />

You can also return the project or segment to a previous version. Any changes or edits made to<br />

the project since the last check in are lost.<br />

If you have links in your project or segment, you can view the history of those linked segments or<br />

projects and see what changes have been made. You will be able to synchronize to those<br />

changes only if the project you are in owns the link (p. 49).<br />

Steps<br />

Create a Segment<br />

1. Click the object you want to view, and click Repository, View History.<br />

2. To synchronize the object to a previous version, click the row of the version you want, and<br />

click Synch.<br />

3. Click Close.<br />

You can create a segment so that you can<br />

• organize a project according to business rules and organizational requirements<br />

• share and reuse project information<br />

When you segment a project, it is also a good idea to divide your project into business units. For<br />

example, human resources, sales, and finance.<br />

When you create a segment, you create a new project in a new folder, complete with its own<br />

associated project files (p. 19).<br />

You divide a project either at the folder or namespace level. By dividing the project, you can<br />

organize the project according to business needs. For example, you have a project named<br />

GoSales. You can create two folders, one named Products and the other named Orders. You<br />

can divide the GoSales project at the Products folder and at the Orders folder.<br />

You can also link the segments to other projects that contain the same information to maintain<br />

consistency and reuse information. For example, the project Inventory contains the folder<br />

Products. You can create a link from GoSales Products to Inventory Products. If any changes or<br />

additions are made to the Inventory Products folder, they will be reflected in the GoSales<br />

Products folder.<br />

Best Practices<br />

When you work with a main project and segments in the main project, there are things you may<br />

want to consider. If you<br />

• create a master project that contains segments, and the master project is connected to a<br />

repository, any new segments created are automatically added to the repository.<br />

• have a project or segment checked in to a repository and you make a change, you will be<br />

notified that you must check out the project or segment before you can make the change.<br />

• make changes in a segment, you will be notified in the main project that changes have been<br />

made in the main project.<br />

Avoid making changes in both the segment and the main project.<br />

For information about opening a segment, see "Create or Open a Project" (p. 20).<br />

Steps<br />

1. Click the folder or namespace you want to divide, and from the Actions menu, click Create<br />

Segment.<br />

2. In the Name box, type a name for the new segment.<br />

46 Cognos ReportNet (TM) Framework Manager


Chapter 2: Designing a Project<br />

3. Make any additional changes you want.<br />

These optional changes are available only to folders or namespaces that are not connected<br />

to a repository.<br />

Goal<br />

Change the default location<br />

Add the segment to a source<br />

control repository<br />

Action<br />

Click the folder button next to<br />

the Location box. In the Select<br />

Project Location dialog box,<br />

go to the appropriate folder and<br />

click OK.<br />

Click the Repository button. In<br />

the Repository Settings pane,<br />

select the Add to Repository<br />

check box. In the Connection<br />

list, choose either to use an<br />

existing connection, or<br />

configure a new repository<br />

connection (p. 43).<br />

Create a Link<br />

4. Click OK.<br />

A link is a shortcut to an existing project, folder, or namespace. You create links to help organize<br />

work across large projects, to maintain consistency, and reuse information.<br />

For example, the project Inventory contains the folder Products. You can create a link from the<br />

GoSales Products to Inventory Products. If any changes or additions are made to the Inventory<br />

Products folder, they will be reflected in the GoSales Products folder.<br />

You must create the project, folder, or namespace, before you can link to it. You can create links<br />

only to<br />

• folders (p. 89)<br />

• namespaces (p. 25)<br />

• projects or segments (p. 46)<br />

Links are defined in the .cpf file of the project that owns them. For example, you have a project.<br />

and you have a link from the main project to the segment. The main project owns the link<br />

between the main project and the segment. You can find that link in the main project’s .cpf file<br />

(p. 19).<br />

If you link to a namespace and a new data source is added to that namespace, you must add a<br />

link to that new data source as well. Framework Manager does not automatically update new<br />

data sources added to a namespace.<br />

The projects you link must have the same languages defined and the same design language.<br />

Steps<br />

1. In the Project Viewer, click the object you want to link.<br />

Tip: You can create links only to folders, namespaces, and projects.<br />

2. From the Actions menu, click Link Segment.<br />

3. Locate the .cpf file of the segment, folder, or namespace, and click Open.<br />

4. If you want to add the link to a repository, click the Repository button.<br />

For more information, see "Create a Repository Connection" (p. 43).<br />

5. Click the segment you want to link and click Add or, to add a link to another project, click<br />

Add Project.<br />

6. Click OK.<br />

A new folder appears in the Project Viewer.<br />

User Guide 47


Chapter 2: Designing a Project<br />

Functions<br />

The Expression Editor provides a list of functions that you can select to create an expression.<br />

This list includes:<br />

• common SQL99 functions<br />

• vendor specific functions<br />

• functions imported from a data source<br />

When you import metadata into Framework Manager, you import the functions from the<br />

metadata source. Functions that you import from a data source are namespace specific. These<br />

functions are displayed in a folder whose name matches the namespace. This folder is located<br />

at the bottom of the list of folders in Expression Editor.<br />

Define Function Sets<br />

A collection of vendor specific database functions is called a function set. When you create a<br />

project that contains relational metadata, the Expression Editor lists the function sets for all<br />

available vendors. However, you can restrict the function sets so that it lists only the vendors that<br />

you want to use in your project. You customize the function set by identifying the specific vendor<br />

for each data source defined in the project.<br />

Note: When you create a project that contains SAP BW metadata, Framework Manager<br />

automatically only lists the functions that apply to SAP BW data.<br />

Steps<br />

1. Click Project, Project Function List.<br />

2. Select Set function list based on the data source type.<br />

Tip: To disable this filter, select Include all function sets.<br />

3. In Function set, click the appropriate data source row.<br />

4. Select the function set you want to use with this data source.<br />

5. Repeat steps 2 and 3 until finished.<br />

6. Click OK.<br />

For information about how to specify which function sets are included in individual packages,<br />

see "Create or Modify a Package" (p. 97)<br />

Choose the Type of Query Processing<br />

For relational metadata, you can select the type of query processing you want to improve<br />

performance.<br />

There are two types of query processing:<br />

• limited local<br />

Limited local query processing means that the database server does as much of the SQL<br />

processing and execution as possible. However, some reports or report sections use local<br />

SQL processing.<br />

• database only<br />

Database only query processing means that the database server does all the SQL<br />

processing and execution. An error appears if any reports or report sections require local<br />

SQL processing.<br />

While the database server can usually execute the SQL and can run reports much faster, local<br />

processing is sometimes necessary. For example, choose limited local processing if you want to<br />

create cross database join or if you want report authors to use unsupported SQL99 functions.<br />

Steps<br />

1. In the Project Viewer, click the data source you want to change.<br />

2. In the Properties pane, from the Query Processing list, click either Limited Local or<br />

Database Only.<br />

48 Cognos ReportNet (TM) Framework Manager


Multiuser Modeling<br />

Chapter 2: Designing a Project<br />

Multiuser modeling is the ability to support multiple users accessing an application<br />

simultaneously. Framework Manager supports multiuser modeling with<br />

• segmented projects (p. 46)<br />

Projects can be divided into segments so that different users can look at different parts of<br />

the same project at the same time. When you create a segment, you create a new project in<br />

a new folder, complete with its own associated project files (p. 19).<br />

• links (p. 47)<br />

Links are created between projects so that different users can refer to a project at the same<br />

time as another user is working on it.<br />

• repository control (p. 43)<br />

You can use repository control to help manage your projects in Framework Manager across<br />

multiple modelers.<br />

Segmenting and Linking Best Practices<br />

You can use Framework Manager to create and link segments, projects, and folders to use in a<br />

multiuser modeling environment. There are some best practices for using these features to<br />

minimize complexity and ensure stability in a multiuser modeling environment.<br />

Note: You can use synchronizing and action logging to revert to earlier versions of the main<br />

project or a segment (p. 50).<br />

When you segment a project, it is also a good idea to divide your project into discrete<br />

submodels, where each submodel can stand on its own or represents a relatively self-contained<br />

part of the project. For example, human resources, sales, and finance.<br />

We recommend that you link to relatively static segments and check the integrity of your project<br />

(p. 90) on a regular basis.<br />

When you set up your multiuser modeling environment, for best practices, ensure the following:<br />

❑ the namespace in the main project and any links in the project to folders have the same<br />

identifier (p. 25)<br />

For example, you have a main project and a link in the project to a folder. The folder you link<br />

to must exist in a namespace that has the same name as the main project. If the identifier in<br />

the main project and that of the linked folder are not the same, any relationships, shortcuts,<br />

or expressions that reference objects in the link, from the main project, may not work.<br />

❑ all objects in a project have unique identifiers<br />

For example, you have a main project that contains a query subject named NewQS, and a<br />

segment in the project. You open the segment, add a new query subject (p. 53) named<br />

NewQS, and save the segment. When you open the main project, an error occurs because<br />

a query subject named NewQS already exists in the main project.<br />

❑ you update any references in both the main project and any segments in the project<br />

For example, you have a main project and a segment in the project. In the main project, you<br />

have a relationship (p. 65) named qs1_qs2 that exists between query subject1 and query<br />

subject2. The query subject named query subject 2 is in the segment. You open the<br />

segment, rename query subject2 to query subject3, and save the segment. When you open<br />

the main project, an error occurs because the relationship qs1_qs2 is broken. In Framework<br />

Manager, any object that relies on a reference, for example, shortcuts, model query<br />

subjects, and expressions, also would be affected. For more information, see "Check a<br />

Project" (p. 90).<br />

❑ the main project and any segments in the project have the same languages<br />

For example, you have a main project and a segment in the project.<br />

In the segment, you have defined the languages (p. 85) English and French. You open the<br />

main model, add the language Chinese, and save the segment. When you open the<br />

segment, an error occurs because the language Chinese is not defined in the segment.<br />

User Guide 49


Chapter 2: Designing a Project<br />

Action Logging<br />

In Framework Manager, you can capture, view, and play back actions performed on the project.<br />

Each sequence of actions that you perform in Framework Manager is considered a transaction.<br />

Each transaction is recorded in the project or segment action log file.<br />

The action log file is an XML file that is designated by the project or segment name, date, and<br />

time. The log file is stored in the project or segment logs folder.<br />

You can simply view a log file or play it back entirely to ensure project integrity. You can choose<br />

to play back individual transactions or a combination of transactions in a log file. You can also<br />

save individual transactions to a separate log file.<br />

For example, you make changes to a project in a test environment. When it is time to move the<br />

project to production, you can play back every action, or series of actions, that you performed in<br />

the project in the test environment to create an identical project in the production environment.<br />

Synchronize Projects<br />

You can use Framework Manager log files to synchronize changes<br />

• made in the metadata source to a project<br />

• between multiple versions of the same model.<br />

When you synchronize your project, you create a new project by replaying, from the log files, all<br />

the actions you made in the original project starting from its initial creation. You can choose to<br />

accept the new changes, and create a new project, or return to the original project. If you accept<br />

the new changes, the original project is deleted.<br />

You cannot synchronize the projects again until additional changes are made and logged. After<br />

you save and close a project file, these changes are added to the log file.<br />

Because every action that you made in your project is rerun, synchronization may take a long<br />

time.<br />

Synchronization can be run only on the master project or a stand-alone segment. You cannot<br />

synchronize linked projects or segments in the master project. If the segments are updated by<br />

the linked project, the synchronization can produce unpredictable results in the master project.<br />

Before synchronizing a project, ensure that data source connections have not changed and that<br />

data sources are online. You can check your connections by testing a few key query subjects.<br />

For more information about data source connections, see Create a Data Source Connection.<br />

Steps to View Transaction History<br />

1. From the Project menu, click View Transaction History.<br />

Tip: To view the details of a transaction, click the plus sign next to a transaction number.<br />

2. Click the transactions numbers you want, and click Save as Script.<br />

3. Click Close.<br />

Steps to Run Script<br />

1. From the Project menu, click Run Script.<br />

Tip: To create a backup of your Framework Manager, select the Backup project into this<br />

directory check box.<br />

2. In the Script File box, you will see the name and location of the script file.<br />

Tip: To locate another log file, click the folder button.<br />

3. To view the details of a transaction, click the transaction.<br />

4. If you want to play back all the actions, click Run, or select the check boxes of the<br />

transactions you want to run, and click Run.<br />

A list of the transaction details appears in the Transaction Details pane.<br />

5. To ensure the project stops on any transaction error, select the Stop on Failed Transaction<br />

check box.<br />

50 Cognos ReportNet (TM) Framework Manager


Chapter 2: Designing a Project<br />

6. If the playback stops, you can modify the temporary project to correct the problem without<br />

closing the Synchronize window. After fixing the problem, choose one of the following:<br />

• To retry the failed action, click Resume.<br />

• To skip to the next transaction, click Skip to Next.<br />

7. Click Accept to replace the original project with the contents of the temporary project.<br />

8. Tip: To return the project to its previous state, click Revert.<br />

Steps to Synchronize<br />

1. From the Project menu, click Synchronize.<br />

2. To ensure the project stops on any transaction error, select the Stop on Failed Transaction<br />

check box.<br />

3. Click Run.<br />

In the Status window, a list of transactions taken from the log file appears.<br />

4. If the playback stops, you can modify the temporary project to correct the problem without<br />

closing the Synchronize window. After fixing the problem, choose one of the following:<br />

• To retry the failed action, click Resume.<br />

• To skip to the next transaction, click Skip to Next.<br />

5. Click Accept to replace the original project with the contents of the temporary project.<br />

Tip: To return the project to its previous state, click Revert.<br />

User Guide 51


Chapter 2: Designing a Project<br />

52 Cognos ReportNet (TM) Framework Manager


Chapter 3: Preparing a Model for Reporting<br />

Preparing a model for reporting involves refining the metadata you imported into a project so<br />

that you can provide the information that your report authors require. Any enhancements you<br />

make to the data source metadata does not affect the original data source.<br />

You can prepare relational metadata in your project for report authors by adding business rules,<br />

such as calculations (p. 75), filters (p. 76), parameter maps (p. 79), and session parameters<br />

(p. 80). Business rules define the information that users can retrieve in a report.<br />

To further customize the model for your report authors, you can modify properties (p. 88) that<br />

control how data is used and formatted in a report. You can also organize model objects into<br />

logical groups, named folders (p. 89), to reflect the business concepts that you require.<br />

You can verify the project (p. 90) at any time to ensure that the references between the objects it<br />

contains are valid.<br />

Query Subjects<br />

A query subject is the basic building block in Framework Manager. Each query subject that is<br />

based on relational metadata is defined by an SQL statement that describes how to retrieve<br />

data from the data source.<br />

Framework Manager generates query subjects that represent tabular data from the data source,<br />

based on the definition of the query subject. For example, a query subject that references an<br />

entire table contains query items that represent each column in the table. If the SQL selects only<br />

specific columns, only those columns are represented as query items.<br />

You use Framework Manager to modify query subjects that are based on relational metadata to<br />

optimize and customize the data that they retrieve. For example, you can add filters or<br />

calculations. When you change the definition of a query subject, Framework Manager<br />

regenerates the associated query items, ensuring that any changes to query item properties are<br />

reflected in the new query items.<br />

There are different types of query subjects that you can use in Framework Manager for<br />

relational metadata. For SAP BW metadata, the only type of query subject that you can use is<br />

the Data Source type.<br />

Each type of query subject has its own advantages, depending on how you want the query to<br />

retrieve information. When you create a query subject (p. 54) that is based on relational data,<br />

Framework Manager prompts you to identify which of the following you wish to create: a data<br />

source, model, or stored procedure query subject. When you modify a query subject, the<br />

changes you can make depend on which type of query subject you want to modify.<br />

Data Source Query Subjects<br />

Data source query subjects directly reference data in a single data source. Framework Manager<br />

automatically creates a data source query subject for each table and view that you import into<br />

your model. For example, when you import the ConversionRate table from the GOSales sample<br />

database, Framework Manager creates a query subject using the following SQL statement:<br />

Select * from [gosales].ConversionRate<br />

Each data source query subject that is based on relational metadata can reference data from<br />

only one data source at a time. However, the advantage of data source query subjects is that<br />

you can directly edit the SQL that defines the data that a data source query subject retrieves.<br />

By directly editing the SQL of a relational query subject, you can<br />

• insert parameters that control the data that the query retrieves<br />

• create query subjects based on arbitrary SQL<br />

For more information, see "Modify a Data Source Query Subject" (p. 55).<br />

User Guide 53


Chapter 3: Preparing a Model for Reporting<br />

Model Query Subjects<br />

You can create model query subjects that are based on relational metadata. Model query<br />

subjects contain SQL statements that do not directly reference a data source. Rather, they use<br />

metadata already in the model, such as query items that exist in other query subjects. Model<br />

queries can contain references to both model queries and data source queries.<br />

The main purpose of model query subjects is to create query items that are oriented to reporting<br />

needs while reusing the underlying data source queries.<br />

Because model query subjects are based on the metadata in your model, they let you<br />

• reuse complex SQL statements that exist in the model<br />

• reference objects from different data sources in the same query subject<br />

Model queries can only read and test the underlying query subjects that they reference. If you<br />

edit the SQL of a model query subject, it becomes a data source query subject whose SQL<br />

corresponds to the data source query upon which it is based.<br />

For more information, see "Modify a Model Query Subject" (p. 59).<br />

Stored Procedure Query Subjects<br />

Stored procedure query subjects are generated when you import any procedure from a<br />

relational data source that is not identified as a function. After importing metadata, you should<br />

check to ensure that these generated query subjects represent stored procedures in the data<br />

source, rather than functions.<br />

When a query subject is based on a stored procedure that returns a result set, the stored<br />

procedure must:<br />

• return a single uniform result set<br />

If a stored procedure returns multiple result sets, Framework Manager only supports the<br />

first result set. Each result set must return the same form, such as the same number of<br />

columns.<br />

• not have an overloaded signature<br />

Some database systems let one stored procedure name accept different numbers and<br />

types of arguments. Framework Manager does not support overloaded signatures, even if<br />

the result set is the same in all cases.<br />

To work around these restrictions, you can create multiple stored procedures, each with a<br />

unique name, and create a separate query subject for each result set or signature.<br />

After you import, or create, a stored procedure query subject, you must execute it to validate the<br />

underlying stored procedure and determine the projection list. When a stored procedure is<br />

updated in the data source, executing the stored procedure in Framework Manager updates the<br />

query subject with the newly generated query items.<br />

For information about modifying and executing a stored procedure query subject, see "Modify a<br />

Stored Procedure Query Subject" (p. 60).<br />

Create a Query Subject<br />

You can use Framework Manager to create the following types of query subjects that are based<br />

on relational metadata:<br />

• Model query subjects are based on metadata that exists in your model.<br />

• Data source query subjects directly reference data that exists within a single data source.<br />

• Stored procedure query subjects leverage the stored procedures in a data source.<br />

Note: For SAP BW metadata, the only way to create a query subject is to import it.<br />

For more information, see "Query Subjects" (p. 53).<br />

You can also create a new query subject that is based on relational metadata by merging<br />

existing query subjects and query items (p. 64), or transforming a relationship into a query<br />

subject (p. 65).<br />

54 Cognos ReportNet (TM) Framework Manager


Chapter 3: Preparing a Model for Reporting<br />

Steps<br />

1. Select the namespace folder, and click Actions, Create, Query Subject.<br />

The New Query Subject wizard appears.<br />

2. In the Name box, type a name for the new query subject.<br />

3. Select the type of query subject you want to create.<br />

4. Click the Finish, or Next button.<br />

5. Complete the steps in the New Query Subject wizard.<br />

Tip: To ensure that the data source is uniquely identified when you create a data source<br />

query subject, do not exit the wizard before the Finish button appears.<br />

6. Click Finish.<br />

The Query Subject Definition dialog box appears. You can use this dialog box to modify<br />

the query subject. For more information, see "Modify a Data Source Query Subject" (p. 55),<br />

"Modify a Model Query Subject" (p. 59), and "Modify a Stored Procedure Query<br />

Subject" (p. 60).<br />

Tips<br />

• To organize objects in the diagram, click Diagram, Auto Layout Diagram.<br />

• To control the model area that is visible in the diagram, click the overview button in the<br />

bottom right corner and drag the cursor over the diagram.<br />

Modify a Data Source Query Subject<br />

After you import or create a data source query subject that is based on relational metadata, you<br />

can modify it to retrieve different data. While you are in the editor, you can test the query subject<br />

(p. 60) to view the results that it returns.<br />

When you embed a filter (p. 77) or calculation (p. 75) in a data source query subject, the data<br />

source query subject must have a relationship to any query subject(s) that the expression<br />

references. This relationship is necessary even if the expression references a model query<br />

subject that is based on the same table as the data source query subject in which you are<br />

embedding the expression. To create this relationship, you can<br />

• ensure that there is a join path between the new query subject and the one that contains the<br />

filter or calculation<br />

• base the embedded filter or calculation on a query item that is based on a the desired data<br />

source query subject<br />

• convert the desired filter or calculation to a stand-alone filter or calculation, so that they are<br />

not part of the query subject<br />

• create and use a stand-alone filter or calculation that references the embedded object<br />

When query subjects are based on SAP BW metadata, you cannot add calculations or edit the<br />

underlying query. However, you can<br />

• add, delete, and define filters<br />

• use prompts in filters to prompt the user for variable values<br />

• test a query subject<br />

You cannot test an SAP BW query subject that contains prompts or BW variables.<br />

• conform or deconform multiple query subjects<br />

Steps<br />

1. Click the query subject you want to modify.<br />

2. Click Actions, Edit Definition.<br />

The Query Subject Definition dialog box appears.<br />

User Guide 55


Chapter 3: Preparing a Model for Reporting<br />

3. Modify the query subject<br />

Note: For SAP BW metadata, the only modification you can make is to apply or embed a<br />

filter.<br />

Goal<br />

Add data<br />

source objects<br />

Edit the SQL<br />

Apply or embed<br />

a filter (p. 76)<br />

Apply or embed<br />

a calculation<br />

(p. 75)<br />

Insert a macro<br />

(p. 81)<br />

Insert a data<br />

source<br />

reference<br />

Action<br />

From Available Database Objects, drag<br />

objects to the SQL tab.<br />

Click the SQL tab, and make the changes you<br />

want.<br />

Note: Changing the alias of a column<br />

regenerates the query item that represents that<br />

column. Any modifications you have made to<br />

the query item properties are not retained<br />

because Framework Manager perceives it to be<br />

a new query item.<br />

Click the arrow to the right of the filter button,<br />

and select one of the following<br />

• Create New to create an embedded filter<br />

that is only used with this query subject.<br />

• Select From Model to apply a filter from<br />

the model.<br />

Set the usage (p. 77) value to determine how<br />

the filter is applied.<br />

Click the arrow to the right of the calculation<br />

button, and select either<br />

• Create New to create an embedded<br />

calculation that is applies to only this query<br />

subject<br />

• Select From Model to apply a calculation<br />

that already exists in the model<br />

On the SQL tab, select where you want the<br />

macro and click the insert macro button.<br />

Because parameter values in data source query<br />

subjects are not translated, ensure that they do<br />

not contain European values, such as a comma<br />

that is used as a list separator.<br />

On the SQL tab, click the location where you<br />

want to insert the reference, click the insert data<br />

source button, select the data source, and click<br />

OK.<br />

56 Cognos ReportNet (TM) Framework Manager


Chapter 3: Preparing a Model for Reporting<br />

Goal<br />

Change the<br />

SQL type<br />

(p. 61)<br />

Action<br />

Click the options button, select the SQL<br />

Settings tab and use the SQL Type list to<br />

select either Cognos, Native, or<br />

Pass-Thro<strong>ug</strong>h.<br />

Change how<br />

the SQL is<br />

generated<br />

(p. 64)<br />

Click the options button and, on the SQL<br />

Settings tab, set Generate SQL to either As<br />

View or Minimized.<br />

4. You can test the query subject (p. 60) to view the result set it returns.<br />

5. Click OK.<br />

Framework Manager verifies the SQL before updating the query subject. If any<br />

modifications have invalidated relationships, other query subjects, calculations, or filters,<br />

you are warned about this impact. You can choose to continue with the update or to cancel<br />

it.<br />

Usage and aggregation property values (p. 74) are regenerated to reflect the changes you<br />

made.<br />

Conform SAP BW Query Subjects<br />

When you import multi-cube InfoQueries there can be two or more query subjects that contain<br />

the same information. Framework Manager lets you conform these query subjects to create one<br />

query subject and one or more shortcuts. This reduces the amount of redundant information<br />

displayed in the model, and ensures that identical query subjects are not changed<br />

independently.<br />

Steps<br />

1. Click Actions, Conform Dimensions.<br />

The Conform Dimension Wizard appears, listing all dimensionally aware SAP BW query<br />

subjects that exist in the model.<br />

2. Select the query subject that you want to conform.<br />

Note: If you want queries based on these query subjects to retrieve data from a specific<br />

data source, select the query subject that references the preferred data source.<br />

3. Click Next.<br />

4. Identify the query subjects that you want to include in the conformed dimension, and click<br />

Next.<br />

5. Click Finish.<br />

Deconform an SAP BW Query Subject<br />

When you import SAP BW metadata into your project, Framework Manager automatically<br />

creates conformed dimensions for any two or more hierarchies that have a matching structure. If<br />

there are dimensions that you do not want conformed you can deconform them by doing the<br />

following steps.<br />

Steps<br />

1. Delete all instances of the query subject from the model.<br />

The easiest way to do this is to delete the one instance of the query subject that is not a<br />

shortcut. This removes all of the shortcuts from the project.<br />

User Guide 57


Chapter 3: Preparing a Model for Reporting<br />

2. Re-import the query subjects that have been deleted from each of the relevant data sources<br />

Ensure that the generate conformed dimensions option is not selected.<br />

3. Ensure that query subjects appear in the project as expected. There should be no shortcuts<br />

in use for these query subjects.<br />

Optimizing SAP BW Performance<br />

You can optimize the performance of query subjects that are based on SAP BW data by<br />

ensuring that the "ragged" and "balanced" properties are set to the correct values.<br />

Balanced Hierarchies<br />

A hierarchy is balanced when each path within a hierarchy descends to the same depth. In SAP<br />

BW, all leaf nodes of a hierarchy are values of the characteristic, but each path does not have to<br />

descend to the lowest level of the hierarchy.<br />

You can define whether a query subject represents a balanced hierarchy by modifying the "type"<br />

and "balanced" properties of the query subject. The values that you set for these properties<br />

depend upon the type of object that the query subject represents, and whether you know if the<br />

hierarchy is balanced.<br />

When all paths are of the same depth, this property should be assigned a value of "true",<br />

otherwise it should be set to "false".<br />

Query subject<br />

represents<br />

Type property<br />

value<br />

Balanced property<br />

value<br />

characteristic read-only true<br />

hierarchy you know is<br />

balanced<br />

hierarchy whose balance<br />

is unknown<br />

read-only<br />

boolean<br />

true<br />

false<br />

Ragged Hierarchies<br />

If you assign a value of "true" to the "balanced" property of an unbalanced hierarchy, queries<br />

that involve this query subject will return incorrect data. If you assign a value of 'true" to the<br />

"balanced" property of a balanced hierarchy, performance will be slowed.<br />

A hierarchy is ragged when at least one path in the hierarchy skips one of the levels in the<br />

hierarchy. In SAP BW, this occurs only when there are "not assigned" or "#" nodes in a<br />

presentation hierarchy. However, the presence of such a node does not guarantee that the<br />

hierarchy is ragged. You need to investigate the layout of a hierarchy to be certain.<br />

You can define whether a query subject represents a ragged hierarchy by modifying the "type"<br />

and "ragged" properties of the query subject. The values that you set for these properties<br />

depend upon the type of object that the query subject represents, and whether you know if the<br />

hierarchy is ragged.<br />

Query subject<br />

represents<br />

Type property<br />

value<br />

Ragged property<br />

value<br />

characteristic read-only false<br />

hierarchy you know is not<br />

ragged<br />

hierarchy whose<br />

raggedness is unknown<br />

read-only<br />

boolean<br />

false<br />

true<br />

58 Cognos ReportNet (TM) Framework Manager


Chapter 3: Preparing a Model for Reporting<br />

If you assign a value of "true" to the "ragged" property of an unragged hierarchy, queries that<br />

involve this query subject will return incorrect data. If you assign a value of 'true" to the "ragged"<br />

property of a ragged hierarchy, performance will be slowed.<br />

Modify a Model Query Subject<br />

After you create a model query subject you can modify the list of query items it is based on, and<br />

add any calculations (p. 75) and filters (p. 76) that already exist in the model. While you are in<br />

the editor, you can test the query subject (p. 60) to view the results that it returns.<br />

Note: If the query subject references an SAP BW data source, it can only be a data source<br />

query subject.<br />

Steps<br />

1. Click the query subject you want to modify.<br />

2. Click Actions, Edit Definition.<br />

The Query Subject Definition dialog box appears.<br />

3. Modify the query subject.<br />

Goal<br />

Add or reuse<br />

model objects<br />

Edit the SQL<br />

Embed a filter<br />

(p. 76)<br />

Embed a<br />

calculation<br />

Action<br />

From Available Model Objects, drag objects<br />

to the Model Objects tab.<br />

If you add a filter, select the usage (p. 77) value<br />

to determine how the filter is applied.<br />

On the Preview tab, click the Edit Definition<br />

button.<br />

This converts the model query subject to a data<br />

source query subject. Do not do this if you want<br />

the query subject to reference multiple data<br />

sources. For more information, see "Modify a<br />

Data Source Query Subject" (p. 55).<br />

On the Model Objects tab, click the filter<br />

button, define the expression, click OK.<br />

Set the usage (p. 77) value to determine how<br />

the filter is applied.<br />

On the Model Objects tab, click the calculation<br />

button, define the expression, and click OK.<br />

Insert a macro<br />

(p. 81)<br />

While creating an embedded calculation or<br />

filter in the Expression Editor, click the insert<br />

macro button.<br />

Change how the<br />

SQL is<br />

generated<br />

(p. 64)<br />

Click the options button and, on the SQL<br />

Settings tab, set Generate SQL to either As<br />

View or Minimized.<br />

4. You can test the query subject (p. 60) to view the result set it returns.<br />

User Guide 59


Chapter 3: Preparing a Model for Reporting<br />

5. Click OK.<br />

Framework Manager verifies the SQL before updating the query subject. If any<br />

modifications have invalidated relationships, other query subjects, calculations, or filters,<br />

you are warned about this impact. You can choose to continue with the update or to cancel<br />

it.<br />

Usage and aggregation property values (p. 74) are regenerated to reflect the changes you<br />

made.<br />

Modify a Stored Procedure Query Subject<br />

After you import or create a stored procedure query subject, you can modify it. To avoid<br />

inconsistencies, the modified query subject should return the same result set structure as the<br />

original.<br />

Steps<br />

1. Select the query subject and click Actions, Edit Definition.<br />

2. Modify the query subject:<br />

Goal<br />

Edit the name<br />

of the stored<br />

procedure<br />

Edit the data<br />

source<br />

Edit an<br />

argument<br />

Action<br />

Click the ellipses button beside the Name field,<br />

and edit the value.<br />

To insert a macro expression (p. 81), click the<br />

Insert Macro button.<br />

Click the ellipses button beside the Data Source<br />

field and select a data source.<br />

In the Arguments tab, select the argument, click<br />

the Edit button and enter a value.<br />

To insert a macro expression (p. 81), click the<br />

Insert Macro button<br />

Test a Query Subject<br />

Note: You can click an existing macro to edit it in the Macro Editor dialog box.<br />

3. You can test the query subject (p. 60) to view the result set it returns.<br />

4. Click OK.<br />

Framework Manager executes the stored procedure and, if the query subject returns a<br />

result set, validates the query subject.<br />

Steps to Transform a Stored Procedure to a Function<br />

1. Select the stored procedure and click Actions, Transform Stored Procedure to Function.<br />

2. To insert a parameter or enter a string value, select the argument and click Edit.<br />

3. The Edit Arguments Value dialog appears.<br />

4. To change the data source, click Select.<br />

5. To remove the stored procedure query subject from the model, click the Delete the Original<br />

Stored Procedure check box.<br />

6. Click OK.<br />

You can see the results that a query subject returns by testing it. Framework Manager lets you<br />

modify existing test settings so that you can customize the results that the test displays.<br />

Note that you cannot test an SAP BW query subject that contains prompts or BW variables.<br />

60 Cognos ReportNet (TM) Framework Manager


Chapter 3: Preparing a Model for Reporting<br />

Steps<br />

1. Select the query subject and click Actions, Edit Definition.<br />

Test settings for stored procedure query subjects are set in the Edit Definition dialog.<br />

These settings control the number of rows returned and prompt values.<br />

2. You can modify the test results for model and data source query subjects by clicking the<br />

options button and selecting the Test Settings tab.<br />

Test setting modifications remain active only for the current editing session. After you close<br />

the editor, test settings are reset to their default values.<br />

Goal<br />

Restrict the<br />

rows returned<br />

Determine the<br />

level of detail<br />

Apply relevant<br />

design mode<br />

filters<br />

Apply a security<br />

filter (p. 100)<br />

Override<br />

session<br />

parameters<br />

(p. 80)<br />

Change prompt<br />

values (p. 78)<br />

Action<br />

Click the Number of Results check box and<br />

enter the required number of rows.<br />

Drag the Level of Information slider to the<br />

location that represents the amount of detail<br />

you require.<br />

This setting is disabled for query subjects that<br />

are based on OLAP data sources.<br />

Click the Design Mode Filter check box. This<br />

applies all relevant filters whose usage is set to<br />

design mode in another query subject<br />

In the Security Filters box, click Edit.<br />

The Security Filters dialog box appears.<br />

In the Session Parameters box, click Set.<br />

The Session Parameters dialog box appears.<br />

In the Current Prompt Values box, click<br />

Prompts.<br />

3. Click the Test button.<br />

The Test Result field displays the query results. Note: Any result sets that contain Binary<br />

Large Objects are displayed as [blob].<br />

4. For more detailed information on the result set of model and data source queries, click the<br />

Results Information tab.<br />

5. Click OK.<br />

SQL Type<br />

SQL is the industry-standard language for creating, updating, and querying relational database<br />

management systems. When you edit the definition of a data source (p. 55) query subject that is<br />

based on relational data you can use:<br />

• Cognos SQL<br />

• Native SQL<br />

• Pass-Thro<strong>ug</strong>h SQL<br />

User Guide 61


Chapter 3: Preparing a Model for Reporting<br />

When choosing the type of SQL in which a data source query subject is generated, you must<br />

weigh the following factors and decide which are most important<br />

Type Advantage Disadvantage<br />

Cognos<br />

SQL<br />

Native<br />

SQL<br />

Pass-<br />

Thro<strong>ug</strong>h<br />

SQL<br />

• improves query<br />

subject performance;<br />

for example, by<br />

removing unused<br />

elements at query time<br />

• SQL works on any<br />

supported database<br />

• performance is<br />

optimized across all<br />

related query subjects<br />

• you can use SQL that<br />

is specific to your<br />

database<br />

• you can enter any SQL<br />

supported by the<br />

database<br />

• you can not enter<br />

non-standard SQL<br />

• you cannot use SQL that<br />

the data source does not<br />

support for subqueries<br />

• the query subject may not<br />

work on a different<br />

database type<br />

• there is no opportunity for<br />

Framework Manager to<br />

automatically optimize<br />

performance<br />

• the SQL may not work on<br />

a different data source<br />

Note: the SQL Settings tab is disabled for query subjects that are based on OLAP data sources.<br />

1.1: added the above note.<br />

Cognos SQL<br />

By default, Framework Manager uses Cognos SQL to create and edit query subjects. Cognos<br />

SQL adheres to SQL99 rules and works with all relational and tabular data sources. Framework<br />

Manager generates the most optimized SQL possible, while preserving its functionality. In this<br />

way, Cognos SQL offers the most added value.<br />

Because query subjects in Framework Manager are similar to views in databases, the SQL for<br />

each query subject must conform to the SQL99 rules that apply to views. For example, you must<br />

assign aliases to any column that is empty or whose name is not unique. This level of<br />

conformance allows Cognos SQL to behave more consistently than vendor-specific SQL, which<br />

does not adhere to SQL99 rules.<br />

In general, using Cognos SQL is preferable because you can create query subjects that<br />

• can contain metadata from multiple data sources<br />

• have fewer database restrictions<br />

• interact more effectively with Cognos applications<br />

Native SQL<br />

When you edit a query subject, you can specify Native SQL. Native SQL is the SQL the data<br />

source uses, such as Oracle SQL. You can not use Native SQL in a query subject that<br />

references more than one data source in the project.<br />

If you are comfortable working with a Native SQL version, you may want to use it for query<br />

subjects that are based on a single data source. By doing so, you can use keywords that are not<br />

available in Cognos SQL, and copy and paste SQL from another application into Framework<br />

Manager.<br />

When the query is generated, Framework Manager combines the SQL of each query subject<br />

that uses a given data source connection into a single query. This helps improve the<br />

performance of the query. However, because the SQL is being generated as a series of<br />

subqueries, Native SQL queries must adhere to any restrictions that their database vendor<br />

places on derived tables.<br />

62 Cognos ReportNet (TM) Framework Manager


Chapter 3: Preparing a Model for Reporting<br />

Therefore, if you change an existing query subject to Native SQL you must ensure that the SQL<br />

reflects the rules that apply to the native data source so that your query executes properly.<br />

❑ edit existing table names<br />

Cognos SQL uses a two-part structure to name query subjects. For example,<br />

[gosales].[ProductLine] means that the ProductLine query subject comes from the<br />

gosales database. Therefore, when you switch to Native SQL you must ensure that all table<br />

names include the parent elements required by the data source vendor.<br />

For information about Framework Manager object naming conventions, see "Naming<br />

Conventions for Objects in a Project" (p. 24).<br />

❑ ensure that the SQL is valid for subqueries<br />

Framework Manager processes Native SQL query subjects as subqueries. For example, if<br />

you change the following Cognos SQL<br />

Select<br />

P.ProductName, P.Margin From Product P<br />

to Native SQL, Framework Manager generates the following statement:<br />

Select<br />

oracle_plain.ProductName as Productname,<br />

oracle_plain.Margin as Margin<br />

From<br />

(GOSALES1_OR_92_WE...SELECT<br />

P.PRODUCTNAME, P.MARGIN<br />

FROM<br />

PRODUCT P}<br />

)oracle_plain<br />

Therefore, you must ensure that the query subject adheres to additional database<br />

restrictions are imposed on subqueries, such as the inability to use the With clause.<br />

Pass-thro<strong>ug</strong>h SQL does not have the same restrictions; however, the fact that Native SQL is<br />

processed as part of a larger query improves its performance.<br />

To test Native SQL with a query tool, such as Oracle’s SQL*Plus, you must place the SQL in<br />

the From clause of a Select statement. For example, you can use the following syntax in a<br />

query tool:<br />

Select * from () T1<br />

❑ assign aliases to derived columns<br />

Assign alias names to any columns whose values are calculated. For example:<br />

SELECT Length(Country) as LGTH<br />

FROM Country.<br />

❑ insert double quotes around alias names<br />

Changing the SQL Type of a query subject can change the case of alias names. When this<br />

happens, any query subjects that reference the altered query item become invalid. To<br />

ensure that there is no case change, insert double quotation marks around the alias. For<br />

example:<br />

Select COUNTRY as "test" from COUNTRY<br />

Note: SQL specified in Framework Manager and processed by the database, whether native or<br />

pass-thro<strong>ug</strong>h, must be completely self-contained. It must not reference anything outside of that<br />

SQL, such as database prompts or variables that would normally be supplied by the calling<br />

application.<br />

Pass-Thro<strong>ug</strong>h SQL<br />

Pass-thro<strong>ug</strong>h SQL lets you use Native SQL without any of the restrictions the data source<br />

imposes on subqueries. This is because Pass-Thro<strong>ug</strong>h SQL query subjects are not processed<br />

as subqueries. Instead, the SQL for each query subject is sent directly to the data source where<br />

the query results are generated.<br />

Because each query subject is sent to the data source as a separate statement, rather than<br />

being optimized by Framework Manager, the performance is slower. Therefore, in choosing<br />

between Native SQL and Pass-Thro<strong>ug</strong>h SQL you must decide which is more important:<br />

performance, or the ability to use SQL that is not permitted in a subquery.<br />

Generally, you should only use Pass-Thro<strong>ug</strong>h SQL if you need to create a query subject that<br />

contains data source specific constructs that can not be used inside a derived table, such as a<br />

With or Order By clause.<br />

User Guide 63


Chapter 3: Preparing a Model for Reporting<br />

SQL Generation<br />

Note: SQL specified in Framework Manager and processed by the database, whether native or<br />

pass-thro<strong>ug</strong>h, must be completely self-contained. It must not reference anything outside of that<br />

SQL, such as database prompts or variables that would normally be supplied by the calling<br />

application.<br />

The SQL Generation setting determines how Framework Manager generates the SQL that<br />

retrieves data from relational data sources. You can change how Framework Manager<br />

generates SQL when you edit a data source (p. 55) or model (p. 59) query subject.<br />

Tip: To see how this setting affects the generated SQL for a query subject, click the Preview tab<br />

in the Edit Definition dialog.<br />

Note: the SQL Settings tab is disabled for query subjects that are based on SAP BW data<br />

sources.<br />

The SQL Generation type of a query subject can either be set to either As View or Minimized.<br />

By default, the SQL Generation type is set to Minimized. This means that the generated SQL<br />

contains only the minimal set of tables and joins needed to obtain values for the selected query<br />

items. When the generation type is set to As View, Framework Manager generates queries that<br />

contain the full SQL statement of the query subject.<br />

Using Minimized SQL improves performance, resulting in a query that executes significantly<br />

faster. Generating Minimized SQL is especially beneficial for query subjects that represent<br />

dimension tables. By using a single model query subject to model a dimension you can get the<br />

benefit of small SQL queries that execute significantly faster.<br />

For example, the SQL Generation Type of the following query subject is set to As View. Note that<br />

this query subject contains a nested select statement.<br />

select<br />

New_Query_Subject.COUNTRYCODE as COUNTRYCODE,<br />

New_Query_Subject.EUROINUSESINCE as EUROINUSESINCE<br />

from<br />

(select<br />

CONVERSIONRATE.COUNTRYCODE as COUNTRYCODE,<br />

COUNTRY.EUROINUSESINCE as EUROINUSESINCE<br />

from<br />

"2 - GOSales1 - OLE-DB".GOSALES1.dbo.CONVERSIONRATE CONVERSIONRATE,<br />

2 - GOSales1 - OLE-DB".GOSALES1.dbo.COUNTRY COUNTRY<br />

where<br />

(COUNTRY.SALESCOUNTRYCODE = CONVERSIONRATE.COUNTRYCODE)<br />

) New_Query_Subject<br />

If you change the SQL Generation Type to Minimized, Framework Manager generates the<br />

following simplified SQL.<br />

select<br />

CONVERSIONRATE.COUNTRYCODE as COUNTRYCODE,<br />

COUNTRY.EUROINUSESINCE as EUROINUSESINCE<br />

from<br />

"2 - GOSales1 - OLE-DB".GOSALES1.dbo.CONVERSIONRATE CONVERSIONRATE,<br />

"2 - GOSales1 - OLE-DB".GOSALES1.dbo.COUNTRY COUNTRY<br />

where<br />

(COUNTRY.SALESCOUNTRYCODE = CONVERSIONRATE.COUNTRYCODE)<br />

Minimized SQL works best when the returned result sets of each query item are equivalent. If<br />

there are records in one column that do not correspond to records in another column, the result<br />

of the Minimized query produces additional rows. You can avoid this by setting the SQL<br />

generation type value to As View.<br />

For example, if there are ProductTypes that are not used by any of the Products and these<br />

ProductTypes all have a common ProductLine, a ProductLine is reported for which there are<br />

ProductTypes, but for which there are no related Products.<br />

Merge Metadata To Create a New Query Subject<br />

In addition to creating query subjects from scratch (p. 54), for you can select existing model<br />

objects and merge them into a new query subject. This lets you reuse existing metadata to<br />

quickly create query subjects.<br />

64 Cognos ReportNet (TM) Framework Manager


Chapter 3: Preparing a Model for Reporting<br />

Note: This feature does not apply to SAP BW metadata.<br />

The objects you can merge include<br />

• model and data source query subjects and their shortcuts<br />

• query items, filters, and calculations in model and data source query subjects<br />

• relationships and relationship shortcuts between model and data source query subjects<br />

You can merge any number of the same type of objects into a new query in a single operation.<br />

The merge usually creates a new data source query subject. It creates a new model query<br />

subject only when the original query subjects are all model queries.<br />

Framework Manager generates the name of the new query subject by appending the name of<br />

the first query subject to the name of the last query subject. A unique number is appended to<br />

duplicate query item names.<br />

Framework Manager retains any existing relationships between the original query subjects and<br />

query subjects that are not included in the merge. However any relationships that exist between<br />

the query subjects that are being merged is ignored, to avoid self-joins. When you merge query<br />

items, only the relationships that the items participate in are replicated.<br />

The new query subject contains any filters that exist in the original query subject. No keys or<br />

indexes are created for the new query subject.<br />

Steps<br />

1. Ctrl+click the objects you want to merge into a single query subject.<br />

Using a shortcut to a query subject or relationship is equivalent to using the referenced<br />

object.<br />

2. Click Action, Merge in New Query Subject.<br />

The new query subject appears.<br />

Transform a Relationship into a Query Subject<br />

In addition to creating a query subject from scratch (p. 54), you can create a query subject that<br />

is based on the metadata in an existing relationship. This process is similar to merging metadata<br />

to create a query subject (p. 64).<br />

Note: This feature does not apply to SAP BW metadata.<br />

Steps<br />

Relationships<br />

1. Click a relationship.<br />

2. Click Action, Transform into Query Subject.<br />

The new query subject appears.<br />

A relationship describes a connection between two query subjects. When Framework Manager<br />

imports metadata, it creates relationships between query subjects based on the joins in the data<br />

source. You can add or remove relationships between query subjects so that the model better<br />

represents the logical structure of your business.<br />

After you import metadata you should verify that the relationships you require exist in the<br />

project. This is particularly true for data warehouses, since, to increase processing speed, many<br />

primary and unique key constraints are not specified in a data warehouse. Without these<br />

constraints, Framework Manager cannot generate the necessary relationships between fact<br />

tables and dimension tables.<br />

Tip: In the Summary pane, click Relationship to display all the join objects and highlight the<br />

columns that participate in relationships. You can also use the Search feature to find an object<br />

that matches specific conditions.<br />

User Guide 65


Chapter 3: Preparing a Model for Reporting<br />

Framework Manager stores relationships in the nearest common parent of the query subjects<br />

that participate in the relationship. The parent can be either a folder or a namespace. If you<br />

move one of the participating query subjects outside of the common parent, the relationship<br />

moves to the next namespace that is common to both ends of the relationship.<br />

For information about namespaces, see "Create a Namespace" (p. 25). For information about<br />

folders, see "Create a Folder" (p. 89).<br />

Cardinality and Notation<br />

Cardinality is a property of a relationship that describes the association between two query<br />

subjects, query items, or other model objects. By default, Framework Manager uses Merise<br />

notation to express cardinality:<br />

• 0..1 (zero or one match)<br />

• 1..1 (only one match required)<br />

• 0..n (zero or more matches)<br />

• 1..n (one or more matches required)<br />

Tip: To use Crowsfeet notation, while in the Object Diagram pane, click Diagram, Notation,<br />

Crowsfeet.<br />

The first part of the notation specifies whether the relationship is optional (0) or mandatory (1).<br />

The second part defines the relationship of query items between the query subjects (1=1,<br />

n=many). When you interpret cardinality, you must consider the notation that appears at both<br />

ends of the relationship.<br />

By default, Framework Manager assigns a cardinality of 1:1 to 1:n (inner join) for each data<br />

source relationship that is based on a primary key and a unique key constraint, respectively. The<br />

same assumption is made for a relationship between a unique index and non-unique index. If<br />

both indexes are unique, the cardinality will be 1:1 to 1:1.<br />

For relational metadata, you can change the criteria for how Framework Manager detects<br />

relationships and assigns cardinality. For information about importing metadata, see "Importing<br />

Metadata" (p. 25). For information about detecting relationships, see "Detect<br />

Relationships" (p. 69).<br />

For SAP BW metadata, you can override the default behavior of Framework Manager by setting<br />

the outer join governor to "allow". When you do this, all relationships are generated as outer<br />

joins. For information about setting governors, see "Set Governors" (p. 95).<br />

Operators and Expressions<br />

In Framework Manager, you can create complex expressions by taking two or more<br />

relationships and joining them using an operator, such as , or =. Use complex expressions to<br />

create custom relationships that help minimize the complexity of the data in your diagram.<br />

You can specify the operator by selecting one from the list or by manually changing the<br />

expression in the Expression Editor.<br />

Recursive Relationships<br />

Refine Query Paths<br />

When you import metadata, Framework Manager displays self-joins in the diagram, but does not<br />

execute them as queries. While you can view the metadata that defines the relationship, you<br />

cannot edit a recursive relationship in Framework Manager.<br />

To modify a relationship that exists as a self-join in the data source you can create a shortcut of<br />

the query item with which the table has a recursive relationship and define a relationship<br />

between the query subject and the shortcut.<br />

You can add and remove relationships between query subjects so that the package better<br />

represents the logical structure of your business.<br />

Note: You cannot add or edit relationships between query subjects that are based on SAP BW<br />

objects.<br />

66 Cognos ReportNet (TM) Framework Manager


Chapter 3: Preparing a Model for Reporting<br />

There are several things that you can do to optimize query path selection and return accurate<br />

result sets. The imported metadata may contain ambiguous relationships, which are caused by<br />

multiple paths between two query subjects in the project. When a query runs, there may be<br />

more than one way to relate the two query subjects to create a query.<br />

How you resolve ambiguous relationships depends on whether they are<br />

• redundant relationships<br />

Redundant relationships are those that return the same result set. For example, query<br />

subject A is joined to query subject B both directly and thro<strong>ug</strong>h query subject C. Because<br />

both of these relationships return the same result set, you do not need them both. While this<br />

is not a problem in terms of query results, you may want to simplify the project by deleting<br />

the redundant relationships.<br />

• non-redundant relationships<br />

Non-redundant relationships are those that return different result sets. Unintended result<br />

sets may be returned if the query chooses a different path than the one intended by the<br />

user, for example, the path between query subject A and query subject B may return a<br />

different result set than the path that includes query subject C.<br />

For information about removing resolving ambiguous relationships that return different<br />

result sets, see "Resolve Ambiguous Relationships" (p. 67).<br />

Resolve Ambiguous Relationships<br />

It is common in the design of databases, and in the queries that run against them, for there to be<br />

more than one way to join tables. Because query results depend on the join selected, you must<br />

model these relationships so that the report authors can create the reports they need.<br />

In Framework Manager, relationship weighting is based on scope. Relationships in the same<br />

folder as the query subject are used first, those in the parent are used second, and so on. For<br />

example, if query subjects A and B, the relationship between them is also in that folder.<br />

However, if query subject C is in a sibling folder, the relationship between A and C is in the<br />

parent folder.<br />

Direct-Path Relationship<br />

Framework Manager lets you create shortcuts of query subjects to model more that one<br />

relationship between query subjects. Shortcuts are duplicate objects with unique names,<br />

allowing them to participate in different relationships from the original query subject. When you<br />

create a relationship between one or more shortcuts, you can use a shortcut to one of the<br />

original relationships (p. 68).<br />

Framework Manager lets you organize query subjects and relationships into folders (p. 89).<br />

When a query is executed, ReportNet chooses the relationship in the parent folder of the query<br />

subjects being joined. Because you create the folder, the report author does not have to<br />

understand the details of the underlying data structure.<br />

Indirect-Path Relationship<br />

When you import metadata, Framework Manager identifies many-to-many joins and generates<br />

the model objects that are necessary to resolve potential reporting errors. For example, if you<br />

import three tables that have many-to-many joins, Framework Manager generates a separate<br />

query for each fact table and joins the result sets.<br />

Because Framework Manager must interpret the structure of your data source, you should verify<br />

the relationships that are created to ensure that they correctly reflect your users business<br />

requirements.<br />

Create a Relationship<br />

You create a relationship to join logically related query subjects that report authors want to<br />

combine in a single report. This is useful for relationships between query subjects that were not<br />

selected during import, were not joined in the data source, or are from multiple data sources.<br />

You can also use Framework Manager to automatically generate relationships (p. 69) between<br />

query subjects based on selected criteria.<br />

User Guide 67


Chapter 3: Preparing a Model for Reporting<br />

Steps<br />

1. Ctrl+click two or more query subjects or query items.<br />

Note: In the diagram view, you can also select a query item in a shortcut to create a<br />

relationship.<br />

2. Click Actions, Create, Relationship.<br />

If this relationship is a valid target for a relationship shortcut, a dialog appears that asks if<br />

you want to create a relationship shortcut.<br />

3. Click OK.<br />

The Relationship Definition dialog box appears. You can use this dialog box to modify the<br />

relationship.<br />

Modify a Relationship<br />

After you create a relationship in Framework Manager you can rename it, redefine cardinality,<br />

change the join type, or change the name of the relationship. You can also use the expression<br />

editor to create complex relationship expressions. For example, you can use functions to join<br />

query subjects based on similar query items, such as: FirstName + LastName =<br />

EmployeeName.<br />

Note: If your metadata is based on an SAP BW data source, you cannot modify a relationship.<br />

Steps<br />

1. Click a relationship and click Actions, Edit Definition.<br />

The Relationship Definition dialog box appears.<br />

2. Modify the relationship.<br />

Goal<br />

Modify existing<br />

elements<br />

Create an<br />

additional join<br />

Create a<br />

complex<br />

expression<br />

Test the<br />

relationship<br />

Action<br />

In the Relationship Expression tab, select the<br />

query items, cardinalities, and operator you<br />

want.<br />

The query items must have the same data type.<br />

Click New Link, and define the new<br />

relationship.<br />

In the Relationship Expression tab, click the<br />

ellipses button, define the expression, and click<br />

OK.<br />

Tip: If you insert session parameters (p. 80) or<br />

prompts (p. 70) and you want to specify the<br />

values that they represent when you test the<br />

expression, click the options button.<br />

In the Relationship SQL tab, identify the<br />

number of rows you want returned and click the<br />

test button.<br />

3. Click OK.<br />

Create a Relationship Shortcut<br />

A relationship shortcut references an existing relationship. You can use relationship shortcuts to<br />

reuse the definition of an existing relationship. Any changes to the source relationship are<br />

automatically reflected in the shortcut. You can also use relationship shortcuts to resolve<br />

ambiguous relationships (p. 66) between query subjects.<br />

68 Cognos ReportNet (TM) Framework Manager


Chapter 3: Preparing a Model for Reporting<br />

Detect Relationships<br />

Framework Manager asks if you want to create a relationship shortcut whenever you create a<br />

relationship and both of the following conditions apply:<br />

• At least one of the ends for the new relationship is a shortcut.<br />

• A relationship exists between the original query subjects.<br />

Steps<br />

1. Ctrl+click the query subjects that you want to participate in the relationship shortcut.<br />

2. Click Actions, Create, Relationship.<br />

Framework Manager asks if you want to create a shortcut to that relationship.<br />

3. Click Yes.<br />

A list appears of all relationships in which one end is a model object and the other end is<br />

either another model object or a shortcut to another model object.<br />

4. If you want to perform an exhaustive search, click the Find All button.<br />

An exhaustive search retrieves all relationships in which both ends can be either a model<br />

object or a shortcut to a model object.<br />

5. Click the relationship that you want to be the target of the relationship shortcut.<br />

6. Click OK.<br />

You can use Framework Manager to detect and generate relationships between two or more<br />

existing query subjects in your model. This is useful when you import metadata in stages, or<br />

when you want to change the criteria that apply to existing relationships, such as whether they<br />

include outer joins.<br />

When importing star schema metadata, avoid generating relationship based on matching<br />

column or query item names. Data warehouses often apply naming standards to columns, such<br />

as surr_key as the default column name for surrogate keys in dimensions. In this case,<br />

generating relationships that are based on matching column names would generate<br />

inappropriate relationships between all dimension tables.<br />

You can also manually create relationships (p. 67) between query subjects.<br />

Steps<br />

1. Ctrl+click two or more query subjects.<br />

2. Click Actions, Detect Relationships.<br />

The Detect Relationships dialog appear.<br />

3. Select the rules you want to apply to each pair of tables.<br />

Rule<br />

Result<br />

Use primary and<br />

foreign keys<br />

Use matching<br />

query item names<br />

that represent<br />

uniquely indexed<br />

columns<br />

Use matching<br />

query item names<br />

Creates joins that are based on primary key<br />

and foreign key relationships. The query item<br />

names do not have to match.<br />

Creates joins between query items whose<br />

names and data types match, if one or both of<br />

the underlying columns are uniquely indexed.<br />

Creates joins between query items whose<br />

names and data types match.<br />

This option is recommended if you want to<br />

generate as many relationships as possible.<br />

User Guide 69


Chapter 3: Preparing a Model for Reporting<br />

Query Items<br />

Format Query Items<br />

4. Indicate whether you want Framework Manager to detect relationships<br />

• between the selected query subjects<br />

• between each selected query subject and every query subject in the project that is not<br />

selected<br />

• between the selected query subjects and every other query subject in the project<br />

5. Identify whether you want Framework Manager to create outer joins, or convert them to<br />

inner joins, when outer joins exist in the data source.<br />

6. Click OK.<br />

Because reports are composed of different query items from one or more query subjects, query<br />

item properties control many aspects of the final report. When you create a model query<br />

subject, the query items inherit the properties of the data source query items on which they are<br />

based.<br />

You can modify the properties of query items that are based on relational data to<br />

• set Usage and Aggregation properties (p. 74) to reflect the intended use of the query item<br />

• format query items to control how data appears in a report<br />

• identify a column as a prompt, and control how the prompt information is presented to the<br />

report author<br />

For SAP BW metadata, you can only modify text-based properties, such as the name, caption,<br />

or screen tip.<br />

For information about viewing and modifying properties see "Modify Properties" (p. 88).<br />

You can use the format property of a query item to define how information appears in a report.<br />

The format property lets you choose a format type, such as Text, Date, and Currency. Each<br />

format type contains properties that further specify how the data appears.<br />

For example, you can assign the Currency format type to a numeric query item, and then use<br />

the No. of Decimal Places property to specify how many decimal points are displayed in the<br />

report.<br />

Some characters are language sensitive and appear properly only when your locale supports<br />

the applicable font. For example, for Japanese currency symbols to appear correctly, your locale<br />

must be set to Japanese.<br />

Steps<br />

1. In the Project Viewer pane, select the query item you want to format.<br />

2. In the Properties pane, click the Format property, and then click the ellipses button.<br />

The Data Format dialog box appears<br />

3. Select the appropriate Format type.<br />

Note: For SAP BW metadata with currency values, set this to "currency". This ensures that<br />

currency formatting is applied to all types of reports.<br />

4. If you want to format the property for every language defined in the project, select the All<br />

Languages check box.<br />

5. In the Properties field, select or type the appropriate property value.<br />

Define a Prompt Control<br />

Prompts help users quickly find the information they need from a report. Altho<strong>ug</strong>h prompts are<br />

generally defined in the reporting tool, you can change the definition of the query subject in the<br />

model so that a prompt appears automatically when report authors create filters. This is useful<br />

for query items, such as ProductTypeCode, whose values are not displayed in a report, but are<br />

useful for filtering data.<br />

70 Cognos ReportNet (TM) Framework Manager


Chapter 3: Preparing a Model for Reporting<br />

In Framework Manager, prompt behavior is defined thro<strong>ug</strong>h a compound query item property<br />

named Prompt Info. Prompt Info contains the following properties that affect how prompt<br />

controls are generated by ReportNet.<br />

Prompt Type<br />

The Prompt Type property sets the type of prompt control that the reporting application<br />

generates at run time, such as an edit box or a pull-down list. The default value for this property<br />

is Server Determined.<br />

Value<br />

Server<br />

Determined<br />

Edit Box<br />

Select Date<br />

Select Date Time<br />

Select Interval<br />

Select Time<br />

Select Value<br />

Select With<br />

Search<br />

Prompt Control<br />

One of the prompt controls listed below, based on<br />

information in the server, such as the data type of<br />

the query item.<br />

A simple text box. If the data type of the column is<br />

date or dateTime, this value generates a date or<br />

date-time control as well as the text box.<br />

A date control with a calendar interface.<br />

A date-time control with a calendar interface.<br />

For SAP BW metadata, this value is not relevant.<br />

A date-time interval control.<br />

For SAP BW metadata, this value is not relevant.<br />

A time control that filters data based on the<br />

selected time period. For example, if you define a<br />

selectTime prompt for Order Time, the user can<br />

use the time control to show all orders placed<br />

after 1:00, or all the orders placed between 10:00<br />

and 11:00.<br />

A drop-down list.<br />

A list control that allows users to search for<br />

values.<br />

For SAP BW metadata, this value is not relevant.<br />

Cascade On Item Reference<br />

The Cascade on Item Reference property indicates that the generated prompt is part of a series<br />

of generated cascading prompts. The query item that you reference in this property is the parent<br />

item in the cascade. The system will prompt the user for the cascade item before prompting<br />

them for the current query item. For example, if you want to prompt for the Product Line and<br />

then the Product within the selected line, set the Cascade On Item Reference property of the<br />

Product query item to Product Line.<br />

Display Item Reference<br />

The Display Item Reference property identifies the query item that the prompt shows if it is<br />

different from the query item whose properties you are editing. For example, if you want to<br />

prompt the user for Product Number but show the Product Name to the user, set the Display On<br />

Reference property of the Product Number query item to Product Name. This property is used<br />

only for data driven prompt controls whose Prompt Type properties are set to either Select Value<br />

or Select With Search.<br />

User Guide 71


Chapter 3: Preparing a Model for Reporting<br />

Filter Item Reference<br />

The Filter Item Reference property identifies an alternative query item that is used by any Query<br />

Studio or Report Studio filters. This property is used only when the reporting tools generate a<br />

filter. This property helps create more efficient queries, because it is more efficient to filter on an<br />

indexed numeric column than a non-indexed string column.<br />

For example, for a report author to create a Product Name filter that uses the values in Product<br />

Number, you can set the Filter Item Reference property of Product Name to Product Number.<br />

You can also set the Display Item Reference property of the Product Number query item to<br />

Product Name, so that the user is prompted to select a name rather than a product number.<br />

Steps<br />

1. Click the query item.<br />

2. In the Properties pane, click the plus sign (+) next to the Prompt Info property.<br />

3. Modify the prompt properties to reflect the behavior you require.<br />

Usage and Aggregate Properties<br />

In addition to being used to drive transformations in Framework Manager (such as the star<br />

scheme transformation), usage property values are used to determine the aggregation rules of<br />

query items and calculations. These rules are applied when the report author creates a report<br />

that aggregates this query item or calculation, unless they override it in the report definition.<br />

During import, Framework Manager assigns usage and aggregation property values to each<br />

query item you import. When you create a model query subject, each query item inherits the<br />

usage and aggregation properties of the query item on which it is based.<br />

Usage Property<br />

The usage property identifies the intended use for the data represented by each query item.<br />

During import, the usage property is set according to the type of data that the query items<br />

represents in the data source.<br />

Database<br />

object<br />

SAP BW<br />

object<br />

Usage<br />

property<br />

Purpose<br />

key, index,<br />

date,<br />

datetime<br />

hierarchy<br />

level<br />

Identifier<br />

Represents a column that is used<br />

to group or summarize the data in<br />

a Fact column with which it has a<br />

relationship.<br />

numeric,<br />

timeinterv<br />

al<br />

key figure Fact Represents a column that<br />

contains numeric data that can be<br />

grouped or summarized, such as<br />

Product Cost.<br />

string attribute Attribute Represents a column that is<br />

neither an Identifier or Fact, such<br />

as Description.<br />

Note: If data meets multiple criteria these rules are applied in the order in which they are listed.<br />

For example, if you import a numeric column that participates in a relationship, the usage<br />

property is set to "identifier".<br />

Regular Aggregate Property<br />

The Regular Aggregate property identifies the type of aggregation that is associated with the<br />

query item or calculation when you publish it. The report author can either use this default<br />

setting to perform calculations on groups of data, or use the reporting application to apply a<br />

different type of aggregation.<br />

72 Cognos ReportNet (TM) Framework Manager


Chapter 3: Preparing a Model for Reporting<br />

For example, if the Regular Aggregate property value of the query item "Quantity" is "sum", and<br />

the report author groups it by Product Name, the Quantity column in the report displays the total<br />

quantity of each product.<br />

During import, Framework Manager uses the "usage" value to determine the value of the<br />

Regular Aggregate property of each query item.<br />

Usage<br />

property<br />

identifier,<br />

count,<br />

attribute<br />

fact<br />

Regular Aggregate<br />

property value<br />

unsupported<br />

sum<br />

When you create a calculation (p. 75) that depends on other query items, Framework Manager<br />

sets the Regular Aggregate property to "automatic", to identify that the aggregation is an<br />

expression defined in the project. When you do this, the report uses the expression defined in<br />

the model.<br />

Semi Aggregate Property<br />

For relational metadata, the semi-aggregate property value is set to unsupported and is<br />

read-only.<br />

For SAP BW metadata, the semi-aggregate property displays the value that is set in the data<br />

source, and the property is read-only. If you change the regularAggregate property value of a<br />

query item, any semi-aggregate value other than "unsupported" is ignored.<br />

If the semi-aggregate value is set to "unsupported" in Framework Manager, the semi-aggregate<br />

behavior is ignored in the reporting application.<br />

Modify Usage and Aggregate Properties<br />

You can change existing usage and Regular Aggregate property values by:<br />

User Guide 73


Chapter 3: Preparing a Model for Reporting<br />

❑ modifying the values in the Properties pane (p. 88),<br />

This lets you select additional aggregation values that are not available thro<strong>ug</strong>h import, such<br />

as average and maximum. You must understand what the data represents in order to know<br />

what aggregation rule is required. For example, if you aggregate a part number, the only<br />

aggregate values that apply are count, countDistinct, countNonZero, maximum, and<br />

minimum.<br />

The following aggregation values are supported for relational data sources:<br />

• unsupported<br />

• automatic<br />

• calculated<br />

• avg<br />

• count<br />

• min<br />

• max<br />

• sum<br />

The following aggregation values are supported for SAP BW:<br />

• COUNT<br />

• COUNT NOT ZERO<br />

• AVG<br />

• AVG NOT ZERO<br />

• CALCULATED<br />

• AUTOMATIC<br />

• MIN<br />

• MAX<br />

• MEDIAN<br />

• STDDEV<br />

• VAR<br />

• SUM<br />

Note that COUNT NOT ZERO and AVG NOT ZERO are supported only when the value is<br />

set during import. You cannot change an aggregate property from its imported value to<br />

COUNT NON ZERO or AVG NOT ZERO.<br />

❑ automatically regenerating the values of selected objects<br />

This lets you ensure that these values are appropriate for the type of data they represent.<br />

Note: If you change an aggregation value for SAP BW metadata the aggregation cannot<br />

perform time-based queries because the aggregation rules are not applied.<br />

Regenerate Usage and Aggregation Property Values<br />

Using Framework Manager to regenerate usage and aggregation property values ensures that<br />

they reflect the transformation rules. It is useful to regenerate these values before you publish a<br />

package to ensure that these properties reflect modifications to your model.<br />

When generating aggregation values, Framework Manager assigns a value that is based on the<br />

usage property value, and the type of model object it is.<br />

Usage property<br />

identifier, count, attribute<br />

fact<br />

Regular Aggregate property value<br />

unsupported<br />

sum<br />

74 Cognos ReportNet (TM) Framework Manager


Chapter 3: Preparing a Model for Reporting<br />

Steps<br />

1. In the Project Viewer pane, select one or more query subjects.<br />

2. In the Properties pane, change the value of the<br />

• usage property to unknown<br />

• Regular Aggregate property to unsupported.<br />

3. Click Actions, Determine Usage.<br />

4. Click Actions, Determine Aggregation Rules.<br />

Adding Business Rules<br />

Create a Calculation<br />

You can add business rules to the query subjects in your model to refine the data retrieved and<br />

ensure that the right information is available for report authors. You can<br />

• add calculations so that report authors can include calculated data in their reports<br />

• create and apply filters so that you can limit the data that a query subject retrieves<br />

• add prompts so that users are prompted to filter data when they open a report<br />

• use session parameters and parameter maps to create dynamic queries<br />

You can create calculations to provide report authors with calculated values that they regularly<br />

use. Calculations can use query items, parameters, expressions, and expression components,<br />

such as functions.<br />

Framework Manager supports two types of calculations: stand-alone, and embedded. Create<br />

stand-alone calculations when you want to use reuse the expression by doing any of the<br />

following:<br />

• apply it to one or more query subjects to provide calculated data to a report<br />

• include it in a package to make it available to your report authors<br />

• move it, or a shortcut to it, into a folder to further organize your model objects<br />

If you want to use the calculation with only one query subject, you can create an embedded<br />

calculation while modifying the data source query subject (p. 55) or model query subject (p. 59).<br />

Tip: If you start with an embedded calculation, you can later convert it into a stand-alone<br />

expression that you can apply to other query subjects. To do this, right-click the calculation<br />

expression in the query subject editor and click Convert to Stand-Alone Calculation.<br />

At query time, Framework Manager returns a null value for any calculation that contains a<br />

divisor whose value is zero. Framework Manager cannot detect zero-division errors in functions<br />

such as AVG and MOD, because the division operator is not explicit.<br />

Steps<br />

1. Click the model folder and click Actions, Create, Calculation.<br />

The Calculation Definition dialog box appears.<br />

2. Define the expression.<br />

Goal<br />

Add model<br />

objects<br />

Add functions<br />

(p. 119)<br />

Add parameters<br />

(p. 81)<br />

Action<br />

On the Model tab, click a query item, filter, or<br />

calculation and click the arrow.<br />

On the Functions tab, select a component and<br />

click the arrow.<br />

On the Parameters tab, click a parameter and<br />

click the arrow.<br />

User Guide 75


Chapter 3: Preparing a Model for Reporting<br />

Goal<br />

Limit test results<br />

Override<br />

session<br />

parameters<br />

(p. 80)<br />

Action<br />

Click the options button and change the<br />

number of rows that are returned on the<br />

Results tab.<br />

Click the options button, click the Set button,<br />

enter a value in the Override Value field, and<br />

click OK.<br />

Create a Filter<br />

3. Click OK.<br />

4. Modify the dataType property (p. 88) to identify the type of data the calculation returns.<br />

The reporting application uses this information to format the data that the calculation<br />

returns.<br />

A filter is an expression that specifies the conditions that rows or instances must meet to be<br />

retrieved for the query subject, calculation, or report to which the filter is applied. A filter returns<br />

a Boolean value, equivalent to the predicate in the Where clause in an SQL statement, so that<br />

you can limit the rows returned by a query subject.<br />

Framework Manager supports two types of filters: stand-alone, and embedded. Create<br />

stand-alone filters when you want to use reuse the expression by doing any of the following:<br />

• add it to one or more query subjects to limit the data that the query retrieves when the<br />

filtered query subject is used in a report<br />

• include it in a package to make it available to your report authors<br />

• move it, or a shortcut to it, into a folder to further organize your model objects<br />

If you want to use a filter with only one specific query subject, you can create an embedded filter<br />

while modifying either a data source query subject (p. 55) or model query subject (p. 59).<br />

Tip: If you start with an embedded filter, you can later convert it into a stand-alone expression<br />

that you can apply to other query subjects. To do this, right-click the filter expression in the query<br />

subject editor and click Convert to Stand-alone Filter.<br />

You can also restrict the data that the queries in a package retrieves by applying governors<br />

(p. 95).<br />

Steps<br />

1. Click the model folder and click Actions, Create, Filter.<br />

The Filter Definition dialog box appears.<br />

2. Define the expression.<br />

Goal<br />

Add query items<br />

and filters<br />

Add functions<br />

(p. 119)<br />

Add parameters<br />

(p. 81)<br />

Action<br />

In the Available Objects pane, click the Model<br />

tab and drag the objects to the Expression<br />

Definition box.<br />

In the Available Objects pane, click the<br />

Functions tab and drag the functions to the<br />

Expression Definition box.<br />

In the Available Objects pane, select the<br />

Parameters tab and drag the parameters to the<br />

Expression Definition field.<br />

76 Cognos ReportNet (TM) Framework Manager


Chapter 3: Preparing a Model for Reporting<br />

Goal<br />

Action<br />

Limit test results Click the options button and change the number<br />

of rows to be returned on the Results tab.<br />

Override<br />

session<br />

parameters<br />

(p. 80)<br />

Click the options button, click Set, enter a value<br />

in the Override Value field, and click OK.<br />

3. Click OK<br />

Applying a Filter<br />

To apply a filter, you must modify the data source query subject (p. 55) or model query subject<br />

(p. 59). Note: The query subject must either contain the query item(s) that the filter references,<br />

or have a relationship path to the query subject(s) that contain the query item(s).<br />

When you apply a filter, you specify how it is used by selecting one of the following usage<br />

values.<br />

Usage<br />

Always<br />

Design Mode Only<br />

Description<br />

The filter is applied whenever the query subject<br />

is executed, regardless of whether the report<br />

contains the query item that is filtered. Always is<br />

the default usage value.<br />

Use this usage value to filter data that you want<br />

to ensure is filtered out of all reports. For<br />

example, your company may have obsolete<br />

information that it stores but does not want to<br />

report on.<br />

Limits the amount of data that the report authors<br />

and modelers retrieve while designing. By<br />

limiting data retrieval, design-time results are<br />

displayed much more quickly. You can have only<br />

one Design Mode filter for each query subject.<br />

This is the only value that you can assign to a<br />

filter that is applied to a multidimensional query<br />

subject.<br />

Example - Create and Apply a Filter<br />

You want to create a query that displays the currency name for a specific country. To do this, you<br />

create a filter that returns the data for a specific country code, and apply the filter to a model<br />

query subject that retrieves the currency name for each country.<br />

Note: The following example uses a relational data source.<br />

Steps<br />

1. Open the gosales_goretailers sample model.<br />

It is located in<br />

installation_location/crn/webcontent/samples/Models/gosales_goretailers/gosales_g<br />

oretailers.cpf.<br />

User Guide 77


Chapter 3: Preparing a Model for Reporting<br />

Use a Prompt Value<br />

2. Create a filter to limit the retrieval of data to only those country codes in the conversion rate<br />

table whose value is "2".<br />

• Click the Filters folder, select Actions, Create, Filter, and name the new filter<br />

ConversionRateCountryCode.<br />

• From the Database view folder in the Model tab, open the GoSales folder.<br />

• Select Conversion rate.Country code, click the arrow to add it to the Expression<br />

definition pane, and type in the rest of the following expression:<br />

[gosales_goretailers].[Conversion rate].[Country code] = '2'<br />

• Click OK.<br />

3. Create a model query subject named ISO Code, and apply the<br />

ConversionRateCountryCode filter.<br />

• From Database view, drag Country.Country and Country.ISO 3-letter code into the<br />

Query Items and Calculations pane.<br />

• From the Filter folder, drag ConversionRateCountryCode to the Filters pane.<br />

4. Click Preview.<br />

The generated SQL contains the filter, even tho<strong>ug</strong>h it does not affect the result set.<br />

5. Change the usage of the ConversionRateCountryCode filter to As Needed.<br />

6. Click Preview.<br />

Because the query item in the filter and the query items in the select list are not from the<br />

same, the filter is not visible in the generated SQL.<br />

You can substitute a prompt for a value to enable users to filter data by typing a value when the<br />

report opens.<br />

In general, it is better to define type-in prompts in the reporting application to make use of the<br />

additional prompt features. However, there are some variables that report author cannot modify.<br />

For these, you can use Framework Manager to define type-in prompts.<br />

You can use prompts in:<br />

• parameter maps<br />

• session parameters<br />

• stored procedure arguments<br />

• expressions, including filters, calculations, and relationships<br />

The syntax for using a prompt as a value is:<br />

??<br />

For example, if a stored procedure returns all rows with a specific part number, instead of using<br />

the part number as the argument for the stored procedure, you can use a prompt, such as<br />

?Part_Number?.<br />

When you test a model object that references a prompt, Framework Manager asks you to enter<br />

the prompt value. Framework Manager uses this value for either the duration of the session, or<br />

until you clear the prompt value.<br />

You can change the session value of prompt values thro<strong>ug</strong>h the Options dialog box. This dialog<br />

box is available when you modify a query subject (p. 59) or define a calculation (p. 75), filter<br />

(p. 76), or complex relationship (p. 68). This lets you change the prompt value at the time that<br />

you are testing the expression referencing that value.<br />

If you enable the always prompt for values check box in the Prompt dialog box, Framework<br />

Manager prompts you for a value every time you test the object. This check box only applies to<br />

testing, when updating the object or performing a count, Framework Manager uses the existing<br />

prompt value, if one exists.<br />

You can also set up prompt properties for query items. For more information, see "Define a<br />

Prompt Control" (p. 70).<br />

78 Cognos ReportNet (TM) Framework Manager


Chapter 3: Preparing a Model for Reporting<br />

Create a Parameter Map<br />

Use parameters to create conditional query subjects that allow for substitutions at report run<br />

time. Parameter maps are similar to data source look-up tables. Each parameter map has two<br />

columns, one for the key and one for the value that the key represents. Keys and values can be<br />

manually entered, imported from a file, or based on existing query items in the model.<br />

Note: If you are using SAP BW metadata, you cannot use a query item to generate the keys and<br />

values of a parameter map.<br />

All parameter map keys must be unique so that Framework Manager can consistently retrieve<br />

the correct value. Do not place quotation marks around a parameter value. You can use<br />

quotation marks in the expression in which you use the parameter.<br />

The value of a parameter can be another parameter. However, you must enclose the entire<br />

value in number signs (#). You cannot have a nesting of parameters as values that exceeds five<br />

levels.<br />

For information about using parameters, see "Using a Macro" (p. 81).<br />

Steps to Manually Enter or Import Parameter Map Values<br />

1. Click the Parameter Maps folder, and click Actions, Create, Parameter Map.<br />

2. In the Name box, type a name for the new parameter map.<br />

3. Click Manually enter the parameter keys, and/or import them from a file and click Next.<br />

4. Do one of the following:<br />

• To manually enter values, click New Key, type a key, and press Tab to enter a value for<br />

that key.<br />

• To import keys and values, click Import File and identify the location of the appropriate<br />

.csv file. You can import from a .txt file only if the values are separated by tabs rather<br />

than commas.<br />

Note: If you are going to use a parameter in a data source query subject, the value must<br />

use English specific punctuation. This means that you must use a period (.) to represent a<br />

decimal and a comma (,) to separate lists of values.<br />

5. You can modify existing parameters by doing the following.<br />

Goal<br />

Assign a<br />

default value<br />

Remove a<br />

parameter<br />

Modify a<br />

parameter<br />

Clear all keys<br />

and values<br />

Action<br />

Type a value in the Default Value field.<br />

Framework Manager uses the default value if a<br />

key has an invalid value.<br />

Select a row and click Delete.<br />

Select the row you want to modify, click the Edit<br />

button, and type a value.<br />

Click Clear Map.<br />

6. Click Finish.<br />

Steps to Create a Parameter Map Based on Existing Query Items<br />

1. Click the Parameter Maps folder and click Actions, Create, Parameter Map.<br />

2. In the Name box, type a name for the new parameter map.<br />

3. Click Base the parameter map on existing Query Items and click Next.<br />

4. In the Select Query Items for Parameter Map box, select the key and value you want from<br />

the list of query items in the model, and click Next.<br />

Note: You must select the key and value from the same query subject.<br />

User Guide 79


Chapter 3: Preparing a Model for Reporting<br />

5. Define the default values.<br />

6. Click Finish.<br />

Create a Session Parameter<br />

A session parameter is a variable that Framework Manager associates with a session. For<br />

example, user ID and preferred language are both session parameters. Because session<br />

parameters are key and value pairs, you can think of each session parameter as an entry in a<br />

parameter map called Session Parameters. You use a session parameter in the same way that<br />

you use a parameter map entry, altho<strong>ug</strong>h the syntax for session parameters is slightly different.<br />

There are two types of session parameters: environment and model. Environment session<br />

parameters are limited to<br />

• account.defaultName<br />

• account.personalInfo.userName (only applicable if a user has not logged on anonymously)<br />

• runLocale<br />

and are predefined and stored in Content Manager. If you need a session parameter that does<br />

not exist, you can create a model session parameter. Model session parameters are stored and<br />

set within the project, and can be published with a package.<br />

Model session parameters must have their values set within the scope of objects in the<br />

Framework Manger model. The scope can include the use of existing environment session<br />

parameters, as well as static values.<br />

In Framework Manager, you can define additional parameters using session parameters. For<br />

example, the parameter userName could be defined using the account.defaultName session<br />

parameter. The syntax would look like the following:<br />

userName = #$account.defaultName#<br />

For more information on syntax, see Using a Macro.<br />

Each session parameter must have a name and a default value. You can define an override<br />

value to test the results that value returns. The override value is valid only while you have the<br />

model open, and is not saved when you save the model. If no override value exists, Framework<br />

Manager uses the default value when it executes a query that contains a session parameter.<br />

For information about using stored procedures, see Modify a Stored Procedure Query Subject.<br />

Steps<br />

1. Click Project, Session Parameters.<br />

2. Click New Key and type a session parameter key and value.<br />

• To avoid having to set the override value every time you edit the project, set the session<br />

parameter as a value.<br />

• To avoid having to remove the project setting each time before you publish it, set the<br />

session parameter as a session override.<br />

3. You can modify existing parameters.<br />

Goal<br />

edit the<br />

parameter<br />

value<br />

Assign a<br />

default value<br />

Action<br />

Select the row you want to modify, click Edit, and<br />

type a value.<br />

Type a value in the Default Value box.<br />

Framework Manager uses the default value if a<br />

key has an invalid value.<br />

80 Cognos ReportNet (TM) Framework Manager


Chapter 3: Preparing a Model for Reporting<br />

Goal<br />

Remove a<br />

parameter<br />

Clear an<br />

override value<br />

Action<br />

Click a row and click the Delete button. You<br />

cannot delete an environment session<br />

parameter.<br />

Click a row and click Clear Override.<br />

Using a Macro<br />

4. Click Finish.<br />

Macros are fragments of code that you can insert anywhere within the Select statement that<br />

defines a query subject. This code lets you include references to session parameters,<br />

parameter maps, and parameter map entries. Parameter values are populated when the query<br />

is executed. For example, you can use the "language" session parameter to display only the<br />

data that matches the language setting for the current user.<br />

Do not insert macros between existing quotation marks or square brackets because Framework<br />

Manager does not execute anything within these elements.<br />

For information about parameterized XML connection strings, see Parameterized XML<br />

Connection Strings.<br />

Use the following syntax to reference session parameter and parameter values.<br />

Object Syntax Example<br />

Session key $session_key #$my_account#<br />

Parameter map key $map{} #$map_one{’abc’}#<br />

Parameter map<br />

entry whose key is<br />

defined by a<br />

session parameter<br />

$map{$session_k<br />

ey}<br />

#$map_one{$my_account}#<br />

When you reference a parameter, you must<br />

• use a number sign (#) at the beginning and end of each set of one or more parameters.<br />

Everything between the number signs is treated as a macro expression, which is executed<br />

at run time.<br />

• precede each parameter map entry with a dollar sign ($)<br />

• use a name that starts with an alpha character (a..z, A..Z)<br />

User Guide 81


Chapter 3: Preparing a Model for Reporting<br />

You can add the following elements to further define the macro expression.<br />

Symbol<br />

Single quotation<br />

marks<br />

Square brackets<br />

Curly brackets<br />

Purpose<br />

Delineates a literal string that has a single<br />

quotation mark as part of the string.<br />

• If the single quotation mark appears in a string,<br />

such as a query item, the string must be<br />

enclosed in a single quotation mark on both<br />

sides of the string and the single quotation<br />

mark must be doubled. For example, ab'c is<br />

written as 'ab''c'<br />

• If the single quotation mark appears in a<br />

macro, the string must be enclosed in square<br />

brackets. For example, ab'c is written as [ab’c]<br />

• If the single quotation mark appears in a<br />

prompt, there is no need to enclose the string.<br />

To escape a single quotation mark in an<br />

expression, use &apos;<br />

Used to enclose:<br />

• model objects, such as a namespace or query<br />

subject.<br />

• macro names that contain restricted<br />

characters, such as a number sign, hyphen, or<br />

space.<br />

Calls a function that is unknown to the parser, such<br />

as dateadd in DB2, and whose first argument is a<br />

keyword.<br />

Example:<br />

dateadd ({month},2,)<br />

+ operator Concatenates two strings, such as 'abc' + 'xyz’.<br />

Single quote<br />

function (sq)<br />

Surrounds the result of a string expression with<br />

single quotation marks. Existing single quotes are<br />

"double-escaped" so that they do not interfere with<br />

the quote structure. You can use this function to<br />

build clauses to test against literal<br />

parameter-driven values.<br />

For example, if a session parameter (my_sp) has<br />

the value ab’cc, the result of<br />

#sq($my_sp)#<br />

is<br />

’ab"cc’.<br />

82 Cognos ReportNet (TM) Framework Manager


Chapter 3: Preparing a Model for Reporting<br />

Symbol<br />

Double quote<br />

function (dq)<br />

Square bracket<br />

function (sb)<br />

Purpose<br />

Surrounds the result of a string expression with<br />

double quotation marks. You can use this function<br />

to refer to table and column names with<br />

non-identifier characters, such as a blank space or<br />

a percent sign (%).<br />

For example, if runLocale=en-us, the result of<br />

#dq ( 'Column' + $runLocale )#<br />

is<br />

"Column en-us"<br />

Inserts a set of square brackets into the argument<br />

to build object references in a model query and<br />

model expressions, such as filters and calculations.<br />

For example, if runLocale=en-us, the result of<br />

#sb ( 'my item in ' + $runLocale )#<br />

is<br />

[my item in en-us]<br />

You can replace the following query subject elements with a parameter:<br />

Object<br />

Query items identified in the<br />

Select list<br />

Tables identified in the From<br />

clause<br />

Where clause<br />

Name of the data source,<br />

schema, or source property<br />

Example<br />

#’Product_name_’+ $languageCode#<br />

Product_#$language#<br />

#Product_lang = #sq($languageCode)#<br />

#$data_source#.#$schema#.Products<br />

Using Parameters with Relational Data Source Query Subjects<br />

Model objects do not reflect changes to the data source objects on which they are based.<br />

Therefore, when you add a parameter to a data source query subject, consider whether you<br />

want to create a model object that references the parameter. If so, you must assign an alias to<br />

the parameterized object in the data source query subject. This ensures that any model query<br />

subjects, filters, or calculations, that reference the object remain valid when the parameter value<br />

changes.<br />

Example<br />

The following SQL defines a data source query subject that contains a session parameter,<br />

runLocale. The runLocale parameter value determines which column the query retrieves. The<br />

alias behaves like a shortcut, so that when a model object references CountryNameAlias,<br />

Framework Manager retrieves the value to which the alias is assigned.<br />

Select<br />

#$ColumnMap{$runLocale}# as CountryNameAlias<br />

From<br />

[GoSales].Country<br />

Therefore, by using aliases, you can ensure that model objects that reference data source<br />

parameters return the correct results after the parameters are changed.<br />

User Guide 83


Chapter 3: Preparing a Model for Reporting<br />

Using Security by Value<br />

You can use a parameter map as an argument in the Framework Manager CSVIdentityName<br />

function. This function retrieves account, group, and role information for the current user. It<br />

returns a string of comma-separated values in single quotation marks, such as ’clerks’,<br />

’technicians’, and ’typists’.<br />

The name in the defaultLocale of each piece of identity information is used as a key into the<br />

specified map. You can use this function to build partial in-clauses or to filter data based on the<br />

identity name of the current user.<br />

Syntax<br />

CSVIdentityName(%map)<br />

Example<br />

The result of<br />

regionColumn in ( #CSVIdentityName ( %region_for_identity )# )<br />

can be<br />

regionColumn in ('North America' , 'Europe')<br />

Example - Using Parameters<br />

An international company stores its Product and Customer information in both French and<br />

English tables. The company stores its Order information only in an English table. By creating<br />

the following parameter maps, they can use parameters to ensure that the query retrieves data<br />

that matches the information the user requires.<br />

LanguageSensitiveStatusTables<br />

Key<br />

P<br />

O<br />

Value<br />

#$ProductStatusTables {$runLocale}#<br />

#$OrderStatusTables {$runLocale}#<br />

ProductStatusTables<br />

Key<br />

en<br />

fr<br />

<br />

Value<br />

EN_ProductStatus<br />

FR_ProductStatus<br />

EN_ProductStatus<br />

OrderStatusTables<br />

Key<br />

en<br />

fr<br />

<br />

Value<br />

English_OrderStatus<br />

Order_Status_FR<br />

English_OrderStatus<br />

The following query subject retrieves the code and description data that matches the defined<br />

parameter values:<br />

SELECT code, description<br />

FROM #$LanguageSensitiveStatusTables {’p’}#<br />

84 Cognos ReportNet (TM) Framework Manager


Chapter 3: Preparing a Model for Reporting<br />

If the value of the runLocale parameter is fr, this expression is equivalent to<br />

SELECT code, description<br />

FROM FR_ProductStatus<br />

Multilingual Support<br />

You can view and modify model objects in different languages and publish packages for use by<br />

multiple-language audiences. To support multilingual metadata, use Framework Manager to<br />

• import metadata (p. 25) from multilingual data sources (p. 37)<br />

• define the languages the model supports<br />

• use a macro (p. 81) to dynamically substitute language values when the report is run<br />

• export multilingual properties in translation tables, which translators use to enter the correct<br />

text for each language<br />

• import a translation table that contains the translated property values<br />

• publish the metadata in the languages you specify (p. 103).<br />

For an example of how these features work together to enable multilingual modeling, see<br />

"Example - Create a Multilingual Project" (p. 87).<br />

Use a Macro to Model Multilingual Data<br />

Framework Manager lets you model multilingual data that is stored in multiple tables, columns,<br />

or rows, for each supported language. You can use parameters to create query subjects that<br />

retrieve data in the preferred language of the person viewing the report.<br />

The location of a parameter within the query subject definition depends on the location of<br />

multilingual data in the data source.<br />

Multilingual data<br />

exists in<br />

tables, such as<br />

Product_en,<br />

columns, such as<br />

ProductName_en<br />

rows whose<br />

language is<br />

identified by a<br />

special column,<br />

such as LANG<br />

Parameter<br />

location<br />

From clause<br />

Select list<br />

Filter<br />

Example<br />

SELECT ProductName<br />

FROM Product_#runLocale#<br />

SELECT<br />

ProductName_#runLocale#<br />

FROM Product<br />

SELECT ProductName<br />

FROM Product<br />

WHERE<br />

Product_lang=#runLocale#<br />

Define Languages<br />

When you add a language to a project, Framework Manager generates a new property value for<br />

every multilingual property of each object in the project. A multilingual property is any text<br />

property that appears in a report, such as Name, Description, and Screen Tip.<br />

Note: When using SAP BW metadata, Framework Manager displays each supported language<br />

but does not import the metadata for each language you define. This is because the metadata<br />

that SAP BW displays is automatically determined by the language in which the user logs on.<br />

The new values that Framework Manager assigns to these text properties are a combination of<br />

the original property value preceded by the language code. For example, if a query subject is<br />

named Country, and you add the Dutch language, Framework Manager inserts a Name whose<br />

value is "(nl)Country".<br />

User Guide 85


Chapter 3: Preparing a Model for Reporting<br />

Each project contains two types of language definitions:<br />

• The Design Language is the language in which the model was originally created. This value<br />

is stored in the model and cannot be changed. It serves as the default language value.<br />

• The Active Language identifies the language in which model content is currently displayed.<br />

This value is not stored in the model and you can change it at any time.<br />

Steps<br />

1. From the menu, click Project, Languages, Define Languages.<br />

The Define Languages dialog box appears.<br />

2. In Available languages, select each language you want to add and use the arrow button to<br />

move it to Project languages.<br />

Tip: To remove a language, select it in Project languages and use the arrow button to<br />

move it to Available languages.<br />

3. To change the active language, click a language in Project languages and click Set as<br />

Active.<br />

4. Click OK.<br />

A dialog box appears and asks you to accept the changes you made to the project.<br />

5. Click OK.<br />

Tip: To display multilingual property values in the Properties pane, click the Languages option<br />

at the top of the pane<br />

Export a Translation Table<br />

When modeling relational metadata, you can generate and export a translation table to make<br />

the task of translating model objects easier. The translation table contains a list of all the text<br />

strings defined for multilingual properties, such as Name, Description, and Screen Tip.<br />

Translators can then use an external application, such as Microsoft Excel, to type the required<br />

information into the table.<br />

You can export a translation table as either a comma-separated value file (.csv) or Unicode text<br />

file (.txt). You must export the translation table as a Unicode text file if it either contains a<br />

non-Latin language or will be imported by a computer with a language setting that is different<br />

from your own computer.<br />

Note: Because SAP BW Variables behave as custom properties, their text strings are not<br />

automatically exported in the translation file.<br />

Steps<br />

1. If you want to export only selected objects, select those objects.<br />

2. Click Project, Languages, Export Translation File.<br />

3. In Project Languages, click the languages you want to export, and click the arrow button to<br />

move them into the Languages to be exported field.<br />

Note: Framework Manager exports the appropriate locale code for each language you<br />

select. If you do not select all of the languages to be translated, you must enter the<br />

language codes into the first row of each new language column in the translation table.<br />

4. In Model objects to be exported, select whether you want to export all model objects, or<br />

export only pre-selected objects and their children.<br />

5. Enter the location to which you want to export the translation table.<br />

6. Click OK.<br />

Import a Translation Table<br />

You can add text property values for each language defined in your model by importing<br />

translated data from a file. The imported file must be a translation table that was exported to<br />

translators who entered the required translated values.<br />

The translation file can contain a subset of the languages defined for the project.<br />

86 Cognos ReportNet (TM) Framework Manager


Chapter 3: Preparing a Model for Reporting<br />

Note: Because SAP BW Variables behave as custom properties, text strings are not<br />

automatically imported from the translation file.<br />

Steps<br />

1. Click Project, Languages, Import Translation File.<br />

2. In Project Languages, click the languages in the translation table, and use the arrow<br />

buttons to move them to the Translate from and Translate into fields.<br />

3. Enter the location of the translation file.<br />

4. Click OK.<br />

Example - Create a Multilingual Project<br />

You want to create a model that can be used by English, French, and German report authors.<br />

You also want the reporting tool to automatically display metadata in the language required by<br />

the report author.<br />

Steps to Translate Metadata<br />

1. Open the goSales_goRetailers project.<br />

2. Ensure that English, French, and German are supported languages.<br />

• Click Project, Languages, Define Languages.<br />

• Verify that the Project languages pane contains English, French, and German.<br />

• In the Project Viewer pane, click a query item and, on the Properties pane, click<br />

Languages.<br />

Note that for the name, description, and tool tip text, you now see one entry per<br />

language.<br />

3. Export all of the languages and objects in the project to a .csv file called GOSales ML.csv.<br />

• Click Project, Languages, Export Translation File.<br />

• In the Project Languages pane, Ctrl+click English, French, and German, and click<br />

the top arrow to move them into the Languages to be exported pane.<br />

• Identify the file location into which you want to export language metadata.<br />

4. Open the GOSales ML.csv file in Microsoft Excel, and translate the strings.<br />

Note that each column represents a given language, and the file only contains the text<br />

strings that exist in the model.<br />

5. In Framework Manager, import the translated file.<br />

• Click Project, Languages, Import Translation File.<br />

• In the Project Languages pane, Ctrl+click English, French, and German, and click<br />

the top arrow to move them into the Translate into pane.<br />

• Identify the file location from which you want to import language metadata.<br />

Steps to Use Parameters to Create a Multilingual Project<br />

You can modify the query subjects in the goSales_goRetailers project to display multilingual<br />

content by using the Language_lookup parameter map and the runLocale session parameter.<br />

Note: Since SAP BW metadata is automatically displayed in the language of the current user,<br />

you do not need to use parameters to create a multilingual project for SAP BW metatdata.<br />

1. In the Project Viewer, double-click the Language_lookup parameter map.<br />

Note that the keys match the possible values for the runLocale session parameter, which<br />

identifies the language of the current user. These keys are mapped to the language values<br />

that are defined in the gosales_goretailers database.<br />

User Guide 87


Chapter 3: Preparing a Model for Reporting<br />

2. Verify that the parameter map contains the following information.<br />

Key<br />

en<br />

fr<br />

de<br />

Value<br />

EN<br />

FR<br />

DE<br />

3. Select a query subject that contains multi-lingual columns, such as Order_Method, and click<br />

Actions, Edit Definition.<br />

4. Notice that the language identifier that was appended to the query item name is replaced<br />

with a parameter map and runLocale session parameter:<br />

Select<br />

ORDER_METHOD.ORDER_METHOD_CODE,<br />

ORDER_METHOD.ORDER_METHOD_# $LanguageMap{$runLocale} # as ORDER_METHOD<br />

from<br />

[_S_GOSALESML_SS_2000_OL].ORDER_METHOD<br />

5. Click the Test button to preview the results.<br />

6. Click Project, Session Parameters and change the runLocale session parameter value to<br />

fr.<br />

7. Test the Order_Method query subject again to view the results.<br />

Managing the Project<br />

Modify Properties<br />

In Framework Manager, you can organize the metadata in the project and ensure that the<br />

project is valid. You can<br />

• modify the properties of each object<br />

• organize objects by creating folders<br />

• organize query subjects by creating query item folders<br />

• check a project to verify that it contains valid metadata<br />

The property pane shows the properties of any object that is selected, such as query subjects,<br />

query items, and relationships. Object properties are set during import. After import, you can<br />

modify any property values that are not greyed-out.<br />

Steps<br />

1. In the Project Viewer pane, select one or more objects.<br />

If you selected multiple objects, Framework Manager shows only the properties that are<br />

common to all the objects.<br />

2. If you selected multiple objects, you can<br />

• sort property values alphabetically by double-clicking the property heading. An arrow<br />

appears to indicate the direction in which values are sorted. You can toggle between<br />

ascending and descending order.<br />

• filter property values by clicking the arrow to the right of the property heading. You can<br />

either click a value, or click Custom to define the criteria for the rows you want to<br />

display.<br />

3. In the Properties pane, click the cell and edit the value.<br />

Tip: To apply a property value to multiple objects, click the arrow next to the property and<br />

drag the highlighted area over the properties to which you want to apply that value.<br />

88 Cognos ReportNet (TM) Framework Manager


Chapter 3: Preparing a Model for Reporting<br />

Create a Folder<br />

You can create folders to organize objects by subject or functional area. This makes it easier for<br />

you to locate metadata in projects that have many query subjects. You can nest folders by<br />

creating new folders in an existing folder.<br />

Tip: When viewing metadata in the Object Diagram, you can expand or collapse folders. From<br />

the Diagram menu, click Collapse All or Expand All.<br />

Using Shortcuts<br />

Model folders can contain either objects, or shortcuts to objects. Use shortcuts when there is an<br />

overlap between groupings and you want to include the metadata in more than one folder. For<br />

example, you create folders for Orders, Products, and Customers. If you want both Orders and<br />

Customers to contain the same query subject, you must create a shortcut to the query subject<br />

and add it to both folders.<br />

When you decide where to place shortcuts, consider how the scope of the shortcut impacts<br />

relationships:<br />

• Shortcuts in the same folder as the target query subject use the relationships of the target<br />

query subject.<br />

• Shortcuts in a different folder from the target query subject ignore the relationships of the<br />

target query subject and use those specified for the shortcut.<br />

When you create a shortcut, Framework Manager does not set the Screen Tip and Description<br />

properties. Unless you define these properties, the values displayed in Report Studio and Query<br />

Studio are the same as those defined in the object that the shortcut references. For information<br />

about defining properties, see "Modify Properties" (p. 88).<br />

Tip: To go to the object the shortcut references, right-click the shortcut and click Go to Target.<br />

Steps<br />

1. Click Actions, Create, Folder.<br />

The Create Model Folder wizard appears.<br />

Tip: To create a folder without using this wizard, select the query subjects before performing<br />

this step.<br />

2. In the Name box, type a name for the new folder.<br />

3. Click Next.<br />

4. Choose whether to create shortcuts to the objects or actually move the objects:<br />

• To create shortcuts that reference selected objects, click Create a shortcut for the<br />

selected items, and select the relevant items.<br />

Do not select all of the objects in the namespace, to avoid creating a recursive structure<br />

in the reporting application.<br />

• To move selected objects to the folder, click Move the selected items to the new<br />

folder.<br />

When you move an object that participates in a relationship, the relationship may also<br />

move. For information about relationships, see "Relationships" (p. 65).<br />

5. Select the objects you want to add to the folder.<br />

6. Click Finish.<br />

Create a Query Item Folder<br />

You can create query item folders to organize query subjects that contain a large number of<br />

query items. A query item folder can contain only query items and query item folders.<br />

Steps<br />

1. In the Project Viewer, click a query subject.<br />

2. From the Action menu, click Create, Query Item Folder.<br />

A new query item folder appears in the Project Viewer, under the query items that belong to<br />

that query subject.<br />

User Guide 89


Chapter 3: Preparing a Model for Reporting<br />

Check a Project<br />

3. Drag the query items that you want into the query item folder.<br />

You cannot add query items that do not exist in the parent query subject.<br />

At any point in the modeling process, you can verify the validity of your project. Framework<br />

Manager also provides an option to verify the package objects before you publish a package to<br />

ensure that there are no invalid objects that can break queries in the published package.<br />

When you verify a project, Framework Manager lists invalid objects and their status. Verifying a<br />

project detects various problems, which you can direct Framework Manager to repair.<br />

Invalid Relationships<br />

Framework Manager identifies query subjects whose relationships are invalid, so that you can<br />

delete them. Invalid relationships include<br />

• many-to-many relationships<br />

• orphaned query subjects (query subjects with no relationships)<br />

• multiple relationships (or relationship shortcuts) between query subjects (or query subject<br />

shortcuts)<br />

Invalid References<br />

Invalid references exist when an object references another object to which it does not have<br />

access. Invalid references occur when an object references another object that no longer exists<br />

in the project.<br />

Invalid Object Definition<br />

Framework Manager warns you when you change an object so that it cannot be executed. If you<br />

proceed, these are marked as invalid. When you verify a project, Framework Manager identifies<br />

any query subjects, shortcuts, filters, calculations, and relationships that were previously<br />

marked as invalid so that you can repair them.<br />

Invalid Aggregation Rules<br />

Framework Manager identifies any aggregate settings that are invalid for the data type of the<br />

query items to which they are applied. For example, if Product_Name has a character data type,<br />

its aggregate property cannot be set to either sum, count, or average. To repair the error,<br />

Framework Manager resets the aggregate property to unsupported.<br />

Steps<br />

1. Click Project, Verify.<br />

The Verify dialog box appears and displays lists of warnings and errors. A check box<br />

appears beside each repairable item.<br />

2. Click the errors you want to correct.<br />

Tip: To see the complete error message and the s<strong>ug</strong>gested solution double-click the error<br />

message.<br />

3. Click Repair.<br />

A dialog displays the number of objects repaired, and identifies the number of broken<br />

references that need to be retargeted.<br />

4. To fix broken references, click Yes.<br />

Note: When you repair a filter that contains an invalid reference, you must check its<br />

expression to ensure that the query items it now references do not contain invalid<br />

references. Any expression components that are invalid are underlined in red.<br />

90 Cognos ReportNet (TM) Framework Manager


Chapter 3: Preparing a Model for Reporting<br />

5. Identify which references you want to display<br />

• To display every reference that exists for the selected object, click Show all references.<br />

Use this option to view valid relationships in which the object participates for more<br />

context about how that object is used.<br />

• To display only the references that are broken for this object, click Show only broken<br />

references.<br />

Use this option to reduce the number of references that are displayed to only those that<br />

need to be repaired.<br />

6. Click the Retarget/Delete Value column, and use the pull-down list to fix the broken<br />

reference.<br />

• To locate the object you want to reference, click Browse.<br />

• To delete the object that contains the broken reference, click Delete Object.<br />

• To clear an existing value, click None.<br />

• To use a reference that you have assigned to another object during this repair session,<br />

click the name of the reference.<br />

7. Click the Apply to column and identify where you want to apply the reference<br />

• To apply the change to this object only, click This Reference Only.<br />

• To apply the change to every object that references the same object, click Entire<br />

Project.<br />

8. click OK.<br />

Dimensional Metadata<br />

A dimension is a hierarchical structure that represents a major segment of your business<br />

information. For example, in a project for sales analysis, you might include these dimensions:<br />

• Dates of Sales (Time)<br />

• Locations of Sales (Region)<br />

• Product and Purchase Details (Products)<br />

• Customer Information (Customers)<br />

Each dimension consists of one or more paths that typically contain several levels. The time<br />

dimension may consist of the years, quarters, months, weeks, and days when sales were made.<br />

The Locations of Sales dimension may be grouped into regions, states, and cities. The Products<br />

dimension may organize your sale items by type, brand, model, color, and packaging.<br />

In Framework Manager you can define dimensional information for any query subject, whether<br />

or not it was imported from a dimensionally aware data source.<br />

To support dimensional model, Framework Manager lets you:<br />

• import hierarchy metadata from an SAP BW data source (p. 92)<br />

When you import SAP BW metadata, Framework Manager generates hierarchies to match<br />

the data source structure.<br />

• create a star schema grouping (p. 93)<br />

You can optimize your data warehouse metadata by grouping objects into star schemas.<br />

• specify dimensional information (p. 93)<br />

By organizing your data into hierarchies and levels, you can analyze results at various levels<br />

of detail in reports.<br />

Note that dimensions do not appear in the reporting application because they are only used for<br />

preparing the project for reporting.<br />

User Guide 91


Chapter 3: Preparing a Model for Reporting<br />

SAP BW Hierarchies<br />

During import, Framework Manager generates a query subject for each hierarchy of an SAP BW<br />

characteristic as well as one query subject that represents the actual characteristic. Only one<br />

query subject of a given characteristic can be used in a report at a time. Therefore, it is best to<br />

group query subjects that represent the hierarchies of a single characteristic into a folder so that<br />

report authors know which query subjects are related to each characteristic.<br />

Framework Manager supports the following types hierarchies:<br />

• characteristic: lists all of the characteristic values<br />

• text nodes: contain only text and do not reference any other data source object<br />

• characteristic value: nodes of each level of a presentation hierarchy are values from another<br />

characteristic.<br />

• recursive: the nodes of the entire presentation hierarchy are from the characteristic itself<br />

Note: Framework Manager does not support hierarchies that contain two or more types of<br />

nodes.<br />

Versioned Hierarchies<br />

There are three types of versioned hierarchies that you can import from an SAP BW data<br />

source:<br />

• Version Dependent Hierarchy<br />

A hierarchy can have multiple versions. Each version of a hierarchy can have the same<br />

name but a different structure, such as Sales by Region and Sales by Manager. During<br />

import, Framework Manager creates a separate query subject for each version.<br />

• Entire Hierarchy Time Dependent<br />

Each version has an associated time period that does not overlap with any other versions of<br />

the same hierarchy. The structure of each version can be different. During import,<br />

Framework Manager creates a query subject for each version and includes the applicable<br />

time period as part of the query subject name.<br />

• Time Dependent Hierarchy Structure<br />

There is a single version of the hierarchy, but nodes within the hierarchy can be assigned<br />

applicable time periods. Over time, the structure of the hierarchy can change. For example,<br />

levels that represent different sales districts can be added or removed over time. During<br />

import, Framework Manager creates a query subject whose structure is based on the<br />

current date.<br />

You can apply a hierarchy to a characteristic and control which version of a hierarchy to use, or<br />

(if the hierarchy is time-dependent) which date to use to control the version.<br />

Framework Manager sets the query key date of time-dependent hierarchies to an arbitrary date,<br />

so that you can select specific versions of hierarchies. The hierarchy that you apply to a<br />

characteristic depends upon the type of query key date:<br />

• fixed date<br />

Include only the version that corresponds to the fixed date in the underlying InfoQuery.<br />

• current date<br />

Include only the version that encompasses a time span appropriate for "now" until some<br />

reasonable time in the future.<br />

• variable<br />

Set the date for the variable in the Framework Manager and include only the version of the<br />

hierarchy applicable to that date.<br />

In Framework Manager, if a versioned hierarchy is not time-dependent and has a fixed version,<br />

only include the version of the hierarchy associated with the selected version. Otherwise the<br />

report author is presented with a hierarchy that is inaccessible.<br />

92 Cognos ReportNet (TM) Framework Manager


Chapter 3: Preparing a Model for Reporting<br />

Create a Star Schema Grouping<br />

Dimension tables can have duplicate data to support fact rows at different grains of aggregation.<br />

This means that each fact table can have multiple surrogate key relationships with different<br />

levels of the same dimension table. For example each level of the Time dimension contains the<br />

same surrogate key value for Month.<br />

Star-schema groups can contain the selected query subjects or shortcuts to the query subjects.<br />

The objects in a star-schema grouping cannot reference, or be referenced by, any object outside<br />

the group. Therefore, Framework Manager automatically creates a shortcut of any object that is<br />

referenced by an object outside of the group.<br />

When you create a grouping you can select one or more query subjects. Generally, you select a<br />

single query subject when the query subject is a Fact that has a relationship to every query<br />

subject that you want in the star-schema group. When you create a star schema group that is<br />

based on one query subject:<br />

• the query subject, rather than a shortcut, is moved to the group.<br />

• Framework Manager displays a list of query subjects with which it has a relationship so that<br />

you can quickly select the query subjects that you want in the group.<br />

• the name of the group is based on the name of the fact table<br />

• the new group is created under the same parent as the selected query subject.<br />

Selecting multiple query subjects is useful if you want to group query subjects that do not<br />

already have relationships defined. If you select multiple query subjects, the new group is<br />

placed under the nearest common parent of the query subjects.<br />

Steps<br />

1. Select one or more query subjects.<br />

2. Click Actions, Create Star Schema Grouping.<br />

3. To exclude a query subject from the group, in the Selected query subject list, clear the<br />

check box next to the query subject.<br />

4. Specify the criteria<br />

• To add shortcuts to the grouping, select Create a shortcut for all selected objects.<br />

• To move the objects to the grouping, select Create shortcuts only for objects that are<br />

used outside the star schema.<br />

5. To move the selected objects into a separate namespace:<br />

• ensure the Create a new namespace for this grouping check box is selected.<br />

• enter the name of the new namespace into the Namespace name field.<br />

6. Click OK.<br />

Specify Dimension Information<br />

It is common for dimension tables in data warehouses to be denormalized. The advantage is<br />

that there are fewer tables to process, which makes the queries much simpler and faster. For<br />

example, the normalized version of a Geography table uses three tables to organize geographic<br />

information.<br />

Table<br />

Country<br />

StateInfo<br />

CityInfo<br />

Columns<br />

CountryCode, CountryName, CountryHeadOfState,<br />

CountryPopulation, and CountrySize<br />

CountryCode*, StateCode, StateName, and<br />

StatePopulation<br />

CountryCode*, StateCode*, CityCode, CityName,<br />

CityPopulation<br />

* indicates that the column functions as a unique identifier.<br />

User Guide 93


Chapter 3: Preparing a Model for Reporting<br />

The disadvantage of denormalization is that hierarchical information cannot be derived from<br />

table definitions. This information is particularly important when the structure is not intuitive. For<br />

example, product information can be organized as a product line that contains product types,<br />

which in turn contain products. However it can also be organized as product types containing<br />

product lines, which in turn contain products.<br />

Framework Manager lets you define this hierarchical information for relational metadata and use<br />

it to optimize SQL generation. You can add hierarchy and level properties to any query subject<br />

that references a relational data source. When you import SAP BW metadata, hierarchical<br />

metadata is automatically generated, and cannot be changed in Framework Manager.<br />

In Framework Manager, dimensional metadata is represented in the following way:<br />

• levels reference 0:n query items<br />

• hierarchies reference 0:n levels<br />

• query subjects can have 0:n hierarchies and 0:n levels<br />

Each query subject that is based on dimensional data contains one or more levels that<br />

represent the information hierarchies that may be explored in Framework Manager. Levels<br />

contain categories that are generated from, or matched to, column values in the source data.<br />

Each source level is associated with one or more columns in the source file. Facts are<br />

associated with levels to identify to the reporting application which numeric query items can be<br />

aggregated against<br />

After you define a level you can use it in a hierarchy to establish a relationship between the<br />

levels. The order of levels in a hierarchy determines the path that the user must follow to get to<br />

the level of granularity they require. For example Country contains State data, while the State<br />

level contains City data. You can reorder the levels in a hierarchy by using drag and drop.<br />

Each key is composed of one or more query item(s) that uniquely define the level. By default,<br />

the key is the query item that defines the level. You can use a single query item as a key if that<br />

item uniquely identifies the level. For example, Product_Number uniquely identifies each<br />

Product. Use composite keys when two or more query items are required to uniquely identify the<br />

level. For example, the combination of country and city are required to uniquely identify each<br />

city.<br />

Note that each level must be uniquely identified on its own, not by other levels within a hierarchy.<br />

Steps<br />

1. Select the query subject and click Actions, Specify Dimension Information.<br />

2. Create one or more levels<br />

• To create a level that is associated with a specific hierarchy, drag a query item from the<br />

Available Items list to the Hierarchies list.<br />

Framework Manager creates a hierarchy if one does not exist.<br />

• To create a level that you can use in multiple hierarchies, drag a query item from the<br />

Available Items list into the Levels list.<br />

Tip: To reuse an existing level, drag the level from the Levels list into the Hierarchies<br />

list<br />

3. Define a key for each level by dragging one or more query items in the Available Items list<br />

to the Key list.<br />

By default, Framework Manager add the names of any container levels to the key.<br />

4. To use the only specified key as a unique identifier, check the Unique Key box.<br />

Do this only if the key values are unique regardless of their context, such as postal code<br />

values.<br />

5. Identify query items that users need to report on by dragging query items from the<br />

Available Items list to the Attributes list.<br />

6. Click OK.<br />

94 Cognos ReportNet (TM) Framework Manager


Chapter 4: Publishing a Project<br />

Set Governors<br />

You must create a package in Framework Manager to contain all or part of your project. You then<br />

publish the package to the ReportNet server so that the report authors can use the metadata.<br />

Before you publish a package, you must create or open a project in Framework Manager (p. 20)<br />

and import metadata into the project (p. 25). You might also want to refine the project for<br />

reporting (p. 53) by creating and modifying the objects in the project.<br />

To publish a project:<br />

❑ Check the project to ensure that the contents are consistent and do not contain any errors<br />

(p. 104).<br />

❑ Set governors for reports (p. 95).<br />

❑ Create custom packages to suit different report authors’ requirements (p. 97).<br />

❑ Add security to the package (p. 98).<br />

❑ Analyze the effect of the published package on already published packages (p. 104).<br />

❑ Specify languages in the package (p. 103).<br />

❑ Publish the package to a location that report authors can access (p. 103).<br />

❑ Manage the packages in a project (p. 105)<br />

You can set limits to the data retrieved in a query subject test or the report design mode by<br />

setting governors. You use governors to reduce system resource requirements and improve<br />

performance.<br />

SQL is generated automatically on demand when you<br />

• run a report in Report Studio or Query Studio<br />

• test a query item or relationship in Framework Manager<br />

• create a new query subject by transforming relationships (p. 65) or merging objects (p. 64)<br />

Governors control SQL generation. As a result, when you set the outer join governor to deny<br />

you will not be allowed to automatically generate, in any of the actions listed above.<br />

This governor does not apply to SQL that is not generated on demand, but is obtained by other<br />

means. If you set the outer join governor to deny, it will not apply to the permanent SQL found in<br />

a data source query subject, whether the SQL was generated on import (p. 25), manually<br />

entered, or created by transforming relationships (p. 65) or merging objects (p. 64).<br />

User Guide 95


Chapter 4: Publishing a Project<br />

You set governors before you create packages to ensure the metadata in the package contains<br />

the specified limits.<br />

Limit<br />

Report table limits<br />

Data retrieval limits<br />

Query execution time limits<br />

Large text items limits<br />

Outer joins activities<br />

Cross-product joins<br />

activities<br />

Description<br />

Controls the number of tables that a<br />

user can retrieve in a query or report.<br />

Tables are counted as they are<br />

retrieved. An error message appears<br />

when the preset number of tables is<br />

reached.<br />

Controls the number of rows that a user<br />

can retrieve in a query or report. Rows<br />

are counted as they are retrieved. An<br />

error message appears when the<br />

preset number of rows is reached.<br />

Limits the time that a query can take.<br />

An error message appears when the<br />

preset number of seconds is reached.<br />

Controls the size of BLOBS (binary<br />

large objects) that a user can retrieve in<br />

a query or report. The BLOB size is<br />

truncated to the size you specify. An<br />

error message appears when the<br />

preset number of characters is<br />

reached.<br />

Controls whether outer joins can be<br />

used in your query or report. An outer<br />

join retrieves all rows in one table, even<br />

if there is no matching row in another<br />

table. This type of join can produce<br />

very large queries and reports.<br />

Note: For SAP BW metadata, setting<br />

this governor to "allow" lets you<br />

generate all relationships as<br />

outer-joins. This setting can be<br />

overridden in Report Studio.<br />

Note: If you set a governor to deny<br />

outer joins, you will be notified only if<br />

you create a relationship, in the Object<br />

Diagram View, that includes outer joins.<br />

You will not be notified if, you create a<br />

relationship, in a data source query<br />

subject or by transforming a<br />

relationship into a query subject, that<br />

includes outer joins.<br />

Controls whether cross-product joins<br />

can be used in your query or report. A<br />

cross-product join retrieves data from<br />

tables without joins. This type of join<br />

can take a long time to retrieve and can<br />

produce meaningless results.<br />

For information about troubleshooting governors, see Appendix A: "Troubleshooting" (p. 107).<br />

96 Cognos ReportNet (TM) Framework Manager


Chapter 4: Publishing a Project<br />

Steps<br />

1. From the Project menu, click Edit Governors.<br />

2. Specify the limits that you want to use when retrieving data.<br />

3. Click OK.<br />

Create or Modify a Package<br />

You create a package to make metadata available to report authors. A package is a subset of a<br />

project. It must contain all the information that a specific user or group of users needs to create<br />

reports.<br />

A package contains query subjects whose SQL defines the query items and relationships that<br />

the package retrieves. When you create a package, you select the objects that a user will want<br />

to report on. When you create or modify a package, you can also apply security to a package<br />

(p. 98).<br />

For example, if your data source contains information from different areas of a business, you<br />

might decide to create different package for Human Resources, and Finance. Ensure that your<br />

package meets a broad but related reporting need. Each report can contain information from a<br />

single package only.<br />

Once a package is published to the ReportNet server, it is available for use by report authors.<br />

Nested Packages<br />

When you create nested packages, you create a master package that is based on other existing<br />

packages. You use nested packages to reuse model information. Using nested packages saves<br />

you time, and they are easier to maintain. Another advantage of using a nested package is that<br />

you publish only the master package.<br />

For example, you create three separate packages named Canada, Mexico, and the United<br />

States. Each package contains the project objects and security appropriate for that package.<br />

You can create one master North America package and include the packages Canada, Mexico,<br />

and the United States. When you need to publish the package for report authors, you publish<br />

only the North America package.<br />

Select, Hide, Unselect<br />

When you create a package, you can choose whether objects in a project can be selected<br />

based on the requirements of reports authors.<br />

Option<br />

Select<br />

Hide<br />

Unselect<br />

Description<br />

The object can be used in reports and can be selected<br />

by report authors.<br />

The data within the object can be used in reports, but the<br />

object cannot be selected by report authors.<br />

For example, you include a model query subject in a<br />

package. Because model query subjects are dependent<br />

on data source query subjects (p. 53), you must add the<br />

data source query subject to your package. If you do not<br />

want report authors to see the data source query<br />

subject, you hide it.<br />

The object is not published and cannot be used for<br />

reports and cannot be selected by report authors.<br />

For example, package A has the query subject Country hidden and package B has the query<br />

subject Country selected. If package C includes package A and package B, then Country is<br />

included. However, if package C includes package A and package B, and you override the query<br />

subject Country in package C so that it is unselected, then Country is unselected.<br />

User Guide 97


Chapter 4: Publishing a Project<br />

Packaging SAP BW Metadata<br />

When you import SAP BW data, Framework Manager generates query items that represent<br />

surrogate keys to simplify join conditions in the star schema. These query items are<br />

automatically hidden in all packages, since they represent items that cannot be queried.<br />

If you select "Enhance the model for SAP BW organization of objects" during import, Framework<br />

Manager creates a query item folder in the Key Figures query subject called Surrogate Keys.<br />

While the query items in this folder are hidden, the folder, by default, is visible in all published<br />

packages. Therefore, you should hide the Surrogate Key query item folder, if it exists, when<br />

publishing models.<br />

Steps to Create a Package<br />

1. Click the Packages folder, and from the Actions menu, click Create, Package.<br />

2. Follow the instructions in the Create Package wizard.<br />

• Choose the location of the objects, either from the project or from existing packages.<br />

Tip: If you have created other packages, we s<strong>ug</strong>gest that you add package references when<br />

you create a package by clicking Using existing packages.<br />

• To accept the default package access security, click Finish. Otherwise, you can define<br />

access to your package by adding a user, group, or role.<br />

• Select the set of data source functions you want available in the package.<br />

For more information, see "Define Function Sets" (p. 48)<br />

3. Click Finish and choose whether to publish the package.<br />

Steps to Modify a Package<br />

1. Right-click the package you want to modify, and then click Edit Definition.<br />

2. Click the objects you want to add to or remove from the package.<br />

Tip: To toggle thro<strong>ug</strong>h the options for an object, click the object icon, or select an option<br />

from the list. For more information, see "Select, Hide, Unselect" (p. 97).<br />

3. Click OK.<br />

4. If you want to add or remove package references to the package you are modifying, click<br />

Edit.<br />

5. Click OK.<br />

Security in Framework Manager<br />

In Framework Manager, security is a way of restricting access to metadata and data across<br />

ReportNet products. There are three types of security in Framework Manager, each type uses<br />

users, groups, and roles to define access:<br />

• data security (p. 100)<br />

You create a security filter and apply it to a specific query subject. The filter controls the data<br />

that is shown to report authors when they set up their reports.<br />

• metadata security (p. 101)<br />

You apply security to a package and identify who has access to that package.<br />

• object-based security (p. 101)<br />

You secure an object directly by either making it visible or keeping it hidden.<br />

There are business reasons for restricting access to data. For example, you may have data that<br />

contains confidential data, and only specific users are allowed to see it. You may have a variety<br />

of data, and your users only need to retrieve data from specific tables or columns. Or, you may<br />

have a table that contains many records, and your users only need to retrieve a subset of<br />

records from that table.<br />

If you are using SAP BW metadata, there can be underlying SAP BW security that affects your<br />

users access to level members. Therefore, assigning a user access to a level does not<br />

guarantee that the user also has access to the members in that level.<br />

98 Cognos ReportNet (TM) Framework Manager


Chapter 4: Publishing a Project<br />

Before you add security in Framework Manager, ensure that security has been set up correctly<br />

in ReportNet. For more information, see the Administration and Security Guide.<br />

Add a User, Group, or Role<br />

Users and groups are created for authentication and authorization purposes. You can use users<br />

and groups created in third-party authentication providers, as well as create your own, in<br />

Cognos ReportNet.<br />

In Framework Manager, you add data security (p. 100) and metadata security (p. 101) using<br />

these users, groups, and Cognos groups.<br />

For more information about security, see the Administration and Security Guide.<br />

Users<br />

A user entry is created and maintained in a third-party authentication provider to uniquely<br />

identify a human or a computer account. You can not create users in Cognos ReportNet.<br />

Information about users, such as first and last names, passwords, IDs, locales, and e-mail<br />

addresses, is stored in the providers.<br />

Users can become members of groups defined in third-party authentication providers and<br />

groups defined in ReportNet. A user can belong to one or more groups. If users are members of<br />

more than one group, their access permissions are merged.<br />

Groups and Roles<br />

Examples of groups are Employees, Developers, or Sales Personnel. Members of groups can<br />

be users and other groups. Group membership is part of the users’ basic identity. When users<br />

log on, they cannot select a group they want to use for a session. They always log on with all the<br />

permissions associated with the groups to which they belong.<br />

A role is a special group. It represents a collection of users that have similar responsibilities and<br />

similar privileges in the organization. Members of roles can be users, groups, and other roles.<br />

Role membership is not part of the users’ basic identity.<br />

In ReportNet, you can use groups created by your organization in third-party authentication<br />

providers, or create new groups in the Cognos namespace.<br />

You create Cognos groups when<br />

• you can not create groups in your authentication provider<br />

• groups are required that span multiple namespaces<br />

• portable groups are required that can be deployed<br />

• you want to address specific needs of ReportNet administration<br />

• you want to avoid cluttering your organization security systems with information used only in<br />

ReportNet<br />

Steps to Create a New Group or Role<br />

1. Right-click the package you want, and click Edit Package Access.<br />

2. Click New.<br />

3. Follow the instructions in the New Group wizard.<br />

4. Click Finish, and then click OK.<br />

Steps to Remove a Group or Role<br />

1. Right-click the package you want, and click Edit Package Access.<br />

2. Click the user, group, or role you want to remove, and click Remove.<br />

3. Click OK.<br />

When you remove Cognos groups or roles, you do not delete them from the third-party<br />

authentication provider or Cognos ReportNet.<br />

User Guide 99


Chapter 4: Publishing a Project<br />

Add Data Security<br />

Steps to Add a Group or Role<br />

1. Right-click the package you want to modify, and click Edit Package Access.<br />

2. Click Add.<br />

Tip: To view all the users in a group, select the Show users in the list check box, and click<br />

the group you want.<br />

3. Specify the users or groups<br />

• To add entries by selecting the names from the list, on the Navigate tab, select the<br />

check box next to the appropriate user, group, or role, and then click Add.<br />

• To search for users, groups, or roles in a namespace you are currently using, on the<br />

Search tab, type the search criteria, and click Search. When the entry appears in the<br />

Search results box, select it and click Add.<br />

• To add entries by typing the names, on the Type tab, in the Type the names text box,<br />

type the names of users, groups, and roles, in the following format, and then click Add.<br />

namespace_name;namespace_name/group_name;namespace_name/user_name<br />

For example, you add a Report Authors group and a user named scarter by typing the<br />

following<br />

LDAP;Cognos/Report Authors;LDAP/scarter.<br />

Separate each entry using a semicolon (;).<br />

The entries that you add appear in the Entries to be added box.<br />

Tip: Select all or Deselect all applies to the current page, which may not represent all<br />

available entries.<br />

4. Click OK twice.<br />

You can restrict the data represented by query subjects in a project by creating a security filter.<br />

The security filter controls the data that is shown to the report authors when they set up their<br />

reports.<br />

For example, your Sales team consists of a Sales Director, and four Sales Managers. You create<br />

a security filter that includes the groups directors and sales managers, and apply the filter to the<br />

salary query subject. When the package is available for report authors, and a report is<br />

generated for the Sales Managers and the Sales Director, only the Sales Director can see the<br />

salary information for the sales managers.<br />

You can base the security filter on existing security filters. If you choose this option, the security<br />

filter inherits the filter, and all the filter properties.<br />

When you create a security filter, you can also use existing project filters, or create new filters<br />

using the expression editor. For more information, see "Create a Filter" (p. 76).<br />

For more information about groups, see "Add a User, Group, or Role" (p. 99).<br />

Steps<br />

1. Right-click the query subject you want, and click Specify Security Filters.<br />

2. Click Add Groups.<br />

3. To view all the users in a group, select the Show users in the list check box, and click the<br />

group you want.<br />

100 Cognos ReportNet (TM) Framework Manager


Chapter 4: Publishing a Project<br />

4. Specify the users or groups<br />

• To add entries by selecting the names from the list, on the Navigate tab, select the<br />

check box next to the appropriate user, group, or role, and then click Add.<br />

• To search for users, groups, or roles in a namespace you are currently using, on the<br />

Search tab, specify the search criteria, and click Search. When the entry appears in the<br />

Search results box, select it and click Add.<br />

• To add entries by typing the names, on the Type tab, in the Type the names text box,<br />

type the names of users, groups, and roles, in the following format, and then click Add.<br />

namespace_name;namespace_name/group_name;namespace_name/user_name<br />

For example, you add a Report Authors group and a user named scarter by typing the<br />

following<br />

LDAP;Cognos/Report Authors;LDAP/scarter.<br />

Separate each entry using a semicolon (;).<br />

The entries that you add appear in the Entries to be added box.<br />

• To remove a group in the security filter, click Delete Group.<br />

Tip: Select all or Deselect all applies to the current page, which may not represent all<br />

available entries.<br />

5. Click OK.<br />

6. If you want to base the group on an existing group, in the Based On column, click a group<br />

from the list.<br />

Tip: If you do not see the group you want in the list, you must add the group to the security<br />

filter.<br />

7. If you want to add a filter to a group, in the Filter column, click either Create/Edit<br />

Embedded Filter or Insert from Model.<br />

8. Click OK.<br />

Adding Metadata Security<br />

When you add metadata security in a package, you specify which users, groups, and roles have<br />

access to certain parts of the published model.<br />

You can define metadata security when you create and publish packages in Framework<br />

Manager. A package is a secured subset of a project. A package can be published and can be<br />

included in other packages.<br />

You can add entries created both in third-party authentication providers and in ReportNet as<br />

members of a Cognos group. You can also organize your security according to business rules<br />

by creating new groups or roles or by removing groups or roles.<br />

To add metadata security:<br />

❑ Decide whether the objects can be selected, unselected, or hidden in the package (p. 97).<br />

❑ Add users, groups, and roles to the package (p. 99).<br />

Add or Remove Object-Based Security<br />

Metadata security can be applied directly to objects in a project. When you add object-based<br />

security, you apply a specific user, group, or role (p. 99) directly to the object. You choose to<br />

make the object visible to selected users or groups.<br />

By default, every object in your project is hidden to everyone. You use object-based security to<br />

make that object visible to selected users, groups, or roles. You can make every object in a main<br />

project namespace visible to selected users or groups, except relationships. For example, in<br />

your project, you may have a Salary query subject. You can make the Salary query subject<br />

visible to the Managers group, and keep it hidden from everyone.<br />

When you secure an object, a package is automatically created in Framework Manager. The<br />

package name consists of an underscore (_) and the name of the secured object. These<br />

object-based packages are visible in the Object Explorer. You can use this package to see which<br />

objects in the project are included, hidden, or excluded from a specific user group.<br />

User Guide 101


Chapter 4: Publishing a Project<br />

Tip: To see a list of the object-based packages, double-click the Packages folder. The list<br />

appears in the Object Explorer View. To see which objects are secured against that specific<br />

object-based package, right-click the package, and click Explore Packages (p. 105).<br />

Every time you include that object in a package, and publish it for report authors, the same<br />

security rules apply for that object. When you publish a package that contains secured objects,<br />

the visible objects for ReportNet users are the intersection of the package definition and the<br />

object security settings. If object-based security is not used, security applied to a package<br />

remains unchanged.<br />

Steps to Set Object-Based Security<br />

1. Right-click the object you want to secure and click Give visibility rights.<br />

2. Specify the users or groups<br />

Tip: To view all the users in a group, select the Show users in the list check box, and click<br />

the group you want.<br />

• To add entries by selecting the names from the list, on the Navigate tab, select the<br />

check box next to the appropriate user, group, or role, and then click Add.<br />

• To search for users, groups, or roles in a namespace you are currently using, on the<br />

Search tab, specify the search criteria, and click Search. When the entry appears in the<br />

Search results box, select it and click Add.<br />

• To add entries by typing the names, on the Type tab, in the Type the names text box,<br />

type the names of users, groups, and roles, in the following format, and then click Add.<br />

namespace_name;namespace_name/group_name;namespace_name/user_name<br />

For example, you add a Report Authors group and a user named scarter by typing the<br />

following<br />

LDAP;Cognos/Report Authors;LDAP/scarter.<br />

Separate each entry using a semicolon (;).<br />

The entries that you add appear in the Entries to be added box.<br />

Tip: Select all or Deselect all applies to the current page, which may not represent all<br />

available entries.<br />

3. Click Add.<br />

4. Click OK.<br />

A list of new and updated object-based packages appears.<br />

Steps to Remove Object-Based Security<br />

1. Right-click the secured object and click Remove visibility rights.<br />

2. Specify the users or groups<br />

Tip: To view all the users in a group, select the Show users in the list check box, and click<br />

the group you want.<br />

• To add entries by selecting the names from the list, on the Navigate tab, select the<br />

check box next to the appropriate user, group, or role, and then click Add.<br />

• To search for users, groups, or roles in a namespace you are currently using, on the<br />

Search tab, specify the search criteria, and click Search. When the entry appears in the<br />

Search results box, select it and click Add.<br />

• To add entries by typing the names, on the Type tab, in the Type the names text box,<br />

type the names of users, groups, and roles, in the following format, and then click Add.<br />

namespace_name;namespace_name/group_name;namespace_name/user_name<br />

For example, you add a Report Authors group and a user named scarter by typing the<br />

following<br />

LDAP;Cognos/Report Authors;LDAP/scarter.<br />

Separate each entry using a semicolon (;).<br />

The entries that you add appear in the Entries to be added box.<br />

Tip: Select all or Deselect all applies to the current page, which may not represent all<br />

available entries.<br />

3. Click Add.<br />

102 Cognos ReportNet (TM) Framework Manager


Chapter 4: Publishing a Project<br />

4. Click OK.<br />

A list of packages that will be affected by these changes appears.<br />

Steps to Clear All Object-based Security<br />

1. Right-click the secured object and click Clear all visibility rights.<br />

A list of objects that will become unsecured appears.<br />

2. Click OK to accept changes.<br />

Specify Languages<br />

You can ensure that the package you publish contains the languages you want report authors to<br />

see on the ReportNet server.<br />

You must add languages to the project (p. 85) before you can specify languages report authors<br />

require in a package.<br />

Steps<br />

1. Right-click a package, and click Specify Languages.<br />

2. Click one or more languages and use the arrow buttons to move them from the Unselected<br />

Model Languages box to the Selected Languages box.<br />

Tip: To select more than one language, use Ctrl+click.<br />

3. Click OK.<br />

Publish a Package<br />

You can publish a package (p. 97) to a location that is convenient for report authors. When you<br />

publish a package, you can choose to save either to the ReportNet Server or to a network<br />

location.<br />

To avoid potential problems, before publishing a package, troubleshoot the package by using the<br />

verify check box in the Publish wizard to ensure that it is complete and does not contain any<br />

errors. When you check a package, Framework Manager s<strong>ug</strong>gests how to fix problems for<br />

• schema validation errors<br />

• invalid references<br />

• invalid association containership<br />

If the package you want to publish contains invalid references, Framework Manager includes the<br />

required object in the package but keeps it hidden.<br />

For information about using a published package, see the Report Studio User Guide.<br />

When you publish a package, you can set the number of model versions to retain on the<br />

ReportNet server.<br />

Tip: To see the number of model versions set for a package, select a package and, in the<br />

Property pane, find the maxVersions property.<br />

Reports and Model Versions<br />

When you publish a package for the first time, you create a corresponding package on the<br />

ReportNet server. The ReportNet package contains a model but no reports.<br />

When you publish a package, you can select how many versions of the model you want to retain<br />

on the Cognos ReportNet server. The next time you publish the same package, you update the<br />

version of the model, in the existing package on the ReportNet server.<br />

User Guide 103


Chapter 4: Publishing a Project<br />

New or modified reports will use the latest version of the model in the package. When a report is<br />

saved, the version of the model used is saved in the report specification. If the package is<br />

republished, a report author is notified that the report will use the newest version of the model in<br />

the package. The report author must save the report to complete the update. If you open a<br />

saved report after the package it is based on is republished, one of two things happens:<br />

• If the original version of the package still exists, the report runs against the original version.<br />

• If the original version of the package no longer exists, the report is updated to run against<br />

the most recent version.<br />

For information about reports, see the Report Studio User Guide.<br />

Steps<br />

1. Click the package you want to publish.<br />

2. From the Actions menu, click Publish Packages.<br />

3. Choose where to publish the package:<br />

• To publish the package to the Framework Manager repository, click Cognos ReportNet<br />

Server.<br />

• To publish the package to a network location, click Location on the network.<br />

4. To enable model versioning, select the Enable model versioning check box.<br />

5. In the Number of model versions to retain box, select the number of model versions of<br />

the package to retain.<br />

Tip: To delete all but the most recently published version on the Cognos ReportNet server,<br />

select the Delete all previous model versions check box.<br />

6. To troubleshoot the package for errors before publishing, select the Verify the package<br />

before publishing check box.<br />

7. Follow the instructions to complete the steps in the Publish wizard.<br />

8. Click Publish.<br />

Analyze the Effects of Changes to a Package<br />

After you create a package (p. 97) and publish a package (p. 103) in Framework Manager, you<br />

can analyze the effects of any changes you made to a package on the reports which were<br />

created based on that package.<br />

You can compare a selected package in Framework Manager with a published package of the<br />

same name in Content Manager to show changes between the packages that could affect any<br />

reports based on the package. You can see details on each change, and which reports are<br />

affected by a specific selected change.<br />

Steps<br />

1. Select the published package you want to analyze and click Actions, Analyze Publish<br />

Impact.<br />

Note: The package you select must be a published package.<br />

2. In the Analyze Publish Impact window, choose what you want to view.<br />

Goal<br />

To view the change details for<br />

an object.<br />

To view report dependencies.<br />

Action<br />

In the Changed Model Items<br />

box, click an item under<br />

Change.<br />

In the Changed Model Items<br />

box, select an object, and click<br />

Find Report Dependencies.<br />

Repeat for each object.<br />

104 Cognos ReportNet (TM) Framework Manager


Chapter 4: Publishing a Project<br />

3. Click Close.<br />

Managing Packages<br />

You can use Framework Manager to manage your packages. You can view the security applied<br />

to a package, check which packages are secured by groups and users, explore packages in a<br />

project, and modify the administrative access of packages.<br />

Modify Package Access<br />

When you modify the package access, you see which users, groups, and roles are applied to<br />

that package.<br />

Steps<br />

1. Right-click the package you want and click Edit Package Access.<br />

2. Choose to either<br />

• add a user, group, or role to the package<br />

• remove a user, group, or role from the package<br />

• create a new group, user, or role and add it to the package<br />

For more information, see "Add a User, Group, or Role" (p. 99).<br />

3. Click OK.<br />

Modify Package Administrative Access<br />

When you apply administrative access to a package, you give access to the user(s) who are<br />

responsible for<br />

• republishing a package in Framework Manager to the ReportNet server.<br />

• ensuring that no reports are impacted when a Framework Manager package is republished<br />

to the ReportNet server.<br />

By default, when you publish a package, the user or group with the administrative role for<br />

reporting will be added in the Package Admin Access dialog.<br />

Steps<br />

Explore Packages<br />

1. Right-click the package you want and click Edit Package Admin Access.<br />

2. Choose to either<br />

• add a user, group, or role to the package<br />

• remove a user, group, or role from the package<br />

• create a new group, user, or role and add it to the package<br />

3. For more information, see "Add a User, Group, or Role" (p. 99).<br />

When you have a large number of projects and object-based security in a project, it can be<br />

difficult to keep everything organized. You can use explore packages to see the packages and<br />

roles in a project.<br />

In the Package Explorer, you see a list of all the packages (normal and object-based) in a<br />

project, as well as the objects that have been selected, unselected, or hidden for each package.<br />

In the Roles Explorer, you see a list of all the users, groups, and roles in a project, and in which<br />

package the object-based security is applied. You can also see whether the objects in the<br />

project are hidden or visible to that specific user, group, or role.<br />

User Guide 105


Chapter 4: Publishing a Project<br />

Steps<br />

1. Right-click the Packages folder and click Explore Packages.<br />

2. Choose one of the following<br />

• For package information, click the Package Explorer tab<br />

• For object-based security information, click the Roles Explorer tab<br />

3. To edit the package, in the Package Explorer tab, click Edit.<br />

For more information, see "Create or Modify a Package" (p. 97).<br />

4. Click Close.<br />

View Package Inclusion<br />

When you view the package inclusion of an object, you see, by package, where that object<br />

exists and whether it is selected, unselected, or hidden in that package.<br />

If the object is secured, you will also see the object-based package in which the object exists.<br />

Steps<br />

1. Right-click on the object you want to see and click View Package Inclusion.<br />

2. To edit the package, click Edit Package.<br />

For more information, see "Create or Modify a Package" (p. 97).<br />

3. Click OK.<br />

106 Cognos ReportNet (TM) Framework Manager


Appendix A: Troubleshooting<br />

Unable to See Test Results<br />

You test a query subject and do not see the results of the query in the test window. This may<br />

occur because the data from your data source is greater than the stop at limit of any Runtime<br />

Limits governor. The query stops at the specified limit, but the test result window does not<br />

contain any data.<br />

You can set the governor stop at limits to zero to view your query results.<br />

Errors in Queries That Use Macros<br />

If a data source query subject contains a macro in the projection list, (SELECT clause) of the<br />

SQL statement, you may get an error when you run a query that uses that query subject. This<br />

error occurs when the macro evaluates to a column name that is different from the Column<br />

Name property of the corresponding query item. The result is that the system is unable to locate<br />

item in the projection list.<br />

To correct this, you should specify an alias in the SQL that matches the Column Name property<br />

of the query item. Assigning an alias ensures that the name of the item in the projection list<br />

remains constant, as the results of evaluating the macro change.<br />

For example, the following query contains a session parameter, runLocale, whose value<br />

specifies which column the query retrieves:<br />

Select<br />

#$ColumnMap{$runLocale}# as CountryNameAlias<br />

From<br />

[GoSales].Country<br />

Unable to View the Result Set of a Stored Procedure<br />

If the result set of a stored procedure contains a CLOB (character large object) or BLOB (binary<br />

large object), you must modify the stored procedure before executing it.<br />

Steps to Use CLOBS<br />

1. Insert a Cast or Substring function to calculate a string based on the CLOB.<br />

Steps to Use BLOBS<br />

1. Create a model query subject that references the stored procedure.<br />

2. Remove the BLOB from the Select statement of the query subject.<br />

You can add query items to the Select statement that perform a lookup on the table that<br />

contains the BLOB data.<br />

Error When Switching the Language in Reporting<br />

Application<br />

When changing the language to any language other than the language used to publish a model<br />

in Framework Manager, an Invalid Query Subject Error message appears in Report Studio and<br />

Query Studio.<br />

User Guide 107


Appendix A: Troubleshooting<br />

This error originates in the model because queries that have parameters must use an alias in<br />

the SQL definition.<br />

Edit the definition of the query subject to ensure that any parameter in the projection list has an<br />

alias.<br />

You can also get an invalid query subject error if you use mismatched physical data sources in<br />

the same model.<br />

Required Currency Not Displayed<br />

If Framework Manager does not display the currency you require in the Currency dialog, you<br />

must ensure that you install the appropriate language packs to support the currency symbols<br />

you require. For example, to display the Indian currency symbol (rupee), you must run an<br />

operating system or install a language pack that can display this symbol. The Japanese<br />

operating system or Japanese language is one example that can display the Indian currency<br />

symbol (rupee).<br />

XML Validation Error During the Import of Third-party<br />

Metadata Sources<br />

In Framework Manager, when you import a third-party metadata source that does not match the<br />

type selected, the following XML validation error message appears.<br />

This file chosen is not a valid representation of the metadata type selected for import.<br />

For example, you try to import the XML file for an exported Architect model using the Cognos<br />

Impromptu XML option. Try the import again, specifying the correct metadata type.<br />

Expressions Imported from Business Objects Metadata<br />

Source Do Not Work<br />

The calculation, filter, and join expressions that are imported from a Business Objects metadata<br />

source do not work in Framework Manager. The reason is that Business Objects’ expression<br />

syntax is different from the syntax in Framework Manager.<br />

An example of a Business Objects expression<br />

@Select(Country\Country) LIKE 'C%'<br />

An example of the same filter in Framework Manager<br />

[gosales-oracle].[Country].[Country] LIKE 'C%'<br />

Similarly, embedded filters in the where clause of a query subject do not work. The syntax is<br />

imported as<br />

SALESTAFF.SALESTARGET>900000<br />

The same clause in Framework Manager might be:<br />

[gosales-oracle].SALESTAFF.SALESTARGET>900000<br />

In Framework Manager, after you have imported from Business Objects, you must edit these<br />

expressions manually to conform to the equivalent Framework Manager syntax.<br />

Extended Characters in Names of SQL Objects Imported<br />

from ERWin Metadata Source are Lost<br />

When you import from an ERWin metadata source, extended characters in object names in the<br />

SQL are converted to an underscore. For example, the table ¢Table is imported as _Table.<br />

In Framework Manager, you can edit the SQL definition manually, and restore the extended<br />

characters.<br />

108 Cognos ReportNet (TM) Framework Manager


Appendix A: Troubleshooting<br />

If you do not have the necessary keyboard support installed, you can use ALT + numeric keys.<br />

For example, you can create these characters Ç , ü , and é , by entering these combinations,<br />

respectively ALT + 128, ALT + 129, and ALT + 130. For more information, see the Microsoft<br />

documentation.<br />

Unable to Execute Stored Procedures Imported from<br />

ERWin Metadata Source<br />

If you import a stored procedure from an ERWin metadata source, you are unable to execute it.<br />

In Framework Manager, after you have imported from the ERWin metadata source, you must<br />

re-import the stored procedures directly from the database.<br />

Script Error Occurs When Testing Query Subjects in<br />

Framework Manager<br />

When you test a query subject in Framework Manager, and you do not have the most recent<br />

version of Internet Explorer, you will get a script error.<br />

It is important to apply all required operating system patches and to use only the versions of<br />

third-party software that are supported. Otherwise, your product may not work properly. For an<br />

up-to-date list of environ<br />

ments supported by Cognos products, see the Cognos support site<br />


Appendix A: Troubleshooting<br />

Here is the generated query that contains the information from all three tables:<br />

At first, this query looks like the wrong result. With a full outer join, you may have expected the<br />

following:<br />

If you separate the SQL from the presentation, you will see that the result is correct. What<br />

Framework Manager does is stitch together locally the two separate queries, one for the left side<br />

and one for the right side.<br />

Here is an example of the native SQL generated from the query:<br />

Select "SALES_STAFF"."FIRST_NAME" AS "C0", "SALES_STAFF"."LAST_NAME" AS "C1",<br />

"SALES_TARGET"."SALES_YEAR" AS "C2", sum("SALES_TARGET"."SALES_TARGET") AS "C3"<br />

from "GOSL"."dbo"."SALES_STAFF" "SALES_STAFF", "GOSL"."dbo"."SALES_TARGET"<br />

"SALES_TARGET"<br />

where "SALES_STAFF"."SALES_STAFF_CODE" "SALES_TARGET"."SALES_STAFF_CODE"<br />

group by "SALES_STAFF"."FIRST_NAME", "SALES_STAFF"."LAST_NAME",<br />

"SALES_TARGET"."SALES_YEAR"<br />

order by 1 asc , 2 asc , 3 asc<br />

Here is what the target query looks like:<br />

select "SALES_STAFF"."FIRST_NAME" AS "C0", "SALES_STAFF"."LAST_NAME" AS "C1",<br />

"ORDER_HEADER_DETAILS"."RETAILER_NAME" AS "C2", sum("ORDER_HEADER_DETAILS"."QUANTITY")<br />

AS "C3"<br />

from "GOSL"."dbo"."SALES_STAFF" "SALES_STAFF",<br />

(select "ORDER_HEADER"."RETAILER_NAME" AS "RETAILER_NAME",<br />

"ORDER_HEADER"."SALES_STAFF_CODE" AS "SALES_STAFF_CODE", "ORDER_DETAILS"."QUANTITY" AS<br />

"QUANTITY"<br />

from "GOSL"."dbo"."ORDER_HEADER" "ORDER_HEADER",<br />

"GOSL"."dbo"."ORDER_DETAILS" "ORDER_DETAILS"<br />

where "ORDER_HEADER"."ORDER_NUMBER" "ORDER_DETAILS"."ORDER_NUMBER")<br />

"ORDER_HEADER_DETAILS"<br />

where "SALES_STAFF"."SALES_STAFF_CODE" = "ORDER_HEADER_DETAILS". "SALES_STAFF_CODE"<br />

group by "SALES_STAFF"."FIRST_NAME", "SALES_STAFF"."LAST_NAME",<br />

"ORDER_HEADER_DETAILS"."RETAILER_NAME"<br />

110 Cognos ReportNet (TM) Framework Manager


Appendix A: Troubleshooting<br />

Here is what the quantity query looks like:<br />

Here is an example of the Cognos SQL generated from the query:<br />

select<br />

coalesce(D2.FIRST_NAME,D3.FIRST_NAME) as FIRST_NAME,<br />

coalesce(D2.LAST_NAME,D3.LAST_NAME) as LAST_NAME,<br />

D2.SALES_YEAR as SALES_YEAR,<br />

D3.RETAILER_NAME as RETAILER_NAME,<br />

D2.SALES_TARGET as SALES_TARGET,<br />

D3.QUANTITY as QUANTITY<br />

from<br />

(select<br />

SALES_STAFF.FIRST_NAME as FIRST_NAME,<br />

SALES_STAFF.LAST_NAME as LAST_NAME,<br />

SALES_TARGET.SALES_YEAR as SALES_YEAR,<br />

XSUM(SALES_TARGET.SALES_TARGET for<br />

SALES_STAFF.FIRST_NAME,SALES_STAFF.LAST_NAME,SALES_TARGET.SALES_YEAR ) as<br />

SALES_TARGET,<br />

RSUM(1 at<br />

SALES_STAFF.FIRST_NAME,SALES_STAFF.LAST_NAME,SALES_TARGET.SALES_YEAR for<br />

SALES_STAFF.FIRST_NAME,SALES_STAFF.LAST_NAME order by SALES_STAFF.FIRST_NAME<br />

asc,SALES_STAFF.LAST_NAME asc,SALES_TARGET.SALES_YEAR asc local) as sc<br />

from<br />

where<br />

group by<br />

order by<br />

"GO Sales".GOSL.dbo.SALES_STAFF SALES_STAFF,<br />

"GO Sales".GOSL.dbo.SALES_TARGET SALES_TARGET<br />

(SALES_STAFF.SALES_STAFF_CODE = SALES_TARGET.SALES_STAFF_CODE)<br />

SALES_STAFF.FIRST_NAME,<br />

SALES_STAFF.LAST_NAME,<br />

SALES_TARGET.SALES_YEAR<br />

FIRST_NAME asc,<br />

LAST_NAME asc,<br />

SALES_YEAR asc<br />

) D2<br />

full outer join (select<br />

SALES_STAFF.FIRST_NAME as FIRST_NAME,<br />

SALES_STAFF.LAST_NAME as LAST_NAME,<br />

ORDER_HEADER_DETAILS.RETAILER_NAME as RETAILER_NAME,<br />

XSUM(ORDER_HEADER_DETAILS.QUANTITY for<br />

SALES_STAFF.FIRST_NAME,SALES_STAFF.LAST_NAME,ORDER_HEADER_DETAILS.RETAILER_NAME ) as<br />

QUANTITY,<br />

RSUM(1 at<br />

SALES_STAFF.FIRST_NAME,SALES_STAFF.LAST_NAME,ORDER_HEADER_DETAILS.RETAILER_NAME for<br />

SALES_STAFF.FIRST_NAME,SALES_STAFF.LAST_NAME order by SALES_STAFF.FIRST_NAME<br />

asc,SALES_STAFF.LAST_NAME asc,ORDER_HEADER_DETAILS.RETAILER_NAME asc local) as sc<br />

from<br />

User Guide 111


Appendix A: Troubleshooting<br />

"GO Sales".GOSL.dbo.SALES_STAFF SALES_STAFF,<br />

(select ORDER_HEADER.RETAILER_NAME as<br />

RETAILER_NAME,ORDER_HEADER.SALES_STAFF_CODE as SALES_STAFF_CODE,ORDER_DETAILS.QUANTITY<br />

as QUANTITY from "GO Sales".GOSL.dbo.ORDER_HEADER ORDER_HEADER, "GO<br />

Sales".GOSL.dbo.ORDER_DETAILS ORDER_DETAILS where ORDER_HEADER.ORDER_NUMBER =<br />

ORDER_DETAILS.ORDER_NUMBER) ORDER_HEADER_DETAILS<br />

where<br />

(SALES_STAFF.SALES_STAFF_CODE = ORDER_HEADER_DETAILS.SALES_STAFF_CODE)<br />

group by<br />

SALES_STAFF.FIRST_NAME,<br />

SALES_STAFF.LAST_NAME,<br />

ORDER_HEADER_DETAILS.RETAILER_NAME<br />

order by<br />

FIRST_NAME asc,<br />

LAST_NAME asc,<br />

RETAILER_NAME asc<br />

) D3<br />

on (((D2.FIRST_NAME = D3.FIRST_NAME) and (D2.LAST_NAME = D3.LAST_NAME)) and<br />

(D2.sc = D3.sc))<br />

Here is an example with the correct query results:<br />

112 Cognos ReportNet (TM) Framework Manager


Appendix B: Data Format Properties<br />

This chapter contains definitions of data formatting properties found in Framework Manager.<br />

The definition for each formatting property is also displayed when you select a property in the<br />

Data Format dialog in the Framework Manager.<br />

Note that for SAP BW metadata:<br />

• any unit of meaure information that exists in SAP BW is automatically appended to the data<br />

value<br />

• you cannot define a format for each currency in a multi-currency query subject.<br />

Data Formatting Properties<br />

Calendar Type<br />

Clock<br />

Currency<br />

Currency Display<br />

Currency Symbol<br />

The following is a list of properties available in the data formatting dialog.<br />

Specifies the type of calendar to be displayed. The date values will be mapped to the selected<br />

calendar before being formatted. The default value is inherited from the user's content<br />

language. Note that the Japanese Imperial setting is only applicable for Japanese languages.<br />

Any other languages will ignore this property if it is set to Japanese Imperial.<br />

Specifies whether to display the time in 12-hour or 24-hour format. The default value is inherited<br />

from the user's content language.<br />

Specifies the currency to be used. The default currency symbol will be displayed unless the<br />

values of the Currency Display and Currency Symbol properties are changed. The default value<br />

is inherited from the model.<br />

Specifies whether to display the international or local currency symbol. By default, the local<br />

currency symbol is displayed.<br />

Specifies a character or characters as a symbol to identify the local currency. This symbol will<br />

precede the number and any sign, even if it is a leading sign. A space between the symbol and<br />

the numeric value can be specified by entering it in this property, after the symbol. The default<br />

value is inherited from the user's content language.<br />

Currency Symbol Position<br />

Specifies where the currency symbol will appear. If End is selected, any spaces that follow the<br />

character or characters in the Currency Symbol or International Currency Symbol properties will<br />

be rendered between the number and the symbol. The default value is inherited from the user's<br />

content language.<br />

User Guide 113


Appendix B: Data Format Properties<br />

Date Ordering<br />

Date Separator<br />

Date Style<br />

Decimal Separator<br />

Specifies the order in which to display the day, month, and year. The default value is inherited<br />

from the user's content language.<br />

Specifies the character to be displayed between the year, month and day. The default value is<br />

inherited from the user's content language.<br />

Specifies the style of date to be used. The results that will be rendered are determined by the<br />

language. Typically, Short uses only numbers, Medium uses some abbreviated words, Long<br />

uses complete words, and Full includes all available details.<br />

Specifies the character that will separate non-decimal numbers from decimals. This property is<br />

ignored if no decimals are displayed. The default value is inherited from the user's content<br />

language.<br />

Display AM / PM Symbols<br />

Display As Exponent<br />

Display Days<br />

Display Eras<br />

Display Hours<br />

Display Milliseconds<br />

Specifies whether or not to display the AM or PM symbols. The default value is inherited from<br />

the user's content language.<br />

Specifies whether or not to render values in scientific notations, using exponents. If this property<br />

is set to No, no scientific notations will be used. If it is not specified, scientific notations will be<br />

used only when values exceed the maximum number of digits. The default value is inherited<br />

from the user's content language.<br />

Specifies whether or not the day will be displayed. The format of the day can be controlled, by<br />

selecting one of the specific formats. Selecting Julian means that the 3 digit day of the year will<br />

be displayed. The default value is inherited from the user's content language.<br />

Specifies whether or not the era will be displayed. The default value is inherited from the user's<br />

content language.<br />

Specifies whether or not to display the hours. The default value is inherited from the user's<br />

content language.<br />

Specifies whether or not to display the milliseconds. The format of the milliseconds can be<br />

controlled, by selecting one of the specific formats. This property is ignored if seconds are not<br />

displayed. The default value is inherited from the user's content language.<br />

114 Cognos ReportNet (TM) Framework Manager


Display Minutes<br />

Display Months<br />

Display Seconds<br />

Display Time Zone<br />

Display Weekdays<br />

Display Years<br />

Exponent Symbol<br />

Group Size (digits)<br />

Appendix B: Data Format Properties<br />

Specifies whether or not to display the minutes. The format of the minutes can be controlled, by<br />

selecting one of the specific formats. The default value is inherited from the user's content<br />

language.<br />

Specifies whether or not the month will be displayed. The format of the month can be controlled,<br />

by selecting one of the specific formats. The default value is inherited from the user's content<br />

language.<br />

Specifies whether or not to display the seconds. The format of the seconds can be controlled, by<br />

selecting one of the specific formats. The default value is inherited from the user's content<br />

language.<br />

Specifies whether or not to display the time zone. The default value is inherited from the user's<br />

content language.<br />

Specifies whether or not the weekday will be displayed. The format of the weekday can be<br />

controlled, by selecting one of the specific formats. The default value is inherited from the user's<br />

content language.<br />

Specifies whether or not the year will be displayed. The first two digits of the year (century) can<br />

be controlled, by selecting one of the associated property values. The default value is inherited<br />

from the user's content language.<br />

Specifies the character to be displayed to identify exponents if the scientific notation is used.<br />

The symbol will be rendered after the number, separated by a space. The default value is<br />

inherited from the user's content language.<br />

Specifies the primary grouping size. This represents the number of digits left of the decimal<br />

point to be grouped together and separated by the thousands separator. The default value is<br />

inherited from the user's content language.<br />

International Currency Symbol<br />

Mantissa (digits)<br />

Specifies a character or characters as a symbol to identify the international currency. This<br />

symbol will take the position of the currency symbol. A space between the symbol and the<br />

numeric value can be specified by entering it in this property, after the symbol. The default value<br />

is inherited from the user's content language.<br />

Specifies the number of digits to be displayed following the exponent symbol if the scientific<br />

notation is used.<br />

User Guide 115


Appendix B: Data Format Properties<br />

Maximum No. of Digits<br />

Specifies the maximum number of digits that can be displayed, including both sides of the<br />

decimal point. If the maximum number of digits is not sufficient to display the value, a scientific<br />

notation will be used. The default value is inherited from the user's content language.<br />

Minimum No. of Digits<br />

Specifies the minimum number of digits that can be displayed, including both sides of the<br />

decimal point. If the minimum number of digits is too high to display a value, the padding<br />

character will be used. The default value is inherited from the user's content language.<br />

Missing Value Characters<br />

Negative Pattern<br />

Specifies the character or characters to be displayed when the value is missing. If no value is<br />

entered for this property, an empty string will be displayed.<br />

Specifies a presentation format that is based on patterns, for negative numbers. Some<br />

restrictions exist for negative patterns.<br />

Negative Sign Position<br />

Specifies where the negative sign will appear. The default value is inherited from the user's<br />

content language.<br />

Negative Sign Symbol<br />

Specifies how to display negative numbers. The default value is inherited from the user's content<br />

language.<br />

No. of Decimal Places<br />

Padding Character<br />

Specifies the number of digits to be displayed to the right of the decimal point. If this property is<br />

not set, the number of digits displayed will be as required.<br />

Specifies the character that will be used to pad values that have fewer digits than the minimum<br />

number of digits. The default value is inherited from the user's content language.<br />

Pattern<br />

Specifies a presentation format that is based on patterns.<br />

Percentage Symbol<br />

Specifies whether to display the values per hundred (percent) or per thousand. The symbol will<br />

be appended to the number and any trailing sign. A space between the numeric value and the<br />

symbol can be specified by entering it in this property, after the symbol. The default value is<br />

inherited from the user's content language.<br />

Percent Scale (integer)<br />

Specifies the scale to be applied to values before formatting. This property complements the<br />

Scale (integer) property. It is applied after the numeric scaling. If no value is entered, the percent<br />

scale will be derived from the specified or inherited percentage type. For example, if the<br />

Percentage type is set to per thousand, the percent scale will be set to -3.<br />

116 Cognos ReportNet (TM) Framework Manager


Scale (integer)<br />

Appendix B: Data Format Properties<br />

Specifies how many digits to move the decimal delimiter for formatting purposes. For example,<br />

move the decimal three spaces to present values in thousands. The default value is inherited<br />

from the database field.<br />

Secondary Group Size (digits)<br />

Specifies the secondary grouping size. If a value is specified, it represents the number of digits<br />

left of the primary group that will be grouped together and separated by the thousands<br />

separator. If this property is left blank, the secondary grouping of digits is the same number as<br />

the primary group size, as specified by the Group Size (digits) property. The default value is<br />

inherited from the user's content language.<br />

Thousands Separator<br />

Time Separator<br />

Time Style<br />

Specifies how to delimit digit groups, such as thousands. This property is only used if the Use<br />

Thousands Separator property is set to Yes. The default value is inherited from the user's<br />

content language.<br />

Specifies the character to be displayed between hour, minute and second. The default value is<br />

inherited from the user's content language.<br />

Specifies the style of time to be displayed. The exact results that will be rendered are<br />

determined by the language. Typically, Short means that the minimum details will be displayed,<br />

Long adds seconds, and Full means that all details are displayed, including the time zone. The<br />

default value is inherited from the user's content language.<br />

Time Unit<br />

Specifies the values' unit of measure. This property will be ignored if any day or time<br />

components are shown. The default value is inherited from the user's content language.<br />

Use Thousands Separator<br />

Specifies whether or not the grouping delimiter will be applied as defined by the Group Size<br />

property. The default value is inherited from the user's content language.<br />

Zero Value Characters<br />

Specifies the character or characters to be displayed when the value is zero (0). If no value is<br />

entered for this property, the Maximum No. of Digits property determines how many zero digits<br />

to display.<br />

User Guide 117


Appendix B: Data Format Properties<br />

118 Cognos ReportNet (TM) Framework Manager


Appendix C: Using the Expression Editor<br />

An expression is any combination of operators, constants, functions, and other components that<br />

evaluates to a single value. You build expressions to create calculation and filter definitions. A<br />

calculation is an expression that you use to create a new value from existing values contained<br />

within a data item. A filter is an expression that you use to retrieve a specific subset of records.<br />

The Expression Editor UI displays the expression components that are supported by the data<br />

source in which the metadata is stored. For example, if you import metadata from an Oracle<br />

data source, the Expression Editor displays only the elements that are supported in Oracle.<br />

Note that SAP BW does not support any of the summary functions, constructs, and common<br />

functions, nor many of the operators and constants, that are listed in this appendix.<br />

Operators<br />

Operators specify what happens to the values on either side of the operator. Operators are<br />

similar to functions, in that they manipulate data items and return a result.<br />

-<br />

Performs arithmetic operations.<br />

Syntax<br />

- numeric_exp<br />

(<br />

Inserts an open parenthesis in your expression.<br />

Syntax<br />

(expression)<br />

)<br />

Inserts a closed parenthesis in your expression.<br />

Syntax<br />

(expression)<br />

*<br />

Performs arithmetic operations.<br />

Syntax<br />

value1 * value2<br />

,<br />

Separates expression components.<br />

Syntax<br />

expression(param1, param2)<br />

User Guide 119


Appendix C: Using the Expression Editor<br />

/<br />

Performs arithmetic operations.<br />

Syntax<br />

value1 / value2<br />

||<br />

Concatenates strings.<br />

Syntax<br />

string1 || string2<br />

+<br />

Performs arithmetic operations.<br />

Syntax<br />

value1 + value2<br />

-<br />

Performs arithmetic operations.<br />

Syntax<br />

value1 - value2<br />

<<br />

Compares values against a defined value and retrieves the values that are less than the defined<br />

value.<br />

Syntax<br />

value1 < value2<br />


Appendix C: Using the Expression Editor<br />

Syntax<br />

value1 > value2<br />

--><br />

Use with the Lookup operator to replace one value with another.<br />

Syntax<br />

Lookup (name) in (value1 --> value2) default (name)<br />

>=<br />

Compares values against a defined value and retrieves the values that are greater than or equal<br />

to the defined value.<br />

Syntax<br />

value1 >= value2<br />

and<br />

Returns true if the conditions on both sides of the expression are true.<br />

Syntax<br />

arg1 AND arg2<br />

auto<br />

Use with summary expressions to define the scope to be adjusted based on the grouping<br />

columns in the query.<br />

Syntax<br />

aggregate_function ( expression AUTO )<br />

between<br />

Determines if a value falls in a given range.<br />

Syntax<br />

name BETWEEN value1 and value2<br />

case<br />

Use with When, Then, Else, and End.<br />

Syntax<br />

CASE expression { WHEN expression THEN expression } [ ELSE expression ] END<br />

contains<br />

Determines if a string contains another string.<br />

Syntax<br />

string1 CONTAINS string2<br />

default<br />

Inserts a default value when the conditions are not met.<br />

Syntax<br />

expression DEFAULT(value)<br />

distinct<br />

Includes only distinct occurrences within a data item in a calculation.<br />

User Guide 121


Appendix C: Using the Expression Editor<br />

Syntax<br />

DISTINCT dataItem<br />

else<br />

Use with If or Case constructs.<br />

Syntax<br />

IF (condition) THEN .... ELSE (expression) , or CASE .... ELSE expression END<br />

end<br />

Use with Case When construct.<br />

Syntax<br />

CASE .... END<br />

for<br />

Use with summary expressions to define the scope of the aggregation in the query.<br />

Syntax<br />

aggregate_function ( expression FOR expression { , expression } )<br />

for all<br />

Use with summary expressions to define the scope to be all the specified grouping columns in<br />

the query. See also FOR clause.<br />

Syntax<br />

aggregate_function ( expression FOR ALL expression { , expression } )<br />

for any<br />

Use with summary expressions to define the scope to be adjusted based on a subset of the<br />

grouping columns in the query. Equivalent to FOR clause.<br />

Syntax<br />

aggregate_function ( expression FOR ANY expression { , expression } )<br />

for report<br />

Use with summary expressions to define the scope to be the whole query. See also FOR<br />

clause.<br />

Syntax<br />

aggregate_function ( expression FOR REPORT )<br />

if<br />

Use with Then and Else.<br />

Syntax<br />

IF (condition is true) THEN (action) ELSE (alternate action)<br />

in<br />

Determines if a value exists in a given list of values.<br />

Syntax<br />

exp1 IN (exp_list)<br />

122 Cognos ReportNet (TM) Framework Manager


Appendix C: Using the Expression Editor<br />

in_range<br />

Determines if an item exists in a given list of constant values or ranges.<br />

Syntax<br />

expression IN_RANGE { constant : constant [ , constant : constant ] }<br />

is missing<br />

Determines if a value is undefined in the data.<br />

Syntax<br />

value IS MISSING<br />

is null<br />

Determines if a value is undefined in the data.<br />

Syntax<br />

value IS NULL<br />

is not missing<br />

Determines if a value is defined in the data.<br />

Syntax<br />

value IS NOT MISSING<br />

is not null<br />

Determines if a value is defined in the data.<br />

Syntax<br />

value IS NOT NULL<br />

like<br />

Determines if a string matches the pattern of another string.<br />

Syntax<br />

string1 LIKE string2<br />

lookup<br />

Finds and replaces data with a value you specify.<br />

Syntax<br />

LOOKUP (name) in (value1 --> value2) default (name)<br />

not<br />

Returns true if the condition is false, otherwise returns false.<br />

Syntax<br />

NOT arg<br />

or<br />

Returns true if either of the two conditions on both sides of the expression is true.<br />

Syntax<br />

arg1 OR arg2<br />

User Guide 123


Appendix C: Using the Expression Editor<br />

prefilter<br />

Performs a summary calculation before applying the summary filter.<br />

Syntax<br />

summary ([expression] PREFILTER)<br />

rows<br />

Counts the number of rows output by the query. Use with Count().<br />

Syntax<br />

count(ROWS)<br />

starts with<br />

Determines if a string starts with a given string.<br />

Syntax<br />

string1 STARTS WITH string2<br />

then<br />

Use with If or Case constructs.<br />

Syntax<br />

IF (condition) THEN ...., or CASE expression WHEN expression THEN .... END<br />

when<br />

Use with Case construct.<br />

Syntax<br />

Summaries<br />

CASE [expression] WHEN .... END<br />

A summary executes a predefined function and returns a summary value.<br />

average<br />

Returns the average value of selected data items.<br />

Syntax<br />

average ( [distinct] numeric_exp [for (expr) [, (expr)] | auto] )<br />

Example<br />

average ( Sales )<br />

Result: The average of all Sales values.<br />

count<br />

Returns the number of selected data items excluding NULL values.<br />

Syntax<br />

count ( [distinct] expr [for (expr) [, (expr)] | auto] )<br />

Example<br />

count ( Sales )<br />

Result: The total number of entries under Sales.<br />

124 Cognos ReportNet (TM) Framework Manager


Appendix C: Using the Expression Editor<br />

maximum<br />

Returns the maximum value of selected data items.<br />

Syntax<br />

maximum ( [distinct] numeric_exp [for (expr) [, (expr)] | auto] )<br />

Example<br />

maximum ( Sales )<br />

Result: The maximum value of all Sales values.<br />

minimum<br />

Returns the minimum value of selected data items.<br />

moving-average<br />

Syntax<br />

minimum ( [distinct] numeric_exp [for (expr) [, (expr)] | auto] )<br />

Example<br />

minimum ( Sales )<br />

Result: The minimum value of all Sales values.<br />

Returns a moving average by row for a specified set of values of over a specified number of<br />

rows.<br />

Syntax<br />

moving-average ([distinct] numeric_exp, integer_const [for (expr) [, (expr)] | auto])<br />

Example<br />

moving-average ( Qty, 3 )<br />

Result: For each row, this displays the quantity and a moving average of the current row and the<br />

preceding two rows.<br />

moving-total<br />

Returns a moving total by row for a specified set of values over a specified number of rows.<br />

Syntax<br />

moving-total ( [distinct] numeric_exp, integer_const [for (expr) [, (expr)] | auto] )<br />

Example<br />

moving-total ( Qty, 3 )<br />

Result: For each row, this displays the quantity and a moving total of the current row and the<br />

preceding two rows.<br />

percentage<br />

Returns the percent of the total value for selected data items.<br />

Syntax<br />

percentage ( [distinct] numeric_exp [for (expr) [, (expr)] | auto] )<br />

Example<br />

percentage ( sales 98 )<br />

Result: Shows the percentage of the total sales for 1998 that is attributed to each sales<br />

representative.<br />

User Guide 125


Appendix C: Using the Expression Editor<br />

percentile<br />

Returns a value, on a scale of one hundred, that indicates the percent of a distribution that is<br />

equal to or below the selected data items.<br />

Syntax<br />

percentile ( [distinct] numeric_exp [for (expr) [, (expr)] | auto] )<br />

Example<br />

percentile ( Sales 98 )<br />

Result: For each row, displays the percentage that the current sales value represents when<br />

compared to the highest sales value.<br />

quantile<br />

Returns the rank of a value in terms of a range that you specify. It returns integers to represent<br />

any range of ranks, such as 1 (highest) to 100 (lowest).<br />

Syntax<br />

quantile ( [distinct] numeric_exp, integer_const [for (expr) [, (expr)] | auto] )<br />

Example<br />

Quantile ( Qty, 4 )<br />

Result: The quantity, the rank of the quantity value, and the quantity values broken down into 4<br />

quantile groups (quartiles).<br />

quartile<br />

Returns the rank of a value, represented as integers from 1 (highest) to 4 (lowest), relative to a<br />

group of values.<br />

Syntax<br />

quartile ( [distinct] numeric_exp [for (expr) [, (expr)] | auto] )<br />

Example<br />

quartile ( Qty )<br />

Result: This displays the quantity and the quartile of the quantity value represented as integers<br />

from 1 (highest) to 4 (lowest).<br />

rank<br />

Returns the rank value of selected data items.<br />

Syntax<br />

rank ( [distinct] numeric_exp [for (expr) [, (expr)] | auto] )<br />

Example<br />

rank ( Sales 98 )<br />

Result: For each row, this displays the rank value of sales for 1998 that is attributed to each<br />

sales representative.<br />

running-average<br />

Returns the running average by row (including the current row) for a set of values.<br />

Syntax<br />

running-average ( [distinct] numeric_exp [for (expr) [, (expr)] | auto] )<br />

Example<br />

running-average ( Qty )<br />

126 Cognos ReportNet (TM) Framework Manager


Appendix C: Using the Expression Editor<br />

Result: For each row, this displays the quantity and a running average of the current and the<br />

previous rows.<br />

running-count<br />

Returns the running count by row (including the current row) for a set of values.<br />

Syntax<br />

running-count ( [distinct] numeric_exp [for (expr) [, (expr)] | auto] )<br />

Example<br />

running-count ( Qty )<br />

Result: For each row, this displays the quantity and a running count of the position of current<br />

row.<br />

running-difference<br />

Returns a running difference by row, calculated as the difference between the value for the<br />

current row and the preceding row, (including the current row) for a set of values.<br />

Syntax<br />

running-difference ( [distinct] numeric_exp [for (expr) [, (expr)] | auto] )<br />

Example<br />

running-difference ( Qty )<br />

Result: For each row, this displays the quantity and a running difference between the value for<br />

the current row and the preceding row.<br />

running-maximum<br />

Returns the running maximum by row (including the current row) for a set of values.<br />

Syntax<br />

running-maximum ( [distinct] numeric_exp [for (expr) [, (expr)] | auto] )<br />

Example<br />

running-maximum ( Qty )<br />

Result: For each row, this displays the quantity and a running maximum of the current and<br />

previous rows.<br />

running-minimum<br />

Returns the running minimum by row (including the current row) for a set of values.<br />

Syntax<br />

running-minimum ( [distinct] numeric_exp [for (expr) [, (expr)] | auto] )<br />

Example<br />

running-minimum ( Qty )<br />

Result: For each row, this displays the quantity and a running minimum of the current and<br />

previous rows.<br />

running-total<br />

Returns a running total by row (including the current row) for a set of values.<br />

Syntax<br />

running-total ( [distinct] numeric_exp [for (expr) [, (expr)] | auto] )<br />

Example<br />

running-total ( Qty )<br />

User Guide 127


Appendix C: Using the Expression Editor<br />

Result: For each row, this displays the quantity and a running total of the current and previous<br />

rows.<br />

standard-deviation<br />

Returns the standard deviation of selected data items.<br />

Syntax<br />

standard-deviation ( [distinct] numeric_exp [for (expr) [, (expr)] | auto] )<br />

Example<br />

standard-deviation ( ProductCost )<br />

Result: A value indicating the deviation between product costs and the average product cost.<br />

standard-deviation-pop<br />

Computes the population standard deviation and returns the square root of the population<br />

variance.<br />

Syntax<br />

standard-deviation-pop ( [distinct] numeric_exp [for (expr) [, (expr)] | auto] )<br />

Example<br />

standard-deviation-pop ( ProductCost )<br />

Result: A value of the square root of the population variance.<br />

tertile<br />

Returns the rank of a value as High, Middle, or Low relative to a group of values.<br />

Syntax<br />

tertile ( [distinct] numeric_exp [for (expr) [, (expr)] | auto] )<br />

Example<br />

tertile ( Qty )<br />

Result: Shows quantity, the quantile of the quantity value as broken down into tertiles, and the<br />

quantity values broken down into tertiles.<br />

total<br />

Returns the total value of selected data items.<br />

Syntax<br />

total ( [distinct] numeric_exp [for (expr) [, (expr)] | auto] )<br />

Example<br />

total ( Sales )<br />

Result: The total value of all Sales values.<br />

variance<br />

Returns the variance of selected data items.<br />

Syntax<br />

variance ( [distinct] numeric_exp [for (expr) [, (expr)] | auto] )<br />

Example<br />

variance ( Product Cost )<br />

Result: A value indicating how widely product costs vary from the average product cost.<br />

128 Cognos ReportNet (TM) Framework Manager


Appendix C: Using the Expression Editor<br />

variance-pop<br />

Constants<br />

Returns the population variance of a set of numbers after discarding the nulls in this set.<br />

Syntax<br />

variance-pop ( [distinct] numeric_exp [for (expr) [, (expr)] | auto] )<br />

Example<br />

variance-pop ( Qty)<br />

Result: For each row, this displays the population variance of a set of numbers after discarding<br />

the nulls in this set.<br />

A constant is a fixed value that you can use in an expression.<br />

date<br />

date-time<br />

Inserts the current system date.<br />

Inserts the current system date and time.<br />

Syntax<br />

date-time<br />

false<br />

interval<br />

Inserts false value.<br />

Inserts the current system interval.<br />

Syntax<br />

interval<br />

null<br />

number<br />

string<br />

time<br />

true<br />

Inserts a null value if the expression conditions are not met.<br />

Inserts the number 0, which you can replace with a new numeric value.<br />

Inserts two quotation marks and positions the cursor between them.<br />

Inserts the current system time.<br />

Inserts true value.<br />

User Guide 129


Appendix C: Using the Expression Editor<br />

Constructs<br />

if then else<br />

Syntax<br />

example: IF ([Country] = 'Canada') THEN ([List Price] * 0.60) ELSE ([List<br />

Price])<br />

in_range<br />

Specify one or more constants or ranges. A range can be open ended.<br />

Example<br />

[gosales].[CONVERSIONRATE].[COUNTRYCODE] IN_RANGE { :30 , 40, 50, 999: }<br />

search case<br />

Syntax<br />

example: CASE WHEN [Country] = 'Canada' THEN ([List Price] * 0.60) WHEN<br />

[CountryCode] > 100 THEN [List Price] * 0.80 ELSE [List Price] END<br />

simple case<br />

Syntax<br />

example: CASE [Country] WHEN 'Canada' THEN ([List Price] * 0.60) WHEN<br />

'Australia' THEN [List Price] * 0.80 ELSE [List Price] END<br />

Business Date/Time Functions<br />

_add_days<br />

Returns the date or datetime resulting from adding integer_exp days to date_exp.<br />

Syntax<br />

_add_days ( date_exp, integer_exp )<br />

Example<br />

_add_days ( 2002-04-30 , 1 )<br />

Result: 2002-05-01<br />

_add_months<br />

Returns the date or datetime resulting from adding integer_exp months to date_exp.<br />

Syntax<br />

_add_months ( date_exp, integer_exp )<br />

Example<br />

_add_months ( 2002-04-30 , 1 )<br />

Result: 2002-05-30<br />

_add_years<br />

Returns the date or datetime resulting from adding integer_exp years to date_exp.<br />

Syntax<br />

_add_years ( date_exp, integer_exp )<br />

130 Cognos ReportNet (TM) Framework Manager


Appendix C: Using the Expression Editor<br />

Example<br />

_add_years ( 2002-04-30 , 1 )<br />

Result: 2003-05-30<br />

_age<br />

Returns a number that is obtained from subtracting date_exp from today’s date. This value has<br />

the form YYYYMMDD, where YYYY represents the number of years, MM represents the<br />

number of months, and DD represents the number of days.<br />

Syntax<br />

_age (date_exp )<br />

Example<br />

Today's date=2003-02-05 _age ( 1990-04-30 )<br />

Result: 120906 that is 12 years, 9 months and 6 days<br />

_day_of_week<br />

Returns the day of week ( between 1 and 7), where 1 is the first day of the week as indicated by<br />

the second parameter (between 1 and 7, 1 being Monday and 7 being Sunday). Note that in ISO<br />

8601 standard, a week begins with Monday being day 1. In North America where Sunday is the<br />

first day of the week being day 7.<br />

Syntax<br />

_day_of_week ( date_exp, integer )<br />

Example<br />

_day_of_week ( 2003-01-01, 1 )<br />

Result: 3<br />

_day_of_year<br />

Returns the ordinal for the day of the year in date_ exp (1 to 366). Also known as Julian day.<br />

Syntax<br />

_day_of_year ( date_exp )<br />

Example<br />

_day_of_year ( 2003-03-01 )<br />

Result: 61<br />

_days_between<br />

Returns a positive or negative number representing the number of days between the two date<br />

expressions. If date_exp1 < date_exp2 then the result will be a negative number.<br />

Syntax<br />

_days_between ( date_exp1, date_exp2 )<br />

Example<br />

_days_between ( 2002-04-30 , 2002-06-21 )<br />

Result: -52<br />

_days_to_end_of_month<br />

Returns a number representing the number of days remaining in the month represented by the<br />

date expression date_exp.<br />

User Guide 131


Appendix C: Using the Expression Editor<br />

_first_of_month<br />

Syntax<br />

_days_to_end_of_month ( date_exp )<br />

Example<br />

_days_to_end_of_month ( 2002-04-20 14:30:22.123 )<br />

Result: 10<br />

Returns a date or datetime obtained from converting date_exp to a date with the same year and<br />

month but the day set to 1.<br />

Syntax<br />

_first_of_month ( date_exp )<br />

Example<br />

_first_of_month ( 2002-04-20 )<br />

Result: 2002-04-01<br />

_last_of_month<br />

Returns a date or datetime that is the last day of the month represented by date_exp.<br />

Syntax<br />

_last_of_month ( date_exp )<br />

Example<br />

_last_of_month ( 2002-01-14 )<br />

Result: 2002-01-31<br />

_make_timestamp<br />

Returns a timestamp constructed from integer_exp1 (the year), integer_exp2 (the month) and<br />

integer_exp3 (the day).<br />

Syntax<br />

_make_timestamp ( integer_exp1, integer_exp2, integer_exp3 )<br />

Example<br />

_make_timestamp ( 2002 , 01 , 14 )<br />

Result: 2002-01-14 00:00:00.000<br />

_months_between<br />

Returns a positive or negative integer number representing the number of months between<br />

date_exp1 to date_exp2. If date_exp1 < date_exp2, then a negative number is returned.<br />

Syntax<br />

_months_between ( date_exp1, date_exp2 )<br />

Example<br />

_months_between ( 2002-01-30, 2002-04-03 )<br />

Result: 2<br />

_round<br />

Returns the numeric expression rounded to the integer_exp places right of the decimal point.<br />

NOTE: integer_exp MUST be a non-negative integer.<br />

132 Cognos ReportNet (TM) Framework Manager


Appendix C: Using the Expression Editor<br />

_week_of_year<br />

Syntax<br />

_round ( numeric, integer_exp )<br />

Example<br />

_round ( 1220.42369, 2 )<br />

Result: 1220.42<br />

Returns the number of the week of the year of the date_exp according to ISO 8601, in which<br />

week 1 of the year is the first week of the year to contain a Thursday, which is equivalent to the<br />

first week containing January 4th.<br />

Syntax<br />

_week_of_year ( date_exp )<br />

Example<br />

_week_of_year ( 2003-01-01 )<br />

Result: 1<br />

_years_between<br />

Returns a positive or negative integer number representing the number of years from date_exp1<br />

to date_exp2. If date_exp1 < date_exp2 then a negative value is returned.<br />

Syntax<br />

_years_between ( date_exp1, date_exp2 )<br />

Example<br />

_years_between ( 2003-01-30, 2001-04-03 )<br />

Result: 1<br />

_ymdint_between<br />

Returns a number representing the difference between the date expressions D1 and D2. This<br />

value has the form YYYYMMDD, where YYYY represents the number of years, MM represents<br />

the number of months, and DD represents the number of days.<br />

Syntax<br />

_ymdint_between ( date_exp1, date_exp2 )<br />

Example<br />

_ymdint_between ( 1990-04-30 , 2003-02-05 )<br />

Common Functions<br />

abs<br />

Returns the absolute value of numeric_exp. The sign of negative values is changed to positive.<br />

Syntax<br />

abs ( numeric_exp )<br />

Example 1<br />

abs ( 15 )<br />

Result: 15<br />

User Guide 133


Appendix C: Using the Expression Editor<br />

Example 2<br />

abs ( -15 )<br />

Result: 15<br />

cast<br />

Returns expression converted to datatype specified.<br />

Syntax<br />

cast ( expression, datatype_specification )<br />

Example<br />

cast ( '123' , integer )<br />

Result: 123<br />

ceiling<br />

Returns the smallest integer greater than or equal to numeric_exp.<br />

Syntax<br />

ceiling ( numeric_exp )<br />

Example 1<br />

ceiling ( 4.22 )<br />

Result: 5<br />

Example 2<br />

ceiling ( -1.23 )<br />

Result: -1<br />

character_length<br />

Returns the number of characters in string_exp.<br />

Syntax<br />

character_length ( string_exp )<br />

Example<br />

character_length ( 'Canada' )<br />

Result: 6<br />

coalesce<br />

Returns the first non-null argument (or null if all arguments are null). The Coalesce function<br />

takes two or more arguments.<br />

Syntax<br />

coalesce ( exp_list )<br />

current_date<br />

Returns a date value representing the current date of the computer that the database software<br />

runs on.<br />

Syntax<br />

current_date<br />

Example<br />

current_date<br />

Result: 2003-03-04<br />

134 Cognos ReportNet (TM) Framework Manager


Appendix C: Using the Expression Editor<br />

current_time<br />

Returns a time value, representing the current time of the computer that runs the database<br />

software.<br />

Syntax<br />

current_time<br />

Example<br />

current_time<br />

Result: 16:33:11<br />

current_timestamp<br />

Returns a datetime value, representing the current timestamp of the computer that runs the<br />

database software.<br />

Syntax<br />

current_timestamp<br />

Example<br />

current_timestamp<br />

Result: 2003-03-03 16:40:15.535000<br />

exp<br />

Returns e raised to the power of numeric_exp. The constant e is the base of the natural<br />

logarithm. See also log.<br />

Syntax<br />

exp ( numeric_exp )<br />

Example<br />

exp ( 2 )<br />

Result: 7.389056<br />

extract<br />

Returns an integer representing the value of datepart (year, month, day, hour, minute, second)<br />

in datetime_exp.<br />

Syntax<br />

extract ( datepart , datetime_exp )<br />

Example 1<br />

extract ( year , 2003-03-03 16:40:15.535 )<br />

Result: 2003<br />

Example 2<br />

extract ( hour , 2003-03-03 16:40:15.535 )<br />

Result: 16<br />

floor<br />

Returns the largest integer less than or equal to numeric_exp.<br />

Syntax<br />

floor ( numeric_exp )<br />

User Guide 135


Appendix C: Using the Expression Editor<br />

Example 1<br />

floor ( 3.22 )<br />

Result: 3<br />

Example 2<br />

floor ( -1.23 )<br />

Result: -2<br />

ln<br />

Returns the natural logarithm of the numeric_exp.<br />

Syntax<br />

ln ( numeric_exp )<br />

Example<br />

ln ( 4 )<br />

Result: 1.38629<br />

lower<br />

Returns string_exp with all uppercase characters shifted to lowercase.<br />

Syntax<br />

lower ( string_exp )<br />

Example<br />

lower ( 'ABCDEF' )<br />

Result: 'abcdef'<br />

mod<br />

Returns the remainder (modulus) of integer_exp1 divided by integer_exp2. The integer_exp2<br />

must not be zero or an exception condition is raised.<br />

Syntax<br />

mod ( integer_exp1, integer_exp2 )<br />

Example<br />

mod ( 20 , 3 )<br />

Result: 2<br />

octet_length<br />

Returns the number of bytes in string_exp.<br />

Syntax<br />

octet_length ( string_exp )<br />

Example 1<br />

octet_length ( 'ABCDEF' )<br />

Result: 6<br />

Example 2<br />

octet_length ( '' )<br />

Result: 0<br />

136 Cognos ReportNet (TM) Framework Manager


Appendix C: Using the Expression Editor<br />

position<br />

Returns integer value representing the position of the first string_exp in the second string_exp<br />

or 0 when the first string_exp is not found.<br />

Syntax<br />

position ( string_exp , string_exp )<br />

Example 1<br />

position ( 'C' , 'ABCDEF' )<br />

Result: 3<br />

Example 2<br />

position ( 'H' , 'ABCDEF' )<br />

Result: 0<br />

power<br />

Returns numeric_exp1 raised to the power numeric_exp2. If numeric_exp1 is negative then<br />

numeric_exp2 must result in an integer value.<br />

Syntax<br />

power ( numeric_exp1, numeric_exp2 )<br />

Example<br />

power ( 3 , 2 )<br />

Result: 9<br />

sqrt<br />

Returns the square root of numeric_exp. numeric_exp must be non-negative.<br />

Syntax<br />

sqrt ( numeric_exp )<br />

Example<br />

sqrt ( 9 )<br />

Result: 3<br />

substring<br />

Returns the substring of string_exp that starts at position integer_exp1 for integer_exp2<br />

characters or to the end of string_exp if integer_exp2 is omitted. The first character in string_exp<br />

is at position 1.<br />

Syntax<br />

substring ( string_exp , integer_exp1 [ , integer_exp2 ] )<br />

Example<br />

substring ( 'abdefg', 3, 2)<br />

Result: 'de'<br />

trim<br />

Returns a string_exp trimmed of leading and/or trailing blanks or trimmed of a certain character<br />

specified in match_character_exp. BOTH is implicit when first argument is not stated and blank<br />

is implicit when second argument is not stated.<br />

Syntax<br />

trim ( [ [ TRAILING | LEADING | BOTH ] [ match_character_exp ] , ] string_exp )<br />

User Guide 137


Appendix C: Using the Expression Editor<br />

Example 1<br />

trim ( TRAILING 'A' , 'ABCDEFA' )<br />

Result: 'ABCDEF'<br />

Example 2<br />

trim ( BOTH ' ABCDEF ' )<br />

Result: 'ABCDEF'<br />

upper<br />

Returns string_exp with all lowercase characters shifted to uppercase.<br />

Syntax<br />

upper ( string_exp )<br />

Example<br />

upper ( 'abcdef' )<br />

Result: 'ABCDEF'<br />

DB2<br />

ascii<br />

Returns the ASCII code value of the leftmost character of the argument as an integer.<br />

Syntax<br />

ascii ( string_exp )<br />

ceiling<br />

Returns the smallest integer greater than or equal to numeric_exp.<br />

Syntax<br />

ceiling ( numeric_exp )<br />

char<br />

Returns a string representation of a date/time value or a decimal number.<br />

Syntax<br />

char ( exp )<br />

chr<br />

Returns the character that has the ASCII code value specified by integer_exp. integer_exp<br />

should be between 0 and 255.<br />

Syntax<br />

chr ( integer_exp )<br />

concat<br />

Returns a string that is the result of concatenating string_exp1 with string_exp2.<br />

Syntax<br />

concat ( string_exp1, string_exp2 )<br />

date<br />

Returns a date from a single input value. exp can be a string or integer representation of a date.<br />

138 Cognos ReportNet (TM) Framework Manager


Appendix C: Using the Expression Editor<br />

Syntax<br />

date ( exp )<br />

day<br />

Returns the day of the month (1-31) from date_exp. date_exp can be a date value or a string<br />

representation of a date.<br />

Syntax<br />

day ( date_exp )<br />

dayname<br />

Returns a character string containing the data source-specific name of the day (for example,<br />

Sunday thro<strong>ug</strong>h Saturday or Sun. thro<strong>ug</strong>h Sat. for a data source that uses English, or Sonntag<br />

thro<strong>ug</strong>h Samstag for a data source that uses German) for the day portion of date_exp. date_exp<br />

can be a date value or a string representation of a date.<br />

Syntax<br />

dayname ( date_exp )<br />

dayofweek<br />

Returns the day of the week in date_exp as an integer in the range 1 to 7, where 1 represents<br />

Sunday. date_exp can be a date value or a string representation of a date.<br />

Syntax<br />

dayofweek ( date_exp )<br />

dayofweek_iso<br />

Returns the day of the week in date_exp as an integer in the range 1 to 7, where 1 represents<br />

Monday. date_exp can be a date value or a string representation of a date.<br />

Syntax<br />

dayofweek_iso ( date_exp )<br />

dayofyear<br />

Returns the day of the year in date_exp as an integer in the range 1 to 366. date_exp can be a<br />

date value or a string representation of a date.<br />

Syntax<br />

dayofyear ( date_exp )<br />

days<br />

Returns an integer representation of a date. exp can be a date value or a string representation<br />

of a date.<br />

Syntax<br />

days ( exp )<br />

decimal<br />

Returns decimal representation of string_exp1 with precision numeric_exp1, scale<br />

numeric_exp2 and decimal character string_exp2. String_exp1 must be formatted as a SQL<br />

Integer or Decimal constant.<br />

Syntax<br />

decimal ( string_exp1 [ , numeric_exp1 [ , numeric_exp2 [ , string_exp2 ] ] ] )<br />

User Guide 139


Appendix C: Using the Expression Editor<br />

difference<br />

Returns an integer value representing the difference between the values returned by the data<br />

source-specific soundex function for string_exp1 and string_exp2. The value returned ranges<br />

from 0 to 4, with 4 indicating the best match. Note that 4 does not mean that the strings are<br />

equal.<br />

Syntax<br />

difference ( string_exp1, string_exp2 )<br />

digits<br />

Returns the character string representation of a non-floating point number.<br />

Syntax<br />

digits ( numeric_exp )<br />

double<br />

Returns the floating-point representation of an expression. 'exp' can be either a numeric or<br />

string expression.<br />

Syntax<br />

double ( exp )<br />

event_mon_state<br />

Returns the operational state of a particular state monitor.<br />

Syntax<br />

event_mon_state ( string_exp )<br />

float<br />

Returns the floating-point representation of a number.<br />

Syntax<br />

float ( numeric_exp )<br />

hex<br />

Returns the hexadecimal representation of a value.<br />

Syntax<br />

hex ( exp )<br />

hour<br />

Returns the hour (an integer from 0, which is midnight, to 23, which is 11:00 pm) from time_exp.<br />

time_exp can be a time value or a string representation of a time.<br />

Syntax<br />

hour ( time_exp )<br />

insert<br />

Returns a string where length (integer_exp2) characters have been deleted from string_exp1<br />

beginning at start (integer_exp1) and where string_exp2 has been inserted into string_exp1 at<br />

start. The first character in a string is at position 1.<br />

Syntax<br />

insert ( string_exp1, integer_exp1, integer_exp2, string_exp2 )<br />

140 Cognos ReportNet (TM) Framework Manager


Appendix C: Using the Expression Editor<br />

integer<br />

Returns the integer representation of an expression. exp can be a numeric value or a string<br />

representation of a number.<br />

Syntax<br />

integer ( exp )<br />

julian_day<br />

Returns an integer value representing the number of days from January 1, 4712 BC (the start of<br />

the Julian date calendar) to the date value specified in exp. exp can be a date value or a string<br />

representation of a date.<br />

Syntax<br />

julian_day ( exp )<br />

lcase<br />

Returns string_exp with all uppercase characters shifted to lowercase.<br />

Syntax<br />

lcase ( string_exp )<br />

left<br />

Returns the leftmost integer_exp characters of string_exp.<br />

Syntax<br />

left ( string_exp, integer_exp )<br />

length<br />

Returns the length of the operand in bytes (except for double byte string types which return the<br />

length in characters).<br />

Syntax<br />

length ( exp )<br />

locate<br />

Returns the starting position of the first occurrence of string_exp1 within string_exp2. The<br />

search starts at position start (integer_exp) of string_exp2. The first character in a string is at<br />

position 1. If string_exp1 is not found then zero is returned.<br />

long_varchar<br />

Syntax<br />

locate ( string_exp1, string_exp2 [ , integer_exp ] )<br />

Returns a long string.<br />

Syntax<br />

long_varchar ( string_exp )<br />

ltrim<br />

Returns string_exp with leading spaces removed.<br />

Syntax<br />

ltrim ( string_exp )<br />

User Guide 141


Appendix C: Using the Expression Editor<br />

microsecond<br />

Returns the microsecond (time-unit) part of a value. exp can be a timestamp or a string<br />

representation of a timestamp.<br />

Syntax<br />

microsecond ( exp )<br />

midnight_seconds<br />

Returns an integer value in the range 0 to 86400 representing the number of seconds between<br />

midnight and time value specified in the argument. exp can be a time value, a timestamp or a<br />

string representation of a time.<br />

Syntax<br />

midnight_seconds ( exp )<br />

minute<br />

Returns the minute (an integer from 0-59) from time_exp. time_exp can be a time value, a<br />

timestamp or a string representation of a time.<br />

Syntax<br />

minute ( time_exp )<br />

month<br />

Returns the month (an integer from 1-12) from date_exp.<br />

Syntax<br />

month ( date_exp )<br />

monthname<br />

Returns a character string containing the data source-specific name of the month (for example,<br />

January thro<strong>ug</strong>h December or Jan. thro<strong>ug</strong>h Dec. for a data source that uses English, or Januar<br />

thro<strong>ug</strong>h Dezember for a data source that uses German) for the month portion of date_exp.<br />

Syntax<br />

monthname ( date_exp )<br />

quarter<br />

Returns the quarter in date_exp as a number in the range 1 to 4, where 1 represents January 1<br />

thro<strong>ug</strong>h March 31.<br />

Syntax<br />

quarter ( date_exp )<br />

radians<br />

Returns the number of radians converted from numeric_exp degrees.<br />

Syntax<br />

radians ( numeric_exp )<br />

repeat<br />

Returns a string consisting of string_exp repeated integer_exp times.<br />

Syntax<br />

repeat ( string_exp, integer_exp )<br />

142 Cognos ReportNet (TM) Framework Manager


Appendix C: Using the Expression Editor<br />

replace<br />

Replaces all occurrences of string_exp2 in string_exp1 with string_exp3.<br />

Syntax<br />

replace ( string_exp1, string_exp2, string_exp3 )<br />

right<br />

Returns the rightmost integer_exp characters of string_exp.<br />

Syntax<br />

right ( string_exp, integer_exp )<br />

round<br />

Returns numeric_exp rounded to the nearest value integer_exp places right of the decimal<br />

point. If integer_exp is negative, numeric_exp is rounded to the nearest value absolute<br />

(integer_exp) places to the left of the decimal point, e.g., round-near (125, -1) rounds to 130.<br />

Syntax<br />

round ( numeric_exp, integer_exp )<br />

rtrim<br />

Returns string_exp with trailing spaces removed.<br />

Syntax<br />

rtrim ( string_exp )<br />

second<br />

Returns the second (an integer from 0-59) from time_exp.<br />

Syntax<br />

second ( time_exp )<br />

sign<br />

Returns an indicator of the sign of numeric_exp: +1 if numeric_exp is positive, 0 if zero or -1 if<br />

negative.<br />

Syntax<br />

sign ( numeric_exp )<br />

smallint<br />

Returns the small integer representation of a number.<br />

Syntax<br />

smallint ( exp )<br />

soundex<br />

Returns a 4 character string code obtained by systematically abbreviating words and names in<br />

string_exp according to phonetics. Can be used to determine if two strings sound the same,<br />

e.g., does sound-of ('SMITH') = sound-of ('SMYTH').<br />

Syntax<br />

soundex ( string_exp )<br />

space<br />

Returns a string consisting of integer_exp spaces.<br />

User Guide 143


Appendix C: Using the Expression Editor<br />

Syntax<br />

space ( integer_exp )<br />

substring<br />

Returns the substring of string_exp that starts at position integer_exp1 for integer_exp2<br />

characters. The first character in string_exp is at position 1.<br />

Syntax<br />

substring ( string_exp, integer_exp1 [ , integer_exp2 ] )<br />

table_name<br />

Returns an unqualified name of a table or view based on the object name in string_exp1 and the<br />

schema name given in string_exp2. It is used to resolve aliases.<br />

Syntax<br />

table_name ( string_exp1 [ , string_exp2 ] )<br />

table_schema<br />

Returns the schema name portion of the two part table or view name based on the object name<br />

in string_exp1 and the schema name in string_exp2. It is used to resolve aliases.<br />

Syntax<br />

table_schema ( string_exp1 [ , string_exp2 ] )<br />

time<br />

Returns a time from a value.<br />

Syntax<br />

time ( exp )<br />

timestamp<br />

Returns a timestamp from a value or a pair of values. exp1 must represent a date value, and<br />

exp2 must represent a time value.<br />

Syntax<br />

timestamp ( exp1 [ , exp2 ] )<br />

timestamp_iso<br />

Returns a datetime in the ISO format (yyyy-mm-dd hh:mm:ss.nnnnnn) converted from the IBM<br />

format (yyyy-mm-dd-hh.mm.ss.nnnnnn). If the exp is a time, it inserts the value of the<br />

CURRENT DATE for the date elements and zero for the fractional time element.<br />

Syntax<br />

timestamp_iso ( exp )<br />

timestampdiff<br />

Returns an estimated number of intervals of type exp1 based on the difference between two<br />

timestamps. Exp2 is the result of subtracting two timestamp types and converting the result to<br />

CHAR. Valid values of exp1 are: 1 Fractions of a second; 2 Seconds; 4 Minutes; 8 Hours; 16<br />

Days; 32 Weeks; 64 Months; 128 Quarters; 256 Years<br />

Syntax<br />

timestampdiff ( exp1, exp2 )<br />

144 Cognos ReportNet (TM) Framework Manager


Appendix C: Using the Expression Editor<br />

translate<br />

Returns string_exp1 in which characters from string_exp3 are translated to the equivalent<br />

characters in string_exp2. string_exp4 is a single character that is used to pad string_exp2 if it is<br />

shorter than string_exp3. If only string_exp1 is present, then this function translates it to<br />

uppercase characters.<br />

Syntax<br />

translate ( string_exp1 [ , string_exp2, string_exp3 [ , string_exp4 ] ] )<br />

truncate<br />

Returns numeric_exp1 truncated to numeric_exp2 places RIGHT of the decimal point. If<br />

numeric_exp2 is negative, numeric_exp1 is truncated to the absolute value of numeric_exp2<br />

places to the LEFT of the decimal point.<br />

Syntax<br />

truncate ( numeric_exp1, numeric_exp2 )<br />

ucase<br />

Returns string_exp with all lowercase characters shifted to uppercase.<br />

Syntax<br />

ucase ( string_exp )<br />

value<br />

Returns the first non-null argument (or null if all arguments are null). The Value function takes<br />

two or more arguments.<br />

Syntax<br />

value ( exp_list )<br />

varchar<br />

Returns a VARCHAR representation of exp, with length numeric_exp.<br />

Syntax<br />

varchar ( exp [ , numeric_exp ] )<br />

week<br />

Returns the week of the year in date_exp as an integer value in the range 1 to 53.<br />

Syntax<br />

week ( date_exp )<br />

year<br />

Returns the year from date_exp.<br />

Syntax<br />

year ( date_exp )<br />

DB2 Cast<br />

cast_char<br />

Returns the first numeric_exp characters of the value of exp cast as a string. The whole string is<br />

returned when the second argument is not specified.<br />

User Guide 145


Appendix C: Using the Expression Editor<br />

Syntax<br />

cast_char ( exp [ , numeric_exp ] )<br />

cast_date<br />

Returns the value of the expression cast as a date.<br />

cast_decimal<br />

Syntax<br />

cast_date ( exp )<br />

Returns the value of exp cast as a decimal with the precision of numeric_exp1 and scale of<br />

numeric_exp2.<br />

Syntax<br />

cast_decimal ( exp [ , numeric_exp1, numeric_exp2 ] )<br />

cast_double<br />

Returns the value of the expression cast as a double.<br />

Syntax<br />

cast_double ( exp )<br />

cast_double_precision<br />

Returns the value of the expression cast as a double.<br />

Syntax<br />

cast_double_precision ( exp )<br />

cast_float<br />

Returns the value of the expression cast as a float.<br />

Syntax<br />

cast_float ( exp )<br />

cast_integer<br />

Returns the value of the expression cast as a integer.<br />

Syntax<br />

cast_integer ( exp )<br />

cast_longvarchar<br />

Returns the value of the expression cast as a longvarchar.<br />

Syntax<br />

cast_longvarchar ( string_exp )<br />

cast_smallint<br />

Returns the value of the expression cast as a smallint.<br />

Syntax<br />

cast_smallint ( exp )<br />

cast_time<br />

Returns the value of the expression cast as a time value<br />

146 Cognos ReportNet (TM) Framework Manager


Appendix C: Using the Expression Editor<br />

Syntax<br />

cast_time ( string_exp )<br />

cast_timestamp<br />

Returns the value of the expression cast as a datetime.<br />

Syntax<br />

cast_timestamp ( exp )<br />

cast_varchar<br />

Returns the value of the expression cast as a varchar with length.<br />

Syntax<br />

cast_varchar ( exp, integer_exp )<br />

DB2 Math<br />

log<br />

Returns the natural logarithm of numeric_exp.<br />

Syntax<br />

log ( numeric_exp )<br />

log10<br />

Returns the base ten logarithm of numeric_exp.<br />

Syntax<br />

log10 ( numeric_exp )<br />

rand<br />

Generates a random number using integer_exp as a seed value.<br />

Syntax<br />

rand ( integer_exp )<br />

DB2 Trigonometry<br />

acos<br />

Returns the arccosine of numeric_exp in radians. The arccosine is the angle whose cosine is<br />

numeric_exp.<br />

Syntax<br />

acos ( numeric_exp )<br />

asin<br />

Returns the arcsine of numeric_exp in radians. The arcsine is the angle whose sine is<br />

numeric_exp.<br />

Syntax<br />

asin ( numeric_exp )<br />

atan<br />

Returns the arctangent of numeric_exp in radians. The arctangent is the angle whose tangent is<br />

numeric_exp.<br />

User Guide 147


Appendix C: Using the Expression Editor<br />

Syntax<br />

atan ( numeric_exp )<br />

atan2<br />

Returns the arctangent of the x and y coordinates specified by numeric_exp1 and<br />

numeric_exp2, respectively, in radians. The arctangent is the angle whose tangent is<br />

numeric_exp2 / numeric_exp1.<br />

Syntax<br />

atan2 ( numeric_exp1, numeric_exp2 )<br />

cos<br />

Returns the cosine of numeric_exp where numeric_exp is an angle expressed in radians.<br />

Syntax<br />

cos ( numeric_exp )<br />

cot<br />

Returns the cotangent of numeric_exp where numeric_exp is an angle expressed in radians.<br />

Syntax<br />

cot ( numeric_exp )<br />

degrees<br />

Returns numeric_exp radians converted to degrees.<br />

Syntax<br />

degrees ( numeric_exp )<br />

sin<br />

Returns the sine of numeric_exp where numeric_exp is an angle expressed in radians.<br />

Syntax<br />

sin ( numeric_exp )<br />

tan<br />

Returns the tangent of numeric_exp where numeric_exp is an angle expressed in radians.<br />

Syntax<br />

MS Access<br />

tan ( numeric_exp )<br />

ascii<br />

Returns a number representing the ascii code value of the leftmost character of string_exp.<br />

Syntax<br />

ascii(string_exp)<br />

ceiling<br />

Returns the smallest integer greater than or equal to numeric_exp.<br />

Syntax<br />

ceiling(numeric_exp)<br />

148 Cognos ReportNet (TM) Framework Manager


Appendix C: Using the Expression Editor<br />

char<br />

Returns the character that has the ASCII code value specified by integer_exp. integer_exp<br />

should be between 0 and 255.<br />

Syntax<br />

char(integer_exp)<br />

concat<br />

Returns a string that is the result of concatenating string_exp1 to string_exp2.<br />

Syntax<br />

concat(string_exp1, string_exp2)<br />

curdate<br />

Returns a date value representing the current date of the computer that the database software<br />

runs on.<br />

Syntax<br />

curdate()<br />

curtime<br />

Returns a time value representing the current time of the computer that the database software<br />

runs on.<br />

Syntax<br />

curtime()<br />

dayname<br />

Returns a character string containing the data source-specific name of the day (for example,<br />

Sunday thro<strong>ug</strong>h Saturday or Sun. thro<strong>ug</strong>h Sat. for a data source that uses English, or Sonntag<br />

thro<strong>ug</strong>h Samstag for a data source that uses German) for the day portion of date_exp.<br />

Syntax<br />

dayname(date_exp)<br />

dayo<strong>fm</strong>onth<br />

Returns the day of the month (1-31) from date_exp. Returns the days field (a signed integer)<br />

from interval_exp.<br />

Syntax<br />

dayo<strong>fm</strong>onth(date_exp|interval_exp)<br />

dayofweek<br />

Returns the day of the week in date_exp as an integer in the range 1 to 7, where 1 represents<br />

Monday.<br />

Syntax<br />

dayofweek(date_exp)<br />

dayofyear<br />

Returns the day of the year in date_exp as an integer in the range 1 to 366.<br />

Syntax<br />

dayofyear(date_exp)<br />

User Guide 149


Appendix C: Using the Expression Editor<br />

downshift<br />

Returns string_exp with all uppercase characters shifted to lowercase.<br />

Syntax<br />

downshift(string_exp)<br />

hour<br />

Returns the hour (an integer from 0, which is midnight, to 23, which is 11:00 pm) from time_exp.<br />

Syntax<br />

hour(time_exp)<br />

lcase<br />

Returns string_exp with all uppercase characters shifted to lowercase<br />

Syntax<br />

lcase(string_exp)<br />

left<br />

Returns the leftmost integer_exp characters of string_exp.<br />

Syntax<br />

left(string_exp, integer_exp)<br />

length<br />

Returns the number of characters in string_exp, excluding trailing blanks and the string<br />

termination character.<br />

Syntax<br />

length(string_exp)<br />

locate<br />

Returns the starting position of the first occurrence of string_exp1 within string_exp2. The<br />

search starts at position start (integer_exp) of string_exp2. The first character in a string is at<br />

position 1. If string_exp1 is not found then zero is returned.<br />

Syntax<br />

locate(string_exp1, string_exp2 [ , integer_exp ] )<br />

ltrim<br />

Returns string_exp with leading spaces removed.<br />

Syntax<br />

ltrim(string_exp)<br />

minute<br />

Returns the minute (an integer from 0-59) from time_exp.<br />

Syntax<br />

minute(time_exp)<br />

month<br />

Returns the month (an integer from 1-12) from date_exp.<br />

150 Cognos ReportNet (TM) Framework Manager


Appendix C: Using the Expression Editor<br />

Syntax<br />

month(date_exp)<br />

monthname<br />

Returns a character string containing the data source-specific name of the month (for example,<br />

January thro<strong>ug</strong>h December or Jan. thro<strong>ug</strong>h Dec. for a data source that uses English, or Januar<br />

thro<strong>ug</strong>h Dezember for a data source that uses German) for the month portion of date_exp.<br />

Syntax<br />

monthname(date_exp)<br />

now<br />

Returns a datetime value representing the current date and time of the computer that the<br />

database software runs on.<br />

Syntax<br />

now()<br />

position<br />

Returns the starting position of string_exp1 in string_exp2. The first character in a string is at<br />

position 1.<br />

Syntax<br />

position(string_exp1, string_exp2)<br />

quarter<br />

Returns the quarter in date_exp as a number in the range 1 to 4, where 1 represents January 1<br />

thro<strong>ug</strong>h March 31.<br />

Syntax<br />

quarter(date_exp)<br />

right<br />

Returns the rightmost integer_exp characters of string_exp.<br />

Syntax<br />

right(string_exp, integer_exp)<br />

round<br />

Returns numeric_exp rounded to the nearest value integer_exp places right of the decimal<br />

point. If integer_exp is negative, numeric_exp is rounded to the nearest value absolute<br />

(integer_exp) places to the left of the decimal point.<br />

Syntax<br />

round(numeric_exp, integer_exp)<br />

rtrim<br />

Returns string_exp with trailing spaces removed.<br />

Syntax<br />

rtrim(string_exp)<br />

sign<br />

Returns an indicator of the sign of numeric_exp: +1 if numeric_exp is positive, 0 if zero or -1 if<br />

negative.<br />

User Guide 151


Appendix C: Using the Expression Editor<br />

Syntax<br />

sign(numeric_exp)<br />

space<br />

Returns a string consisting of integer_exp spaces.<br />

Syntax<br />

space(integer_exp)<br />

substr<br />

Returns the substring of string_exp that starts at position integer_exp1 for integer_exp2<br />

characters. The first character in string_exp is at position 1.<br />

Syntax<br />

substr(string_exp, integer_exp1, integer_exp2)<br />

substring<br />

Returns the substring of string_exp that starts at position integer_exp1 for integer_exp2<br />

characters. The first character in string_exp is at position 1.<br />

Syntax<br />

substring(string_exp, integer_exp1, integer_exp2)<br />

truncate<br />

Returns string_exp with trailing spaces removed.<br />

Syntax<br />

truncate(string_exp)<br />

ucase<br />

Returns string_exp with all lowercase characters shifted to uppercase.<br />

Syntax<br />

ucase(string_exp)<br />

upshift<br />

Returns string_exp with all lowercase characters shifted to uppercase.<br />

Syntax<br />

upshift(string_exp)<br />

week<br />

Returns the week of the year in date_exp as an integer value in the range 1 to 53.<br />

Syntax<br />

week(date_exp)<br />

year<br />

Returns the year from date_exp.<br />

Syntax<br />

year(date_exp)<br />

152 Cognos ReportNet (TM) Framework Manager


Appendix C: Using the Expression Editor<br />

MS Access Cast<br />

cast_decimal<br />

Returns the value of the expression cast as a decimal.<br />

Syntax<br />

cast_decimal(exp)<br />

cast_float<br />

Returns the value of the expression cast as a float.<br />

Syntax<br />

cast_float(exp)<br />

cast_integer<br />

Returns the value of the expression cast as a integer.<br />

Syntax<br />

cast_integer(exp)<br />

cast_numeric<br />

Returns the value of string_exp cast as a numeric value.<br />

Syntax<br />

cast_numeric(string_exp)<br />

cast_real<br />

Returns the value of the expression cast as a real.<br />

Syntax<br />

cast_real(exp)<br />

cast_smallint<br />

Returns the value of the expression cast as a smallint.<br />

Syntax<br />

cast_smallint(exp)<br />

cast_varchar<br />

Returns the value of the expression cast as a varchar.<br />

Syntax<br />

MS Access Math<br />

cast_varchar(exp)<br />

log<br />

Returns the natural logarithm of numeric_exp.<br />

Syntax<br />

log(numeric_exp)<br />

rand<br />

Generates a random number using integer_exp as a seed value.<br />

User Guide 153


Appendix C: Using the Expression Editor<br />

Syntax<br />

rand(integer_exp)<br />

MS Access Trigonometry<br />

atan<br />

Returns the arctangent of numeric_exp in radians. The arctangent is the angle whose tangent is<br />

numeric_exp.<br />

Syntax<br />

atan(numeric_exp)<br />

cos<br />

Returns the cosine of numeric_exp where numeric_exp is an angle expressed in radians.<br />

Syntax<br />

cos(numeric_exp)<br />

sin<br />

Returns the sine of numeric_exp where numeric_exp is an angle expressed in radians.<br />

Syntax<br />

sin(numeric_exp)<br />

tan<br />

Returns the tangent of numeric_exp where numeric_exp is an angle expressed in radians.<br />

Syntax<br />

tan(numeric_exp)<br />

Oracle<br />

add_months<br />

Returns the datetime resulting from adding integer_exp months to date_exp.<br />

Syntax<br />

add_months ( date_exp, integer_exp )<br />

ascii<br />

Returns a number representing the ascii code value of the leftmost character of string_exp, e.g.<br />

ascii('A') is 65.<br />

Syntax<br />

ascii ( string_exp )<br />

chr<br />

Returns the character that has the ASCII code value specified by integer_exp. integer_exp<br />

should be between 0 and 255.<br />

Syntax<br />

chr ( integer_exp )<br />

154 Cognos ReportNet (TM) Framework Manager


Appendix C: Using the Expression Editor<br />

concat<br />

Returns a string that is the result of concatenating string_exp1 to string_exp2.<br />

Syntax<br />

concat ( string_exp1, string_exp2 )<br />

decode<br />

DECODE compares expr to each search value one by one. If expr is equal to a search, then<br />

returns the corresponding result. If no match is found, then returns default. If default is omitted,<br />

then returns null.<br />

Syntax<br />

decode ( expr , search , result [, search , result]... [, default] )<br />

dump<br />

Returns internal representation of 'expr' with the format of numeric_exp1 starting from position<br />

numeric_exp2 for numeric_exp3.<br />

Syntax<br />

dump ( expr [ , numeric_exp1 [ , numeric_exp2 [ , numeric_exp3 ] ] ] )<br />

greatest<br />

Returns the greatest value in a list of expressions.<br />

Syntax<br />

greatest ( exp_list )<br />

initcap<br />

Returns string_exp, with the first letter of each word in uppercase, all other letters in lowercase.<br />

Words are delimited by white space or characters that are not alphanumeric.<br />

Syntax<br />

initcap ( string_exp )<br />

instr<br />

Searches string_exp1 from the integer_exp1 position for the (integer_exp2)th occurrence of<br />

string_exp2. If integer_exp1 is negative then the search is backwards from the end of<br />

string_exp1. Returns an integer indicating the position of string_exp2.<br />

Syntax<br />

instr ( string_exp1, string_exp2 [ , integer_exp1 [ , integer_exp2 ] ] )<br />

instrb<br />

Searches string_exp1 from the integer_exp1 position for the (integer_exp2)th occurrence of<br />

string_exp2. If integer_exp1 is negative then the search is backwards from the end of<br />

string_exp1. The result returned indicates the position (byte number) where search was found.<br />

Syntax<br />

instrb ( string_exp1, string_exp2 [ , integer_exp1 [ , integer_exp2 ] ] )<br />

least<br />

Returns the least value in a list of expressions.<br />

Syntax<br />

least ( exp_list )<br />

User Guide 155


Appendix C: Using the Expression Editor<br />

length<br />

Returns the number of characters in string_exp.<br />

Syntax<br />

length ( string_exp )<br />

lengthb<br />

Returns the number of bytes in string_exp.<br />

Syntax<br />

lengthb ( string_exp )<br />

lpad<br />

Returns string_exp1 padded to length integer_exp with occurrences of string_exp2. If<br />

string_exp1 is longer than integer_exp then returns the appropriate portion of string_exp1.<br />

Syntax<br />

lpad ( string_exp1, integer_exp [ , string_exp2 ] )<br />

ltrim<br />

Returns string_exp1, with leading characters removed up to the first character not in<br />

string_exp2, e.g. ltrim('xyxXxyAB', 'xy') returns 'XxyAB'.<br />

months_between<br />

Syntax<br />

ltrim ( string_exp1 [ , string_exp2 ] )<br />

Returns the number of months from date_exp1 to date_exp2. If date_exp1 is later than<br />

date_exp2 then the result will be a positive number. The days and time portion of the difference<br />

are ignored, i.e. the months are not rounded, except if date_exp1 and date_exp2 are the last<br />

days of a month.<br />

Syntax<br />

months_between ( date_exp1, date_exp2 )<br />

new_time<br />

Returns the Datetime in timezone 'new_tz' for 'datetime' in 'old_tz' timezone. 'Old_tz' and<br />

'new_tz' can be one of 'AST', 'ADT', 'BST', 'BDT', 'CST', 'CDT', 'EST', 'EDT', 'HST', 'HDT', 'MST',<br />

'MDT', 'NST', 'PST', 'PDT', 'YST' or 'YDT'.<br />

Syntax<br />

new_time ( datetime_exp, old_tz, new_tz )<br />

next_day<br />

Returns the datetime of the first weekday named by string_exp that is later than datetime_exp.<br />

The return value has the same hours, minutes, and seconds as datetime_exp.<br />

Syntax<br />

next_day ( datetime_exp, string_exp )<br />

nls_initcap<br />

Returns string_exp1 with the first letter of each word in uppercase, all other letters in lowercase.<br />

Words are delimited by white space or characters that are not alphanumeric. string_exp2<br />

specifies the sorting sequence.<br />

156 Cognos ReportNet (TM) Framework Manager


Appendix C: Using the Expression Editor<br />

Syntax<br />

nls_initcap ( string_exp1 [ , string_exp2 ] )<br />

nls_lower<br />

Returns string_exp1 with all letters in lowercase. string_exp2 specifies the sorting sequence.<br />

Syntax<br />

nls_lower ( string_exp1 [ , string_exp2 ] )<br />

nls_upper<br />

Returns string_exp1 with all letters in uppercase. string_exp2 specifies the sorting sequence.<br />

Syntax<br />

nls_upper ( string_exp1 [ , string_exp2 ] )<br />

nvl<br />

If exp is null (missing) returns constant. If exp is not null returns exp. Valid for numeric_exp,<br />

string_exp, date_exp, and time_exp.<br />

Syntax<br />

nvl ( exp, constant )<br />

replace<br />

Replaces all occurrences of string_exp2 in string_exp1 with string_exp3. If string_exp3 is not<br />

specified then it replaces all occurrences with null (i.e.: removes all occurrences of string_exp2).<br />

Syntax<br />

replace ( string_exp1, string_exp2 [ , string_exp3 ] )<br />

round<br />

Returns numeric_exp rounded to the nearest value integer_exp places right of the decimal<br />

point. If integer_exp is negative, numeric_exp is rounded to the nearest value absolute<br />

(integer_exp) places to the left of the decimal point, e.g., round (125, -1) rounds to 130.<br />

Syntax<br />

round ( numeric_exp [ , integer_exp ] )<br />

rpad<br />

Returns string_exp1 right-padded to length integer_exp with occurrences of string_exp2. If<br />

string_exp1 is longer than integer_exp then returns the appropriate portion of string_exp1. If<br />

string_exp2 is not specified then spaces are used.<br />

Syntax<br />

rpad ( string_exp1, integer_exp [ , string_exp2 ] )<br />

rtrim<br />

Returns string_exp1, with final characters removed after the last character not in string_exp2,<br />

e.g. rtrim('ABxXxyx', 'xy') returns 'ABxX'. If string_exp2 is not specified it removes the final<br />

space characters.<br />

Syntax<br />

rtrim ( string_exp1 [ , string_exp2 ] )<br />

sign<br />

Returns an indicator of the sign of numeric_exp: +1 if numeric_exp is positive, 0 if zero or -1 if<br />

negative.<br />

User Guide 157


Appendix C: Using the Expression Editor<br />

Syntax<br />

sign ( numeric_exp )<br />

soundex<br />

Returns a character string containing the phonetic representation of string_exp.<br />

Syntax<br />

soundex ( string_exp )<br />

substr<br />

Returns the substring of string_exp that starts at position integer_exp1. The first character in<br />

string_exp is at position 1. integer_exp2 can be used to select fewer characters, by default it<br />

selects character to the end of the string<br />

Syntax<br />

substr ( string_exp, integer_exp1 [ , integer_exp2 ] )<br />

substrb<br />

Same as substr, except that the arguments are expressed in bytes (not characters).<br />

Syntax<br />

substrb ( string_exp, numeric_exp1 [ , numeric_exp2 ] )<br />

{sysdate}<br />

Returns a datetime value representing the current date and time of the computer that the<br />

database software runs on.<br />

Syntax<br />

{ sysdate }<br />

to_char<br />

Returns the string representation of exp with the format of string_exp. exp can either be a date<br />

value or a numeric value.<br />

Syntax<br />

to_char ( exp [ , string_exp ] )<br />

to_date<br />

Converts string_exp1 to a datetime value as specified by the format string_exp2. string_exp3<br />

specifies format elements such as language.<br />

Syntax<br />

to_date ( string_exp1 [ , string_exp2 [ , string_exp3 ] ] )<br />

to_number<br />

Converts string_exp1 to a numeric value as specified by the format string_exp2. string_exp3<br />

specifies format elements such as currency information.<br />

Syntax<br />

to_number ( string_exp1, string_exp2, string_exp3 )<br />

translate<br />

Returns string_exp1, with all occurrences of each character in string_exp2 replaced by its<br />

corresponding character in string_exp3.<br />

158 Cognos ReportNet (TM) Framework Manager


Appendix C: Using the Expression Editor<br />

Syntax<br />

translate ( string_exp1, string_exp2, string_exp3 )<br />

trunc<br />

Truncates the date_exp using the format specified by string_exp. For example, if string_exp is<br />

'YEAR' then date_exp is truncated to the first day of the year.<br />

Syntax<br />

trunc ( date_exp, string_exp )<br />

trunc<br />

Truncates digits from numeric_exp1 using numeric_exp2 as the precision.<br />

Syntax<br />

trunc ( numeric_exp1, numeric_exp2 )<br />

{user}<br />

Returns the username of the current Oracle user.<br />

Syntax<br />

{ user }<br />

vsize<br />

Returns the number of bytes in the internal representation of 'exp'. 'exp' must be a string<br />

expression.<br />

Oracle Math<br />

Syntax<br />

vsize ( exp )<br />

log<br />

Returns the logarithm of numeric_exp2 to the base numeric_exp1.<br />

Syntax<br />

Oracle Trigonometry<br />

log ( numeric_exp1, numeric_exp2 )<br />

acos<br />

Returns the arccosine of numeric_exp in radians. The arccosine is the angle whose cosine is<br />

numeric_exp.<br />

Syntax<br />

acos ( numeric_exp )<br />

asin<br />

Returns the arcsine of numeric_exp in radians. The arcsine is the angle whose sine is<br />

numeric_exp.<br />

Syntax<br />

asin ( numeric_exp )<br />

User Guide 159


Appendix C: Using the Expression Editor<br />

atan<br />

Returns the arctangent of numeric_exp in radians. The arctangent is the angle whose tangent is<br />

numeric_exp.<br />

Syntax<br />

atan ( numeric_exp )<br />

atan2<br />

Returns the arctangent of the x and y coordinates specified by numeric_exp1 and<br />

numeric_exp2, respectively, in radians. The arctangent is the angle whose tangent is<br />

numeric_exp2 / numeric_exp1.<br />

Syntax<br />

atan2 ( numeric_exp1 ,numeric_exp2 )<br />

cos<br />

Returns the cosine of numeric_exp where numeric_exp is an angle expressed in radians.<br />

Syntax<br />

cos ( numeric_exp )<br />

cosh<br />

Returns the hyperbolic cosine of numeric_exp where numeric_exp is an angle expressed in<br />

radians.<br />

Syntax<br />

cosh ( numeric_exp )<br />

sin<br />

Returns the sine of numeric_exp where numeric_exp is an angle expressed in radians.<br />

Syntax<br />

sin ( numeric_exp )<br />

sinh<br />

Returns the hyperbolic sine of numeric_exp where numeric_exp is an angle expressed in<br />

radians.<br />

Syntax<br />

sinh ( numeric_exp )<br />

tan<br />

Returns the tangent of numeric_exp where numeric_exp is an angle expressed in radians.<br />

Syntax<br />

tan ( numeric_exp )<br />

tanh<br />

Returns the hyperbolic tangent of numeric_exp where numeric_exp is an angle expressed in<br />

radians.<br />

Syntax<br />

tanh ( numeric_exp )<br />

160 Cognos ReportNet (TM) Framework Manager


Appendix C: Using the Expression Editor<br />

Red Brick<br />

concat<br />

This function concatenates character strings and returns the concatenated string of characters.<br />

Syntax<br />

concat ( string_exp1 , string_exp2 )<br />

current_user<br />

Returns the database username (authorization ID) of the current user.<br />

Syntax<br />

current_user<br />

date<br />

This function creates a date value from a character string or a timestamp expression and returns<br />

a date data type. The expression can be either characters or timestamp.<br />

Syntax<br />

date ( expression )<br />

dateadd<br />

This function adds an interval to a datetime value and returns a result that is the same datetime<br />

data type as that of datetime_expression. The datepart refers to year, month, day, hour, minute,<br />

second. The interval must be an integer and datetime_exp can be date, time or timestamp.<br />

Syntax<br />

dateadd ( { datepart }, interval, datetime_exp )<br />

datediff<br />

This function finds the difference between two datetime expressions and returns an integer<br />

result in datepart units. The datepart refers to year, month, day, hour, minute, second. The<br />

datetime_exp can be date, time or timestamp.<br />

Syntax<br />

datediff ( { datepart }, datetime_exp, datetime_exp )<br />

datename<br />

This function extracts the specified datepart component and returns its value as a character<br />

string. The datepart refers to year, month, day, hour, minute, second. The datetime_exp can be<br />

date, time or timestamp<br />

Syntax<br />

datename ( { datepart }, datetime_exp )<br />

dec<br />

This function converts a specified value to a decimal value and returns a value with the data<br />

type decimal (precision, scale). The default value of precision is 9. The default value of scale is<br />

0.<br />

Syntax<br />

dec ( expression, [precision, scale] )<br />

User Guide 161


Appendix C: Using the Expression Editor<br />

decode<br />

This function compares and converts an expression to another value. If the expression matches<br />

target, it is replaced by the corresponding replacement; otherwise the expression is replaced by<br />

default or by NULL if no default is specified. The expressions can be any data type and all<br />

expressions must be the same data type.<br />

Syntax<br />

decode ( expression, target, replacement [,default] )<br />

float<br />

This function converts a specified value into a double-precision floating-point value.<br />

Syntax<br />

float ( numeric_exp )<br />

ifnull<br />

This function tests an expression for missing values and replaces each one with a specified<br />

value. If expression is NULL, this function returns substitute; otherwise it returns the value of the<br />

expression. The expressions can be any data type and all expressions must be the same data<br />

type.<br />

Syntax<br />

ifnull ( expression , substitute )<br />

int<br />

This function converts a specified numeric string into an integer value and returns an integer<br />

value. If the argument is null, this function returns NULL.<br />

Syntax<br />

int ( numeric_exp )<br />

length<br />

If the argument is not null, this function returns an integer result specifying the number of<br />

characters in the string; otherwise the result is NULL.<br />

Syntax<br />

length ( string_exp )<br />

lengthb<br />

If the argument is not null, this function returns an integer result specifying the number of bytes<br />

in the string. If the argument is null, the result is NULL.<br />

Syntax<br />

lengthb ( string_exp )<br />

ltrim<br />

If the argument is not null, this function removes leading blanks from the character string;<br />

otherwise the result is NULL.<br />

Syntax<br />

ltrim ( string_exp )<br />

nullif<br />

This function returns NULL if both expressions have the same value. If the expressions have<br />

different values, the value of the first expression is returned. The exp1 and exp2 can be any data<br />

type and must be the same data type.<br />

162 Cognos ReportNet (TM) Framework Manager


Appendix C: Using the Expression Editor<br />

Syntax<br />

nullif ( exp1, exp2 )<br />

positionb<br />

If the first string_exp is located, this function returns an integer that is relative to the beginning<br />

byte position of the first string_exp in the second string_exp. If the first string_exp is not located,<br />

the result is 0. If the first string_exp is of zero length, the result is 1. If the first string_exp is null,<br />

an error message is returned. If the second string_exp is null, the result is 0.<br />

Syntax<br />

positionb ( string-exp, string_exp )<br />

real<br />

This function returns a real value. If the argument is null, this function returns NULL.<br />

Syntax<br />

real ( numeric_exp )<br />

rtrim<br />

If the argument is not null, this function removes trailing blanks from the character string;<br />

otherwise the result is NULL.<br />

Syntax<br />

rtrim ( string_exp )<br />

sign<br />

This function calculates the sign of the expression, and returns 1 for a positive value, –1 for a<br />

negative value, and 0 for zero.<br />

Syntax<br />

sign ( numeric_exp )<br />

string<br />

This function converts numeric or datetime values to character strings. The expression can be<br />

numeric or datetime.<br />

Syntax<br />

string ( expression [, length [, scale]] )<br />

substr<br />

If the first argument is not null, this function returns the substring that begins at position start<br />

and continues for length characters. If length is not specified, this function returns a substring<br />

from start to the end of string_exp.<br />

Syntax<br />

substr ( string_exp, start_integer, length_integer )<br />

substrb<br />

If the first argument is not null, this function returns the substring that begins at position start<br />

and continues for length bytes. If length is not specified, this function returns a substring from<br />

start to the end of string_exp.<br />

Syntax<br />

substrb ( string_exp, start_integer, length_integer )<br />

User Guide 163


Appendix C: Using the Expression Editor<br />

time<br />

This function creates a time value from a character string or a time-stamp data type expression.<br />

Syntax<br />

time ( expression )<br />

timestamp<br />

This function creates a time-stamp value from a character string.<br />

Syntax<br />

timestamp ( timestamp_exp )<br />

timestamp<br />

This function creates a time-stamp value from time and date values. If there are two arguments,<br />

the first must be a date expression and the second must be a time expression, separated by a<br />

comma (,). If either the date expression or the time expression is null, the resulting time-stamp<br />

expression is also null.<br />

Syntax<br />

timestamp ( date_exp, time_exp )<br />

to_char<br />

This function is a datetime scalar function that operates on a date, time, or timestamp data type<br />

and returns the character string specified by a given format.<br />

Syntax<br />

to_char ( source_date, format_str )<br />

SAP BW<br />

SAP BW OLAP<br />

characteristicValue<br />

Creates the unique SAP BW identifier for a query item value that represents an SAP BW key<br />

value. Useful for identifying leaf-level query item values in unbalanced hierarchies.<br />

Syntax<br />

characteristicValue( [ query_subject, ] query_item_value)<br />

SAP BW Trigonometry<br />

arccos<br />

Returns the arccosine of numeric_exp in radians. The arccosine is the angle whose cosine is<br />

numeric_exp.<br />

Syntax<br />

arccos ( numeric_exp )<br />

arcsin<br />

Returns the arcsine of numeric_exp in radians. The arcsine is the angle whose sine is<br />

numeric_exp.<br />

164 Cognos ReportNet (TM) Framework Manager


Appendix C: Using the Expression Editor<br />

Syntax<br />

arcsin ( numeric_exp )<br />

arctan<br />

Returns the arctangent of numeric_exp in radians. The arctangent is the angle whose tangent is<br />

numeric_exp.<br />

Syntax<br />

arctan ( numeric_exp )<br />

cos<br />

Returns the cosine of numeric_exp where numeric_exp is an angle expressed in radians.<br />

Syntax<br />

cos ( numeric_exp )<br />

sin<br />

Returns the sine of numeric_exp where numeric_exp is an angle expressed in radians.<br />

Syntax<br />

sin ( numeric_exp )<br />

tan<br />

Returns the tangent of numeric_exp where numeric_exp is an angle expressed in radians.<br />

Syntax<br />

tan ( numeric_exp )<br />

coshyp<br />

Returns the hyperbolic cosine of numeric_exp where numeric_exp is an angle expressed in<br />

radians.<br />

Syntax<br />

coshyp ( numeric_exp )<br />

sinhyp<br />

Returns the hyperbolic sine of numeric_exp where numeric_exp is an angle expressed in<br />

radians.<br />

Syntax<br />

sinhyp ( numeric_exp )<br />

tanhyp<br />

Returns the hyperbolic tangent of numeric_exp where numeric_exp is an angle expressed in<br />

radians.<br />

Syntax<br />

SAP BW Math<br />

tanhyp ( numeric_exp )<br />

log10<br />

Returns the base ten logarithm of numeric_exp.<br />

User Guide 165


Appendix C: Using the Expression Editor<br />

Syntax<br />

log10 ( numeric_exp )<br />

ln<br />

Returns the natural logarithm of the numeric_exp.<br />

Syntax<br />

ln ( numeric_exp )<br />

exp<br />

Returns e raised to the power of numeric_exp. The constant e is the base of the natural<br />

logarithm. See also log.<br />

Syntax<br />

exp ( numeric_exp )<br />

sqrt<br />

Returns the square root of numeric_exp. numeric_exp must be non-negative.<br />

Syntax<br />

SQL Server<br />

sqrt ( numeric_exp )<br />

ascii<br />

Returns a number representing the ascii code value of the leftmost character of string_exp, e.g.<br />

ascii('A') is 65.<br />

Syntax<br />

ascii(string_exp)<br />

char<br />

Returns the character that has the ASCII code value specified by integer_exp. integer_exp<br />

should be between 0 and 255. For example, char(65) has the value 'A'.<br />

Syntax<br />

char(integer_exp)<br />

datalength<br />

Returns the length of the string.<br />

Syntax<br />

datalength(string_exp)<br />

dateadd<br />

Returns the date resulting from adding integer_exp units indicated by datepart(e.g. day, month,<br />

year) to date_exp.<br />

Syntax<br />

dateadd({datepart}, integer_exp, date_exp)<br />

datediff<br />

Returns the number of units indicated by datepart(e.g. day, month, year) between date_exp1<br />

and date_exp2.<br />

166 Cognos ReportNet (TM) Framework Manager


Appendix C: Using the Expression Editor<br />

Syntax<br />

datediff({datepart}, date_exp1, date_exp2)<br />

day<br />

Returns the day portion of date_exp. Same as extract(day from date_exp).<br />

Syntax<br />

day(date_exp)<br />

difference<br />

Returns an integer value representing the difference between the values returned by the data<br />

source-specific soundex function for string_exp1 and string_exp2. The value returned ranges<br />

from 0 to 4, with 4 indicating the best match. Note that 4 does not mean that the strings are<br />

equal.<br />

Syntax<br />

difference(string_exp1, string_exp2)<br />

getdate<br />

Returns a datetime value representing the current date and time of the computer that the<br />

database software runs on.<br />

Syntax<br />

getdate()<br />

ltrim<br />

Returns string_exp with leading spaces removed.<br />

Syntax<br />

ltrim(string_exp)<br />

month<br />

Returns the month portion of date_exp. Same as extract(month from date_exp).<br />

Syntax<br />

month(date_exp)<br />

replicate<br />

Returns a string consisting of string_exp repeated integer_exp times.<br />

Syntax<br />

replicate(string_exp, integer_exp)<br />

right<br />

Returns the rightmost integer_exp characters of string_exp.<br />

Syntax<br />

right(string_exp, integer_exp)<br />

round<br />

Returns numeric_exp rounded to the nearest value integer_exp places right of the decimal<br />

point.<br />

Syntax<br />

round(numeric_exp,integer_exp)<br />

User Guide 167


Appendix C: Using the Expression Editor<br />

sign<br />

Returns an indicator of the sign of numeric_exp: +1 if numeric_exp is positive, 0 if zero or -1 if<br />

negative.<br />

Syntax<br />

sign(numeric_exp)<br />

soundex<br />

Returns a four character string representing the sound of the words in string_exp.<br />

Syntax<br />

soundex(string_exp)<br />

space<br />

Returns a string consisting of integer_exp spaces.<br />

Syntax<br />

space(integer_exp)<br />

str<br />

Returns a string representation of numeric_exp. integer_exp1 is the length of the string<br />

returned. integer_exp2 is the number of decimal digits.<br />

Syntax<br />

str(numeric_exp [ , integer_exp1 [ , integer_exp2 ] ] )<br />

stuff<br />

Returns a string where length (integer_exp2) characters have been deleted from string_exp1<br />

beginning at start (integer_exp1) and where string_exp2 has been inserted into string_exp1 at<br />

start. The first character in a string is at position 1.<br />

Syntax<br />

stuff(string_exp1, integer_exp1, integer_exp2, string_exp2)<br />

year<br />

Returns the year portion of date_exp. Same as extract(year from date_exp).<br />

Syntax<br />

year(date_exp)<br />

SQL Server Cast<br />

cast_char<br />

Returns the value of the expression cast as a char.<br />

Syntax<br />

cast_char(exp)<br />

cast_float<br />

Returns the value of the expression cast as a float.<br />

Syntax<br />

cast_float(exp)<br />

168 Cognos ReportNet (TM) Framework Manager


Appendix C: Using the Expression Editor<br />

cast_integer<br />

Returns the value of the expression cast as an integer.<br />

Syntax<br />

cast_integer(exp)<br />

cast_real<br />

Returns the value of the expression cast as a real.<br />

Syntax<br />

cast_real(exp)<br />

cast_smallint<br />

Returns the value of the expression cast as a small integer.<br />

Syntax<br />

cast_smallint(exp)<br />

cast_timestamp<br />

Returns the value of the expression cast as a datetime.<br />

Syntax<br />

cast_timestamp(exp)<br />

cast_varchar<br />

Returns the value of the expression cast as a varchar.<br />

Syntax<br />

cast_varchar(exp)<br />

SQL Server Math<br />

log<br />

Returns the natural logarithm of numeric_exp.<br />

Syntax<br />

log(numeric_exp)<br />

log10<br />

Returns the base ten logarithm of numeric_exp.<br />

Syntax<br />

log10(numeric_exp)<br />

pi<br />

Returns the constant value of pi as a floating point value.<br />

Syntax<br />

pi()<br />

rand<br />

Generates a random number using integer_exp as a seed value.<br />

User Guide 169


Appendix C: Using the Expression Editor<br />

Syntax<br />

rand(integer_exp)<br />

SQL Server Trigonometry<br />

acos<br />

Returns the arccosine of numeric_exp in radians. The arccosine is the angle whose cosine is<br />

numeric_exp.<br />

Syntax<br />

acos(numeric_exp)<br />

asin<br />

Returns the arcsine of numeric_exp in radians. The arcsine is the angle whose sine is<br />

numeric_exp.<br />

Syntax<br />

asin(numeric_exp)<br />

atan<br />

Returns the arctangent of numeric_exp in radians. The arctangent is the angle whose tangent is<br />

numeric_exp.<br />

Syntax<br />

atan(numeric_exp)<br />

atn2<br />

Returns the arctangent of the x and y coordinates specified by numeric_exp1 and<br />

numeric_exp2, respectively, in radians. The arctangent is the angle whose tangent is<br />

numeric_exp1.<br />

Syntax<br />

atn2(numeric_exp1, numeric_exp2)<br />

cos<br />

Returns the cosine of numeric_exp where numeric_exp is an angle expressed in radians.<br />

Syntax<br />

cos(numeric_exp)<br />

cot<br />

Returns the cotangent of numeric_exp where numeric_exp is an angle expressed in radians.<br />

Syntax<br />

cot(numeric_exp)<br />

degrees<br />

Returns numeric_exp radians converted to degrees.<br />

Syntax<br />

degrees(numeric_exp)<br />

radians<br />

Returns the number of radians converted from numeric_exp degrees.<br />

170 Cognos ReportNet (TM) Framework Manager


Appendix C: Using the Expression Editor<br />

Syntax<br />

radians(numeric_exp)<br />

sin<br />

Returns the sine of numeric_exp where numeric_exp is an angle expressed in radians.<br />

Syntax<br />

sin(numeric_exp)<br />

tan<br />

Returns the tangent of numeric_exp where numeric_exp is an angle expressed in radians.<br />

Teradata<br />

Syntax<br />

tan(numeric_exp)<br />

account<br />

This function returns the account string for the current user.<br />

Syntax<br />

account<br />

bytes<br />

This function returns the number of bytes contained in the specified byte string. The byte_exp<br />

are restricted to BYTE or VARBYTE.<br />

Syntax<br />

bytes ( byte_exp )<br />

case_n<br />

This function evaluates a list of conditions and returns the position of the first condition that<br />

evaluates to TRUE, provided that no prior condition in the list evaluates to UNKNOWN. The NO<br />

CASE is an optional condition that evaluates to TRUE if every conditional_expression in the list<br />

evaluates to FALSE. The NO CASE OR UNKNOWN condition evaluates to TRUE if every<br />

conditional_expression in the list evaluates to FALSE, or if a conditional_expression evaluates to<br />

UNKNOWN and all prior conditions in the list evaluate to FALSE. The UNKNOWN is an optional<br />

condition that evaluates to TRUE if a conditional_expression evaluates to UNKNOWN and all<br />

prior conditions in the list evaluate to FALSE.<br />

Syntax<br />

case_n ( condition_exp_list [, NO CASE | UNKNOWN | NO CASE OR UNKNOWN [, UNKNOWN ]] )<br />

char2hexint<br />

This function returns the hexadecimal representation for a character string.<br />

Syntax<br />

char2hexint ( string_exp )<br />

characters<br />

This function returns an integer value representing the number of logical characters or bytes<br />

contained in the specified operand string.<br />

Syntax<br />

characters ( string_exp )<br />

User Guide 171


Appendix C: Using the Expression Editor<br />

database<br />

This function returns the name of the default database for the current user.<br />

Syntax<br />

database<br />

date<br />

This function returns the current date.<br />

Syntax<br />

date<br />

format<br />

This function returns the declared format for the named expression. The data type returned by a<br />

FORMAT phrase is a variable character string of up to 30 characters.<br />

Syntax<br />

format ( expression )<br />

index<br />

This function returns the position in string_exp1 where string_exp2 starts.<br />

Syntax<br />

index ( string_exp1, string_exp2 )<br />

log<br />

Computes the base 10 logarithm of an argument. The numeric_exp is a non-zero, positive<br />

numeric expression.<br />

Syntax<br />

log ( numeric_exp )<br />

nullif<br />

This function returns NULL if scalar_exp1 and scalar_exp2 are equal. Otherwise, it returns its<br />

first argument, scalar_exp1. The scalar_exp1 and scalar_exp2 can be any data type.<br />

Syntax<br />

nullif ( scalar_exp1, scalar_exp2 )<br />

nullifzero<br />

This function converts data from zero to null to avoid problems with division by zero.<br />

Syntax<br />

nullifzero ( numeric_exp )<br />

profile<br />

This function returns the current profile for the session or NULL if none.<br />

Syntax<br />

PROFILE<br />

172 Cognos ReportNet (TM) Framework Manager


Appendix C: Using the Expression Editor<br />

random<br />

This function returns a random integer number for each row of the results table. The<br />

lower_bound and upper_bound are integer constants. The limits for lower_bound, upper_bound<br />

range from -2147483648 to 2147483647, inclusive. The upper_bound must be greater than or<br />

equal to lower_bound.<br />

Syntax<br />

random ( lower_bound, upper_bound )<br />

range_n<br />

This function evaluates a test_exp and maps the result into a list of specified ranges and returns<br />

the position of the range in the list. start_exp and end_exp are constants or constant<br />

expressions and must be the same data type as test_exp. Use an asterisk ( * ) for the starting<br />

boundary of the first range to indicate the lowest possible value. Use an asterisk ( * ) for the<br />

ending boundary of the last range to indicate the highest possible value. An asterisk is<br />

compatible with any data type. The range_size is a constant or constant expression. A range<br />

that specifies an EACH phrase is equivalent to a series of ranges. The value of range_size must<br />

be greater than zero. NO RANGE is an optional range to handle a test_exp that does not map<br />

into any of the specified ranges. The NO RANGE OR UNKNOWN option handles a test_exp<br />

that does not map into any of the specified ranges, or a test_exp that evaluates to NULL when<br />

RANGE_N does not specify the range BETWEEN * AND *. UNKNOWN is an option to handle a<br />

test_expression that evaluates to NULL when RANGE_N does not specify the range BETWEEN<br />

* AND *.<br />

Syntax<br />

range_n ( test_exp BETWEEN start_exp | start_exp_list | * AND end_exp | * [ EACH<br />

range_size [, NO RANGE [ OR UNKNOWN | , UNKNOWN ] | UNKNOWN ] ])<br />

role<br />

This function returns the current role for the session or NULL if none.<br />

Syntax<br />

role<br />

session<br />

This function returns the number of the session for the current user.<br />

Syntax<br />

session<br />

soundex<br />

This function returns a character string that represents the Soundex code for string_exp.<br />

Syntax<br />

soundex ( string_exp )<br />

time<br />

This function returns the current time based on a 24-hour day.<br />

Syntax<br />

time<br />

type<br />

This function returns the data type defined for an expression.<br />

Syntax<br />

type ( expression )<br />

User Guide 173


Appendix C: Using the Expression Editor<br />

user<br />

This function returns the user name of the current user.<br />

Syntax<br />

user<br />

vargraphic<br />

This function Returns a character string that represents the vargraphic code for string_exp.<br />

Syntax<br />

vargraphic ( string_exp )<br />

zeroifnull<br />

This function converts data from null to 0 to avoid cases where a null result creates an error. If<br />

the numeric_exp is not null, it returns the value of the numeric_exp, if numeric_exp is a<br />

character string, it is converted to a numeric value of FLOAT data type. If the numeric_exp is null<br />

or zero, it returns zero.<br />

Syntax<br />

zeroifnull ( numeric_exp )<br />

Teradata Trigonometry<br />

acos<br />

Returns the arccosine of numeric_exp in radians. The arccosine is the angle whose cosine is<br />

numeric_exp.The values of numeric_exp must be between -1 and 1, inclusive.<br />

Syntax<br />

acos ( numeric_exp )<br />

acosh<br />

Returns the inverse hyperbolic cosine of an argument. The numeric_exp can be any real<br />

number equal to or greater than 1.<br />

Syntax<br />

acosh ( numeric_exp )<br />

asin<br />

Returns the arcsine of numeric_exp in radians. The arcsine is the angle whose sine is<br />

numeric_exp. The values of numeric_exp must be between -1 and 1, inclusive.<br />

Syntax<br />

asin ( numeric_exp )<br />

asinh<br />

Returns the inverse hyperbolic sine of an argument. The numeric_exp can be any real number.<br />

Syntax<br />

asinh ( numeric_exp )<br />

atan<br />

Returns the arctangent of numeric_exp in radians. The arctangent is the angle whose tangent is<br />

numeric_exp.<br />

174 Cognos ReportNet (TM) Framework Manager


Appendix C: Using the Expression Editor<br />

Syntax<br />

atan ( numeric_exp )<br />

atan2<br />

Returns the arctangent of the x and y coordinates specified by numeric_exp1 and<br />

numeric_exp2, respectively, in radians. ATAN2(x,y) equals ATAN(y/x), except that x can be 0 in<br />

ATAN2(x,y).The returned angle is between - and π radians, excluding π.<br />

Syntax<br />

atan2 ( numeric_exp1, numeric_exp2 )<br />

atanh<br />

Returns the inverse hyperbolic tangent of an argument. The numeric_exp can be any real<br />

number between 1 and -1, excluding 1 and -1.<br />

Syntax<br />

atanh (numeric_exp )<br />

cos<br />

Returns the cosine of numeric_exp where numeric_exp is an angle expressed in radians.<br />

Syntax<br />

cos ( numeric_exp )<br />

sin<br />

Returns the sine of numeric_exp where numeric_exp is an angle expressed in radians.<br />

Syntax<br />

sin ( numeric_exp )<br />

sinh<br />

Returns the hyperbolic sine of an argument. The numeric_exp can be any real number.<br />

Syntax<br />

sinh ( numeric_exp )<br />

tan<br />

Returns the tangent of numeric_exp where numeric_exp is an angle expressed in radians.<br />

Syntax<br />

tan ( numeric_exp )<br />

tanh<br />

Returns the hyperbolic tangent of an argument. The numeric_exp can be any real number.<br />

Syntax<br />

tanh ( numeric_exp )<br />

User Guide 175


Appendix C: Using the Expression Editor<br />

OLAP<br />

OLAP Member<br />

ancestor<br />

Returns the value of query_item that represents the ancestor of query_item_value. If<br />

query_item_value has multiple ancestors, the provider elects which parent to return.<br />

Syntax<br />

ancestor(query_item_value, query_item)<br />

closingPeriod<br />

Returns the last value of query_item that is a descendant of query_item_value. Typically applied<br />

to query subjects associated with time.<br />

Syntax<br />

closingPeriod(query_item, query_item_value )<br />

openingPeriod<br />

Returns the first value of query_item that is a descendant of query_item_value. Typically applied<br />

to query subjects associated with time.<br />

Syntax<br />

openingPeriod(query_item, query_item_value )<br />

parallelPeriod<br />

Obtains the value of query_item that represents the ancestor of query_item_value. Then<br />

identifies the sibling of that value that lags by index positions, then returns the equivalent of<br />

query_item_value for that sibling. Typically applied to query subjects associated with time.<br />

OLAP Set<br />

Syntax<br />

parallelPeriod(query_item, index, query_item_value)<br />

bottomCount<br />

Sorts the query item values contained in set_exp on numeric_value_exp and returns the bottom<br />

index_exp values.<br />

Syntax<br />

bottomCount(set_exp, index_exp, numeric_value_exp)<br />

bottomPercent<br />

Sorts the query item values contained in set_exp on numeric_value_exp and returns the<br />

bottommost values with a cumulative total of at least index_exp.<br />

Syntax<br />

bottomPercent(set_exp, index_exp, numeric_value_exp)<br />

bottomSum<br />

Sorts the query item values contained in set_exp on numeric_value_exp and returns the<br />

bottommost values such that their sum is at least index_exp.<br />

176 Cognos ReportNet (TM) Framework Manager


Appendix C: Using the Expression Editor<br />

Syntax<br />

bottomSum(set_exp, index_exp, numeric_value_exp)<br />

descendants<br />

Returns all values of query_item that represent descendants of query_item_value.<br />

Syntax<br />

descendants(query_item_value,query_item)<br />

distinct<br />

Removes all duplicates from the specified set. The remaining items remain in their original<br />

order.<br />

Syntax<br />

distinct(set_expr)<br />

except<br />

Returns the difference between the query item values contained in set_exp1 and set_exp2.<br />

The result removes duplicates.<br />

Syntax<br />

except(set_exp1, set_exp2)<br />

exceptAll<br />

Returns the difference between the query item values contained in set_exp1 and set_exp2. The<br />

result retains duplicates.<br />

Syntax<br />

exceptAll(set_exp1, set_exp2)<br />

filter<br />

Filters the query item values contained in set_exp based on search_condition_exp.<br />

Syntax<br />

filter(set_exp, search_condition_exp)<br />

intersect<br />

Returns the intersection of the query item values contained in set_exp1 and set_exp2. The<br />

result removes duplicates.<br />

Syntax<br />

intersect(set_exp1, set_exp2)<br />

intersectAll<br />

Returns the intersection of the query item values contained in set_exp1 and set_exp2. The<br />

result retains duplicates.<br />

Syntax<br />

intersectAll(set_exp1, set_exp2)<br />

lastPeriods<br />

Returns the set of index_exp query item values ending with query_item_value and starting with<br />

the query item value lagging index_exp - 1 from query_item_value. Typically applied to query<br />

subjects associated with time.<br />

User Guide 177


Appendix C: Using the Expression Editor<br />

periodsToDate<br />

Syntax<br />

lastPeriods(index_exp, query_item_value)<br />

Within the scope of query_item, returns the set of values of the query item associated with<br />

query_item_value, starting with the first query item value of the query item associated with<br />

query_item_value. Typically applied to query subjects associated with time, such as obtaining<br />

the set of days within the quarter in which a particular day occurs.<br />

Syntax<br />

periodsToDate(query_item, query_item_value)<br />

topCount<br />

Sorts the query item values contained in set_exp on numeric_value_exp and returns the top<br />

index_exp values.<br />

Syntax<br />

topCount(set_exp, index_exp, numeric_value_exp)<br />

topPercent<br />

Sorts the query item values contained in set_exp on numeric_value_exp and returns the<br />

topmost values with a cumulative total of at least index_exp.<br />

Syntax<br />

topPercent(set_exp, index_exp, numeric_value_exp)<br />

topSum<br />

Sorts the query item values contained in set_exp on numeric_value_exp and returns the<br />

topmost values such that their sum is at least index_exp.<br />

Syntax<br />

topSum(set_exp, index_exp, numeric_value_exp)<br />

union<br />

Returns the union of the query item values of set_exp1 and set_exp2. The result removes<br />

duplicates.<br />

Syntax<br />

union(set_exp1, set_exp1)<br />

unionAll<br />

Returns the union of the query item values of set_exp1 and set_exp2. The result retains<br />

duplicates.<br />

Syntax<br />

OLAP Numeric<br />

unionAll(set_exp1, set_exp)<br />

avg<br />

Computes the average of the query item values in set_exp based on numeric_value_exp.<br />

Syntax<br />

avg(set_exp, numeric_value_exp)<br />

178 Cognos ReportNet (TM) Framework Manager


Appendix C: Using the Expression Editor<br />

countSet<br />

Counts all of the query item values contained in set_exp, excluding empty values.<br />

Syntax<br />

countSet(set_exp)<br />

countSetAll<br />

Counts all of the query item values in set_exp, including empty values.<br />

Syntax<br />

countSetAll(set_exp)<br />

max<br />

Computes the maximum of the tuples in set_exp based on numeric_value_exp.<br />

Syntax<br />

max(set_exp, numeric_value_exp)<br />

median<br />

Computes the median of the tuples in set_exp based on numeric_value_exp.<br />

Syntax<br />

median(set_exp, numeric_value_exp)<br />

min<br />

Computes the minimum of the tuples in set_exp based on numeric_value_exp.<br />

Syntax<br />

min(set_exp, numeric_value_exp)<br />

stddev<br />

Computes the standard deviation of the tuples in set_exp based on numeric_value_exp.<br />

Syntax<br />

stddev(set_exp, numeric_value_exp)<br />

sum<br />

Computes the sum of the tuples in set_exp based on numeric_value_exp.<br />

Syntax<br />

sum(set_exp, numeric_value_exp)<br />

var<br />

Computes the variance of the tuples in set_exp based on numeric_value_exp.<br />

Syntax<br />

var(set_exp, numeric_value_exp)<br />

User Guide 179


Appendix C: Using the Expression Editor<br />

180 Cognos ReportNet (TM) Framework Manager


Appendix D: Formatting Data With Patterns<br />

You can format data so that it matches any pattern of text and numbers when default formats are<br />

not appropriate. For example, you can format dates to use full text including the era, or you can<br />

format them to only use numbers and display the last two digits of years to save space.<br />

Using symbols and patterns can provide similar results as basic data formatting tasks. For<br />

example, you can set how many digits are displayed after the decimal point. You can achieve<br />

these types of results with a pattern, or you can set the No. of Decimal Places property. Patterns<br />

allow flexibility for more complex requirements.<br />

Each supported content language code requires a specific set of symbols to be used in<br />

patterns. For each language code, there are two tables; one for date and time symbols, and one<br />

for decimal symbols. The language codes are listed in alphabetical order.<br />

To define patterns, open the Data Format dialog box, and edit the Pattern property for each<br />

format type. Use the symbols that are defined in the language code tables, and follow these<br />

guidelines.<br />

Pattern Guidelines<br />

When you define a pattern, the number of symbols you use affects how the data will be shown.<br />

There are different rules for text, numbers, and values that can take the form of text or numbers.<br />

Text<br />

You can specify whether text is produced in full or abbreviated form.<br />

Number of<br />

symbols Meaning Example<br />

4 or more Full text form EEEE produces Monday<br />

Less than 4 Abbreviated form EEE produces Mon<br />

Numbers<br />

The number of symbols you use in a pattern sets the minimum number of digits that are<br />

produced in a report. Numbers that have fewer digits than specified are zero-padded. For<br />

example, if you specify mm for minutes, and the database value is 6, the report will display 06.<br />

Note: The year value is handled differently. If you specify two symbols for year, the last two digits<br />

of the year value is produced. For example, yyyy produces 1997, and yy produces 97.<br />

Text and Numbers<br />

For values that can produce text or numbers, such as months, you can specify whether text or<br />

numbers are produced, and whether words are abbreviated.<br />

Number of<br />

symbols Meaning Example<br />

3 or more Text MMMM produces January<br />

MMM produces Jan<br />

Less than 3 Numbers MM produces 01<br />

M produces 1<br />

User Guide 181


Appendix D: Formatting Data With Patterns<br />

Language Code: cs<br />

Locale ID: cs<br />

Date and Time Symbols<br />

Symbol Meaning Presentation Example<br />

G Era Text AD<br />

u Year Number 1996<br />

M Month in year Text and<br />

number<br />

July and 07<br />

t Day in month Number 10<br />

k Hour in a.m. or p.m. (1<br />

to 12)<br />

Number 12<br />

H Hour in day (0 to 23) Number 0<br />

m Minute in hour Number 30<br />

s Second in minute Number 55<br />

S Millisecond Number 978<br />

E Day in week Text Tuesday<br />

D Day in year Number 189<br />

F Day of week in month Number 2 (2nd Wed in<br />

July)<br />

w Week in year Number 27<br />

W Week in month Number 2<br />

a a.m. or p.m. marker Text pm<br />

h Hour in day (1 to 24) Number 24<br />

K Hour in a.m. or p.m. (0<br />

to 11)<br />

Number 0<br />

z Time zone Text Pacific Standard<br />

Time<br />

U Escape used in text n/a n/a<br />

e Single quote n/a ’<br />

182 Cognos ReportNet (TM) Framework Manager


Appendix D: Formatting Data With Patterns<br />

Decimal Format Symbols<br />

Symbol<br />

Meaning<br />

, A digit that is shown even if the value is zero.<br />

\u00A0<br />

A digit that is suppressed if the value is zero.<br />

; A placeholder for decimal separator.<br />

% A placeholder for thousands grouping separator.<br />

0 Separates mantissa and exponent for exponential<br />

formats.<br />

# Separates formats for positive numbers and formats for<br />

negative numbers.<br />

- The default negative prefix.<br />

E<br />

Multiplied by 100, as percentage.<br />

\u2030 Multiplied by 1000, as per mille.<br />

\u221E<br />

\uFFFD<br />

X<br />

The currency symbol. If this symbol is present in a<br />

pattern, the monetary decimal separator is used instead<br />

of the decimal separator.<br />

The international currency sign. It will be replaced by an<br />

international currency symbol. If it is present in a<br />

pattern, the monetary decimal separator is used instead<br />

of the decimal separator.<br />

Other characters that can be used in the prefix or suffix.<br />

’ Used to quote special characters in a prefix or suffix.<br />

Locale ID: cs_CZ<br />

Date and Time Symbols<br />

Symbol Meaning Presentation Example<br />

G Era Text AD<br />

u Year Number 1996<br />

M Month in year Text and<br />

number<br />

July and 07<br />

t Day in month Number 10<br />

k Hour in a.m. or p.m. (1<br />

to 12)<br />

Number 12<br />

H Hour in day (0 to 23) Number 0<br />

m Minute in hour Number 30<br />

s Second in minute Number 55<br />

User Guide 183


Appendix D: Formatting Data With Patterns<br />

Symbol Meaning Presentation Example<br />

S Millisecond Number 978<br />

E Day in week Text Tuesday<br />

D Day in year Number 189<br />

F Day of week in month Number 2 (2nd Wed in<br />

July)<br />

w Week in year Number 27<br />

W Week in month Number 2<br />

a a.m. or p.m. marker Text pm<br />

h Hour in day (1 to 24) Number 24<br />

K Hour in a.m. or p.m. (0<br />

to 11)<br />

Number 0<br />

z Time zone Text Pacific Standard<br />

Time<br />

U Escape used in text n/a n/a<br />

e Single quote n/a ’<br />

Decimal Format Symbols<br />

Symbol<br />

Meaning<br />

, A digit that is shown even if the value is zero.<br />

\u00A0<br />

A digit that is suppressed if the value is zero.<br />

; A placeholder for decimal separator.<br />

% A placeholder for thousands grouping separator.<br />

0 Separates mantissa and exponent for exponential<br />

formats.<br />

# Separates formats for positive numbers and formats for<br />

negative numbers.<br />

- The default negative prefix.<br />

E<br />

Multiplied by 100, as percentage.<br />

\u2030 Multiplied by 1000, as per mille.<br />

\u221E<br />

\uFFFD<br />

The currency symbol. If this symbol is present in a<br />

pattern, the monetary decimal separator is used instead<br />

of the decimal separator.<br />

The international currency sign. It will be replaced by an<br />

international currency symbol. If it is present in a<br />

pattern, the monetary decimal separator is used instead<br />

of the decimal separator.<br />

184 Cognos ReportNet (TM) Framework Manager


Appendix D: Formatting Data With Patterns<br />

Symbol<br />

X<br />

Meaning<br />

Other characters that can be used in the prefix or suffix.<br />

’ Used to quote special characters in a prefix or suffix.<br />

Language Code: da<br />

Locale ID: da<br />

Date and Time Symbols<br />

Symbol Meaning Presentation Example<br />

G Era Text AD<br />

u Year Number 1996<br />

M Month in year Text and<br />

number<br />

July and 07<br />

t Day in month Number 10<br />

k Hour in a.m. or p.m. (1<br />

to 12)<br />

Number 12<br />

H Hour in day (0 to 23) Number 0<br />

m Minute in hour Number 30<br />

s Second in minute Number 55<br />

S Millisecond Number 978<br />

E Day in week Text Tuesday<br />

D Day in year Number 189<br />

F Day of week in month Number 2 (2nd Wed in<br />

July)<br />

w Week in year Number 27<br />

W Week in month Number 2<br />

a a.m. or p.m. marker Text pm<br />

h Hour in day (1 to 24) Number 24<br />

K Hour in a.m. or p.m. (0<br />

to 11)<br />

Number 0<br />

z Time zone Text Pacific Standard<br />

Time<br />

U Escape used in text n/a n/a<br />

e Single quote n/a ’<br />

User Guide 185


Appendix D: Formatting Data With Patterns<br />

Decimal Format Symbols<br />

Symbol<br />

Meaning<br />

, A digit that is shown even if the value is zero.<br />

. A digit that is suppressed if the value is zero.<br />

; A placeholder for decimal separator.<br />

% A placeholder for thousands grouping separator.<br />

0 Separates mantissa and exponent for exponential<br />

formats.<br />

# Separates formats for positive numbers and formats for<br />

negative numbers.<br />

- The default negative prefix.<br />

E<br />

Multiplied by 100, as percentage.<br />

\u2030 Multiplied by 1000, as per mille.<br />

\u221E<br />

\uFFFD<br />

X<br />

The currency symbol. If this symbol is present in a<br />

pattern, the monetary decimal separator is used instead<br />

of the decimal separator.<br />

The international currency sign. It will be replaced by an<br />

international currency symbol. If it is present in a<br />

pattern, the monetary decimal separator is used instead<br />

of the decimal separator.<br />

Other characters that can be used in the prefix or suffix.<br />

’ Used to quote special characters in a prefix or suffix.<br />

Locale ID: da_DK<br />

Date and Time Symbols<br />

Symbol Meaning Presentation Example<br />

G Era Text AD<br />

u Year Number 1996<br />

M Month in year Text and<br />

number<br />

July and 07<br />

t Day in month Number 10<br />

k<br />

Hour in a.m. or p.m. (1 to<br />

12)<br />

Number 12<br />

H Hour in day (0 to 23) Number 0<br />

m Minute in hour Number 30<br />

s Second in minute Number 55<br />

186 Cognos ReportNet (TM) Framework Manager


Appendix D: Formatting Data With Patterns<br />

Symbol Meaning Presentation Example<br />

S Millisecond Number 978<br />

E Day in week Text Tuesday<br />

D Day in year Number 189<br />

F Day of week in month Number 2 (2nd Wed in<br />

July)<br />

w Week in year Number 27<br />

W Week in month Number 2<br />

a a.m. or p.m. marker Text pm<br />

h Hour in day (1 to 24) Number 24<br />

K<br />

Hour in a.m. or p.m. (0 to<br />

11)<br />

Number 0<br />

z Time zone Text Pacific Standard<br />

Time<br />

U Escape used in text n/a n/a<br />

e Single quote n/a ’<br />

Decimal Format Symbols<br />

Symbol<br />

Meaning<br />

, A digit that is shown even if the value is zero.<br />

. A digit that is suppressed if the value is zero.<br />

; A placeholder for decimal separator.<br />

% A placeholder for thousands grouping separator.<br />

0 Separates mantissa and exponent for exponential<br />

formats.<br />

# Separates formats for positive numbers and formats for<br />

negative numbers.<br />

- The default negative prefix.<br />

E<br />

Multiplied by 100, as percentage.<br />

\u2030 Multiplied by 1000, as per mille.<br />

\u221E<br />

\uFFFD<br />

The currency symbol. If this symbol is present in a<br />

pattern, the monetary decimal separator is used instead<br />

of the decimal separator.<br />

The international currency sign. It will be replaced by an<br />

international currency symbol. If it is present in a<br />

pattern, the monetary decimal separator is used instead<br />

of the decimal separator.<br />

User Guide 187


Appendix D: Formatting Data With Patterns<br />

Symbol<br />

X<br />

Meaning<br />

Other characters that can be used in the prefix or suffix.<br />

’ Used to quote special characters in a prefix or suffix.<br />

Language Code: de<br />

Locale ID: de<br />

Date and Time Symbols<br />

Symbol Meaning Presentation Example<br />

G Era Text AD<br />

j Year Number 1996<br />

M Month in year Text and<br />

number<br />

July and 07<br />

t Day in month Number 10<br />

k Hour in a.m. or p.m. (1<br />

to 12)<br />

Number 12<br />

H Hour in day (0 to 23) Number 0<br />

m Minute in hour Number 30<br />

s Second in minute Number 55<br />

S Millisecond Number 978<br />

E Day in week Text Tuesday<br />

D Day in year Number 189<br />

F Day of week in month Number 2 (2nd Wed in<br />

July)<br />

w Week in year Number 27<br />

W Week in month Number 2<br />

a a.m. or p.m. marker Text pm<br />

h Hour in day (1 to 24) Number 24<br />

K Hour in a.m. or p.m. (0<br />

to 11)<br />

Number 0<br />

z Time zone Text Pacific Standard<br />

Time<br />

J Escape used in text n/a n/a<br />

e Single quote n/a ’<br />

188 Cognos ReportNet (TM) Framework Manager


Appendix D: Formatting Data With Patterns<br />

Decimal Format Symbols<br />

Symbol<br />

Meaning<br />

, A digit that is shown even if the value is zero.<br />

. A digit that is suppressed if the value is zero.<br />

; A placeholder for decimal separator.<br />

% A placeholder for thousands grouping separator.<br />

0 Separates mantissa and exponent for exponential<br />

formats.<br />

# Separates formats for positive numbers and formats for<br />

negative numbers.<br />

- The default negative prefix.<br />

E<br />

Multiplied by 100, as percentage.<br />

\u2030 Multiplied by 1000, as per mille.<br />

\u221E<br />

\uFFFD<br />

X<br />

The currency symbol. If this symbol is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

The international currency sign. It will be replaced by an<br />

international currency symbol. If it is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

Other characters that can be used in the prefix or suffix.<br />

’ Used to quote special characters in a prefix or suffix.<br />

Locale ID: de_CH<br />

Date and Time Symbols<br />

Symbol Meaning Presentation Example<br />

G Era Text AD<br />

j Year Number 1996<br />

M Month in year Text and<br />

number<br />

July and 07<br />

t Day in month Number 10<br />

k Hour in a.m. or p.m. (1<br />

to 12)<br />

Number 12<br />

H Hour in day (0 to 23) Number 0<br />

m Minute in hour Number 30<br />

s Second in minute Number 55<br />

User Guide 189


Appendix D: Formatting Data With Patterns<br />

Symbol Meaning Presentation Example<br />

S Millisecond Number 978<br />

E Day in week Text Tuesday<br />

D Day in year Number 189<br />

F Day of week in month Number 2 (2nd Wed in<br />

July)<br />

w Week in year Number 27<br />

W Week in month Number 2<br />

a a.m. or p.m. marker Text pm<br />

h Hour in day (1 to 24) Number 24<br />

K Hour in a.m. or p.m. (0<br />

to 11)<br />

Number 0<br />

z Time zone Text Pacific Standard<br />

Time<br />

J Escape used in text n/a n/a<br />

e Single quote n/a ’<br />

Decimal Format Symbols<br />

Symbol<br />

Meaning<br />

, A digit that is shown even if the value is zero.<br />

. A digit that is suppressed if the value is zero.<br />

; A placeholder for decimal separator.<br />

% A placeholder for thousands grouping separator.<br />

0 Separates mantissa and exponent for exponential<br />

formats.<br />

# Separates formats for positive numbers and formats for<br />

negative numbers.<br />

- The default negative prefix.<br />

E<br />

Multiplied by 100, as percentage.<br />

\u2030 Multiplied by 1000, as per mille.<br />

\u221E<br />

\uFFFD<br />

The currency symbol. If this symbol is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

The international currency sign. It will be replaced by an<br />

international currency symbol. If it is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

190 Cognos ReportNet (TM) Framework Manager


Appendix D: Formatting Data With Patterns<br />

Symbol<br />

X<br />

Meaning<br />

Other characters that can be used in the prefix or suffix.<br />

’ Used to quote special characters in a prefix or suffix.<br />

Locale ID: de_DE, de_LU, de_AT<br />

Date and Time Symbols<br />

Symbol Meaning Presentation Example<br />

G Era Text AD<br />

j Year Number 1996<br />

M Month in year Text and<br />

number<br />

July and 07<br />

t Day in month Number 10<br />

k Hour in a.m. or p.m. (1<br />

to 12)<br />

Number 12<br />

H Hour in day (0 to 23) Number 0<br />

m Minute in hour Number 30<br />

s Second in minute Number 55<br />

S Millisecond Number 978<br />

E Day in week Text Tuesday<br />

D Day in year Number 189<br />

F Day of week in month Number 2 (2nd Wed in<br />

July)<br />

w Week in year Number 27<br />

W Week in month Number 2<br />

a a.m. or p.m. marker Text pm<br />

h Hour in day (1 to 24) Number 24<br />

K Hour in a.m. or p.m. (0<br />

to 11)<br />

Number 0<br />

z Time zone Text Pacific Standard<br />

Time<br />

J Escape used in text n/a n/a<br />

e Single quote n/a ’<br />

User Guide 191


Appendix D: Formatting Data With Patterns<br />

Decimal Format Symbols<br />

Symbol<br />

Meaning<br />

, A digit that is shown even if the value is zero.<br />

. A digit that is suppressed if the value is zero.<br />

; A placeholder for decimal separator.<br />

% A placeholder for thousands grouping separator.<br />

0 Separates mantissa and exponent for exponential<br />

formats.<br />

# Separates formats for positive numbers and formats for<br />

negative numbers.<br />

- The default negative prefix.<br />

E<br />

Multiplied by 100, as percentage.<br />

\u2030 Multiplied by 1000, as per mille.<br />

\u221E<br />

\uFFFD<br />

X<br />

The currency symbol. If this symbol is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

The international currency sign. It will be replaced by an<br />

international currency symbol. If it is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

Other characters that can be used in the prefix or suffix.<br />

’ Used to quote special characters in a prefix or suffix.<br />

Language Code: el<br />

Locale ID: el<br />

Date and Time Symbols<br />

Symbol Meaning Presentation Example<br />

G Era Text AD<br />

a Year Number 1996<br />

n Month in year Text and<br />

number<br />

July and 07<br />

j Day in month Number 10<br />

k Hour in a.m. or p.m. (1<br />

to 12)<br />

Number 12<br />

H Hour in day (0 to 23) Number 0<br />

192 Cognos ReportNet (TM) Framework Manager


Appendix D: Formatting Data With Patterns<br />

Symbol Meaning Presentation Example<br />

m Minute in hour Number 30<br />

s Second in minute Number 55<br />

S Millisecond Number 978<br />

E Day in week Text Tuesday<br />

D Day in year Number 189<br />

F Day of week in month Number 2 (2nd Wed in<br />

July)<br />

w Week in year Number 27<br />

W Week in month Number 2<br />

x a.m. or p.m. marker Text pm<br />

h Hour in day (1 to 24) Number 24<br />

K Hour in a.m. or p.m. (0<br />

to 11)<br />

Number 0<br />

z Time zone Text Pacific Standard<br />

Time<br />

A Escape used in text n/a n/a<br />

e Single quote n/a ’<br />

Decimal Format Symbols<br />

Symbol<br />

Meaning<br />

, A digit that is shown even if the value is zero.<br />

. A digit that is suppressed if the value is zero.<br />

; A placeholder for decimal separator.<br />

% A placeholder for thousands grouping separator.<br />

0 Separates mantissa and exponent for exponential<br />

formats.<br />

# Separates formats for positive numbers and formats for<br />

negative numbers.<br />

- The default negative prefix.<br />

E<br />

Multiplied by 100, as percentage.<br />

\u2030 Multiplied by 1000, as per mille.<br />

\u221E<br />

The currency symbol. If this symbol is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

User Guide 193


Appendix D: Formatting Data With Patterns<br />

Symbol<br />

\uFFFD<br />

X<br />

Meaning<br />

The international currency sign. It will be replaced by an<br />

international currency symbol. If it is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

Other characters that can be used in the prefix or suffix.<br />

’ Used to quote special characters in a prefix or suffix.<br />

Locale ID: el_GR<br />

Date and Time Symbols<br />

Symbol Meaning Presentation Example<br />

G Era Text AD<br />

y Year Number 1996<br />

M Month in year Text and<br />

number<br />

July and 07<br />

d Day in month Number 10<br />

h Hour in a.m. or p.m. (1<br />

to 12)<br />

Number 12<br />

H Hour in day (0 to 23) Number 0<br />

m Minute in hour Number 30<br />

s Second in minute Number 55<br />

S Millisecond Number 978<br />

E Day in week Text Tuesday<br />

D Day in year Number 189<br />

F Day of week in month Number 2 (2nd Wed in<br />

July)<br />

w Week in year Number 27<br />

W Week in month Number 2<br />

a a.m. or p.m. marker Text pm<br />

k Hour in day (1 to 24) Number 24<br />

K Hour in a.m. or p.m. (0<br />

to 11)<br />

Number 0<br />

Z Time zone Text Pacific Standard<br />

Time<br />

’ Escape used in text n/a n/a<br />

" Single quote n/a ’<br />

194 Cognos ReportNet (TM) Framework Manager


Appendix D: Formatting Data With Patterns<br />

Decimal Format Symbols<br />

Symbol<br />

Meaning<br />

, A digit that is shown even if the value is zero.<br />

. A digit that is suppressed if the value is zero.<br />

; A placeholder for decimal separator.<br />

% A placeholder for thousands grouping separator.<br />

0 Separates mantissa and exponent for exponential<br />

formats.<br />

# Separates formats for positive numbers and formats for<br />

negative numbers.<br />

- The default negative prefix.<br />

E<br />

Multiplied by 100, as percentage.<br />

\u2030 Multiplied by 1000, as per mille.<br />

\u221E<br />

\uFFFD<br />

X<br />

The currency symbol. If this symbol is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

The international currency sign. It will be replaced by an<br />

international currency symbol. If it is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

Other characters that can be used in the prefix or suffix.<br />

’ Used to quote special characters in a prefix or suffix.<br />

Language Code: en<br />

Locale ID: en, en_AU, en_CA, en_GB, en_IE, en_NZ, en_SG, en_US, en_ZA,<br />

en_ZW<br />

Date and Time Symbols<br />

Symbol Meaning Presentation Example<br />

G Era Text AD<br />

y Year Number 1996<br />

M Month in year Text and<br />

number<br />

July and 07<br />

d Day in month Number 10<br />

h Hour in a.m. or p.m. (1<br />

to 12)<br />

Number 12<br />

User Guide 195


Appendix D: Formatting Data With Patterns<br />

Symbol Meaning Presentation Example<br />

H Hour in day (0 to 23) Number 0<br />

m Minute in hour Number 30<br />

s Second in minute Number 55<br />

S Millisecond Number 978<br />

E Day in week Text Tuesday<br />

D Day in year Number 189<br />

F Day of week in month Number 2 (2nd Wed in<br />

July)<br />

w Week in year Number 27<br />

W Week in month Number 2<br />

a a.m. or p.m. marker Text pm<br />

k Hour in day (1 to 24) Number 24<br />

K Hour in a.m. or p.m. (0<br />

to 11)<br />

Number 0<br />

Z Time zone Text Pacific Standard<br />

Time<br />

’ Escape used in text n/a n/a<br />

" Single quote n/a ’<br />

Decimal Format Symbols<br />

Symbol Meaning<br />

0 A digit that is shown even if the value is zero.<br />

# A digit that is suppressed if the value is zero.<br />

. A placeholder for decimal separator.<br />

, A placeholder for thousands grouping separator.<br />

E<br />

Separates mantissa and exponent for exponential<br />

formats.<br />

; Separates formats for positive numbers and formats for<br />

negative numbers.<br />

- The default negative prefix.<br />

% Multiplied by 100, as percentage.<br />

‰ Multiplied by 1000, as per mille.<br />

¤ The currency symbol. If this symbol is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

196 Cognos ReportNet (TM) Framework Manager


Appendix D: Formatting Data With Patterns<br />

Symbol<br />

Meaning<br />

¤¤ The international currency sign. It will be replaced by an<br />

international currency symbol. If it is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

X<br />

Other characters that can be used in the prefix or suffix.<br />

’ Used to quote special characters in a prefix or suffix.<br />

Locale ID: en_BE<br />

Date and Time Symbols<br />

Symbol Meaning Presentation Example<br />

G Era Text AD<br />

y Year Number 1996<br />

M Month in year Text and<br />

number<br />

July and 07<br />

d Day in month Number 10<br />

h Hour in a.m. or p.m. (1<br />

to 12)<br />

Number 12<br />

H Hour in day (0 to 23) Number 0<br />

m Minute in hour Number 30<br />

s Second in minute Number 55<br />

S Millisecond Number 978<br />

E Day in week Text Tuesday<br />

D Day in year Number 189<br />

F Day of week in month Number 2 (2nd Wed in<br />

July)<br />

w Week in year Number 27<br />

W Week in month Number 2<br />

a a.m. or p.m. marker Text pm<br />

k Hour in day (1 to 24) Number 24<br />

K Hour in a.m. or p.m. (0<br />

to 11)<br />

Number 0<br />

Z Time zone Text Pacific Standard<br />

Time<br />

’ Escape used in text n/a n/a<br />

" Single quote n/a ’<br />

User Guide 197


Appendix D: Formatting Data With Patterns<br />

Decimal Format Symbols<br />

Symbol<br />

Meaning<br />

, A digit that is shown even if the value is zero.<br />

. A digit that is suppressed if the value is zero.<br />

; A placeholder for decimal separator.<br />

% A placeholder for thousands grouping separator.<br />

0 Separates mantissa and exponent for exponential<br />

formats.<br />

# Separates formats for positive numbers and formats for<br />

negative numbers.<br />

- The default negative prefix.<br />

E<br />

Multiplied by 100, as percentage.<br />

\u2030 Multiplied by 1000, as per mille.<br />

\u221E<br />

\uFFFD<br />

X<br />

The currency symbol. If this symbol is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

The international currency sign. It will be replaced by an<br />

international currency symbol. If it is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

Other characters that can be used in the prefix or suffix.<br />

’ Used to quote special characters in a prefix or suffix.<br />

Locale ID: en_HK, en_IN, en_PH, en_BW<br />

These symbols are valid for the following locales: en_HK, en_IN, en_PH, en_BW.<br />

Date and Time Symbols<br />

Symbol Meaning Presentation Example<br />

G Era Text AD<br />

y Year Number 1996<br />

M Month in year Text and<br />

number<br />

July and 07<br />

d Day in month Number 10<br />

h Hour in a.m. or p.m. (1<br />

to 12)<br />

Number 12<br />

H Hour in day (0 to 23) Number 0<br />

m Minute in hour Number 30<br />

198 Cognos ReportNet (TM) Framework Manager


Appendix D: Formatting Data With Patterns<br />

Symbol Meaning Presentation Example<br />

s Second in minute Number 55<br />

S Millisecond Number 978<br />

E Day in week Text Tuesday<br />

D Day in year Number 189<br />

F Day of week in month Number 2 (2nd Wed in<br />

July)<br />

w Week in year Number 27<br />

W Week in month Number 2<br />

a a.m. or p.m. marker Text pm<br />

k Hour in day (1 to 24) Number 24<br />

K Hour in a.m. or p.m. (0<br />

to 11)<br />

Number 0<br />

Z Time zone Text Pacific Standard<br />

Time<br />

’ Escape used in text n/a n/a<br />

" Single quote n/a ’<br />

Decimal Format Symbols<br />

Symbol<br />

Meaning<br />

. A digit that is shown even if the value is zero.<br />

, A digit that is suppressed if the value is zero.<br />

; A placeholder for decimal separator.<br />

% A placeholder for thousands grouping separator.<br />

0 Separates mantissa and exponent for exponential<br />

formats.<br />

# Separates formats for positive numbers and formats for<br />

negative numbers.<br />

- The default negative prefix.<br />

E<br />

Multiplied by 100, as percentage.<br />

\u2030 Multiplied by 1000, as per mille.<br />

\u221E<br />

The currency symbol. If this symbol is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

User Guide 199


Appendix D: Formatting Data With Patterns<br />

Symbol<br />

\uFFFD<br />

X<br />

Meaning<br />

The international currency sign. It will be replaced by an<br />

international currency symbol. If it is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

Other characters that can be used in the prefix or suffix.<br />

’ Used to quote special characters in a prefix or suffix.<br />

Language Code: es<br />

Locale ID: es, es_AR, es_CL, es_ES, es_PE, es_PY, es_UY, es_VE<br />

Date and Time Symbols<br />

Symbol Meaning Presentation Example<br />

G Era Text AD<br />

u Year Number 1996<br />

M Month in year Text and<br />

number<br />

July and 07<br />

t Day in month Number 10<br />

k Hour in a.m. or p.m. (1<br />

to 12)<br />

Number 12<br />

H Hour in day (0 to 23) Number 0<br />

m Minute in hour Number 30<br />

s Second in minute Number 55<br />

S Millisecond Number 978<br />

E Day in week Text Tuesday<br />

D Day in year Number 189<br />

F Day of week in month Number 2 (2nd Wed in<br />

July)<br />

w Week in year Number 27<br />

W Week in month Number 2<br />

a a.m. or p.m. marker Text pm<br />

h Hour in day (1 to 24) Number 24<br />

K Hour in a.m. or p.m. (0<br />

to 11)<br />

Number 0<br />

z Time zone Text Pacific Standard<br />

Time<br />

200 Cognos ReportNet (TM) Framework Manager


Appendix D: Formatting Data With Patterns<br />

Symbol Meaning Presentation Example<br />

U Escape used in text n/a n/a<br />

e Single quote n/a ’<br />

Decimal Format Symbols<br />

Symbol<br />

Meaning<br />

, A digit that is shown even if the value is zero.<br />

. A digit that is suppressed if the value is zero.<br />

; A placeholder for decimal separator.<br />

% A placeholder for thousands grouping separator.<br />

0 Separates mantissa and exponent for exponential<br />

formats.<br />

# Separates formats for positive numbers and formats for<br />

negative numbers.<br />

- The default negative prefix.<br />

E<br />

Multiplied by 100, as percentage.<br />

\u2030 Multiplied by 1000, as per mille.<br />

\u221E<br />

\uFFFD<br />

X<br />

The currency symbol. If this symbol is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

The international currency sign. It will be replaced by an<br />

international currency symbol. If it is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

Other characters that can be used in the prefix or suffix.<br />

’ Used to quote special characters in a prefix or suffix.<br />

Locale ID: es_BO, es_CO, es_CR, es_DO, es_EC, es_GT, es_HN, es_MX,<br />

es_NI, es_PA, es_PR, es_SV, es_US<br />

Date and Time Symbols<br />

Symbol Meaning Presentation Example<br />

G Era Text AD<br />

u Year Number 1996<br />

M Month in year Text and<br />

number<br />

July and 07<br />

t Day in month Number 10<br />

User Guide 201


Appendix D: Formatting Data With Patterns<br />

Symbol Meaning Presentation Example<br />

k Hour in a.m. or p.m. (1<br />

to 12)<br />

Number 12<br />

H Hour in day (0 to 23) Number 0<br />

m Minute in hour Number 30<br />

s Second in minute Number 55<br />

S Millisecond Number 978<br />

E Day in week Text Tuesday<br />

D Day in year Number 189<br />

F Day of week in month Number 2 (2nd Wed in<br />

July)<br />

w Week in year Number 27<br />

W Week in month Number 2<br />

a a.m. or p.m. marker Text pm<br />

h Hour in day (1 to 24) Number 24<br />

K Hour in a.m. or p.m. (0<br />

to 11)<br />

Number 0<br />

z Time zone Text Pacific Standard<br />

Time<br />

U Escape used in text n/a n/a<br />

e Single quote n/a ’<br />

Decimal Format Symbols<br />

Symbol<br />

Meaning<br />

. A digit that is shown even if the value is zero.<br />

, A digit that is suppressed if the value is zero.<br />

; A placeholder for decimal separator.<br />

% A placeholder for thousands grouping separator.<br />

0 Separates mantissa and exponent for exponential<br />

formats.<br />

# Separates formats for positive numbers and formats for<br />

negative numbers.<br />

- The default negative prefix.<br />

E<br />

Multiplied by 100, as percentage.<br />

\u2030 Multiplied by 1000, as per mille.<br />

202 Cognos ReportNet (TM) Framework Manager


Appendix D: Formatting Data With Patterns<br />

Symbol<br />

\u221E<br />

\uFFFD<br />

X<br />

Meaning<br />

The currency symbol. If this symbol is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

The international currency sign. It will be replaced by an<br />

international currency symbol. If it is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

Other characters that can be used in the prefix or suffix.<br />

’ Used to quote special characters in a prefix or suffix.<br />

Language Code: fi<br />

Locale ID: fi, fi_FI<br />

Date and Time Symbols<br />

Symbol Meaning Presentation Example<br />

G Era Text AD<br />

a Year Number 1996<br />

n Month in year Text and<br />

number<br />

July and 07<br />

j Day in month Number 10<br />

k Hour in a.m. or p.m. (1<br />

to 12)<br />

Number 12<br />

H Hour in day (0 to 23) Number 0<br />

m Minute in hour Number 30<br />

s Second in minute Number 55<br />

S Millisecond Number 978<br />

E Day in week Text Tuesday<br />

D Day in year Number 189<br />

F Day of week in month Number 2 (2nd Wed in<br />

July)<br />

w Week in year Number 27<br />

W Week in month Number 2<br />

x a.m. or p.m. marker Text pm<br />

h Hour in day (1 to 24) Number 24<br />

User Guide 203


Appendix D: Formatting Data With Patterns<br />

Symbol Meaning Presentation Example<br />

K Hour in a.m. or p.m. (0<br />

to 11)<br />

Number 0<br />

z Time zone Text Pacific Standard<br />

Time<br />

A Escape used in text n/a n/a<br />

e Single quote n/a ’<br />

Decimal Format Symbols<br />

Symbol<br />

Meaning<br />

, A digit that is shown even if the value is zero.<br />

\u00A0<br />

A digit that is suppressed if the value is zero.<br />

; A placeholder for decimal separator.<br />

% A placeholder for thousands grouping separator.<br />

0 Separates mantissa and exponent for exponential<br />

formats.<br />

# Separates formats for positive numbers and formats for<br />

negative numbers.<br />

- The default negative prefix.<br />

E<br />

Multiplied by 100, as percentage.<br />

\u2030 Multiplied by 1000, as per mille.<br />

\u221E<br />

\uFFFD<br />

X<br />

The currency symbol. If this symbol is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

The international currency sign. It will be replaced by an<br />

international currency symbol. If it is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

Other characters that can be used in the prefix or suffix.<br />

’ Used to quote special characters in a prefix or suffix.<br />

204 Cognos ReportNet (TM) Framework Manager


Appendix D: Formatting Data With Patterns<br />

Language Code: fr<br />

Locale ID: fr, fr_CA, fr_FR, fr_LU<br />

Date and Time Symbols<br />

Symbol Meaning Presentation Example<br />

G Era Text AD<br />

a Year Number 1996<br />

n Month in year Text and<br />

number<br />

July and 07<br />

j Day in month Number 10<br />

k Hour in a.m. or p.m. (1<br />

to 12)<br />

Number 12<br />

H Hour in day (0 to 23) Number 0<br />

m Minute in hour Number 30<br />

s Second in minute Number 55<br />

S Millisecond Number 978<br />

E Day in week Text Tuesday<br />

D Day in year Number 189<br />

F Day of week in month Number 2 (2nd Wed in<br />

July)<br />

w Week in year Number 27<br />

W Week in month Number 2<br />

x a.m. or p.m. marker Text pm<br />

h Hour in day (1 to 24) Number 24<br />

K Hour in a.m. or p.m. (0<br />

to 11)<br />

Number 0<br />

z Time zone Text Pacific Standard<br />

Time<br />

A Escape used in text n/a n/a<br />

e Single quote n/a ’<br />

User Guide 205


Appendix D: Formatting Data With Patterns<br />

Decimal Format Symbols<br />

Symbol Meaning<br />

0 A digit that is shown even if the value is zero.<br />

# A digit that is suppressed if the value is zero.<br />

. A placeholder for decimal separator.<br />

, A placeholder for thousands grouping separator.<br />

E<br />

Separates mantissa and exponent for exponential<br />

formats.<br />

; Separates formats for positive numbers and formats for<br />

negative numbers.<br />

- The default negative prefix.<br />

% Multiplied by 100, as percentage.<br />

‰ Multiplied by 1000, as per mille.<br />

¤ The currency symbol. If this symbol is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

¤¤ The international currency sign. It will be replaced by an<br />

international currency symbol. If it is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

X<br />

Other characters that can be used in the prefix or suffix.<br />

’ Used to quote special characters in a prefix or suffix.<br />

Locale ID: fr_BE<br />

Date and Time Symbols<br />

Symbol Meaning Presentation Example<br />

G Era Text AD<br />

a Year Number 1996<br />

n Month in year Text and<br />

number<br />

July and 07<br />

j Day in month Number 10<br />

k Hour in a.m. or p.m. (1<br />

to 12)<br />

Number 12<br />

H Hour in day (0 to 23) Number 0<br />

m Minute in hour Number 30<br />

s Second in minute Number 55<br />

206 Cognos ReportNet (TM) Framework Manager


Appendix D: Formatting Data With Patterns<br />

Symbol Meaning Presentation Example<br />

S Millisecond Number 978<br />

E Day in week Text Tuesday<br />

D Day in year Number 189<br />

F Day of week in month Number 2 (2nd Wed in<br />

July)<br />

w Week in year Number 27<br />

W Week in month Number 2<br />

x a.m. or p.m. marker Text pm<br />

h Hour in day (1 to 24) Number 24<br />

K Hour in a.m. or p.m. (0<br />

to 11)<br />

Number 0<br />

z Time zone Text Pacific Standard<br />

Time<br />

A Escape used in text n/a n/a<br />

e Single quote n/a ’<br />

Decimal Format Symbols<br />

Symbol<br />

Meaning<br />

, A digit that is shown even if the value is zero.<br />

. A digit that is suppressed if the value is zero.<br />

; A placeholder for decimal separator.<br />

% A placeholder for thousands grouping separator.<br />

0 Separates mantissa and exponent for exponential<br />

formats.<br />

# Separates formats for positive numbers and formats for<br />

negative numbers.<br />

- The default negative prefix.<br />

E<br />

Multiplied by 100, as percentage.<br />

\u2030 Multiplied by 1000, as per mille.<br />

\u221E<br />

\uFFFD<br />

The currency symbol. If this symbol is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

The international currency sign. It will be replaced by an<br />

international currency symbol. If it is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

User Guide 207


Appendix D: Formatting Data With Patterns<br />

Symbol<br />

X<br />

Meaning<br />

Other characters that can be used in the prefix or suffix.<br />

’ Used to quote special characters in a prefix or suffix.<br />

Locale ID: fr_CH<br />

Date and Time Symbols<br />

Symbol Meaning Presentation Example<br />

G Era Text AD<br />

a Year Number 1996<br />

n Month in year Text and<br />

number<br />

July and 07<br />

j Day in month Number 10<br />

k Hour in a.m. or p.m. (1<br />

to 12)<br />

Number 12<br />

H Hour in day (0 to 23) Number 0<br />

m Minute in hour Number 30<br />

s Second in minute Number 55<br />

S Millisecond Number 978<br />

E Day in week Text Tuesday<br />

D Day in year Number 189<br />

F Day of week in month Number 2 (2nd Wed in<br />

July)<br />

w Week in year Number 27<br />

W Week in month Number 2<br />

x a.m. or p.m. marker Text pm<br />

h Hour in day (1 to 24) Number 24<br />

K Hour in a.m. or p.m. (0<br />

to 11)<br />

Number 0<br />

z Time zone Text Pacific Standard<br />

Time<br />

A Escape used in text n/a n/a<br />

e Single quote n/a ’<br />

208 Cognos ReportNet (TM) Framework Manager


Appendix D: Formatting Data With Patterns<br />

Decimal Format Symbols<br />

Symbol<br />

Meaning<br />

. A digit that is shown even if the value is zero.<br />

’ A digit that is suppressed if the value is zero.<br />

; A placeholder for decimal separator.<br />

% A placeholder for thousands grouping separator.<br />

0 Separates mantissa and exponent for exponential<br />

formats.<br />

# Separates formats for positive numbers and formats for<br />

negative numbers.<br />

- The default negative prefix.<br />

E<br />

Multiplied by 100, as percentage.<br />

\u2030 Multiplied by 1000, as per mille.<br />

\u221E<br />

\uFFFD<br />

X<br />

The currency symbol. If this symbol is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

The international currency sign. It will be replaced by an<br />

international currency symbol. If it is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

Other characters that can be used in the prefix or suffix.<br />

’ Used to quote special characters in a prefix or suffix.<br />

Language Code: hi<br />

Locale ID: hi<br />

Date and Time Symbols<br />

Symbol Meaning Presentation Example<br />

G Era Text AD<br />

y Year Number 1996<br />

M Month in year Text and<br />

number<br />

July and 07<br />

d Day in month Number 10<br />

h Hour in a.m. or p.m. (1<br />

to 12)<br />

Number 12<br />

H Hour in day (0 to 23) Number 0<br />

User Guide 209


Appendix D: Formatting Data With Patterns<br />

Symbol Meaning Presentation Example<br />

m Minute in hour Number 30<br />

s Second in minute Number 55<br />

S Millisecond Number 978<br />

E Day in week Text Tuesday<br />

D Day in year Number 189<br />

F Day of week in month Number 2 (2nd Wed in<br />

July)<br />

w Week in year Number 27<br />

W Week in month Number 2<br />

a a.m. or p.m. marker Text pm<br />

k Hour in day (1 to 24) Number 24<br />

K Hour in a.m. or p.m. (0<br />

to 11)<br />

Number 0<br />

Z Time zone Text Pacific Standard<br />

Time<br />

’ Escape used in text n/a n/a<br />

" Single quote n/a ’<br />

Decimal Format Symbols<br />

Symbol<br />

Meaning<br />

. A digit that is shown even if the value is zero.<br />

, A digit that is suppressed if the value is zero.<br />

; A placeholder for decimal separator.<br />

% A placeholder for thousands grouping separator.<br />

\u0966 Separates mantissa and exponent for exponential<br />

formats.<br />

# Separates formats for positive numbers and formats for<br />

negative numbers.<br />

- The default negative prefix.<br />

E<br />

Multiplied by 100, as percentage.<br />

\u2030 Multiplied by 1000, as per mille.<br />

\u221e<br />

The currency symbol. If this symbol is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

210 Cognos ReportNet (TM) Framework Manager


Appendix D: Formatting Data With Patterns<br />

Symbol<br />

\ufffd<br />

X<br />

Meaning<br />

The international currency sign. It will be replaced by an<br />

international currency symbol. If it is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

Other characters that can be used in the prefix or suffix.<br />

’ Used to quote special characters in a prefix or suffix.<br />

Locale ID: hi_IN<br />

Date and Time Symbols<br />

Symbol Meaning Presentation Example<br />

G Era Text AD<br />

y Year Number 1996<br />

M Month in year Text and<br />

number<br />

July and 07<br />

d Day in month Number 10<br />

h Hour in a.m. or p.m. (1<br />

to 12)<br />

Number 12<br />

H Hour in day (0 to 23) Number 0<br />

m Minute in hour Number 30<br />

s Second in minute Number 55<br />

S Millisecond Number 978<br />

E Day in week Text Tuesday<br />

D Day in year Number 189<br />

F Day of week in month Number 2 (2nd Wed in<br />

July)<br />

w Week in year Number 27<br />

W Week in month Number 2<br />

a a.m. or p.m. marker Text pm<br />

k Hour in day (1 to 24) Number 24<br />

K Hour in a.m. or p.m. (0<br />

to 11)<br />

Number 0<br />

Z Time zone Text Pacific Standard<br />

Time<br />

’ Escape used in text n/a n/a<br />

" Single quote n/a ’<br />

User Guide 211


Appendix D: Formatting Data With Patterns<br />

Decimal Format Symbols<br />

Symbol<br />

Meaning<br />

. A digit that is shown even if the value is zero.<br />

, A digit that is suppressed if the value is zero.<br />

; A placeholder for decimal separator.<br />

% A placeholder for thousands grouping separator.<br />

\u0966 Separates mantissa and exponent for exponential<br />

formats.<br />

# Separates formats for positive numbers and formats for<br />

negative numbers.<br />

- The default negative prefix.<br />

E<br />

Multiplied by 100, as percentage.<br />

\u2030 Multiplied by 1000, as per mille.<br />

\u221e<br />

\ufffd<br />

X<br />

The currency symbol. If this symbol is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

The international currency sign. It will be replaced by an<br />

international currency symbol. If it is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

Other characters that can be used in the prefix or suffix.<br />

’ Used to quote special characters in a prefix or suffix.<br />

Language Code: hu<br />

Locale ID: hu<br />

Date and Time Symbols<br />

Symbol Meaning Presentation Example<br />

G Era Text AD<br />

a Year Number 1996<br />

n Month in year Text and<br />

number<br />

July and 07<br />

j Day in month Number 10<br />

k Hour in a.m. or p.m. (1<br />

to 12)<br />

Number 12<br />

H Hour in day (0 to 23) Number 0<br />

212 Cognos ReportNet (TM) Framework Manager


Appendix D: Formatting Data With Patterns<br />

Symbol Meaning Presentation Example<br />

m Minute in hour Number 30<br />

s Second in minute Number 55<br />

S Millisecond Number 978<br />

E Day in week Text Tuesday<br />

D Day in year Number 189<br />

F Day of week in month Number 2 (2nd Wed in<br />

July)<br />

w Week in year Number 27<br />

W Week in month Number 2<br />

x a.m. or p.m. marker Text pm<br />

h Hour in day (1 to 24) Number 24<br />

K Hour in a.m. or p.m. (0<br />

to 11)<br />

Number 0<br />

z Time zone Text Pacific Standard<br />

Time<br />

A Escape used in text n/a n/a<br />

e Single quote n/a ’<br />

Decimal Format Symbols<br />

Symbol<br />

Meaning<br />

, A digit that is shown even if the value is zero.<br />

\u00A0<br />

A digit that is suppressed if the value is zero.<br />

; A placeholder for decimal separator.<br />

% A placeholder for thousands grouping separator.<br />

0 Separates mantissa and exponent for exponential<br />

formats.<br />

# Separates formats for positive numbers and formats for<br />

negative numbers.<br />

- The default negative prefix.<br />

E<br />

Multiplied by 100, as percentage.<br />

\u2030 Multiplied by 1000, as per mille.<br />

\u221E<br />

The currency symbol. If this symbol is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

User Guide 213


Appendix D: Formatting Data With Patterns<br />

Symbol<br />

\uFFFD<br />

X<br />

Meaning<br />

The international currency sign. It will be replaced by an<br />

international currency symbol. If it is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

Other characters that can be used in the prefix or suffix.<br />

’ Used to quote special characters in a prefix or suffix.<br />

Locale ID: hu_HU<br />

Date and Time Symbols<br />

Symbol Meaning Presentation Example<br />

G Era Text AD<br />

a Year Number 1996<br />

n Month in year Text and<br />

number<br />

July and 07<br />

j Day in month Number 10<br />

k Hour in a.m. or p.m. (1<br />

to 12)<br />

Number 12<br />

H Hour in day (0 to 23) Number 0<br />

m Minute in hour Number 30<br />

s Second in minute Number 55<br />

S Millisecond Number 978<br />

E Day in week Text Tuesday<br />

D Day in year Number 189<br />

F Day of week in month Number 2 (2nd Wed in<br />

July)<br />

w Week in year Number 27<br />

W Week in month Number 2<br />

x a.m. or p.m. marker Text pm<br />

h Hour in day (1 to 24) Number 24<br />

K Hour in a.m. or p.m. (0<br />

to 11)<br />

Number 0<br />

z Time zone Text Pacific Standard<br />

Time<br />

A Escape used in text n/a n/a<br />

e Single quote n/a ’<br />

214 Cognos ReportNet (TM) Framework Manager


Appendix D: Formatting Data With Patterns<br />

Decimal Format Symbols<br />

Symbol<br />

Meaning<br />

, A digit that is shown even if the value is zero.<br />

\u00A0<br />

A digit that is suppressed if the value is zero.<br />

; A placeholder for decimal separator.<br />

% A placeholder for thousands grouping separator.<br />

0 Separates mantissa and exponent for exponential<br />

formats.<br />

# Separates formats for positive numbers and formats for<br />

negative numbers.<br />

- The default negative prefix.<br />

E<br />

Multiplied by 100, as percentage.<br />

\u2030 Multiplied by 1000, as per mille.<br />

\u221E<br />

\uFFFD<br />

X<br />

The currency symbol. If this symbol is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

The international currency sign. It will be replaced by an<br />

international currency symbol. If it is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

Other characters that can be used in the prefix or suffix.<br />

’ Used to quote special characters in a prefix or suffix.<br />

Language Code: it<br />

Locale ID: it<br />

Date and Time Symbols<br />

Symbol Meaning Presentation Example<br />

G Era Text AD<br />

y Year Number 1996<br />

M Month in year Text and<br />

number<br />

July and 07<br />

d Day in month Number 10<br />

h Hour in a.m. or p.m. (1<br />

to 12)<br />

Number 12<br />

H Hour in day (0 to 23) Number 0<br />

User Guide 215


Appendix D: Formatting Data With Patterns<br />

Symbol Meaning Presentation Example<br />

m Minute in hour Number 30<br />

s Second in minute Number 55<br />

S Millisecond Number 978<br />

E Day in week Text Tuesday<br />

D Day in year Number 189<br />

F Day of week in month Number 2 (2nd Wed in<br />

July)<br />

w Week in year Number 27<br />

W Week in month Number 2<br />

a a.m. or p.m. marker Text pm<br />

k Hour in day (1 to 24) Number 24<br />

K Hour in a.m. or p.m. (0<br />

to 11)<br />

Number 0<br />

Z Time zone Text Pacific Standard<br />

Time<br />

’ Escape used in text n/a n/a<br />

" Single quote n/a ’<br />

Decimal Format Symbols<br />

Symbol<br />

Meaning<br />

, A digit that is shown even if the value is zero.<br />

. A digit that is suppressed if the value is zero.<br />

; A placeholder for decimal separator.<br />

% A placeholder for thousands grouping separator.<br />

0 Separates mantissa and exponent for exponential<br />

formats.<br />

# Separates formats for positive numbers and formats for<br />

negative numbers.<br />

- The default negative prefix.<br />

E<br />

Multiplied by 100, as percentage.<br />

\u2030 Multiplied by 1000, as per mille.<br />

\u221E<br />

The currency symbol. If this symbol is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

216 Cognos ReportNet (TM) Framework Manager


Appendix D: Formatting Data With Patterns<br />

Symbol<br />

\uFFFD<br />

X<br />

Meaning<br />

The international currency sign. It will be replaced by an<br />

international currency symbol. If it is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

Other characters that can be used in the prefix or suffix.<br />

’ Used to quote special characters in a prefix or suffix.<br />

Locale ID: it_IT<br />

These symbols are valid for the following locales: it_IT<br />

Date and Time Symbols<br />

Symbol Meaning Presentation Example<br />

G Era Text AD<br />

y Year Number 1996<br />

M Month in year Text and<br />

number<br />

July and 07<br />

d Day in month Number 10<br />

h Hour in a.m. or p.m. (1<br />

to 12)<br />

Number 12<br />

H Hour in day (0 to 23) Number 0<br />

m Minute in hour Number 30<br />

s Second in minute Number 55<br />

S Millisecond Number 978<br />

E Day in week Text Tuesday<br />

D Day in year Number 189<br />

F Day of week in month Number 2 (2nd Wed in<br />

July)<br />

w Week in year Number 27<br />

W Week in month Number 2<br />

a a.m. or p.m. marker Text pm<br />

k Hour in day (1 to 24) Number 24<br />

K Hour in a.m. or p.m. (0<br />

to 11)<br />

Number 0<br />

Z Time zone Text Pacific Standard<br />

Time<br />

User Guide 217


Appendix D: Formatting Data With Patterns<br />

Symbol Meaning Presentation Example<br />

’ Escape used in text n/a n/a<br />

" Single quote n/a ’<br />

Decimal Format Symbols<br />

Symbol<br />

Meaning<br />

, A digit that is shown even if the value is zero.<br />

. A digit that is suppressed if the value is zero.<br />

; A placeholder for decimal separator.<br />

% A placeholder for thousands grouping separator.<br />

0 Separates mantissa and exponent for exponential<br />

formats.<br />

# Separates formats for positive numbers and formats for<br />

negative numbers.<br />

- The default negative prefix.<br />

E<br />

Multiplied by 100, as percentage.<br />

\u2030 Multiplied by 1000, as per mille.<br />

\u221E<br />

\uFFFD<br />

X<br />

The currency symbol. If this symbol is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

The international currency sign. It will be replaced by an<br />

international currency symbol. If it is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

Other characters that can be used in the prefix or suffix.<br />

’ Used to quote special characters in a prefix or suffix.<br />

Locale ID: it_CH<br />

Date and Time Symbols<br />

Symbol Meaning Presentation Example<br />

G Era Text AD<br />

y Year Number 1996<br />

M Month in year Text and<br />

number<br />

July and 07<br />

d Day in month Number 10<br />

h Hour in a.m. or p.m. (1<br />

to 12)<br />

Number 12<br />

218 Cognos ReportNet (TM) Framework Manager


Appendix D: Formatting Data With Patterns<br />

Symbol Meaning Presentation Example<br />

H Hour in day (0 to 23) Number 0<br />

m Minute in hour Number 30<br />

s Second in minute Number 55<br />

S Millisecond Number 978<br />

E Day in week Text Tuesday<br />

D Day in year Number 189<br />

F Day of week in month Number 2 (2nd Wed in<br />

July)<br />

w Week in year Number 27<br />

W Week in month Number 2<br />

a a.m. or p.m. marker Text pm<br />

k Hour in day (1 to 24) Number 24<br />

K Hour in a.m. or p.m. (0<br />

to 11)<br />

Number 0<br />

Z Time zone Text Pacific Standard<br />

Time<br />

’ Escape used in text n/a n/a<br />

" Single quote n/a ’<br />

Decimal Format Symbols<br />

Symbol<br />

Meaning<br />

. A digit that is shown even if the value is zero.<br />

’ A digit that is suppressed if the value is zero.<br />

; A placeholder for decimal separator.<br />

% A placeholder for thousands grouping separator.<br />

0 Separates mantissa and exponent for exponential<br />

formats.<br />

# Separates formats for positive numbers and formats for<br />

negative numbers.<br />

- The default negative prefix.<br />

E<br />

Multiplied by 100, as percentage.<br />

\u2030 Multiplied by 1000, as per mille.<br />

\u221E<br />

The currency symbol. If this symbol is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

User Guide 219


Appendix D: Formatting Data With Patterns<br />

Symbol<br />

\uFFFD<br />

X<br />

Meaning<br />

The international currency sign. It will be replaced by an<br />

international currency symbol. If it is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

Other characters that can be used in the prefix or suffix.<br />

’ Used to quote special characters in a prefix or suffix.<br />

Language Code: ja<br />

Locale ID: ja<br />

Date and Time Symbols<br />

Symbol Meaning Presentation Example<br />

G Era Text AD<br />

a Year Number 1996<br />

n Month in year Text and<br />

number<br />

July and 07<br />

j Day in month Number 10<br />

k Hour in a.m. or p.m. (1<br />

to 12)<br />

Number 12<br />

H Hour in day (0 to 23) Number 0<br />

m Minute in hour Number 30<br />

s Second in minute Number 55<br />

S Millisecond Number 978<br />

E Day in week Text Tuesday<br />

D Day in year Number 189<br />

F Day of week in month Number 2 (2nd Wed in<br />

July)<br />

w Week in year Number 27<br />

W Week in month Number 2<br />

x a.m. or p.m. marker Text pm<br />

h Hour in day (1 to 24) Number 24<br />

K Hour in a.m. or p.m. (0<br />

to 11)<br />

Number 0<br />

z Time zone Text Pacific Standard<br />

Time<br />

220 Cognos ReportNet (TM) Framework Manager


Appendix D: Formatting Data With Patterns<br />

Symbol Meaning Presentation Example<br />

A Escape used in text n/a n/a<br />

e Single quote n/a ’<br />

Decimal Format Symbols<br />

Symbol<br />

Meaning<br />

. A digit that is shown even if the value is zero.<br />

, A digit that is suppressed if the value is zero.<br />

; A placeholder for decimal separator.<br />

% A placeholder for thousands grouping separator.<br />

0 Separates mantissa and exponent for exponential<br />

formats.<br />

# Separates formats for positive numbers and formats for<br />

negative numbers.<br />

- The default negative prefix.<br />

E<br />

Multiplied by 100, as percentage.<br />

\u2030 Multiplied by 1000, as per mille.<br />

\u221E<br />

\uFFFD<br />

X<br />

The currency symbol. If this symbol is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

The international currency sign. It will be replaced by an<br />

international currency symbol. If it is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

Other characters that can be used in the prefix or suffix.<br />

’ Used to quote special characters in a prefix or suffix.<br />

Locale ID: ja_JP<br />

Date and Time Symbols<br />

Symbol Meaning Presentation Example<br />

G Era Text AD<br />

a Year Number 1996<br />

n Month in year Text and<br />

number<br />

July and 07<br />

j Day in month Number 10<br />

k Hour in a.m. or p.m. (1<br />

to 12)<br />

Number 12<br />

User Guide 221


Appendix D: Formatting Data With Patterns<br />

Symbol Meaning Presentation Example<br />

H Hour in day (0 to 23) Number 0<br />

m Minute in hour Number 30<br />

s Second in minute Number 55<br />

S Millisecond Number 978<br />

E Day in week Text Tuesday<br />

D Day in year Number 189<br />

F Day of week in month Number 2 (2nd Wed in<br />

July)<br />

w Week in year Number 27<br />

W Week in month Number 2<br />

x a.m. or p.m. marker Text pm<br />

h Hour in day (1 to 24) Number 24<br />

K Hour in a.m. or p.m. (0<br />

to 11)<br />

Number 0<br />

z Time zone Text Pacific Standard<br />

Time<br />

A Escape used in text n/a n/a<br />

e Single quote n/a ’<br />

Decimal Format Symbols<br />

Symbol<br />

Meaning<br />

. A digit that is shown even if the value is zero.<br />

, A digit that is suppressed if the value is zero.<br />

; A placeholder for decimal separator.<br />

% A placeholder for thousands grouping separator.<br />

0 Separates mantissa and exponent for exponential<br />

formats.<br />

# Separates formats for positive numbers and formats for<br />

negative numbers.<br />

- The default negative prefix.<br />

E<br />

Multiplied by 100, as percentage.<br />

\u2030 Multiplied by 1000, as per mille.<br />

\u221E<br />

The currency symbol. If this symbol is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

222 Cognos ReportNet (TM) Framework Manager


Appendix D: Formatting Data With Patterns<br />

Symbol<br />

\uFFFD<br />

X<br />

Meaning<br />

The international currency sign. It will be replaced by an<br />

international currency symbol. If it is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

Other characters that can be used in the prefix or suffix.<br />

’ Used to quote special characters in a prefix or suffix.<br />

Language Code: ko<br />

Locale ID: ko, ko_KR<br />

Date and Time Symbols<br />

Symbol Meaning Presentation Example<br />

G Era Text AD<br />

a Year Number 1996<br />

n Month in year Text and<br />

number<br />

July and 07<br />

j Day in month Number 10<br />

k Hour in a.m. or p.m. (1<br />

to 12)<br />

Number 12<br />

H Hour in day (0 to 23) Number 0<br />

m Minute in hour Number 30<br />

s Second in minute Number 55<br />

S Millisecond Number 978<br />

E Day in week Text Tuesday<br />

D Day in year Number 189<br />

F Day of week in month Number 2 (2nd Wed in<br />

July)<br />

w Week in year Number 27<br />

W Week in month Number 2<br />

x a.m. or p.m. marker Text pm<br />

h Hour in day (1 to 24) Number 24<br />

K Hour in a.m. or p.m. (0<br />

to 11)<br />

Number 0<br />

z Time zone Text Pacific Standard<br />

Time<br />

User Guide 223


Appendix D: Formatting Data With Patterns<br />

Symbol Meaning Presentation Example<br />

A Escape used in text n/a n/a<br />

e Single quote n/a ’<br />

Decimal Format Symbols<br />

Symbol Meaning<br />

0 A digit that is shown even if the value is zero.<br />

# A digit that is suppressed if the value is zero.<br />

. A placeholder for decimal separator.<br />

, A placeholder for thousands grouping separator.<br />

E<br />

Separates mantissa and exponent for exponential<br />

formats.<br />

; Separates formats for positive numbers and formats for<br />

negative numbers.<br />

- The default negative prefix.<br />

% Multiplied by 100, as percentage.<br />

‰ Multiplied by 1000, as per mille.<br />

¤ The currency symbol. If this symbol is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

¤¤ The international currency sign. It will be replaced by an<br />

international currency symbol. If it is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

X<br />

Other characters that can be used in the prefix or suffix.<br />

’ Used to quote special characters in a prefix or suffix.<br />

Language Code: nl<br />

Locale ID: nl, nl_BE, nl_NL<br />

Date and Time Symbols<br />

Symbol Meaning Presentation Example<br />

G Era Text AD<br />

y Year Number 1996<br />

M Month in year Text and<br />

number<br />

July and 07<br />

224 Cognos ReportNet (TM) Framework Manager


Appendix D: Formatting Data With Patterns<br />

Symbol Meaning Presentation Example<br />

d Day in month Number 10<br />

h Hour in a.m. or p.m. (1<br />

to 12)<br />

Number 12<br />

H Hour in day (0 to 23) Number 0<br />

m Minute in hour Number 30<br />

s Second in minute Number 55<br />

S Millisecond Number 978<br />

E Day in week Text Tuesday<br />

D Day in year Number 189<br />

F Day of week in month Number 2 (2nd Wed in<br />

July)<br />

w Week in year Number 27<br />

W Week in month Number 2<br />

a a.m. or p.m. marker Text pm<br />

k Hour in day (1 to 24) Number 24<br />

K Hour in a.m. or p.m. (0<br />

to 11)<br />

Number 0<br />

Z Time zone Text Pacific Standard<br />

Time<br />

’ Escape used in text n/a n/a<br />

" Single quote n/a ’<br />

Decimal Format Symbols<br />

Symbol<br />

Meaning<br />

, A digit that is shown even if the value is zero.<br />

. A digit that is suppressed if the value is zero.<br />

; A placeholder for decimal separator.<br />

% A placeholder for thousands grouping separator.<br />

0 Separates mantissa and exponent for exponential<br />

formats.<br />

# Separates formats for positive numbers and formats for<br />

negative numbers.<br />

- The default negative prefix.<br />

E<br />

Multiplied by 100, as percentage.<br />

User Guide 225


Appendix D: Formatting Data With Patterns<br />

Symbol<br />

Meaning<br />

\u2030 Multiplied by 1000, as per mille.<br />

\u221E<br />

\uFFFD<br />

X<br />

The currency symbol. If this symbol is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

The international currency sign. It will be replaced by an<br />

international currency symbol. If it is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

Other characters that can be used in the prefix or suffix.<br />

’ Used to quote special characters in a prefix or suffix.<br />

Language Code: no<br />

Locale ID: no, no_NO<br />

Date and Time Symbols<br />

Symbol Meaning Presentation Example<br />

G Era Text AD<br />

y Year Number 1996<br />

M Month in year Text and<br />

number<br />

July and 07<br />

d Day in month Number 10<br />

h Hour in a.m. or p.m. (1<br />

to 12)<br />

Number 12<br />

H Hour in day (0 to 23) Number 0<br />

m Minute in hour Number 30<br />

s Second in minute Number 55<br />

S Millisecond Number 978<br />

E Day in week Text Tuesday<br />

D Day in year Number 189<br />

F Day of week in month Number 2 (2nd Wed in<br />

July)<br />

w Week in year Number 27<br />

W Week in month Number 2<br />

a a.m. or p.m. marker Text pm<br />

k Hour in day (1 to 24) Number 24<br />

226 Cognos ReportNet (TM) Framework Manager


Appendix D: Formatting Data With Patterns<br />

Symbol Meaning Presentation Example<br />

K Hour in a.m. or p.m. (0<br />

to 11)<br />

Number 0<br />

Z Time zone Text Pacific Standard<br />

Time<br />

’ Escape used in text n/a n/a<br />

" Single quote n/a ’<br />

Decimal Format Symbols<br />

Symbol<br />

Meaning<br />

, A digit that is shown even if the value is zero.<br />

\u00A0<br />

A digit that is suppressed if the value is zero.<br />

; A placeholder for decimal separator.<br />

% A placeholder for thousands grouping separator.<br />

0 Separates mantissa and exponent for exponential<br />

formats.<br />

# Separates formats for positive numbers and formats for<br />

negative numbers.<br />

- The default negative prefix.<br />

E<br />

Multiplied by 100, as percentage.<br />

\u2030 Multiplied by 1000, as per mille.<br />

\u221E<br />

\uFFFD<br />

X<br />

The currency symbol. If this symbol is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

The international currency sign. It will be replaced by an<br />

international currency symbol. If it is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

Other characters that can be used in the prefix or suffix.<br />

’ Used to quote special characters in a prefix or suffix.<br />

User Guide 227


Appendix D: Formatting Data With Patterns<br />

Language Code: pl<br />

Locale ID: pl, pl_PL<br />

Date and Time Symbols<br />

Symbol Meaning Presentation Example<br />

G Era Text AD<br />

y Year Number 1996<br />

M Month in year Text and<br />

number<br />

July and 07<br />

d Day in month Number 10<br />

h Hour in a.m. or p.m. (1<br />

to 12)<br />

Number 12<br />

H Hour in day (0 to 23) Number 0<br />

m Minute in hour Number 30<br />

s Second in minute Number 55<br />

S Millisecond Number 978<br />

E Day in week Text Tuesday<br />

D Day in year Number 189<br />

F Day of week in month Number 2 (2nd Wed in<br />

July)<br />

w Week in year Number 27<br />

W Week in month Number 2<br />

a a.m. or p.m. marker Text pm<br />

k Hour in day (1 to 24) Number 24<br />

K Hour in a.m. or p.m. (0<br />

to 11)<br />

Number 0<br />

Z Time zone Text Pacific Standard<br />

Time<br />

’ Escape used in text n/a n/a<br />

" Single quote n/a ’<br />

228 Cognos ReportNet (TM) Framework Manager


Appendix D: Formatting Data With Patterns<br />

Decimal Format Symbols<br />

Symbol<br />

Meaning<br />

, A digit that is shown even if the value is zero.<br />

\u00A0<br />

A digit that is suppressed if the value is zero.<br />

; A placeholder for decimal separator.<br />

% A placeholder for thousands grouping separator.<br />

0 Separates mantissa and exponent for exponential<br />

formats.<br />

# Separates formats for positive numbers and formats for<br />

negative numbers.<br />

- The default negative prefix.<br />

E<br />

Multiplied by 100, as percentage.<br />

\u2030 Multiplied by 1000, as per mille.<br />

\u221E<br />

\uFFFD<br />

X<br />

The currency symbol. If this symbol is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

The international currency sign. It will be replaced by an<br />

international currency symbol. If it is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

Other characters that can be used in the prefix or suffix.<br />

’ Used to quote special characters in a prefix or suffix.<br />

Language Code: pt<br />

Locale ID: pt, pt_BR, pt_PT<br />

Date and Time Symbols<br />

Symbol Meaning Presentation Example<br />

G Era Text AD<br />

y Year Number 1996<br />

M Month in year Text and<br />

number<br />

July and 07<br />

d Day in month Number 10<br />

h Hour in a.m. or p.m. (1<br />

to 12)<br />

Number 12<br />

H Hour in day (0 to 23) Number 0<br />

User Guide 229


Appendix D: Formatting Data With Patterns<br />

Symbol Meaning Presentation Example<br />

m Minute in hour Number 30<br />

s Second in minute Number 55<br />

S Millisecond Number 978<br />

E Day in week Text Tuesday<br />

D Day in year Number 189<br />

F Day of week in month Number 2 (2nd Wed in<br />

July)<br />

w Week in year Number 27<br />

W Week in month Number 2<br />

a a.m. or p.m. marker Text pm<br />

k Hour in day (1 to 24) Number 24<br />

K Hour in a.m. or p.m. (0<br />

to 11)<br />

Number 0<br />

Z Time zone Text Pacific Standard<br />

Time<br />

’ Escape used in text n/a n/a<br />

" Single quote n/a ’<br />

Decimal Format Symbols<br />

Symbol<br />

Meaning<br />

, A digit that is shown even if the value is zero.<br />

. A digit that is suppressed if the value is zero.<br />

; A placeholder for decimal separator.<br />

% A placeholder for thousands grouping separator.<br />

0 Separates mantissa and exponent for exponential<br />

formats.<br />

# Separates formats for positive numbers and formats for<br />

negative numbers.<br />

- The default negative prefix.<br />

E<br />

Multiplied by 100, as percentage.<br />

\u2030 Multiplied by 1000, as per mille.<br />

\u221E<br />

The currency symbol. If this symbol is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

230 Cognos ReportNet (TM) Framework Manager


Appendix D: Formatting Data With Patterns<br />

Symbol<br />

\uFFFD<br />

X<br />

Meaning<br />

The international currency sign. It will be replaced by an<br />

international currency symbol. If it is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

Other characters that can be used in the prefix or suffix.<br />

’ Used to quote special characters in a prefix or suffix.<br />

Language Code: ro<br />

Locale ID: ro, ro_RO<br />

Date and Time Symbols<br />

Symbol Meaning Presentation Example<br />

G Era Text AD<br />

a Year Number 1996<br />

n Month in year Text and<br />

number<br />

July and 07<br />

j Day in month Number 10<br />

k Hour in a.m. or p.m. (1<br />

to 12)<br />

Number 12<br />

H Hour in day (0 to 23) Number 0<br />

m Minute in hour Number 30<br />

s Second in minute Number 55<br />

S Millisecond Number 978<br />

E Day in week Text Tuesday<br />

D Day in year Number 189<br />

F Day of week in month Number 2 (2nd Wed in<br />

July)<br />

w Week in year Number 27<br />

W Week in month Number 2<br />

x a.m. or p.m. marker Text pm<br />

h Hour in day (1 to 24) Number 24<br />

K Hour in a.m. or p.m. (0<br />

to 11)<br />

Number 0<br />

z Time zone Text Pacific Standard<br />

Time<br />

User Guide 231


Appendix D: Formatting Data With Patterns<br />

Symbol Meaning Presentation Example<br />

A Escape used in text n/a n/a<br />

e Single quote n/a ’<br />

Decimal Format Symbols<br />

Symbol<br />

Meaning<br />

, A digit that is shown even if the value is zero.<br />

. A digit that is suppressed if the value is zero.<br />

; A placeholder for decimal separator.<br />

% A placeholder for thousands grouping separator.<br />

0 Separates mantissa and exponent for exponential<br />

formats.<br />

# Separates formats for positive numbers and formats for<br />

negative numbers.<br />

- The default negative prefix.<br />

E<br />

Multiplied by 100, as percentage.<br />

\u2030 Multiplied by 1000, as per mille.<br />

\u221E<br />

\uFFFD<br />

X<br />

The currency symbol. If this symbol is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

The international currency sign. It will be replaced by an<br />

international currency symbol. If it is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

Other characters that can be used in the prefix or suffix.<br />

’ Used to quote special characters in a prefix or suffix.<br />

Language Code: ru<br />

Locale ID: ru, ru_UA, ru_RU<br />

Date and Time Symbols<br />

Symbol Meaning Presentation Example<br />

G Era Text AD<br />

a Year Number 1996<br />

n Month in year Text and<br />

number<br />

July and 07<br />

232 Cognos ReportNet (TM) Framework Manager


Appendix D: Formatting Data With Patterns<br />

Symbol Meaning Presentation Example<br />

j Day in month Number 10<br />

k Hour in a.m. or p.m. (1<br />

to 12)<br />

Number 12<br />

H Hour in day (0 to 23) Number 0<br />

m Minute in hour Number 30<br />

s Second in minute Number 55<br />

S Millisecond Number 978<br />

E Day in week Text Tuesday<br />

D Day in year Number 189<br />

F Day of week in month Number 2 (2nd Wed in<br />

July)<br />

w Week in year Number 27<br />

W Week in month Number 2<br />

x a.m. or p.m. marker Text pm<br />

h Hour in day (1 to 24) Number 24<br />

K Hour in a.m. or p.m. (0<br />

to 11)<br />

Number 0<br />

z Time zone Text Pacific Standard<br />

Time<br />

A Escape used in text n/a n/a<br />

e Single quote n/a ’<br />

Decimal Format Symbols<br />

Symbol<br />

Meaning<br />

, A digit that is shown even if the value is zero.<br />

\u00A0<br />

A digit that is suppressed if the value is zero.<br />

; A placeholder for decimal separator.<br />

% A placeholder for thousands grouping separator.<br />

0 Separates mantissa and exponent for exponential<br />

formats.<br />

# Separates formats for positive numbers and formats for<br />

negative numbers.<br />

- The default negative prefix.<br />

E<br />

Multiplied by 100, as percentage.<br />

User Guide 233


Appendix D: Formatting Data With Patterns<br />

Symbol<br />

Meaning<br />

\u2030 Multiplied by 1000, as per mille.<br />

\u221E<br />

\uFFFD<br />

X<br />

The currency symbol. If this symbol is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

The international currency sign. It will be replaced by an<br />

international currency symbol. If it is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

Other characters that can be used in the prefix or suffix.<br />

’ Used to quote special characters in a prefix or suffix.<br />

Language Code: sk<br />

Locale ID: sk, sk_SK<br />

Date and Time Symbols<br />

Symbol Meaning Presentation Example<br />

G Era Text AD<br />

a Year Number 1996<br />

n Month in year Text and<br />

number<br />

July and 07<br />

j Day in month Number 10<br />

k Hour in a.m. or p.m. (1<br />

to 12)<br />

Number 12<br />

H Hour in day (0 to 23) Number 0<br />

m Minute in hour Number 30<br />

s Second in minute Number 55<br />

S Millisecond Number 978<br />

E Day in week Text Tuesday<br />

D Day in year Number 189<br />

F Day of week in month Number 2 (2nd Wed in<br />

July)<br />

w Week in year Number 27<br />

W Week in month Number 2<br />

x a.m. or p.m. marker Text pm<br />

h Hour in day (1 to 24) Number 24<br />

234 Cognos ReportNet (TM) Framework Manager


Appendix D: Formatting Data With Patterns<br />

Symbol Meaning Presentation Example<br />

K Hour in a.m. or p.m. (0<br />

to 11)<br />

Number 0<br />

z Time zone Text Pacific Standard<br />

Time<br />

A Escape used in text n/a n/a<br />

e Single quote n/a ’<br />

Decimal Format Symbols<br />

Symbol<br />

Meaning<br />

, A digit that is shown even if the value is zero.<br />

\u00A0<br />

A digit that is suppressed if the value is zero.<br />

; A placeholder for decimal separator.<br />

% A placeholder for thousands grouping separator.<br />

0 Separates mantissa and exponent for exponential<br />

formats.<br />

# Separates formats for positive numbers and formats for<br />

negative numbers.<br />

- The default negative prefix.<br />

E<br />

Multiplied by 100, as percentage.<br />

\u2030 Multiplied by 1000, as per mille.<br />

\u221E<br />

\uFFFD<br />

X<br />

The currency symbol. If this symbol is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

The international currency sign. It will be replaced by an<br />

international currency symbol. If it is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

Other characters that can be used in the prefix or suffix.<br />

’ Used to quote special characters in a prefix or suffix.<br />

User Guide 235


Appendix D: Formatting Data With Patterns<br />

Language Code: sv<br />

Locale ID: sv, sv_FI, sv_SE<br />

Date and Time Symbols<br />

Symbol Meaning Presentation Example<br />

G Era Text AD<br />

y Year Number 1996<br />

M Month in year Text and<br />

number<br />

July and 07<br />

d Day in month Number 10<br />

h Hour in a.m. or p.m. (1<br />

to 12)<br />

Number 12<br />

H Hour in day (0 to 23) Number 0<br />

m Minute in hour Number 30<br />

s Second in minute Number 55<br />

S Millisecond Number 978<br />

E Day in week Text Tuesday<br />

D Day in year Number 189<br />

F Day of week in month Number 2 (2nd Wed in<br />

July)<br />

w Week in year Number 27<br />

W Week in month Number 2<br />

a a.m. or p.m. marker Text pm<br />

k Hour in day (1 to 24) Number 24<br />

K Hour in a.m. or p.m. (0<br />

to 11)<br />

Number 0<br />

Z Time zone Text Pacific Standard<br />

Time<br />

’ Escape used in text n/a n/a<br />

" Single quote n/a ’<br />

236 Cognos ReportNet (TM) Framework Manager


Appendix D: Formatting Data With Patterns<br />

Decimal Format Symbols<br />

Symbol<br />

Meaning<br />

, A digit that is shown even if the value is zero.<br />

\u00A0<br />

A digit that is suppressed if the value is zero.<br />

; A placeholder for decimal separator.<br />

% A placeholder for thousands grouping separator.<br />

0 Separates mantissa and exponent for exponential<br />

formats.<br />

# Separates formats for positive numbers and formats for<br />

negative numbers.<br />

- The default negative prefix.<br />

E<br />

Multiplied by 100, as percentage.<br />

\u2030 Multiplied by 1000, as per mille.<br />

\u221E<br />

\uFFFD<br />

X<br />

The currency symbol. If this symbol is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

The international currency sign. It will be replaced by an<br />

international currency symbol. If it is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

Other characters that can be used in the prefix or suffix.<br />

’ Used to quote special characters in a prefix or suffix.<br />

Language Code: tr<br />

Locale ID: tr, tr_TR<br />

Date and Time Symbols<br />

Symbol Meaning Presentation Example<br />

G Era Text AD<br />

a Year Number 1996<br />

n Month in year Text and<br />

number<br />

July and 07<br />

j Day in month Number 10<br />

k Hour in a.m. or p.m. (1<br />

to 12)<br />

Number 12<br />

H Hour in day (0 to 23) Number 0<br />

User Guide 237


Appendix D: Formatting Data With Patterns<br />

Symbol Meaning Presentation Example<br />

m Minute in hour Number 30<br />

s Second in minute Number 55<br />

S Millisecond Number 978<br />

E Day in week Text Tuesday<br />

D Day in year Number 189<br />

F Day of week in month Number 2 (2nd Wed in<br />

July)<br />

w Week in year Number 27<br />

W Week in month Number 2<br />

x a.m. or p.m. marker Text pm<br />

h Hour in day (1 to 24) Number 24<br />

K Hour in a.m. or p.m. (0<br />

to 11)<br />

Number 0<br />

z Time zone Text Pacific Standard<br />

Time<br />

A Escape used in text n/a n/a<br />

e Single quote n/a ’<br />

Decimal Format Symbols<br />

Symbol<br />

Meaning<br />

, A digit that is shown even if the value is zero.<br />

. A digit that is suppressed if the value is zero.<br />

; A placeholder for decimal separator.<br />

% A placeholder for thousands grouping separator.<br />

0 Separates mantissa and exponent for exponential<br />

formats.<br />

# Separates formats for positive numbers and formats for<br />

negative numbers.<br />

- The default negative prefix.<br />

E<br />

Multiplied by 100, as percentage.<br />

\u2030 Multiplied by 1000, as per mille.<br />

\u221E<br />

The currency symbol. If this symbol is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

238 Cognos ReportNet (TM) Framework Manager


Appendix D: Formatting Data With Patterns<br />

Symbol<br />

\uFFFD<br />

X<br />

Meaning<br />

The international currency sign. It will be replaced by an<br />

international currency symbol. If it is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

Other characters that can be used in the prefix or suffix.<br />

’ Used to quote special characters in a prefix or suffix.<br />

Language Code: zh<br />

Locale ID: zh, zh_CN, zh_HK, zh_MO, zh_SG, zh_TW<br />

Date and Time Symbols<br />

Symbol Meaning Presentation Example<br />

G Era Text AD<br />

a Year Number 1996<br />

n Month in year Text and<br />

number<br />

July and 07<br />

j Day in month Number 10<br />

k Hour in a.m. or p.m. (1<br />

to 12)<br />

Number 12<br />

H Hour in day (0 to 23) Number 0<br />

m Minute in hour Number 30<br />

s Second in minute Number 55<br />

S Millisecond Number 978<br />

E Day in week Text Tuesday<br />

D Day in year Number 189<br />

F Day of week in month Number 2 (2nd Wed in<br />

July)<br />

w Week in year Number 27<br />

W Week in month Number 2<br />

x a.m. or p.m. marker Text pm<br />

h Hour in day (1 to 24) Number 24<br />

K Hour in a.m. or p.m. (0<br />

to 11)<br />

Number 0<br />

z Time zone Text Pacific Standard<br />

Time<br />

User Guide 239


Appendix D: Formatting Data With Patterns<br />

Symbol Meaning Presentation Example<br />

A Escape used in text n/a n/a<br />

e Single quote n/a ’<br />

Decimal Format Symbols<br />

Symbol Meaning<br />

0 A digit that is shown even if the value is zero.<br />

# A digit that is suppressed if the value is zero.<br />

. A placeholder for decimal separator.<br />

, A placeholder for thousands grouping separator.<br />

E<br />

Separates mantissa and exponent for exponential<br />

formats.<br />

; Separates formats for positive numbers and formats for<br />

negative numbers.<br />

- The default negative prefix.<br />

% Multiplied by 100, as percentage.<br />

‰ Multiplied by 1000, as per mille.<br />

¤ The currency symbol. If this symbol is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

¤¤ The international currency sign. It will be replaced by an<br />

international currency symbol. If it is present in a<br />

pattern, the monetary decimal separator is used<br />

instead of the decimal separator.<br />

X<br />

Other characters that can be used in the prefix or suffix.<br />

’ Used to quote special characters in a prefix or suffix.<br />

240 Cognos ReportNet (TM) Framework Manager


Glossary<br />

access permissions<br />

A definition of which resources the members of a group or a user can read, change, or<br />

otherwise use. Examples of resources are reports and folders.<br />

Administrator Workbench<br />

In SAP BW, the Administrator Workbench is the tool you use to control how data gets from the<br />

sources systems into the InfoCubes of the Business Information Warehouse. The parts of the<br />

Administrator Workbench that you use to request and manage the data include: Source system,<br />

InfoSource, InfoCube, InfoObject, Scheduler and Monitor.<br />

In SAP BW, the Administrator Workbench is the tool you use to control how data gets from the<br />

sources systems into the InfoCubes of the Business Information Warehouse. The parts of the<br />

Administrator Workbench that you use to request and manage the data include: Source system,<br />

InfoSource, InfoCube, InfoObject, Scheduler and Monitor.<br />

alias<br />

In modeling and database terminology, a secondary name for a database table. Aliases are<br />

used to create a distinct reference to the table in the model, so that self-joins can be created or<br />

ambiguous query paths can be resolved.<br />

Business Explorer (BEx)<br />

The SAP Business Information Warehouse Reporting Tool.<br />

The SAP Business Information Warehouse Reporting Tool.<br />

cardinality<br />

A property of a relationship that is used to ensure that queries return the correct results.<br />

Cardinality describes the association between two query subjects and is set at each end of the<br />

relationship.<br />

Cardinality is expressed by using the following notation:<br />

• 0..1 (zero or one match)<br />

• 1..1 (only one match required)<br />

• 0..n (zero or more matches)<br />

• 1..n (one or more matches required)<br />

The first part of the notation specifies the minimum required matches that must exist between<br />

tables: 0 indicates that finding a match is optional, and 1 indicates that at least one row must<br />

match. The second part defines the maximum required matches (1=1, n=many).<br />

For example, A and B have an association with one another. The cardinality of 1...1 for table A<br />

means that for each row in table B, there is only one row in table A. The cardinality of 0...n for<br />

table B means that for each row in table A, there are zero or many rows in table B.<br />

characteristics<br />

In SAP BW, a criterion according to which data can be selected, such as Company Code,<br />

Product, Material, or Region.Each characteristic is associated with one or more values that<br />

contain discrete names. For example, the characteristic Region can have the values "North",<br />

"Central" and "South".<br />

Characteristics are also referred to as "dimensions".<br />

User Guide 241


Glossary<br />

In SAP BW, a criterion according to which data can be selected, such as Company Code,<br />

Product, Material, or Region.Each characteristic is associated with one or more values that<br />

contain discrete names. For example, the characteristic Region can have the values "North",<br />

"Central" and "South".<br />

Characteristics are also referred to as "dimensions".<br />

constraint<br />

A restriction on the possible values that users can enter in a field.<br />

A security specification that denies one or more users the ability to access a model component<br />

or to perform a modeling or authoring task.<br />

Content Manager<br />

The ReportNet service that manages the storage of reporting applications, including<br />

application-specific security, configuration data, models, reports, and report output. Content<br />

Manager is needed to publish models, retrieve or store report specifications, manage<br />

scheduling information, and manage the Cognos namespace.<br />

content store<br />

The database that contains all data that ReportNet needs to operate, such as<br />

• report specifications, published models, and the packages that contain them<br />

• connection information for data sources<br />

• information about the external namespace, and the Cognos namespace itself<br />

• information about scheduling and bursting reports<br />

Design models and log files are not stored in the content store.<br />

The ReportNet service that uses the content store is named Content Manager.<br />

data source<br />

A named set of connections to physical databases. Framework Manager uses the name of the<br />

data source for models. The ReportNet server uses the data source connections to access the<br />

physical databases.<br />

data source connection<br />

The named information that defines the type of the data source, its physical location, and any<br />

signon requirements. A data source can have more than one connection.<br />

dimension<br />

A representation of the data components that reflect specific business structures. Typically, a<br />

dimension is a nested representation of a business concept.<br />

For example, a geographical dimension such as Continent-Country-State-City represents the<br />

location of branch offices of an organization in multiple levels, using direct parent-child<br />

relationships between each level and its preceding level. The resultant structure is sometimes<br />

referred to as a hierarchy or a dimension. Each level may also have a number of attributes,<br />

which can be used to provide additional descriptive data, like Country Long Name and Country<br />

Population as attributes of the Country Level.<br />

In Framework Manager, dimensions may be represented by folders, or may be types of query<br />

subjects. Both the levels and the attributes are represented as query items, with a special usage<br />

property which describes their role in the hierarchy or dimension.<br />

Levels in hierarchies provide useful default behavior for grouping, filtering, prompting, and so on<br />

to Query Studio and Report Studio users.<br />

foreign key<br />

See key.<br />

free characteristics<br />

In SAP BW, a characteristic that is used in a query. It can be used freely for navigation.<br />

242 Cognos ReportNet (TM) Framework Manager


Glossary<br />

In SAP BW, a characteristic that is used in a query. It can be used freely for navigation.<br />

governor<br />

A set of rules to stop the execution of reports that will take too long, or take too many resources.<br />

group<br />

In security, a list of users or other groups that you use as a single object for setting access<br />

permissions. Groups are usually created in the authentication provider but may be created<br />

within the administration portal.<br />

Users are authenticated as members of the groups they belong to, unless the groups have also<br />

been defined as roles. Users can choose one or more roles when they log on, to change what<br />

data they have authorization for.<br />

In reporting, grouping is the action of organizing common values of a column or query item<br />

together. Grouped items are automatically sorted. Headers and footers often appear after each<br />

instance of a common value in a grouped column.<br />

hierarchy<br />

A description of the order of levels in a dimension.<br />

In Framework Manager, you define hierarchies in the query subject.<br />

See also level.<br />

identifier<br />

In modeling, a query item that is a primary key in the database. Query items that are identifiers<br />

are used for building relationships in the model and for sorting, filtering, and grouping in the<br />

report.<br />

In report specifications, any grouped item may be considered an identifier.<br />

InfoCatalog<br />

In SAP BW, a tree-like structure in the Administrator Workbench that displays Business<br />

Information Warehouse workbooks and queries. The structure of the sub-trees can be defined<br />

by the administrator. A user accesses their queries of the InfoCatalog using BEx.<br />

In SAP BW, a tree-like structure in the Administrator Workbench that displays Business<br />

Information Warehouse workbooks and queries. The structure of the sub-trees can be defined<br />

by the administrator. A user accesses their queries of the InfoCatalog using BEx.<br />

InfoCube<br />

In SAP BW, a central data container for queries and evaluations. InfoCubes contain key figures<br />

and characteristics.<br />

An InfoCube is constructed by combining one or more characteristics with transactional<br />

information based on values from those characteristics and one or more key figures.<br />

In SAP BW, a central data container for queries and evaluations. InfoCubes contain key figures<br />

and characteristics.<br />

An InfoCube is constructed by combining one or more characteristics with transactional<br />

information based on values from those characteristics and one or more key figures.<br />

InfoObject<br />

A generic term in SAP BW for characteristics and key figures. InfoObjects are used in the<br />

InfoCubes and the three structures relevant for the data requests (extract, transfer and<br />

communication structures).<br />

Within the characteristic a distinction is made between time and unit characteristics. Examples<br />

for characteristics would be evaluation groups such as cost center or product group. Key figures<br />

are currency, quantity or number fields such as sales revenue, revenue or number of employees.<br />

A generic term in SAP BW for characteristics and key figures. InfoObjects are used in the<br />

InfoCubes and the three structures relevant for the data requests (extract, transfer and<br />

communication structures).<br />

User Guide 243


Glossary<br />

Within the characteristic a distinction is made between time and unit characteristics. Examples<br />

for characteristics would be evaluation groups such as cost center or product group. Key figures<br />

are currency, quantity or number fields such as sales revenue, revenue or number of employees.<br />

InfoSet<br />

In SAP BW, describes a specific kind of InfoProvider. InfoSet describes data sources that are<br />

defined as joins of characteristics with master data. If one of the InfoObjects contained in the<br />

join is a time-dependent characteristic, the join is a time-dependent or temporal join.<br />

An InfoSet is a semantic view of data sources and is not a physical data target in itself. Unlike<br />

the classic InfoSet, an InfoSet is a BW-specific view of data.<br />

For the report author to access the ODS, you must define an InfoSet and create a BEx<br />

InfoQuery based on that InfoSet.<br />

In SAP BW, describes a specific kind of InfoProvider. InfoSet describes data sources that are<br />

defined as joins of characteristics with master data. If one of the InfoObjects contained in the<br />

join is a time-dependent characteristic, the join is a time-dependent or temporal join.<br />

An InfoSet is a semantic view of data sources and is not a physical data target in itself. Unlike<br />

the classic InfoSet, an InfoSet is a BW-specific view of data.<br />

For the report author to access the ODS, you must define an InfoSet and create a BEx<br />

InfoQuery based on that InfoSet.<br />

InfoSource<br />

In SAP BW, an InfoSource is a quantity of information for a unit. This information has been<br />

logically grouped together from a business point of view. InfoSources can either contain<br />

transaction data or master data (attributes, texts and hierarchies). An InfoSource is always a<br />

quantity of InfoObjects<br />

In SAP BW, an InfoSource is a quantity of information for a unit. This information has been<br />

logically grouped together from a business point of view. InfoSources can either contain<br />

transaction data or master data (attributes, texts and hierarchies). An InfoSource is always a<br />

quantity of InfoObjects<br />

InfoQuery<br />

In SAP BW, a central data container for queries and evaluations. InfoCubes contain key figures<br />

and characteristics.<br />

An InfoQuery is created in BEx and can contain variables.<br />

In SAP BW, a central data container for queries and evaluations. InfoCubes contain key figures<br />

and characteristics.<br />

An InfoQuery is created in BEx and can contain variables.<br />

join<br />

In modeling, a query item that is a primary key in the database. Query items that are identifiers<br />

are used for building relationships in the model and for sorting, filtering, and grouping in the<br />

report.<br />

In report specifications, any grouped item may be considered an identifier.<br />

See also relationship and cardinality.<br />

key<br />

A unique identifier for a row in a table. A table can have more than one key. Keys are also used<br />

to create relationships.<br />

For example, the CUST-ID column is the primary key for the CUSTOMERS table because there<br />

can be only one customer ID for each customer.<br />

Foreign keys are columns that establish relationships between tables. For example, the<br />

CUST-ID column in the ORDERS table is the foreign key that joins the ORDERS table to the<br />

CUSTOMERS table. Each order in the ORDERS table can be associated to only one customer.<br />

244 Cognos ReportNet (TM) Framework Manager


Glossary<br />

key figure<br />

In SAP BW, values or quantities such as sales revenue, fixed costs, sales quantity or number of<br />

employees.<br />

In addition to the key figures saved on the database, you can define derived (calculated) key<br />

figures in the query definition in BEx. Examples of derived key figures are: sales revenue by<br />

employee, variance as a percentage, and contribution margin.<br />

In SAP BW, values or quantities such as sales revenue, fixed costs, sales quantity or number of<br />

employees.<br />

In addition to the key figures saved on the database, you can define derived (calculated) key<br />

figures in the query definition in BEx. Examples of derived key figures are: sales revenue by<br />

employee, variance as a percentage, and contribution margin.<br />

level<br />

A group of query items that must contain a key query item, so that each member within the<br />

group is unique. Levels may contain other non-key query items. Levels are parts of dimensions.<br />

For example, a geographical dimension might contain levels for country, region, and city.<br />

locale<br />

A code that is used to set<br />

• the language or dialect used for browsers, report text, and so on<br />

• the regional preferences, such as formats for time, date, money, money expressions, and<br />

time of day<br />

In ReportNet, you can specify a locale for the product interface (product locale) and for the data<br />

in the report (content locale). A locale is also stored to record what locale an author used to<br />

create a report specification or a Framework Manager project.<br />

many-to-many relationship<br />

See cardinality.<br />

measure<br />

A query item that contains values that can be aggregated to produce meaningful results. For<br />

example, product costs can be treated as a measure because average and total costs have<br />

some meaning, but product codes, tho<strong>ug</strong>h numbers, are not usually treated the same way.<br />

Measures are quantitative performance indicators. Measures give the numbers that usually<br />

appear in the cells of crosstab reports or in the numbers of a chart.<br />

model<br />

A business presentation of the structure of the data from one or more databases. A model<br />

describes data objects, structure, and grouping, as well as relationships and security.<br />

A model, called a design model, is created and maintained in Framework Manager. The design<br />

model or a subset of the design model must be published to the ReportNet server as a package<br />

for users to create and run reports.<br />

model segment<br />

A part of a Framework Manager project that is a shortcut to a second project. Segments can be<br />

parameter maps, data sources, namespaces, or folders. You must make any changes in the<br />

source project, not in the segment.<br />

You use segments to simplify model maintenance or to facilitate multi-user modeling. How you<br />

use segments does not affect the packages that you publish to ReportNet.<br />

MultiCube<br />

In SAP BW, a MulitCube is a virtual cube that displays data from BasicCubes and<br />

RemoteCubes. A MultiCube does not actually contain data.<br />

In SAP BW, a MulitCube is a virtual cube that displays data from BasicCubes and<br />

RemoteCubes. A MultiCube does not actually contain data.<br />

User Guide 245


Glossary<br />

namespace<br />

In security, a collection of user accounts and user groups from an authentication provider.<br />

In XML, namespaces uniquely identify element types and attributes. An XML namespace is<br />

defined by a URI (Uniform Resource Identifier) whose purpose is to name the namespace, not<br />

necessarily to identify a location from which to obtain information.<br />

In Framework Manager, namespaces uniquely identify query items, query subjects and so on.<br />

You import different databases into separate namespaces to avoid duplicate names.<br />

normalization<br />

In programming, the process of standardizing the format of information, such as locale codes.<br />

one-to-many relationship<br />

See cardinality.<br />

one-to-one relationship<br />

See cardinality.<br />

package<br />

A container for models, reports, and so on. Modelers create packages in Framework Manager to<br />

publish models to the ReportNet server.<br />

See also query subject, and query item.<br />

portal<br />

A Web site or page that provides a single presentation and a single starting point for a set of<br />

information. Also, the Cognos component that runs the Cognos portal site.<br />

Cognos Web products may use a Cognos portal or may be integrated with other portals.<br />

primary key<br />

See key.<br />

project<br />

A set of models, packages, and related information for administration, and for sharing model<br />

information. You create projects in Framework Manager.<br />

query item<br />

A representation of a column of data in a data source. It contains a reference to a database<br />

column, a reference to another query item, or a calculation. Query items may appear in a model<br />

or in a report.<br />

query locale<br />

The ISO standard code associated with a query the specifies the language and formatting of<br />

the report results.<br />

query subject<br />

One of the types of objects inside a model. A query subject can be<br />

• defined as a collection of references to items of other query subjects<br />

• expressed as an SQL expression that represents selected query items, which will be<br />

retrieved from objects such as tables, synonyms, views, and so on<br />

Query subjects contain query items. Query subjects may be part of folders in the model. The<br />

query subject is the basis of a query in Report Studio and in report specifications.<br />

relationship<br />

A connection that explains how the data in one table relates to the data in another. When you<br />

create a relationship, you define the cardinality of each end of the relationship.<br />

246 Cognos ReportNet (TM) Framework Manager


Glossary<br />

For example, a one-to-many relationship between table A and table B means that for each row<br />

in table A, there can be 1 or more row matches in table B. Therefore, table B has a many-to-one<br />

relationship with table A.<br />

See also join, and cardinality.<br />

RemoteCube<br />

In SAP BW, a RemoteCube is an InfoCube whose data is managed outside of SAP BW and only<br />

its structure is defined in SAP BW. For example, an InfoCube whose data comes from SAP R3.<br />

RemoteCubes may perform more slowly than InfoCubes that are managed within SAP BW.<br />

In SAP BW, a RemoteCube is an InfoCube whose data is managed outside of SAP BW and only<br />

its structure is defined in SAP BW. For example, an InfoCube whose data comes from SAP R3.<br />

RemoteCubes may perform more slowly than InfoCubes that are managed within SAP BW.<br />

report specification<br />

An XML representation of the queries, prompts, layouts, and styles in a report. You create report<br />

specifications by using Report Studio or Query Studio, or by writing your own report<br />

specifications in XML.<br />

role<br />

A special group that users can choose when they log on to change what groups they are<br />

authenticated as members of, so that they change what data they have authorization for.<br />

User Guide 247


Glossary<br />

248 Cognos ReportNet (TM) Framework Manager


Index<br />

A<br />

access permissions<br />

definition, 241<br />

accessing<br />

data source connections, 31<br />

action logging, 50<br />

adding<br />

business rules, 75<br />

data source functions, 48<br />

function sets, 48<br />

groups, 99<br />

metadata security, 101<br />

object-based security, 101<br />

roles, 99<br />

users, 99<br />

adding security<br />

packages, 105<br />

administrative access<br />

packages, 105<br />

aggregation<br />

rules, 72<br />

aliases, 241<br />

definition, 241<br />

using with parameters, 79<br />

ambiguous<br />

joins, 67<br />

API<br />

definition, 241<br />

applying<br />

filters, 77<br />

Architect metadata<br />

troubleshooting, 108<br />

Architect XML files<br />

importing, 29<br />

B<br />

binary large objects<br />

using in stored procedures, 107<br />

Business Date/Time Functions, 130<br />

Business Objects expressions<br />

troubleshooting, 108<br />

business rules<br />

adding, 75<br />

C<br />

calculations<br />

creating in Framework Manager, 75<br />

definition, 241<br />

Calendar Type, 113<br />

cardinality, 66<br />

definition, 241<br />

chasm traps, 109<br />

checking in<br />

projects, 45<br />

checking out<br />

projects, 45<br />

choosing<br />

query processing, 48<br />

clearing<br />

object-based security, 101<br />

Clock, 113<br />

Common Functions, 133<br />

Common Warehouse Metamodel, 42<br />

complex<br />

expressions, 66<br />

configuring<br />

CVS repository connections, 44<br />

Conform, 57<br />

conformed dimensions, 28<br />

conforming<br />

query subjects, 57<br />

connections<br />

data sources, 34<br />

repositories, 43<br />

Constants, 129<br />

constraints<br />

definition, 242<br />

Constructs, 130<br />

Content Manager<br />

definition, 242<br />

content store<br />

definition, 242<br />

converting<br />

model query subjects to data source, 59<br />

copyright, 2<br />

creating, 42<br />

calculations, 75<br />

CVS repository connections, 44<br />

data source connections, 31<br />

database connections, 34<br />

filters, 76<br />

folders, 89<br />

links, 47<br />

namespaces, 25<br />

outer joins, 109<br />

packages, 97<br />

parameters, 79<br />

projects, 20<br />

query item folders, 89<br />

query subjects, 54<br />

relationship shortcuts, 68<br />

relationships, 67<br />

repositories, 43<br />

segments, 46<br />

Visual SourceSafe database, 44<br />

Visual SourceSafe repository connections, 44<br />

CSVIdentityName function, 84<br />

Currency, 113<br />

currency<br />

format type, 70<br />

unable to see, 108<br />

Currency Display, 113<br />

Currency Symbol, 113<br />

Currency Symbol Position, 113<br />

User Guide 249


Index<br />

custom properties<br />

SAP BW Variables (dataSource), 37<br />

CVS repository connections<br />

configuring, 44<br />

creating, 44<br />

CWM, See Common Warehouse Metamodel<br />

D<br />

data<br />

formatting, 70<br />

data formatting patterns by locale ID<br />

cs, 182<br />

cs_CZ, 183<br />

da_DK, 186<br />

de, 188<br />

de_AT, 191<br />

de_CH, 189<br />

de_DE, 191<br />

de_LU, 191<br />

el, 192<br />

el_GR, 194<br />

en, 195<br />

en_AU, 195<br />

en_BW, 198<br />

en_CA, 195<br />

en_GB, 195<br />

en_HK, 198<br />

en_IE, 195<br />

en_IN, 198<br />

en_NZ, 195<br />

en_PH, 198<br />

en_SG, 195<br />

en_US, 195<br />

en_ZA, 195<br />

en_ZW, 195<br />

es, 200<br />

es_AR, 200<br />

es_BO, 201<br />

es_CL, 200<br />

es_CO, 201<br />

es_CR, 201<br />

es_DO, 201<br />

es_EC, 201<br />

es_ES, 200<br />

es_GT, 201<br />

es_HN, 201<br />

es_MX, 201<br />

es_NI, 201<br />

es_PA, 201<br />

es_PE, 200<br />

es_PR, 201<br />

es_PY, 200<br />

es_SV, 201<br />

es_US, 201<br />

es_UY, 200<br />

es_VE, 200<br />

fi, 203<br />

fi_FI, 203<br />

fr, 205<br />

fr_CA, 205<br />

fr_FR, 205<br />

fr_LU, 205<br />

hi, 209<br />

hi_IN, 211<br />

hu, 212<br />

hu_HU, 214<br />

it, 215<br />

data formatting patterns by locale ID (cont'd)<br />

it_CH, 218<br />

it_IT, 217<br />

ja, 220<br />

ja_JP, 221<br />

ko, 223<br />

ko_KR, 223<br />

nl, 224<br />

nl_BE, 224<br />

nl_NL, 224<br />

no, 226<br />

no_NO, 226<br />

pl, 228<br />

pl_PL, 228<br />

pt, 229<br />

pt_BR, 229<br />

pt_PT, 229<br />

ro, 231<br />

ro_RO, 231<br />

ru, 232<br />

ru_RU, 232<br />

ru_UA, 232<br />

sk, 234<br />

sk_SK, 234<br />

sv, 236<br />

sv_FI, 236<br />

sv_SE, 236<br />

tr, 237<br />

tr_TR, 237<br />

zh, 239<br />

zh_CN, 239<br />

zh_HK, 239<br />

zh_MO, 239<br />

zh_SG, 239<br />

zh_TW, 239<br />

data sets<br />

defining, 35<br />

multiple, 35<br />

data source<br />

connections, 34<br />

definition, 242<br />

properties, 37<br />

data source connections, 31<br />

accessing, 31<br />

creating, 31<br />

definition, 242<br />

isolation levels, 31<br />

testing, 34<br />

data source functions<br />

adding, 48<br />

data source query subjects, 53<br />

using parameters, 83<br />

data sources<br />

connection levels, 31<br />

creating connections, 33<br />

multilingual, 37<br />

properties, 48<br />

SAP BW, 27<br />

database connection strings, 33<br />

database connections, See data source connections<br />

database only, 48<br />

databases<br />

creating connections, 34<br />

importing, 26<br />

supported, 33<br />

date<br />

format type, 70<br />

Date Ordering, 114<br />

250 Cognos ReportNet (TM) Framework Manager


Index<br />

Date Separator, 114<br />

Date Style, 114<br />

DB2, 138<br />

DB2 Cast, 145<br />

DB2 Math, 147<br />

DB2 Trigonometry, 147<br />

Decimal Separator, 114<br />

deconforming<br />

dimensions, 60<br />

defining<br />

function sets, 48<br />

languages, 85<br />

prompt controls, 70<br />

defining multiple data sets, 35<br />

detecting<br />

relationships, 69<br />

diagrams, 21<br />

viewing, 23<br />

dimension information<br />

specifying, 93<br />

dimensions<br />

conforming, 28<br />

deconforming, 60<br />

definition, 242<br />

Display AM / PM Symbols, 114<br />

Display As Exponent, 114<br />

Display Days, 114<br />

Display Eras, 114<br />

Display Hours, 114<br />

Display Milliseconds, 114<br />

Display Minutes, 115<br />

Display Months, 115<br />

Display Seconds, 115<br />

Display Time Zone, 115<br />

Display Weekdays, 115<br />

Display Years, 115<br />

document<br />

version, 2<br />

E<br />

embedded strings, 81<br />

embedding<br />

parameters in XML connection strings, 35<br />

ERWin extended characters<br />

troubleshooting, 108<br />

ERWin stored procedures<br />

troubleshooting, 109<br />

escape symbol, 81<br />

examples<br />

multilingual modeling, 87<br />

exploring<br />

object-based security, 105<br />

packages, 105<br />

roles, 105<br />

Exponent Symbol, 115<br />

exporting<br />

metadata into CWM, 42<br />

translation tables, 86<br />

expressions<br />

complex, 66<br />

using prompts, 78<br />

F<br />

filters<br />

applying to a query subject, 77<br />

creating, 76<br />

filters (cont'd)<br />

determining usage, 77<br />

modifying, 76<br />

folders<br />

creating, 89<br />

using shortcuts, 89<br />

foreign keys, 242<br />

definition, 242<br />

format types<br />

currency, 70<br />

date, 70<br />

text, 70<br />

formatting<br />

data, 70<br />

Framework Manager<br />

project, 19<br />

function sets<br />

adding, 48<br />

defining, 48<br />

functions<br />

project, 48<br />

G<br />

generating<br />

relationships, 69<br />

getting latest<br />

versions, 45<br />

governors<br />

definition, 243<br />

setting run-time limits, 107<br />

Group Size (digits), 115<br />

groups<br />

adding, 99<br />

definition, 243<br />

H<br />

hierarchies<br />

definition, 243<br />

SAP BW, 92<br />

history<br />

viewing, 46<br />

HTTP URL connection strings<br />

using parameters, 35<br />

I<br />

IBM DB2<br />

creating connection strings, 33<br />

identifiers<br />

definition, 243<br />

importing<br />

Architect XML files, 29<br />

databases, 26<br />

Impromptu XML files, 29<br />

metadata into Framework Manager, 25<br />

ReportNet models, 28<br />

SAP BW, 92<br />

SAP BW metadata, 27<br />

third-party data sources, 29<br />

translation tables, 86<br />

XML files, 30<br />

Impromptu XML files<br />

importing, 29<br />

Impromtpu metadata<br />

troubleshooting, 108<br />

User Guide 251


Index<br />

Informix<br />

creating connection strings, 33<br />

installing<br />

language packs, 108<br />

International Currency Symbol, 115<br />

invalid query results, 107<br />

invalid query subject error<br />

when switching language in reporting application, 107<br />

isolation levels, 31<br />

J<br />

join, 244<br />

definition, 244<br />

joins<br />

, 66<br />

ambiguous, 67<br />

refining, 66<br />

self, 66<br />

K<br />

keys, 244<br />

definition, 244<br />

L<br />

language<br />

error when switching in reporting application, 107<br />

language packs<br />

installing, 108<br />

languages<br />

defining, 85<br />

levels, 245<br />

definition, 245<br />

limited local, 48<br />

links<br />

creating, 47<br />

literal strings, 81<br />

locale<br />

definition, 245<br />

locale, See languages<br />

M<br />

macros<br />

troubleshooting, 107<br />

using, 81, 107<br />

managing<br />

packages, 105<br />

projects, 43, 50<br />

Mantissa (digits), 115<br />

many-to-many relationships, 109, 245<br />

definition, 245<br />

mapping parameter values, 79<br />

Maximum No. of Digits, 116<br />

measures<br />

definition, 245<br />

merging<br />

metadata, 64<br />

metadata<br />

exporting, 42<br />

importing, 25<br />

merging, 64<br />

publishing, 95<br />

structuring, 13<br />

metadata security<br />

adding, 101<br />

Microsoft SQL Server<br />

creating connection strings, 33<br />

Minimum No. of Digits, 116<br />

Missing Value Characters, 116<br />

model objects, 21, 246<br />

definition, 246<br />

using parameters, 79<br />

viewing, 21<br />

model objects with parameters, 107<br />

model query subjects, 54<br />

converting to data source, 59<br />

model segments<br />

definition, 245<br />

model versions<br />

updating, 103<br />

modeling<br />

data sources, 37<br />

multilingual, 37<br />

multiuser, 49<br />

models<br />

definition, 245<br />

preparing, 53<br />

versioning, 103<br />

modifying<br />

data source query subjects, 55<br />

filters, 76<br />

model query subjects, 59<br />

package access, 105<br />

package administrative access, 105<br />

packages, 97<br />

properties, 88<br />

relationships, 68<br />

session parameters, 80<br />

stored procedure query subjects, 60<br />

MS Access, 148<br />

MS Access Cast, 153<br />

MS Access Math, 153<br />

MS Access Trigonometry, 154<br />

multi-fact relationships, 109<br />

multilingual<br />

data sources, 37, 85<br />

multilingual modeling<br />

example, 87<br />

parameters, 85<br />

multiple data sets, 35<br />

defining, 35<br />

multiple data source connections<br />

using, 31<br />

multiple users<br />

modeling, 49<br />

multiuser modeling, 49<br />

N<br />

namespaces, 246<br />

creating, 25<br />

definition, 246<br />

naming conventions<br />

objects, 24<br />

native SQL, 62<br />

Negative Pattern, 116<br />

Negative Sign Position, 116<br />

Negative Sign Symbol, 116<br />

No. of Decimal Places, 116<br />

non-redundant<br />

relationships, 66<br />

normalization, 246<br />

definition, 246<br />

252 Cognos ReportNet (TM) Framework Manager


Index<br />

notations, 66<br />

O<br />

Object Diagram View, 23<br />

Object Explorer View, 23<br />

object-based security<br />

adding, 101<br />

clearing, 101<br />

exploring, 105<br />

removing, 101<br />

objects<br />

naming conventions, 24<br />

searching, 24<br />

unique identifiers, 24<br />

ODBC<br />

creating data sources, 34<br />

OLAP, 176<br />

OLAP Member, 176<br />

OLAP Numeric, 178<br />

OLAP Set, 176<br />

one-to-many relationships, 246<br />

definition, 246<br />

one-to-one relationships, 246<br />

definition, 246<br />

opening<br />

projects, 20<br />

Operators, 119<br />

operators, 66<br />

Oracle, 154<br />

Oracle databases<br />

creating connection strings, 33<br />

Oracle Math, 159<br />

Oracle Trigonometry, 159<br />

outer joins<br />

in SQL, 109<br />

P<br />

package access<br />

modifying, 105<br />

package administrative access<br />

modifying, 105<br />

package inclusion<br />

viewing, 106<br />

packages, 246<br />

adding security, 105<br />

administrative access, 105<br />

creating, 97<br />

definition, 246<br />

exploring, 105<br />

managing, 105<br />

modifying, 97<br />

publishing, 103<br />

packaging<br />

SAP BW metadata, 98<br />

Padding Character, 116<br />

parameter maps, 79<br />

using as lookup tables, 85<br />

parameterizing<br />

XML connection strings, 35<br />

parameters, 79<br />

creating, 79<br />

embedded in XML connection strings, 35<br />

in model objects, 79<br />

in XML connection strings, 35<br />

multilingual modeling, 85<br />

session, 80<br />

parameters (cont'd)<br />

using, 81<br />

using aliases, 79<br />

using in data source query subjects, 83<br />

pass-thro<strong>ug</strong>h SQL, 63<br />

Pattern, 116<br />

Percent Scale (integer), 116<br />

Percentage Symbol, 116<br />

portals<br />

definition, 246<br />

primary keys, 246<br />

definition, 246<br />

product<br />

version, 2<br />

project<br />

Framework Manager, 19<br />

functions, 48<br />

project files, 19<br />

project objects<br />

naming conventions, 24<br />

Project Viewer, 21<br />

projects<br />

checking in, 45<br />

checking out, 45<br />

creating, 20<br />

definition, 246<br />

managing, 43, 50<br />

opening, 20<br />

publishing, 95<br />

structuring, 14<br />

synchronizing, 50<br />

using multiple data sets, 35<br />

verifying, 90<br />

prompt controls<br />

defining, 70<br />

prompt type<br />

properties, 71<br />

promptInfo<br />

property, 70<br />

prompts<br />

cascade on reference, 71<br />

display on reference, 71<br />

filter on reference, 72<br />

in expressions, 78<br />

properties<br />

aggregation rules, 72<br />

cascade on reference, 71<br />

data sources, 48<br />

display on reference, 71<br />

filter on reference, 72<br />

modifying, 88<br />

prompt type, 70, 71<br />

promptInfo, 70<br />

regularAggregate, 72<br />

relationships, 66<br />

SAP BW data source, 37<br />

SAP BW Variables, 37<br />

semiAggregate, 72<br />

usage, 72<br />

viewing, 23<br />

publishing<br />

metadata, 95<br />

packages, 103<br />

projects, 95<br />

User Guide 253


Index<br />

Q<br />

query item folders<br />

creating, 89<br />

query items<br />

definition, 246<br />

query locales<br />

definition, 246<br />

query paths<br />

refining, 66<br />

query processing, 48<br />

choosing, 48<br />

query subjects<br />

creating, 54<br />

data source, 53<br />

definition, 246<br />

model, 54<br />

modifying a model query subject, 59<br />

modifying a stored procedure query subject, 60<br />

modifying data source query subjects, 55<br />

SQL, 53<br />

stored procedure, 54<br />

testing, 60<br />

viewing properties, 88<br />

quotation marks, 81<br />

R<br />

recursive relationships, 66<br />

Red Brick, 161<br />

redundant<br />

relationships, 66<br />

refining<br />

query paths, 66<br />

regularAggregate<br />

property, 72<br />

relationships, 65<br />

ambiguous, 67<br />

cardinality, 66<br />

creating, 67<br />

creating shortcuts, 68<br />

definition, 246<br />

generating, 69<br />

many-to-many, 109<br />

modifying, 68<br />

multi-fact, 109<br />

non-redundant, 66<br />

properties, 66<br />

recursive, 66<br />

redundant, 66<br />

refining, 66<br />

removing<br />

object-based security, 101<br />

Report functions, 179<br />

report specifications<br />

definition, 247<br />

reporting application<br />

error when switching language, 107<br />

ReportNet models<br />

importing, 28<br />

repositories<br />

connections, 43<br />

creating, 43<br />

repository control, 43<br />

roles<br />

adding, 99<br />

definition, 247<br />

exploring, 105<br />

rules<br />

business, 75<br />

run-time limits<br />

governors, 107<br />

S<br />

SAP BW, 164<br />

comforming dimension, 57<br />

hierarchies, 92<br />

importing, 27<br />

packaging metadata, 98<br />

variables, 37<br />

SAP BW Math, 165<br />

SAP BW OLAP, 164<br />

SAP BW Trigonometry, 164<br />

SAP BW Variables, 37<br />

Scale (integer), 117<br />

searching<br />

objects, 24<br />

Secondary Group Size (digits), 117<br />

security<br />

CSVIdentityName function, 84<br />

segments<br />

creating, 46<br />

self joins, 66<br />

semiAggregate<br />

property, 72<br />

sending<br />

information thro<strong>ug</strong>h XML connection strings, 35<br />

session parameters<br />

creating, 80<br />

modifying, 80<br />

shortcuts<br />

using, 89<br />

single quotation marks, 81<br />

specifying<br />

dimension information, 93<br />

SQL<br />

Cognos, 61<br />

generation types, 64<br />

native, 61, 62<br />

outer joins, 109<br />

pass-thro<strong>ug</strong>h, 63<br />

query subjects, 53<br />

stand-alone native, 61<br />

SQL Server, 166<br />

SQL Server Cast, 168<br />

SQL Server Math, 169<br />

SQL Server Trigonometry, 170<br />

statistics<br />

viewing, 23<br />

stored procedure query subjects, 54<br />

modifying query subjects, 60<br />

stored procedures<br />

using binary large objects, 107<br />

structuring<br />

metadata, 13<br />

projects, 14<br />

Summaries, 124<br />

summaries<br />

viewing, 23<br />

supported environments<br />

multilingual, 85<br />

supporting<br />

multiple users, 49<br />

Sybase Adaptive Server<br />

creating connection strings, 33<br />

254 Cognos ReportNet (TM) Framework Manager


Index<br />

synchronizing<br />

projects, 50<br />

T<br />

tasks<br />

viewing, 23<br />

Teradata, 171<br />

Teradata Trigonometry, 174<br />

test results<br />

unable to view, 107<br />

testing<br />

data source connections, 34<br />

query subjects, 60<br />

text<br />

format type, 70<br />

third-party data sources<br />

importing, 29<br />

third-party metadata<br />

troubleshooting, 108<br />

Thousands Separator, 117<br />

Time Separator, 117<br />

Time Style, 117<br />

Time Unit, 117<br />

translation tables<br />

exporting, 86<br />

importing, 86<br />

traps<br />

chasm, 109<br />

troubleshooting, 107<br />

Architect metadata, 108<br />

Business Objects expressions, 108<br />

ERWin extended characters, 108<br />

ERWin stored procedures, 109<br />

Impromptu metadata, 108<br />

macros, 107<br />

third-party metadata, 108<br />

XML validation, 108<br />

U<br />

unable to see<br />

currency, 108<br />

unable to view<br />

test results, 107<br />

unique identifiers<br />

objects, 24<br />

UNIX<br />

creating ODBC data sources, 34<br />

updating<br />

model versions, 103<br />

usage property, 72<br />

Use Thousands Separator, 117<br />

users<br />

adding, 99<br />

using<br />

macros, 107<br />

multiple data source connections, 31<br />

parameters in XML connection strings, 35<br />

using embedded strings<br />

in expressions, 81<br />

in macros, 81<br />

using literal strings<br />

in expressions, 81<br />

in macros, 81<br />

using parameters<br />

in data source query subjects, 83<br />

using quotation marks<br />

in expressions, 81<br />

in macros, 81<br />

V<br />

version<br />

product, 2<br />

versioning<br />

models, 103<br />

versions<br />

getting latest, 45<br />

viewing<br />

diagrams, 23<br />

history, 46<br />

model objects, 21<br />

package inclusion, 106<br />

properties, 23<br />

statistics, 23<br />

summaries, 23<br />

tasks, 23<br />

Visual SourceSafe database<br />

creating, 44<br />

Visual SourceSafe repository connections<br />

creating, 44<br />

X<br />

XML<br />

creating connection strings, 33<br />

XML connection strings<br />

parameterizing, 35<br />

sending information, 35<br />

using parameters, 35<br />

with parameters, 35<br />

XML files<br />

importing, 30<br />

XML validation<br />

troubleshooting, 108<br />

Z<br />

Zero Value Characters, 117<br />

User Guide 255


Index<br />

256 Cognos ReportNet (TM) Framework Manager

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!