Buy the Cognos SDK Guide by BI Centre Now

The Cognos SDK Guide by BI Centre provides you with the complete source code for a C# web solution, C8.1 report based on the GOSR package, and a Word document that will serve as your core reference to understanding the Cognos 8 SDK. It will cover C8 SDK topics such as: authentication; querying the Cognos content store; rendering a C8 report in ASP.NET; exception handling; and much more.

Buy the Cognos 8 Modification Check Now

Thursday, January 10, 2008

CognosSDK.cs -- Helper Functions

Your Cognos SDK class will also contain several helper functions that will aid you in querying and executing against the Cognos 8 Content Store.  One example is the sample code to resolve a report’s prompt page prompts and pass the final parameter collection a Report Service’s .run method.  The purpose of the method is to iterate through the prompt page’s form collection and identify all Cognos 8 prompt controls by name and retrieve their associated value.  This method requires that your Cognos 8 Report Author follows a standardized naming convention for the Report Studio prompt pages.  For example, our sample Report Studio reports will name all of the prompt page prompts in the following manner.


v      Date Time prompts – p_dteStartDate

v      Value prompt – p_txtFirstName

v      Multiple Select prompt – p_lstCity


NOTE:  As you progress through the code in the CognosSDK.cs file you will find references to string functions that rely on this naming convention.  You may be forced to alter your CognosSDK.cs code to work with your Cognos 8 Report Studio naming standards.


For example:


_promptType = nvcFormData.Keys[x];             

int _posPrompt = _promptType.LastIndexOf("p_");


if (_posPrompt == 2)


      _promptName = _promptType.Substring(2, _promptType.Length - 2);

      _promptType = _promptType.Substring(_posPrompt + 2,3);


Cognos 8 SDK google search


New C8 SDK Utility --- Cognos 8 Modification Check

The BI Centre C8 Modification Check provides a Cognos SDK developer with a workable C# solution that will allow you to:

· Search the Content Store for items that have been modified after a selected date value

For example, if you were looking for all reports that were modified on June 3rd, 2008 then you would select the date June 2nd, 2008. The code will search for all items that have been modified after the selected date value from the date control.

The results of the search are then rendered to a text box control.