Sunday, July 26, 2009

cognos sdk dev note

If you use the BI Bus API, you can use optimistic concurrency control to
prevent users from accidentally overwriting each other's changes.
Optimistic concurrency control relies on object versions to detect
conflicting transactions.

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Passing Environment Variables to External Applications

You can use a URL to pass environment variables, such as content locale,
to external applications. For example, if a user clicks a link that drills
through to an external application, the content locale environment
variable can be passed through the URL so that the language the user sees
in the report is the same as the language the user sees in the application.

The mandatory building blocks for a URL that passes environment variables
to an external application are as follows:

b_action=xts.run&m=portal/bridge.xts, parameters required to pass the
values of the environment variables

&c_cmd=<command>, to specify the URL-encoded application command to be
executed.

This URL can include application variables, other than environment
variables, to pass to the external application.

&c_env=<variables.xml>, to specify the location of the XML file that
identifies the environmental variables to be passed.

This file must be located under the templates folder in templates/ps.

&c_mode=<get_or_post>, to specify whether to use the get or post request
method when calling the external application.

When you use the post request method, the HTML page created is UTF-8
encoded. When you use the get request method, the values of the variables
are UTF-8 encoded.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

After you create your extended applications, you register them in the
applications index and then deploy the Cognos Extended Applications
portlet to your portal. In addition to the .jar files required to run a
Cognos 8 SDK application, the Cognos Extended Applications portlet must be
deployed with the following files:

The Java standard tag library (JSTL) files jstl.jar and standard.jar. By
default, these files are installed in the
installation_location/Cognos/c8/webapps/samples/WEB-INF/lib directory.

The CPS tag library file cps-sdk-jsptags.jar. By default, this file is
installed in the
installation_location/Cognos/c8/webapps/samples/WEB-INF/lib directory.

The CPS tag library descriptor file cps.tld. By default, this file is
installed in the
installation_location/Cognos/c8/webapps/samples/WEB-INF/tld directory.

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Wednesday, July 15, 2009

cognos sdk study note

MDL represents Transformer models in text format and you can view the text
in any text editor. The .py? file is a representation of the model, stored
in default binary format.

You can use MDL in two ways:
to create an MDL model that completely defines a Transformer model
to create an MDL script that manipulates or updates an existing
Transformer model

ach Transformer model must have at least one model object. The model may
also contain one or more of each of the following object types:

Data Source
PowerCube
Cognos Source (a Cognos 8 package)
PowerCubeGroup
Column
PowerCubeGroupCube
Dimension
Subdimension
Level
Signon
Root Category
View
Drill Category
Custom View
Regular Category
Currency Table
Special Category
Currency
Measure
Dimension Calculation Definition

Automate CleanHouse Sample

This script uses the MDL verb CleanHouse, which is equivalent to selecting
the Clean House command on the Tools menu of the Windows interface,
followed by a date in the format YYYYMMDD. This command removes all
categories with a Last Use date less than the specified date.

Tip: To remove all categories in the model, specify a future date.

This script removes all categories in the Products dimension that have a
Last Use date prior to November 1, 2006, and saves the model.
OpenPy "model.pyj"
CleanHouse Dimension "Product" 20061101 SaveMDL "model.mdl"

life sucks......................................

Tuesday, July 14, 2009

transformer documents notes

The Transformer 8.3 executable name is now cogtr.exe on Windows, and cogtr
on UNIX/Linux.

Scale
Decimal values are read into the model based on a scale that you
specify.

You apply security to an entire PowerCube or cube group by setting a
password to restrict access to authorized users.
cogtr.xml seems to be useful.
You can invoke Transformer from the command line to populate models,
create cubes, and perform other actions. How and where these actions are
performed is determined by information that you provide.
Command Line Options

Transformer can perform certain modeling and cube-building tasks from the
Windows, UNIX or Linux command line.

Note: You must invoke the command line utilities from the directory where
the Transformer executable resides. In Transformer 8.3, this is the bin
directory.

This document provides the syntax for the following routine tasks:

creating or updating cubes

updating a model with new categories created during the category
generation process

running a set of batch jobs with different preference settings or input
files

changing the current date setting so that relative time calculations in
batch cube creation are based on a specific date

supplying database signon information

changing the degree of detail for log file messages

opening and deleting checkpoint files

verifying and, if necessary, updating the scales used in MDL model columns
and measures to match those used in the data source

publishing cubes in Content Manager

supporting Cognos 8 prompts

opening specified .mdl files and executing MDL statements

specifying the number of records for a test cube

regenerating categories, and the measure scales used with them, without
building the cube

Sunday, July 12, 2009

Cognos sdk dev log

An action is a request made to the FM Engine. Actions are XML elements
that contain input parameters. Some actions also have output parameters.
Actions are defined in the CR1Behaviors.xml file, available in the
<c8-location>\templates\bmt\Cr1Model directory.
Some actions do not change the state of the model in the Framework Manager
application and are not typically recorded in the action logs. An example
of actions that are not recorded are DBBrowse and Publish. There are also
some actions that are recorded but they do not change the state of the
model. An example of this type of action is DBRelease.

Modifying the Log Status of Actions
You can modify the log status of an action to determine whether or not you
want it to appear in the action logs.

Using the Framework Manager SDK

You can use the Framework Manager SDK to perform all the same metadata
modeling tasks and processes as the Framework Manager application. For
example, you can

import a data source

enhance query subjects with SQL, expressions and filters

create model query subjects to extend value of data source query subjects

create a basic package

publish a package to report authors

cognos SDK学习 手记

The Model Schema

The Model schema validates the model.xml file, the xml representation of
the model. The Model Schema reference contains information about the
elements and attributes in the model.xml file.

The Framework Manager application records all the actions you do that
modify the metadata model. These actions are recorded in action logs.
Action logs are XML files that you can re-use and re-run in the Framework
Manager application. You can use these Framework Manager action logs as
examples to help you create your own action logs for the SDK.

Friday, July 10, 2009

cognos sdk 开发手记

Cognos 8 is a solution designed to address the challenges of
enterprise-scale reporting, analysis, scorecarding, and event notification.

The Cognos 8 architecture is based on a typical three-tiered Web
architecture that consists of
*a Web server
The Cognos 8 Web server tier contains one or more Cognos 8 gateways.
*applications
The Cognos 8 applications tier contains one or more Cognos 8 servers. A
Cognos 8 server runs requests, such as reports, analyses, and queries,
that are forwarded by a gateway.
*data
The Cognos 8 data tier consists of the content store, data sources, and
the metric store.

Service-Oriented Architecture

Developers can use a collection of cross-platform Web services, libraries,
and programming interfaces provided with the SDK API to access the full
functionality of Framework Manager. You can use the Framework Manager SDK
to model metadata and publish packages without the use of the Framework
Manager application.

Script Player is a command line utility that runs previously created
action logs to create or modify models, or to publish packages for report
authors. Script Player can run an entire action log or only the part that
is required for a specific task.

Virtually everything you can do with the Cognos 8 graphical user
interface, you can do using the appropriate API, XML file, or command line
utility.

You can manage authorization in Cognos 8 in the following ways:

You can modify users, groups, and roles as defined by your authentication
provider or in Cognos 8. You cannot create users in Cognos 8.

You can control access to objects in the content store, such as folders,
reports, data sources, and configuration objects through the use of
policies.

You can grant capabilities to users, groups, and roles to control access
to specific functionality in Cognos 8.

You can assign access permissions to certain profiles, limiting Report
Studio functionality to specific users, groups, and roles. For more
information about managing profiles,

Running an Object Using the Schedule


The URLs provide a quick and efficient way to start Cognos 8 components
and open specified content, such as reports, metrics, folders, or pages.

You can use the URLs to

start Cognos 8 components

access a Cognos Connection page

You create an extended application by using the CreateURI, URIParameter,
Cognos8Connect, and EncodeNamespace tags in a JSP document.