Purchase your Section 508 Compliance Support guide now!

Purchase your Section 508 Compliance Support guide now!

Access Manager API -- dynamically add users to LDAP

Hello, stay tuned for some more code samples of dynamically adding users to your Series 7 Access Manager LDAP.  If you would like to recieve a code sample today then send us an email at businessintelligencecentre@gmail.com.
 
 

Access Manager API -- dynamically add users to LDAP

Hello, stay tuned for some more code samples of dynamically adding users to your Series 7 Access Manager LDAP.  If you would like to recieve a code sample today then send us an email at businessintelligencecentre@gmail.com.
 
 

Cognos Series 7 Access Manager -- generate a report of namespace users

Run the AM_NamespaceReport command line utility to create an XML report that lists all users or user classes in a namespace.

You can use the AM_NamespaceReport command line utility with any version of a namespace. Any user with a basic signon can log on.    However, only users and user classes for which you have show privileges appear in the report.
If the report is the users type with the filter of the all type, the following information is returned: name, first name, last name, description, email, phone number, basic signons, and OS signons. For the namespace version 17.0, external user DN is also returned.

If the report is userclasses type with the filter of the all type, the following information is returned: user class name, names of children user classes, names of member users, and access permissions.
The XML schema for both types of report output is located in the Cognos_installation
/cer4/accman/AM_NamespaceReport_users|AM_NamespaceReport_userclasses.xsd directory.

Parameters

Parameter Description
-h Specifies the computer name of the directory server.default: localhost
-p Specifies the port number of the directory server.default: 389
-r Specifies the base DN of the directory server.default: o=cognos, c=ca
-s Specifies that SSL is enabled.This parameter is optional.
-C Specifies the location of the cert7.db file.This parameter is required only if SSL is enabled.
-n Specifies the name of the namespace for reporting. default: default namespace
-D Specifies the basic signon to use for namespace authentication.This parameter is mandatory.
-w Specifies the basic signon password.This parameter is mandatory.
-t Specifies the type of report. The report types users and userclasses are supported.default: users
-f Specifies a filter type for a report.For the users report type, the following filter types are supported:  allReturns all user information; this is the default filter.  userclassesReturns only information about the users' user class membership.  brokenlinks Returns only the names of users whose DNs are broken. This filter is used only with the namespace version 17.0.  lockedout Returns only the names of users whose accounts are locked.  disabledReturns only the names of users whose accounts are disabled.For the userclasses report type, the following filter types are supported:  all Returns all user class information; this is the default filter.  usersReturns only the names of the member users.   userclasses Returns only information about the children user classes.
-o Indicates the file to which output is written.This parameter is mandatory.
Example

To report all users in a namespace, type the following:

D:\Cognos\cer4\bin>AM_NamespaceReport -n default -D Administrator -w "" -t users -f all -o all_users.xml

Here is a sample output of the users report type:

<?xml version="1.0" encoding="UTF-8"?>
<NamespaceReport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="D:\Cognos\cer4\accman\AM_NamespaceReport.xsd" host="localhost" port="389" baseDN="o=Cognos,c=ca" ns="Default" user="Administrator" type="users" filter="all">

<User name="Sam Carter" first_name="Sam" last_name="Carter" email="sam.carter@cognos.com" phone="(123)456-7890" externalUserDN="uid=scarter,ou=people,o=cognos,c=ca">
  <BasicSignon>scarter</BasicSignon>
  <OSSignon>domain/scarter</OSSignon>
  <Description>Employee id: 12345</Description>
 </User>
 <User name="Ted Morris" first_name="Ted" last_name="Morris" email="ted.morris@cognos.com" phone="(123)456-7899" externalUserDN="uid=tmorris,ou=people,o=cognos,c=ca">

<BasicSignon>tmorris</BasicSignon>
  <OSSignon>domain/tmorris</OSSignon>
  <Description>Employee id: 56789</Description>
 </User>

</NamespaceReport>

Cognos Series 7 Access Manager -- generate a report of namespace users

Run the AM_NamespaceReport command line utility to create an XML report that lists all users or user classes in a namespace.

You can use the AM_NamespaceReport command line utility with any version of a namespace. Any user with a basic signon can log on.    However, only users and user classes for which you have show privileges appear in the report.
If the report is the users type with the filter of the all type, the following information is returned: name, first name, last name, description, email, phone number, basic signons, and OS signons. For the namespace version 17.0, external user DN is also returned.

If the report is userclasses type with the filter of the all type, the following information is returned: user class name, names of children user classes, names of member users, and access permissions.
The XML schema for both types of report output is located in the Cognos_installation
/cer4/accman/AM_NamespaceReport_users|AM_NamespaceReport_userclasses.xsd directory.

Parameters

Parameter Description
-h Specifies the computer name of the directory server.default: localhost
-p Specifies the port number of the directory server.default: 389
-r Specifies the base DN of the directory server.default: o=cognos, c=ca
-s Specifies that SSL is enabled.This parameter is optional.
-C Specifies the location of the cert7.db file.This parameter is required only if SSL is enabled.
-n Specifies the name of the namespace for reporting. default: default namespace
-D Specifies the basic signon to use for namespace authentication.This parameter is mandatory.
-w Specifies the basic signon password.This parameter is mandatory.
-t Specifies the type of report. The report types users and userclasses are supported.default: users
-f Specifies a filter type for a report.For the users report type, the following filter types are supported:  allReturns all user information; this is the default filter.  userclassesReturns only information about the users' user class membership.  brokenlinks Returns only the names of users whose DNs are broken. This filter is used only with the namespace version 17.0.  lockedout Returns only the names of users whose accounts are locked.  disabledReturns only the names of users whose accounts are disabled.For the userclasses report type, the following filter types are supported:  all Returns all user class information; this is the default filter.  usersReturns only the names of the member users.   userclasses Returns only information about the children user classes.
-o Indicates the file to which output is written.This parameter is mandatory.
Example

To report all users in a namespace, type the following:

D:\Cognos\cer4\bin>AM_NamespaceReport -n default -D Administrator -w "" -t users -f all -o all_users.xml

Here is a sample output of the users report type:

<?xml version="1.0" encoding="UTF-8"?>
<NamespaceReport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="D:\Cognos\cer4\accman\AM_NamespaceReport.xsd" host="localhost" port="389" baseDN="o=Cognos,c=ca" ns="Default" user="Administrator" type="users" filter="all">

<User name="Sam Carter" first_name="Sam" last_name="Carter" email="sam.carter@cognos.com" phone="(123)456-7890" externalUserDN="uid=scarter,ou=people,o=cognos,c=ca">
  <BasicSignon>scarter</BasicSignon>
  <OSSignon>domain/scarter</OSSignon>
  <Description>Employee id: 12345</Description>
 </User>
 <User name="Ted Morris" first_name="Ted" last_name="Morris" email="ted.morris@cognos.com" phone="(123)456-7899" externalUserDN="uid=tmorris,ou=people,o=cognos,c=ca">

<BasicSignon>tmorris</BasicSignon>
  <OSSignon>domain/tmorris</OSSignon>
  <Description>Employee id: 56789</Description>
 </User>

</NamespaceReport>

Cognos 8 Report Studio -- How to get the overall totals only on the last page of a Cognos 8 report

Create two pages and set a page break on summary totals.

Steps:

  1) Create a page set
  2) Drag page1 under the detail pages
  3) Select the measures and total them
  4) Delete the summary line so that only the total of the product line is seen
  5) Click on the page set and from the properties click on Grouping and Sorting
  6) Drag the product line to the Groups
  7) Add a new page to the page set
  8) Go to the page and from the data items tab, right click on the query and insert
  9) Ensure that the order in the list is the same as on page 1
 10) Total the measures
 11) Select everything in the list except the summary row
 12) In the properties, click on box type and set it to none
 13) When the report is run the summary should be shown on the last page

To see hidden objects in the page, click on visual aids next to the run and lock button and select 'show hidden objects'

Cognos 8 Report Studio -- How to get the overall totals only on the last page of a Cognos 8 report

Create two pages and set a page break on summary totals.

Steps:

  1) Create a page set
  2) Drag page1 under the detail pages
  3) Select the measures and total them
  4) Delete the summary line so that only the total of the product line is seen
  5) Click on the page set and from the properties click on Grouping and Sorting
  6) Drag the product line to the Groups
  7) Add a new page to the page set
  8) Go to the page and from the data items tab, right click on the query and insert
  9) Ensure that the order in the list is the same as on page 1
 10) Total the measures
 11) Select everything in the list except the summary row
 12) In the properties, click on box type and set it to none
 13) When the report is run the summary should be shown on the last page

To see hidden objects in the page, click on visual aids next to the run and lock button and select 'show hidden objects'

Cognos 8 Report Studio --- dynamically set print out options in url

If you have the requirement to execute several reports from a URL and need the ability to specify the page size of the report or change the orientation then you can use the following url as an example to modify the settings.

Add the following parameters at the end of the URL for pdf and for landscape:

&run.outputFormat=PDF&run.outputPageOrientation=landscape

The URl value would look something like this:

http://localhost/c8mr2/cgi-bin/cognos.cgi?b_action=xts.run&m=portal/report-viewer.xts&ui.action=run&ui.object=%2fcontent%2fpackage%5b%40name%3d%27GO%20Sales%20and%20Retailers%27%5d%2freport%5b%40name%3d%27Rank%20Revenue%20by%20sales%20rep%20and%20product%20line%27%5d&run.outputFormat=PDF&run.outputPageOrientation=landscape

or you can also add:

(outputPageDefinition)=legal



--
Thank you.

BI Centre

Cognos 8 Report Studio --- dynamically set print out options in url

If you have the requirement to execute several reports from a URL and need the ability to specify the page size of the report or change the orientation then you can use the following url as an example to modify the settings.

Add the following parameters at the end of the URL for pdf and for landscape:

&run.outputFormat=PDF&run.outputPageOrientation=landscape

The URl value would look something like this:

http://localhost/c8mr2/cgi-bin/cognos.cgi?b_action=xts.run&m=portal/report-viewer.xts&ui.action=run&ui.object=%2fcontent%2fpackage%5b%40name%3d%27GO%20Sales%20and%20Retailers%27%5d%2freport%5b%40name%3d%27Rank%20Revenue%20by%20sales%20rep%20and%20product%20line%27%5d&run.outputFormat=PDF&run.outputPageOrientation=landscape

or you can also add:

(outputPageDefinition)=legal



--
Thank you.

BI Centre

Cognos 8 -- set tab order javascript

script
function check(id)
{
var _obj=document.getElementById(id).attributes;
for(var j=0;j<_obj.length;j++)
{
if(_obj[j].nodeName=="tabindex")
var _str="ID of "+id+" has a tabindex of "+_obj[j].nodeValue;
document.getElementById(id).value=_str;
//alert(_str); /* if you want an alert uncomment */
}
}
/script

Cognos 8 -- set tab order javascript

script
function check(id)
{
var _obj=document.getElementById(id).attributes;
for(var j=0;j<_obj.length;j++)
{
if(_obj[j].nodeName=="tabindex")
var _str="ID of "+id+" has a tabindex of "+_obj[j].nodeValue;
document.getElementById(id).value=_str;
//alert(_str); /* if you want an alert uncomment */
}
}
/script

Cognos 8 -- Unable to view images

* Open IIS Internet Services Manager
* Under "Default Web Site", expand the virtual directory for the ReportNet alias ("crn") and navigate to the samples\images folder
* Right-click the "images" folder, and choose "Properties"
* In the "Directory" tab, ensure that the checkbox "Directory Browsing" is checked.
* Stop and Start the "Default Web Site" service.

Cognos 8 -- Unable to view images

* Open IIS Internet Services Manager
* Under "Default Web Site", expand the virtual directory for the ReportNet alias ("crn") and navigate to the samples\images folder
* Right-click the "images" folder, and choose "Properties"
* In the "Directory" tab, ensure that the checkbox "Directory Browsing" is checked.
* Stop and Start the "Default Web Site" service.

New C8 SDK Utility --- Cognos 8 Modification Check

http://bicentresdkguide.blogspot.com/2008/05/new-c8-sdk-utility-cognos-8.html

New C8 SDK Utility --- Cognos 8 Modification Check

http://cognos8helpsdkguide.blogspot.com/2008/05/new-c8-sdk-utility-cognos-8.html

Cognos 8 -- Unable to Click Links

Links in Cognos Connection will not work if your browser is not properly configured.  Consequently, you cannot perform operations such as running a report or starting Report Studio.  For all Web browsers, cookies and JavaScript must be enabled.

For Internet Explorer only, the following must be enabled:

• Run ActiveX controls and plug-ins

• Script ActiveX controls marked safe for scripting

• Active scripting

Cognos does not provide or download ActiveX controls as part of Cognos 8. Report Studio uses the native Internet Explorer XML support, which is an integral component of the browser.  Because Microsoft implements XML using ActiveX, you must enable ActiveX support for Report Studio.

Steps to Enable Internet Explorer Options

1.

In Internet Explorer, from the Tools menu, click Internet Options.

2.

On the Security tab, click Custom Level.

3.

In the Security Settings dialog box, scroll to the Activex controls and plug-ins settings and enable Run Activex controls and plug-ins and Script Activex controls marked safe for scripting.

4.

Scroll to the Scripting settings and enable Active scripting.

5.

Click OK

Cognos 8 -- Unable to Click Links

Links in Cognos Connection will not work if your browser is not properly configured.  Consequently, you cannot perform operations such as running a report or starting Report Studio.  For all Web browsers, cookies and JavaScript must be enabled.

For Internet Explorer only, the following must be enabled:

• Run ActiveX controls and plug-ins

• Script ActiveX controls marked safe for scripting

• Active scripting

Cognos does not provide or download ActiveX controls as part of Cognos 8. Report Studio uses the native Internet Explorer XML support, which is an integral component of the browser.  Because Microsoft implements XML using ActiveX, you must enable ActiveX support for Report Studio.

Steps to Enable Internet Explorer Options

1.

In Internet Explorer, from the Tools menu, click Internet Options.

2.

On the Security tab, click Custom Level.

3.

In the Security Settings dialog box, scroll to the Activex controls and plug-ins settings and enable Run Activex controls and plug-ins and Script Activex controls marked safe for scripting.

4.

Scroll to the Scripting settings and enable Active scripting.

5.

Click OK

Cognos 8 --- A Report Link in an Email Notification Does Not Work

If a report link in an email notification does not work, the Gateway URI may not be configured correctly.  You must change the host name portion of the Gateway URI from localhost to either the IP address of the computer or the computer name. If the URL in the email contains localhost, remote users cannot open the report.

Cognos 8 --- A Report Link in an Email Notification Does Not Work

If a report link in an email notification does not work, the Gateway URI may not be configured correctly.  You must change the host name portion of the Gateway URI from localhost to either the IP address of the computer or the computer name. If the URL in the email contains localhost, remote users cannot open the report.

next Cognos SDK Utility

We will be adding a new Cognos SDK utility to the http://bicentresdkguide.blogspot.com blog in the next few days.  It will be a utility that you can use view all of the updated items that are contained within your Cognos servers for a given date.
 
 

next Cognos SDK Utility

We will be adding a new Cognos SDK utility to the http://cognos8helpsdkguide.blogspot.com blog in the next few days.  It will be a utility that you can use view all of the updated items that are contained within your Cognos servers for a given date.