Purchase your Section 508 Compliance Support guide now!

Purchase your Section 508 Compliance Support guide now!

Cognos 8 SDK -- search all reports for a package

Hello, if you'd like to find all reports that exist for a specified package then you would use the syntax:


"/content/package[@name='GO Sales and Retailers']/report//*"

Cognos 8 SDK -- search all reports for a package

Hello, if you'd like to find all reports that exist for a specified package then you would use the syntax:


"/content/package[@name='GO Sales and Retailers']/report//*"

BI Centre SDK Guide

Stay tuned for updates on the BI Centre SDK Guide blog. The BI Centre SDK Guide will be your source for walking through a sample ASP.NET web application that integrates your Cognos 8 Report Studio reports.

BI Centre SDK Guide

Stay tuned for updates on the BI Centre SDK Guide blog. The BI Centre SDK Guide will be your source for walking through a sample ASP.NET web application that integrates your Cognos 8 Report Studio reports.

Cognos 8 Framework Manager -- Unable to View the Result Set of a Stored Procedure

If the result set of a stored procedure contains a CLOB (character large object) or BLOB (binary large object), you must modify the stored procedure before running it.

 

CLOBS

1. Create a model query subject that references the stored procedure.

2. Insert a Cast or Substring function to calculate a string based on the CLOB.

 

BLOBS

1. Create a model query subject that references the stored procedure.

2. Remove the BLOB from the Select statement of the query subject.

3. Add query items to the Select statement that perform a lookup on the table that contains the BLOB data.

 

Cognos 8 Framework Manager -- Unable to View the Result Set of a Stored Procedure

If the result set of a stored procedure contains a CLOB (character large object) or BLOB (binary large object), you must modify the stored procedure before running it.

 

CLOBS

1. Create a model query subject that references the stored procedure.

2. Insert a Cast or Substring function to calculate a string based on the CLOB.

 

BLOBS

1. Create a model query subject that references the stored procedure.

2. Remove the BLOB from the Select statement of the query subject.

3. Add query items to the Select statement that perform a lookup on the table that contains the BLOB data.

 

Cognos 8 SDK -- output is ready

You can use this function to determine if your Cognos 8 SDK response output has been created.

 

 

public bool outputIsReady(asynchReply response)

            {

                  for (int i = 0; i < response.details.Length; i++)

                  {

                        if ((response.details[i] is asynchDetailReportStatus)

                    && (((asynchDetailReportStatus)response.details[i]).status == asynchDetailReportStatusEnum.responseReady)

                              && (hasSecondaryRequest(response, "getOutput")))

                        {

                              return true;

                        }

                  }

                  return false;

            }

Cognos 8 SDK -- output is ready

You can use this function to determine if your Cognos 8 SDK response output has been created.

 

 

public bool outputIsReady(asynchReply response)

            {

                  for (int i = 0; i < response.details.Length; i++)

                  {

                        if ((response.details[i] is asynchDetailReportStatus)

                    && (((asynchDetailReportStatus)response.details[i]).status == asynchDetailReportStatusEnum.responseReady)

                              && (hasSecondaryRequest(response, "getOutput")))

                        {

                              return true;

                        }

                  }

                  return false;

            }

Cognos 8 SDK -- encode url string

Hello, if you’re working on a Cognos 8 SDK app and you need to pass in a Cognos Connection URL value that is saved in your web.config file, then make sure that you encode any portion of your URL that has “&” with

 

b_action=xts.run&amp;m=portal

Cognos 8 SDK -- encode url string

Hello, if you’re working on a Cognos 8 SDK app and you need to pass in a Cognos Connection URL value that is saved in your web.config file, then make sure that you encode any portion of your URL that has “&” with

 

b_action=xts.run&amp;m=portal

Cognos 8 SDK -- reminder

Hello, don't forget that when you're working on your Cognos SDK app that Cognos appends all prompt names with "p_" so if you name your prompt OrderId then then Cognos will be looking for p_OrderId to be passed via your C# code.

Cognos 8 SDK -- reminder

Hello, don't forget that when you're working on your Cognos SDK app that Cognos appends all prompt names with "p_" so if you name your prompt OrderId then then Cognos will be looking for p_OrderId to be passed via your C# code.

Cognos SDK -- examples

Hello, feel free to send me some Cognos SDK examples that you would like to have submitted.

Email your SDK Submissions

Cognos SDK -- examples

Hello, feel free to send me some Cognos SDK examples that you would like to have submitted.

Email your SDK Submissions

Cognos 8 BI for Consumers sample chapter!

Do you like to try before you buy?  Well, then check out the link below for a sample chapter of the Cognos 8 BI for Consumers book available at www.cognosbooks.com.  

 

 

SAMPLE CHAPTER LINK

http://www.cognosbooks.com/samples/consumers-chapter.swf

 

 

Cognos 8 BI for Consumers sample chapter!

Do you like to try before you buy?  Well, then check out the link below for a sample chapter of the Cognos 8 BI for Consumers book available at www.cognosbooks.com.  

 

 

SAMPLE CHAPTER LINK

http://www.cognosbooks.com/samples/consumers-chapter.swf

 

 

Cognos 8 SDK -- wait for response

Hello, here is an SDK example of waiting for the Cognos 8 report service response to complete.

 

try
        {
           //get the initial response
           C8response = oCrn.execute(path,pv,ro);
                        
           //if it has not yet completed, keep waiting until it is done
           if(C8response.getStatus() != AsynchStatusEnum.complete)
           {
            int count = 1;
            while (C8response.getStatus() != AsynchStatusEnum.complete && 
C8response.getStatus() != AsynchStatusEnum.responseReady)
            {
                System.out.println("C8response.getStatus() = wait: " + count++);
                C8response = oCrn.wait(C8response.getPrimaryRequest());    
            }
            if(C8response.getStatus() == AsynchStatusEnum.responseReady)
                C8response = oCrn.getOutput(C8response.getPrimaryRequest());
            
            if (C8response != null)
                C8response = oCrn.getOutput(C8response.getPrimaryRequest());
           }
           //return the final C8responseponse
           return C8response;
    
        }
        catch(Exception e)
        {
            return null;    
        }

 

Cognos 8 SDK -- wait for response

Hello, here is an SDK example of waiting for the Cognos 8 report service response to complete.

 

try
        {
           //get the initial response
           C8response = oCrn.execute(path,pv,ro);
                        
           //if it has not yet completed, keep waiting until it is done
           if(C8response.getStatus() != AsynchStatusEnum.complete)
           {
            int count = 1;
            while (C8response.getStatus() != AsynchStatusEnum.complete && 
C8response.getStatus() != AsynchStatusEnum.responseReady)
            {
                System.out.println("C8response.getStatus() = wait: " + count++);
                C8response = oCrn.wait(C8response.getPrimaryRequest());    
            }
            if(C8response.getStatus() == AsynchStatusEnum.responseReady)
                C8response = oCrn.getOutput(C8response.getPrimaryRequest());
            
            if (C8response != null)
                C8response = oCrn.getOutput(C8response.getPrimaryRequest());
           }
           //return the final C8responseponse
           return C8response;
    
        }
        catch(Exception e)
        {
            return null;    
        }

 

Visit the November 2007 Newsletter

Visit our partner site and review the latest newsletter blog. Go to http://bicentrenewsletter.blogspot.com/

Visit the November 2007 Newsletter

Visit our partner site and review the latest newsletter blog. Go to http://cognos8helpnewsletter.blogspot.com/

Cognos 8 multiple instances of Framework Manager on one workstation

One Windows host can have numerous Framework Managers installed and running at the same time. The requirement is that each Framework Manager instance is installed at a separate physical location, and that each instance is configured with Cognos Configuration for the correct respective Gateway URI and SDK URI.

In order to do this you must ensure that:

* You use a Framework Manager installation media CD or download.
* Specify the installation location as a path which does not already contain a Cognos ReportNet or Cognos 8 BI installation.
* At the end of installation open Cognos Configuration.
* Setup Gateway URI and SDK URI settings correctly
* From the Cryptography menu, click Cognos, Server Common Name enter a variation of FM 1 at , FM 2 at for the different installed instances.
* Ensure that the referred Cognos ReportNet or Cognos 8 BI installation System is running and save configuration.
* Cognos Configuration will recieve the keys from the target system.

Cognos 8 multiple instances of Framework Manager on one workstation

One Windows host can have numerous Framework Managers installed and running at the same time. The requirement is that each Framework Manager instance is installed at a separate physical location, and that each instance is configured with Cognos Configuration for the correct respective Gateway URI and SDK URI.

In order to do this you must ensure that:

* You use a Framework Manager installation media CD or download.
* Specify the installation location as a path which does not already contain a Cognos ReportNet or Cognos 8 BI installation.
* At the end of installation open Cognos Configuration.
* Setup Gateway URI and SDK URI settings correctly
* From the Cryptography menu, click Cognos, Server Common Name enter a variation of FM 1 at , FM 2 at for the different installed instances.
* Ensure that the referred Cognos ReportNet or Cognos 8 BI installation System is running and save configuration.
* Cognos Configuration will recieve the keys from the target system.

Cognos 8 -- Framework Manager model validate

When you attempt to validate a Cognos 8 Framework Manager model Framework Manager is working to detect various problems, such as invalid objects and their status. Framework Manager validates four main items in the model:


1. Invalid Relationships

Framework Manager identifies query subjects whose relationships are invalid, so that you can delete them. Invalid relationships include:

- many-to-many relationships

- orphaned query subjects (query subjects with no relationships)

- multiple relationships (or relationship shortcuts) between query subjects (or query subject shortcuts)

If you do not define relationships for a model query subject because it uses the relationships defined for the data source query subject, an error is listed when you check the project. You can define relationships for the model query subject, or you can leave the model query subject as an orphan.

2. Invalid References

Invalid references exist when an object references another object to which it does not have access or which no longer exists in the project.

3. Invalid Object Definition

Framework Manager warns you when your changes to an object will mean it cannot be executed. If you proceed, these are marked as invalid. When you verify a project, Framework Manager identifies any query subjects, shortcuts, filters, calculations, and relationships that were previously marked as invalid so that you can repair them.

4. Invalid Aggregation Rules

Framework Manager identifies any aggregate settings that are invalid for the data type of the query items to which they are applied. For example, if Product_Name has a character data type, its aggregate property cannot be set to either sum, count, or average. To repair the error, Framework Manager resets the aggregate property to unsupported.

Cognos 8 -- Framework Manager model validate

When you attempt to validate a Cognos 8 Framework Manager model Framework Manager is working to detect various problems, such as invalid objects and their status. Framework Manager validates four main items in the model:


1. Invalid Relationships

Framework Manager identifies query subjects whose relationships are invalid, so that you can delete them. Invalid relationships include:

- many-to-many relationships

- orphaned query subjects (query subjects with no relationships)

- multiple relationships (or relationship shortcuts) between query subjects (or query subject shortcuts)

If you do not define relationships for a model query subject because it uses the relationships defined for the data source query subject, an error is listed when you check the project. You can define relationships for the model query subject, or you can leave the model query subject as an orphan.

2. Invalid References

Invalid references exist when an object references another object to which it does not have access or which no longer exists in the project.

3. Invalid Object Definition

Framework Manager warns you when your changes to an object will mean it cannot be executed. If you proceed, these are marked as invalid. When you verify a project, Framework Manager identifies any query subjects, shortcuts, filters, calculations, and relationships that were previously marked as invalid so that you can repair them.

4. Invalid Aggregation Rules

Framework Manager identifies any aggregate settings that are invalid for the data type of the query items to which they are applied. For example, if Product_Name has a character data type, its aggregate property cannot be set to either sum, count, or average. To repair the error, Framework Manager resets the aggregate property to unsupported.

Cognos 8 SDK -- add new folder

private void createNewFolder(String newFolderName)
{
propEnum[] properties = new propEnum[]{propEnum.searchPath, propEnum.defaultName};

addOptions add = new addOptions();
add.updateAction = updateActionEnum.replace;

//create new folder object
folder aFolder = new folder();

tokenProp tp = new tokenProp();
tp.value = newFolderName;

aFolder.defaultName = tp;

searchPathMultipleObject searchPath = new searchPathMultipleObject();
searchPath.Value = "/content/folder[@name='" + newFolderName + "']";

try
{
baseClass[] folder = cmService.query(searchPath, properties,new sort[] {},new queryOptions());
// Check if the folder is already exist if not create it.
if (folder.Length == 0)
{
searchPathSingleObject searchPathSing = new searchPathSingleObject();
searchPathSing.Value = "/content";
cmService.add(searchPathSing,new baseClass[]{aFolder},add);

Console.WriteLine("New folder [" + newFolderName +"] has been created.");
}
else
{
Console.WriteLine(newFolderName + " is already exist.");
}
}
catch(Exception e)
{
Console.WriteLine("Exception " + e.Message.ToString());
}
}

Cognos 8 SDK -- add new folder

private void createNewFolder(String newFolderName)
{
propEnum[] properties = new propEnum[]{propEnum.searchPath, propEnum.defaultName};

addOptions add = new addOptions();
add.updateAction = updateActionEnum.replace;

//create new folder object
folder aFolder = new folder();

tokenProp tp = new tokenProp();
tp.value = newFolderName;

aFolder.defaultName = tp;

searchPathMultipleObject searchPath = new searchPathMultipleObject();
searchPath.Value = "/content/folder[@name='" + newFolderName + "']";

try
{
baseClass[] folder = cmService.query(searchPath, properties,new sort[] {},new queryOptions());
// Check if the folder is already exist if not create it.
if (folder.Length == 0)
{
searchPathSingleObject searchPathSing = new searchPathSingleObject();
searchPathSing.Value = "/content";
cmService.add(searchPathSing,new baseClass[]{aFolder},add);

Console.WriteLine("New folder [" + newFolderName +"] has been created.");
}
else
{
Console.WriteLine(newFolderName + " is already exist.");
}
}
catch(Exception e)
{
Console.WriteLine("Exception " + e.Message.ToString());
}
}

Cognos Query Studio -- Parts of the Report Appear in the Wrong Language

Have you ever changed the product language within Cognos Connection’s preferences property screen and then had issues with the language of your report?  If some parts of your report are still in the previous language then you should clear your browser’s cache.

 

For performance purposes, Query Studio relies on cached elements that remain in the memory of your system. After changing the product language in Cognos Connection preferences, close your browser and then restart it!

 

 

 

Cognos Query Studio -- Parts of the Report Appear in the Wrong Language

Have you ever changed the product language within Cognos Connection’s preferences property screen and then had issues with the language of your report?  If some parts of your report are still in the previous language then you should clear your browser’s cache.

 

For performance purposes, Query Studio relies on cached elements that remain in the memory of your system. After changing the product language in Cognos Connection preferences, close your browser and then restart it!

 

 

 

Cognos 8 -- modify Cognos Report Studio graphic

If you wanted to remove or replace some of the graphics used in Cognos Report Studio, then it is recommended that you keep the same directory structure and file name.

The table below shows which files supply the currently used images. They are located in the c8_location/webcontent/skins/style/branding directory.

Contents

File

The splash screen image specifically used for Report Studio, which appears in a frame, with a progress bar below it

branding/rs_splash.gif

The Welcome page banner image specifically used for Report Studio

branding/rs_welcome.gif

The About box graphic

branding/about.gif

The banner image

branding/banner_cogsquare.gif

The animated progress image

branding/progress.gif

 

Cognos 8 -- modify Cognos Report Studio graphic

If you wanted to remove or replace some of the graphics used in Cognos Report Studio, then it is recommended that you keep the same directory structure and file name.

The table below shows which files supply the currently used images. They are located in the c8_location/webcontent/skins/style/branding directory.

Contents

File

The splash screen image specifically used for Report Studio, which appears in a frame, with a progress bar below it

branding/rs_splash.gif

The Welcome page banner image specifically used for Report Studio

branding/rs_welcome.gif

The About box graphic

branding/about.gif

The banner image

branding/banner_cogsquare.gif

The animated progress image

branding/progress.gif

 

Cognos SDK -- java get detailed exceptions

Hello, here is a sample snippet that I was using in a test Cognos SDK application to show the Cognos SDK generated error message.




public String getDetailedException(Exception e)
{
AxisFault f = (AxisFault)e;
String message;
String a1 = f.dumpToString();
int start = a1.indexOf("");
int end = a1.indexOf("
");
if(start > 0 && end > 0)
{
message = a1.substring(start+40,end-1) + "\n";
int start2 = a1.indexOf("",end);
int end2 = a1.indexOf("
",end+24);
if (start2 > 0 && end2 > 0) // more than one msg.
message = message + a1.substring(start2+40,end2-1) + "\n";
return message;
}
else
return a1;
}

Cognos SDK -- java get detailed exceptions

Hello, here is a sample snippet that I was using in a test Cognos SDK application to show the Cognos SDK generated error message.




public String getDetailedException(Exception e)
{
AxisFault f = (AxisFault)e;
String message;
String a1 = f.dumpToString();
int start = a1.indexOf("");
int end = a1.indexOf("
");
if(start > 0 && end > 0)
{
message = a1.substring(start+40,end-1) + "\n";
int start2 = a1.indexOf("",end);
int end2 = a1.indexOf("
",end+24);
if (start2 > 0 && end2 > 0) // more than one msg.
message = message + a1.substring(start2+40,end2-1) + "\n";
return message;
}
else
return a1;
}

Cognos 8 -- getting starting with web services and SOAP

This was in response to a question on how to get started with viewing the SOAP calls that are being used by Cognos 8.

http://businessintelligence.ittoolbox.com/groups/message.asp?type=technical-functional&v=cognos8-l&i=1682248

"Hello, you can use the CM_Tester.htm to review the SOAP calls that are being passed. This comes as part of your C8 install. You can use this to view the SOAP that is passed for typical calls such as logon, executeReport, etc...

You can also download Fiddler to do a more thorough SOAP trace. This is a free downloadable utility that can be very helpful in troubleshooting and development code.

If you have a Cognos support account then you can also check out the Proven Practices area and download the "A Web Service To Run a Cognos 8 Report Proven". This provides you with a C# web service app that can give you an idea of how to get started with your own app.

Good luck."

http://bicentre.blogspot.com

Cognos 8 -- getting starting with web services and SOAP

This was in response to a question on how to get started with viewing the SOAP calls that are being used by Cognos 8.

http://businessintelligence.ittoolbox.com/groups/message.asp?type=technical-functional&v=cognos8-l&i=1682248

"Hello, you can use the CM_Tester.htm to review the SOAP calls that are being passed. This comes as part of your C8 install. You can use this to view the SOAP that is passed for typical calls such as logon, executeReport, etc...

You can also download Fiddler to do a more thorough SOAP trace. This is a free downloadable utility that can be very helpful in troubleshooting and development code.

If you have a Cognos support account then you can also check out the Proven Practices area and download the "A Web Service To Run a Cognos 8 Report Proven". This provides you with a C# web service app that can give you an idea of how to get started with your own app.

Good luck."

http://cognos8help.blogspot.com

Cognos 8 -- metadata (use MetaManager)

Accurately modeled and documented metadata is the foundation of a successful performance management implementation. Cognos Framework Manager serves as the metadata layer for the Cognos deployment. It is critical to leverage the metadata attributes of the various elements to improve the end user experience. Once captured, the value of these attributes should be demonstrated across the organization.

MetaManager allows administrators to simplify many of the complexities associated with metadata, security and data management, both at the modeling and user level. The product modules are designed to help administrators manage and maintain metadata, perform impact analysis of these modifications on end user content, and automatically resolve any issues that may occur from the impact analysis. As well, administrators can generate detailed audit trail documentation with a click of a button, perform full or selectable content backups and restores, and revert changes back to previous state at any time.

Benefits
As an extension of Framework Manager and ReportNet or Cognos 8, MetaManager provides functionality that automates many of the manual processes in a Cognos deployment (Security, Distribution, Standardization, Documentation, Validation and Backup & Recovery).

In addition to automating the impact of changes to the underlying data foundation, MetaManager enables administrators to carry forward the value of the data to end users in an automated fashion.

By carrying details about the metadata (such as sources of query items and descriptions) through to end user reports, business users gain insight about the information presented to them.

With thorough documentation of Framework Manager models and the entire content store (including report specs, security, and schedules), MetaManager enables detailed record keeping and audit trails of the entire Cognos environment.


Features
Excel-like user interface for making changes and updates to Framework Manager object properties (including simple and advanced search capabilities).

Automate report validation when changes to the underlying packages are made.

Automatically apply Framework Manager model changes to impacted reports.

Carry metadata through to end-user reports in the form of screen tips.

Find and replace text within selectable report objects.

Standardize the look and feel of existing reports with one click easily distribute custom portal tabs to any role, group or user

Secure packages, folders, reports and other objects in one simple step

Document the contents of Framework Manager models and the content store in PDF, XLS, TXT or HTML.

Full backup and restore capabilities on selected objects in the content store. Restoration can be done to the same location or any location in any content store.
Revert any change back to its previous state.

Architecture
MetaManager is a client application that runs on any Windows platform supported by Cognos (e.g., XP, 2000, 2003). The product communicates with Cognos through Web services and does not require the use of SDK.

For more details, visit their website: www.bspsoftware.com

Cognos 8 -- metadata (use MetaManager)

Accurately modeled and documented metadata is the foundation of a successful performance management implementation. Cognos Framework Manager serves as the metadata layer for the Cognos deployment. It is critical to leverage the metadata attributes of the various elements to improve the end user experience. Once captured, the value of these attributes should be demonstrated across the organization.

MetaManager allows administrators to simplify many of the complexities associated with metadata, security and data management, both at the modeling and user level. The product modules are designed to help administrators manage and maintain metadata, perform impact analysis of these modifications on end user content, and automatically resolve any issues that may occur from the impact analysis. As well, administrators can generate detailed audit trail documentation with a click of a button, perform full or selectable content backups and restores, and revert changes back to previous state at any time.

Benefits
As an extension of Framework Manager and ReportNet or Cognos 8, MetaManager provides functionality that automates many of the manual processes in a Cognos deployment (Security, Distribution, Standardization, Documentation, Validation and Backup & Recovery).

In addition to automating the impact of changes to the underlying data foundation, MetaManager enables administrators to carry forward the value of the data to end users in an automated fashion.

By carrying details about the metadata (such as sources of query items and descriptions) through to end user reports, business users gain insight about the information presented to them.

With thorough documentation of Framework Manager models and the entire content store (including report specs, security, and schedules), MetaManager enables detailed record keeping and audit trails of the entire Cognos environment.


Features
Excel-like user interface for making changes and updates to Framework Manager object properties (including simple and advanced search capabilities).

Automate report validation when changes to the underlying packages are made.

Automatically apply Framework Manager model changes to impacted reports.

Carry metadata through to end-user reports in the form of screen tips.

Find and replace text within selectable report objects.

Standardize the look and feel of existing reports with one click easily distribute custom portal tabs to any role, group or user

Secure packages, folders, reports and other objects in one simple step

Document the contents of Framework Manager models and the content store in PDF, XLS, TXT or HTML.

Full backup and restore capabilities on selected objects in the content store. Restoration can be done to the same location or any location in any content store.
Revert any change back to its previous state.

Architecture
MetaManager is a client application that runs on any Windows platform supported by Cognos (e.g., XP, 2000, 2003). The product communicates with Cognos through Web services and does not require the use of SDK.

For more details, visit their website: www.bspsoftware.com