Purchase your Section 508 Compliance Support guide now!

Purchase your Section 508 Compliance Support guide now!

Cognos 8 SDK -- reinstall Cognos SDK instance

If you are having performance issues with your SDK application and believe that your install is corrupt then you should consider re-applying your Cognos 8 SDK install.  One way to do this is to locate your cmplst.txt file which is located under ...Cognos Install path/Cognos\c8.
 
You would then make a back up copy of the file before proceeding with commenting out all references to SDK components such as:
 
SDKCSP_version=SDK-AW-ML-RTM-8.1.60.28-0
SDKCSP_name=SDK Uninstall
VERXML_C8SDK_version=VERXML_C8SDK-AW-ML-RTM-8.1.60.28-0
VERXML_C8SDK_name=Verxml C8SDK
.......

Cognos 8 SDK -- reinstall Cognos SDK instance

If you are having performance issues with your SDK application and believe that your install is corrupt then you should consider re-applying your Cognos 8 SDK install.  One way to do this is to locate your cmplst.txt file which is located under ...Cognos Install path/Cognos\c8.
 
You would then make a back up copy of the file before proceeding with commenting out all references to SDK components such as:
 
SDKCSP_version=SDK-AW-ML-RTM-8.1.60.28-0
SDKCSP_name=SDK Uninstall
VERXML_C8SDK_version=VERXML_C8SDK-AW-ML-RTM-8.1.60.28-0
VERXML_C8SDK_name=Verxml C8SDK
.......

Cognos SDK -- drill down into a cube

Here is a C# Cognos SDK code snippet that shows the ability to drill down into a cube report by using the Cognos SDK.  Take note of the bolded code lines below.  You will need to use the Report Service's .drill method and pass in values for the drillOptionParameterValues property.
 
simpleParmValueItem item = new simpleParmValueItem();
                item.use = "[great_outdoors_company].[Years].[Years].[Year]->:[PC].[@MEMBER].[20050101-20051231]";
                item.inclusive = true;
 
option[] drillOptions = new option[1];
                drillOptionParameterValues d1 = new drillOptionParameterValues();
                d1.name = drillOptionEnum.down;
                d1.value = parameters;
                drillOptions[0] = d1;
 
response = this.rptService.drill(response.primaryRequest, parameters, drillOptions);
 
 
 
 
private void GoToDrillDown(reportService1 rptService)
        {
            if (this.rptService == null)
            {
                this.rptService = rptService;
            }
            String reportPath = "/content/package[@name='Great Outdoors Company']/report[@name='MyTestReport']";
           String savePath = "c:\\temp";
            parameterValue[] parameters = new parameterValue[1];
            asynchReply response;
            searchPathSingleObject reportPathObj = new searchPathSingleObject();
            reportPathObj.Value = reportPath;
            try
            {
                option[] runOptions = new option[6];

                runOptionBoolean saveOutput = new runOptionBoolean();
                saveOutput.name = runOptionEnum.saveOutput;
                saveOutput.value = false;
                runOptions[0] = saveOutput;

                // Specify the output format.
                runOptionStringArray outputFormat = new runOptionStringArray();
                outputFormat.name = runOptionEnum.outputFormat;
                outputFormat.value = new String[] { "HTML" };
                runOptions[1] = outputFormat;

                //Set the report not to prompt as we pass the parameters if any
                runOptionBoolean rop = new runOptionBoolean();
                rop.name = runOptionEnum.prompt;
                rop.value = false;
                runOptions[2] = rop;

                runOptionInt maxRows = new runOptionInt();
                maxRows.name = runOptionEnum.verticalElements;
                maxRows.value = 20;
                runOptions[3] = maxRows;

                option[] drillOptions = new option[1];
                drillOptionParameterValues d1 = new drillOptionParameterValues();
                d1.name = drillOptionEnum.down;
                d1.value = parameters;
                drillOptions[0] = d1;

                //Set the option to always have the primaryRequest in the response
                asynchOptionBoolean includePrimaryRequest = new asynchOptionBoolean();

                includePrimaryRequest.name = asynchOptionEnum.alwaysIncludePrimaryRequest;
                includePrimaryRequest.value = true;
                runOptions[4] = includePrimaryRequest;

                runOptionLanguageArray roOutputFormat = new runOptionLanguageArray();
                roOutputFormat.name = runOptionEnum.outputLocale;
                String[] fmt = { "en-us" };
                roOutputFormat.value = fmt;
                runOptions[5] = roOutputFormat;

                //Run the report
                response = this.rptService.run(reportPathObj, new parameterValue[] { }, runOptions);
                //If response is not immediately complete, call wait until complete
                if (!(response.status == (asynchReplyStatusEnum.complete)))
                {
                    while (!(response.status == asynchReplyStatusEnum.complete))
                    {
                        //before calling wait, double check that it is okay
                        if (hasSecondaryRequest(response, "wait"))
                        {
                            response =
                             this.rptService.wait(
                               response.primaryRequest,
                               new parameterValue[] { },
                               new option[] { });
                        }
                        else
                        {
                            Console.Write("Error: Wait method not available as expected.");
                            return;
                        }
                    }
                    //check if output is ready

                    if (outputIsReady(response))
                    {
                        response =
                         this.rptService.getOutput(response.primaryRequest, new parameterValue[] { },
                          new option[] { });
                    }
                    else
                    {
                        Console.Write("output is not ready!");
                    }
                }

                String data = getOutputPage(response);
                // Write the report output to file system
                Console.Write("Writing the output of the original report..");


                StreamWriter sw = File.CreateText(savePath + "\\original.html");
                sw.Write(data);
                sw.Flush();
                sw.Close();


                //Drill down in the report
                //set up drill down parameter.
                simpleParmValueItem item = new simpleParmValueItem();
                item.use = "[great_outdoors_company].[Years].[Years].[Year]->:[PC].[@MEMBER].[20050101-20051231]";
                item.inclusive = true;

                parmValueItem[] pvi = new parmValueItem[1];
                pvi[0] = item;

                parameters[0] = new parameterValue();
                parameters[0].name = "Year";
                parameters[0].value = pvi;

                response = this.rptService.drill(response.primaryRequest, parameters, drillOptions);

                if (!(response.status == (asynchReplyStatusEnum.complete)))
                {
                    while (!(response.status == asynchReplyStatusEnum.complete))
                    {
                        //before calling wait, double check that it is okay
                        if (hasSecondaryRequest(response, "wait"))
                        {
                            response =
                             this.rptService.wait(
                               response.primaryRequest,
                               new parameterValue[] { },
                               new option[] { });
                        }
                        else
                        {
                            Console.Write("Error: Wait method not available as expected.");
                            return;
                        }
                    }
                    //check if output is ready

                    if (outputIsReady(response))
                    {
                        response =
                         this.rptService.getOutput(response.primaryRequest, new parameterValue[] { },
                          new option[] { });
                    }
                    else
                    {
                        Console.Write("output is not ready!");
                    }
                }

                data = getOutputPage(response);
                // Write the report output to file system
                Console.Write("Writing the output of the drill down report..");


                StreamWriter sw2 = File.CreateText(savePath + "\\drilldown.html");
                sw2.Write(data);
                sw2.Flush();
                sw2.Close();


                // release the conversation to free resources.
                this.rptService.release(response.primaryRequest);

            }
            catch (Exception ex)
            {
                Console.WriteLine("Error: " + ex.Message.ToString());
                Console.WriteLine(ex.StackTrace);

            }
        }

Cognos SDK -- drill down into a cube

Here is a C# Cognos SDK code snippet that shows the ability to drill down into a cube report by using the Cognos SDK.  Take note of the bolded code lines below.  You will need to use the Report Service's .drill method and pass in values for the drillOptionParameterValues property.
 
simpleParmValueItem item = new simpleParmValueItem();
                item.use = "[great_outdoors_company].[Years].[Years].[Year]->:[PC].[@MEMBER].[20050101-20051231]";
                item.inclusive = true;
 
option[] drillOptions = new option[1];
                drillOptionParameterValues d1 = new drillOptionParameterValues();
                d1.name = drillOptionEnum.down;
                d1.value = parameters;
                drillOptions[0] = d1;
 
response = this.rptService.drill(response.primaryRequest, parameters, drillOptions);
 
 
 
 
private void GoToDrillDown(reportService1 rptService)
        {
            if (this.rptService == null)
            {
                this.rptService = rptService;
            }
            String reportPath = "/content/package[@name='Great Outdoors Company']/report[@name='MyTestReport']";
           String savePath = "c:\\temp";
            parameterValue[] parameters = new parameterValue[1];
            asynchReply response;
            searchPathSingleObject reportPathObj = new searchPathSingleObject();
            reportPathObj.Value = reportPath;
            try
            {
                option[] runOptions = new option[6];

                runOptionBoolean saveOutput = new runOptionBoolean();
                saveOutput.name = runOptionEnum.saveOutput;
                saveOutput.value = false;
                runOptions[0] = saveOutput;

                // Specify the output format.
                runOptionStringArray outputFormat = new runOptionStringArray();
                outputFormat.name = runOptionEnum.outputFormat;
                outputFormat.value = new String[] { "HTML" };
                runOptions[1] = outputFormat;

                //Set the report not to prompt as we pass the parameters if any
                runOptionBoolean rop = new runOptionBoolean();
                rop.name = runOptionEnum.prompt;
                rop.value = false;
                runOptions[2] = rop;

                runOptionInt maxRows = new runOptionInt();
                maxRows.name = runOptionEnum.verticalElements;
                maxRows.value = 20;
                runOptions[3] = maxRows;

                option[] drillOptions = new option[1];
                drillOptionParameterValues d1 = new drillOptionParameterValues();
                d1.name = drillOptionEnum.down;
                d1.value = parameters;
                drillOptions[0] = d1;

                //Set the option to always have the primaryRequest in the response
                asynchOptionBoolean includePrimaryRequest = new asynchOptionBoolean();

                includePrimaryRequest.name = asynchOptionEnum.alwaysIncludePrimaryRequest;
                includePrimaryRequest.value = true;
                runOptions[4] = includePrimaryRequest;

                runOptionLanguageArray roOutputFormat = new runOptionLanguageArray();
                roOutputFormat.name = runOptionEnum.outputLocale;
                String[] fmt = { "en-us" };
                roOutputFormat.value = fmt;
                runOptions[5] = roOutputFormat;

                //Run the report
                response = this.rptService.run(reportPathObj, new parameterValue[] { }, runOptions);
                //If response is not immediately complete, call wait until complete
                if (!(response.status == (asynchReplyStatusEnum.complete)))
                {
                    while (!(response.status == asynchReplyStatusEnum.complete))
                    {
                        //before calling wait, double check that it is okay
                        if (hasSecondaryRequest(response, "wait"))
                        {
                            response =
                             this.rptService.wait(
                               response.primaryRequest,
                               new parameterValue[] { },
                               new option[] { });
                        }
                        else
                        {
                            Console.Write("Error: Wait method not available as expected.");
                            return;
                        }
                    }
                    //check if output is ready

                    if (outputIsReady(response))
                    {
                        response =
                         this.rptService.getOutput(response.primaryRequest, new parameterValue[] { },
                          new option[] { });
                    }
                    else
                    {
                        Console.Write("output is not ready!");
                    }
                }

                String data = getOutputPage(response);
                // Write the report output to file system
                Console.Write("Writing the output of the original report..");


                StreamWriter sw = File.CreateText(savePath + "\\original.html");
                sw.Write(data);
                sw.Flush();
                sw.Close();


                //Drill down in the report
                //set up drill down parameter.
                simpleParmValueItem item = new simpleParmValueItem();
                item.use = "[great_outdoors_company].[Years].[Years].[Year]->:[PC].[@MEMBER].[20050101-20051231]";
                item.inclusive = true;

                parmValueItem[] pvi = new parmValueItem[1];
                pvi[0] = item;

                parameters[0] = new parameterValue();
                parameters[0].name = "Year";
                parameters[0].value = pvi;

                response = this.rptService.drill(response.primaryRequest, parameters, drillOptions);

                if (!(response.status == (asynchReplyStatusEnum.complete)))
                {
                    while (!(response.status == asynchReplyStatusEnum.complete))
                    {
                        //before calling wait, double check that it is okay
                        if (hasSecondaryRequest(response, "wait"))
                        {
                            response =
                             this.rptService.wait(
                               response.primaryRequest,
                               new parameterValue[] { },
                               new option[] { });
                        }
                        else
                        {
                            Console.Write("Error: Wait method not available as expected.");
                            return;
                        }
                    }
                    //check if output is ready

                    if (outputIsReady(response))
                    {
                        response =
                         this.rptService.getOutput(response.primaryRequest, new parameterValue[] { },
                          new option[] { });
                    }
                    else
                    {
                        Console.Write("output is not ready!");
                    }
                }

                data = getOutputPage(response);
                // Write the report output to file system
                Console.Write("Writing the output of the drill down report..");


                StreamWriter sw2 = File.CreateText(savePath + "\\drilldown.html");
                sw2.Write(data);
                sw2.Flush();
                sw2.Close();


                // release the conversation to free resources.
                this.rptService.release(response.primaryRequest);

            }
            catch (Exception ex)
            {
                Console.WriteLine("Error: " + ex.Message.ToString());
                Console.WriteLine(ex.StackTrace);

            }
        }

Cognos SDK example of getting a deployment package details

Hello, some people have been looking for information on how to access a deployment package by using the Cognos SDK.  Here is an example to that will capture a specified deployment package.  Don't forget that you can set the location of your deployment packages from within Cognos Configuration.
 
The 'Cognos SDK Guide by BI Centre' also discusses the Exception class that is used in this code in more detail.
 
 
 
public
baseClass[] getExportItems(string strNamespaceId)

{

//string export = "CAMID(\"" + strNamespaceId + "\")//Export";

string export = "/adminFolder/importDeployment[@name=''MY DEPLOYMENT PACKAGE"]";

propEnum[] props = new propEnum[] { propEnum.deployedObjectDefaultName, propEnum.defaultName, propEnum.searchPath };

baseClass[] exportObjects = new baseClass[] { };

searchPathMultipleObject spMulti = new searchPathMultipleObject();

spMulti.Value = export;

try

{

exportObjects = cmService.query(spMulti, props,

new sort[] { }, new queryOptions());

}

catch (SoapException exSoap)

{

SoapExceptionHandler objEx = new SoapExceptionHandler(exSoap);

MessageBox.Show(objEx.Details + objEx.Message + objEx.ErrorCode + objEx.Severity);

}

return exportObjects;

}

Cognos SDK example of getting a deployment package details

Hello, some people have been looking for information on how to access a deployment package by using the Cognos SDK.  Here is an example to that will capture a specified deployment package.  Don't forget that you can set the location of your deployment packages from within Cognos Configuration.
 
The 'Cognos SDK Guide by BI Centre' also discusses the Exception class that is used in this code in more detail.
 
 
 
public
baseClass[] getExportItems(string strNamespaceId)

{

//string export = "CAMID(\"" + strNamespaceId + "\")//Export";

string export = "/adminFolder/importDeployment[@name=''MY DEPLOYMENT PACKAGE"]";

propEnum[] props = new propEnum[] { propEnum.deployedObjectDefaultName, propEnum.defaultName, propEnum.searchPath };

baseClass[] exportObjects = new baseClass[] { };

searchPathMultipleObject spMulti = new searchPathMultipleObject();

spMulti.Value = export;

try

{

exportObjects = cmService.query(spMulti, props,

new sort[] { }, new queryOptions());

}

catch (SoapException exSoap)

{

SoapExceptionHandler objEx = new SoapExceptionHandler(exSoap);

MessageBox.Show(objEx.Details + objEx.Message + objEx.ErrorCode + objEx.Severity);

}

return exportObjects;

}

Looking for a Cognos job?

 
 

Looking for a Cognos job?

 
 

Cognos 8 -- dynamically change a report's datasource

Do you have an audit based report that you use for both your DEV and PROD environments, and you want to use the same report schema but have the flexibility to dynamically change your datasource connection?

You can use 'Prompt Macros' to allow the user to select the desired data source. The macro should be placed within each Query Subject.

From within Framework Manager, you should modify each Query Subject to replace the data source name to a prompt. For instance,

MODIFY

Select * from [GOSL].CONVERSION_RATE


TO

Select * from # prompt('Select Datasource','token') # .CONVERSION_RATE

When prompted for the data source name, you must enclose it in square brackets. i.e. [gosales]

Cognos 8 -- dynamically change a report's datasource

Do you have an audit based report that you use for both your DEV and PROD environments, and you want to use the same report schema but have the flexibility to dynamically change your datasource connection?

You can use 'Prompt Macros' to allow the user to select the desired data source. The macro should be placed within each Query Subject.

From within Framework Manager, you should modify each Query Subject to replace the data source name to a prompt. For instance,

MODIFY

Select * from [GOSL].CONVERSION_RATE


TO

Select * from # prompt('Select Datasource','token') # .CONVERSION_RATE

When prompted for the data source name, you must enclose it in square brackets. i.e. [gosales]

Cognos 8 SDK -- optional parameters

Cognos 8 SDK example of dealing with optional parameters

Cognos 8 SDK -- optional parameters

Cognos 8 SDK example of dealing with optional parameters

Cognos 8.3 -- upgrading?

Here are some of the changes that you'll encounter when developing in Cognos 8.3

1. When a query returns no data, you can now choose to provide a message or to remove the data item from the report. The new No Data Contents property was added to many data containers such as lists, crosstabs, and charts. You can also choose to not render the entire report page if all the data containers on the page do not contain any data.


2. A series of new functions were added in the expression editor to make report expressions more powerful. The new functions give you the flexibility to create report expressions for reporting and conditional processing. Thy include a new mathematical function named mod(), time-based functions, and conversion functions. Of interest to PowerCube users are the cube variables that can now be added to report output. The double2string( ) function can be used in data type conversions.
The following functions return the named PowerCube properties:
● CubeName( )
● CubeDescription( )
● CubePath( )
● CubeCreatedOn( )
● CubeDataUpdatedOn( )
● CubeSchemaUpdatedOn( )
● CubeIsOptimized( )
● CubeDefaultMeasure( )
● CubeCurrentPeriod( )
● CellValue( )


3. Reports can now span two or more page widths in a PDF. This is useful when you want wide data in lists and crosstabs to show in its original size. The fit-to-page option from previous releases is still available. You decide for each list or crosstab which items span across pages and which items shrink to fit a single page.


4. The Microsoft Excel 2000 format for report outputs is deprecated in version 8.3.

Cognos 8.3 -- upgrading?

Here are some of the changes that you'll encounter when developing in Cognos 8.3

1. When a query returns no data, you can now choose to provide a message or to remove the data item from the report. The new No Data Contents property was added to many data containers such as lists, crosstabs, and charts. You can also choose to not render the entire report page if all the data containers on the page do not contain any data.


2. A series of new functions were added in the expression editor to make report expressions more powerful. The new functions give you the flexibility to create report expressions for reporting and conditional processing. Thy include a new mathematical function named mod(), time-based functions, and conversion functions. Of interest to PowerCube users are the cube variables that can now be added to report output. The double2string( ) function can be used in data type conversions.
The following functions return the named PowerCube properties:
● CubeName( )
● CubeDescription( )
● CubePath( )
● CubeCreatedOn( )
● CubeDataUpdatedOn( )
● CubeSchemaUpdatedOn( )
● CubeIsOptimized( )
● CubeDefaultMeasure( )
● CubeCurrentPeriod( )
● CellValue( )


3. Reports can now span two or more page widths in a PDF. This is useful when you want wide data in lists and crosstabs to show in its original size. The fit-to-page option from previous releases is still available. You decide for each list or crosstab which items span across pages and which items shrink to fit a single page.


4. The Microsoft Excel 2000 format for report outputs is deprecated in version 8.3.

Cognos 8.3 -- Framework Manager -- Model objects and shortcuts

The main difference between model objects and shortcuts is that model objects give you the freedom to include or exclude items and to rename them. You may choose to use model objects instead of shortcuts if you need to limit the query items included or to change the names of items.

Shortcuts are less flexible from a presentation perspective than model objects, but they require much less maintenance because they are automatically updated when the target object is updated. If maintenance is a key concern and there is no need to customize the appearance of the query subject, use shortcuts.

Framework Manager has two types of shortcuts:

● regular shortcuts, which are a simple reference to the target object.
● alias shortcuts, which behave as if they were a copy of the original object with completely independent behavior.

Alias shortcuts are available only for query subjects and dimensions. Regular shortcuts are typically used as conformed dimensions with star schema groups, creating multiple references with the exact same name and appearance in multiple places. Alias shortcuts are typically used in role-playing dimensions or shared tables.

Being able to specify the behavior of shortcuts is new to Cognos 8.3. When you open a model from a previous release, the Shortcut Processing governor is set to
Automatic. When Automatic is used, shortcuts work the same as in previous releases, that is, a shortcut that exists in the same folder as its target behaves as an alias, or independent instance, whereas a shortcut existing elsewhere in the model behaves as a reference to the original. To take advantage of the Treat As property, it is recommended that you verify the model and, when repairing, change the governor to Explicit. The repair operation changes all shortcuts to the correct value from the Treat As property based on the rules followed by the Automatic setting, this means that there should be no change in behavior of your model unless you choose to make one or more changes to the Treat As properties of your shortcuts.

When you create a new model, the Shortcut Processing governor is always set to Explicit. When the governor is set to Explicit, the shortcut behavior is taken from the Treat As property and you have complete control over how shortcuts behave without being concerned about where in the model they are located.

Cognos 8.3 -- Framework Manager -- Model objects and shortcuts

The main difference between model objects and shortcuts is that model objects give you the freedom to include or exclude items and to rename them. You may choose to use model objects instead of shortcuts if you need to limit the query items included or to change the names of items.

Shortcuts are less flexible from a presentation perspective than model objects, but they require much less maintenance because they are automatically updated when the target object is updated. If maintenance is a key concern and there is no need to customize the appearance of the query subject, use shortcuts.

Framework Manager has two types of shortcuts:

● regular shortcuts, which are a simple reference to the target object.
● alias shortcuts, which behave as if they were a copy of the original object with completely independent behavior.

Alias shortcuts are available only for query subjects and dimensions. Regular shortcuts are typically used as conformed dimensions with star schema groups, creating multiple references with the exact same name and appearance in multiple places. Alias shortcuts are typically used in role-playing dimensions or shared tables.

Being able to specify the behavior of shortcuts is new to Cognos 8.3. When you open a model from a previous release, the Shortcut Processing governor is set to
Automatic. When Automatic is used, shortcuts work the same as in previous releases, that is, a shortcut that exists in the same folder as its target behaves as an alias, or independent instance, whereas a shortcut existing elsewhere in the model behaves as a reference to the original. To take advantage of the Treat As property, it is recommended that you verify the model and, when repairing, change the governor to Explicit. The repair operation changes all shortcuts to the correct value from the Treat As property based on the rules followed by the Automatic setting, this means that there should be no change in behavior of your model unless you choose to make one or more changes to the Treat As properties of your shortcuts.

When you create a new model, the Shortcut Processing governor is always set to Explicit. When the governor is set to Explicit, the shortcut behavior is taken from the Treat As property and you have complete control over how shortcuts behave without being concerned about where in the model they are located.

Cognos 8 -- planning your model

If you are modeling a normalized data source, you may become interested in generating Minimized SQL for your model. Minimized SQL will help to reduce the number of tables used in some requests and it can aid in performance.

You should consider creating relationships and determinants between the data source query subjects, and then create model query subjects that do not have relationships.

Some FM model developers believe that if you do not have relationships between objects, you cannot create star schema groups. This is not necessarily true. You can select the model query subjects to include in the group and use the Star Schema Grouping wizard. In addition, you can create shortcuts and move them to a new namespace in your model. There is no need to have shortcuts to the relationships; this feature is purely visual in the diagram. The affect on query generation and presentation in the both Query Studio and Report Studio is the same.

Cognos 8 -- planning your model

If you are modeling a normalized data source, you may become interested in generating Minimized SQL for your model. Minimized SQL will help to reduce the number of tables used in some requests and it can aid in performance.

You should consider creating relationships and determinants between the data source query subjects, and then create model query subjects that do not have relationships.

Some FM model developers believe that if you do not have relationships between objects, you cannot create star schema groups. This is not necessarily true. You can select the model query subjects to include in the group and use the Star Schema Grouping wizard. In addition, you can create shortcuts and move them to a new namespace in your model. There is no need to have shortcuts to the relationships; this feature is purely visual in the diagram. The affect on query generation and presentation in the both Query Studio and Report Studio is the same.

Cognos 8 -- Framework Manager executing SPROCS

Hello, if you're using SQL Server stored procedures (SPROCS) in your Cognos 8 Framework Manager model as the source for your model's query subjects, then you should make sure that you have a valid user signon defined in Cognos Connection that has the proper permissions to execute the SPROC.

If not, then you may a recieve an error similar to the following:

RQP-DEF-0177 An error occurred while performing operation 'sqlExecute'

Cognos 8 -- Framework Manager executing SPROCS

Hello, if you're using SQL Server stored procedures (SPROCS) in your Cognos 8 Framework Manager model as the source for your model's query subjects, then you should make sure that you have a valid user signon defined in Cognos Connection that has the proper permissions to execute the SPROC.

If not, then you may a recieve an error similar to the following:

RQP-DEF-0177 An error occurred while performing operation 'sqlExecute'

Cognos 8 -- issue with browsing images in Report Studio

If you have added an image to your Cognos Report Studio report page and when you attempt to browse your directory for an image file to apply you may encounter an error message stating that you don't have the proper permissions.  If you are using IIS for your web server then you should attempt the following fix:

  1. If you are using Microsoft Internet Information Services (IIS), enable the Read and Directory Browsing properties for the URL you want to access:
  2. Open the Control Panel and double-click Internet Services Manager.
  • Right-click the directory that points to the folder containing the image you want to insert and click Properties. If no directory exists for the folder, create one and point it to the folder.
  • In the Virtual Directory or Directory tab, select the Read and Directory Browsing check boxes and click OK.

Cognos 8 -- issue with browsing images in Report Studio

If you have added an image to your Cognos Report Studio report page and when you attempt to browse your directory for an image file to apply you may encounter an error message stating that you don't have the proper permissions.  If you are using IIS for your web server then you should attempt the following fix:

  1. If you are using Microsoft Internet Information Services (IIS), enable the Read and Directory Browsing properties for the URL you want to access:
  2. Open the Control Panel and double-click Internet Services Manager.
  • Right-click the directory that points to the folder containing the image you want to insert and click Properties. If no directory exists for the folder, create one and point it to the folder.
  • In the Virtual Directory or Directory tab, select the Read and Directory Browsing check boxes and click OK.

Cognos SDK Guide by BI Centre Sample?

Check out the link below if you're interested in getting a free preview of the Cognos SDK Guide by BI Centre.

Free Preview

Cognos SDK Guide by BI Centre Sample?

Check out the link below if you're interested in getting a free preview of the Cognos SDK Guide by BI Centre.

Free Preview

Cognos 8 -- Log Messaging

You can take advantage of the log messaging facility within Cognos 8 to help investigate or diagnose the behaviour of the Cognos 8 BI system.  You can configure the log servers in both a single or multi server environment.
 
The log messages are generated by the various components, filtered by level, and directed to one or more destinations by the log server.  A log server is automatically installed when you install the Content Manager or report server.  There are 3 main types of messages that can be created:
 
1.  Audit logging -- calls that are made from components
2.  Trace logging -- shows which tasks are being performed
3.  Performance logging -- amount of system resources required for a task
 
If you do use the Audit logging then you should ensure that you set up the Audit database and use the canned reports that comes with the Audit package.  You should also become familiar with the cogserver.log located in your install's /log folder.
 
Cognos has a utility that is included with your install that doesn't appear to receive support.  It is the logconsole.exe, which is also located in the /logs folder.  This is a utility that can be used to view the log messages and to turn on/off levels of logging.  You can use this utility to help capture the SQL that is being generated when a report is run.
 
To log or not to log, it's not really a question! 

Cognos 8 -- Log Messaging

You can take advantage of the log messaging facility within Cognos 8 to help investigate or diagnose the behaviour of the Cognos 8 BI system.  You can configure the log servers in both a single or multi server environment.
 
The log messages are generated by the various components, filtered by level, and directed to one or more destinations by the log server.  A log server is automatically installed when you install the Content Manager or report server.  There are 3 main types of messages that can be created:
 
1.  Audit logging -- calls that are made from components
2.  Trace logging -- shows which tasks are being performed
3.  Performance logging -- amount of system resources required for a task
 
If you do use the Audit logging then you should ensure that you set up the Audit database and use the canned reports that comes with the Audit package.  You should also become familiar with the cogserver.log located in your install's /log folder.
 
Cognos has a utility that is included with your install that doesn't appear to receive support.  It is the logconsole.exe, which is also located in the /logs folder.  This is a utility that can be used to view the log messages and to turn on/off levels of logging.  You can use this utility to help capture the SQL that is being generated when a report is run.
 
To log or not to log, it's not really a question! 

Cognos SDK -- new item from Cognos

 
Hello, if you have a Cognos Support account and if you use the Cognos SDK then you should check out the link above.  It talks about creating a Cognos SDK utility to retrieve user security reports.

Cognos SDK -- new item from Cognos

 
Hello, if you have a Cognos Support account and if you use the Cognos SDK then you should check out the link above.  It talks about creating a Cognos SDK utility to retrieve user security reports.

Cognos 8 -- validate a Framework Manager model

When you validate a model in Framework Manager you may encounter a series of new Warning messages. 

The following warnings commonly appear when you check a model:

• Needs reevaluation

This message is most likely related to data type changes.  The majority of items with this warning can be selected for repair. The repair option steps you

through your options for evaluating and upgrading specific elements of metadata. 

Tip:

You can also evaluate a query subject by using the Evaluate Object command from the Tools menu.

• Join expression conflicts with the determinant information defined in the query subject

Sometimes the index and key information specified for a query subject implies a level of granularity that does not match the relationships specified on a query subject.

• None of the query items in this level have a role Caption specified

When defining levels, you must ensure that a business key and caption roles are specified.  These roles are relevant for member functions in the report authoring tools and to assist in the member-oriented tree in Analysis Studio.  All captions must have the string data type. If there is no attribute of this type available, create a calculation that is a string data type and assign the member caption role to the new item.  This is primarily an issue for Analysis Studio.

• One or more determinants that describe the keys and attributes of the query subject should be specified

When importing from a relational data source, determinants are specified for any indexes and keys that exist in the data source. It is possible that no determinants exist on a query subject upgraded from ReportNet 1.x, especially for model query subjects. We recommend that you use determinants to explicitly specify the granularity of the data in the query subject and the functional dependencies between query items. However, it is not mandatory to specify determinants for query subjects representing a single level or fact data. Determinants are required only if the item is a BLOB data type.

Cognos 8 -- validate a Framework Manager model

When you validate a model in Framework Manager you may encounter a series of new Warning messages. 

The following warnings commonly appear when you check a model:

• Needs reevaluation

This message is most likely related to data type changes.  The majority of items with this warning can be selected for repair. The repair option steps you

through your options for evaluating and upgrading specific elements of metadata. 

Tip:

You can also evaluate a query subject by using the Evaluate Object command from the Tools menu.

• Join expression conflicts with the determinant information defined in the query subject

Sometimes the index and key information specified for a query subject implies a level of granularity that does not match the relationships specified on a query subject.

• None of the query items in this level have a role Caption specified

When defining levels, you must ensure that a business key and caption roles are specified.  These roles are relevant for member functions in the report authoring tools and to assist in the member-oriented tree in Analysis Studio.  All captions must have the string data type. If there is no attribute of this type available, create a calculation that is a string data type and assign the member caption role to the new item.  This is primarily an issue for Analysis Studio.

• One or more determinants that describe the keys and attributes of the query subject should be specified

When importing from a relational data source, determinants are specified for any indexes and keys that exist in the data source. It is possible that no determinants exist on a query subject upgraded from ReportNet 1.x, especially for model query subjects. We recommend that you use determinants to explicitly specify the granularity of the data in the query subject and the functional dependencies between query items. However, it is not mandatory to specify determinants for query subjects representing a single level or fact data. Determinants are required only if the item is a BLOB data type.

Cognos 8 -- Framework Manager macro to get user identity info

Here are a couple of FM macros that I came across while trying to find all users that belong in the Administrators group.  My requirement was to render a pie chart to the user on the Report Studio report page if they belonged to a specific Finance group.
 
CAMIDList

Returns the pieces of the user's identity (account name, group names, role names) as a list of

values separated by commas.

Syntax

CAMIDList ( [ separator_string ] )

Example

#CAMIDList ( )#

Result: CAMID("::Everyone"), CAMID(":Authors"), CAMID(":Query Users"),

CAMID(":Consumers"), CAMID(":Metrics Authors")
 
 

CSVIdentityName

Use the identity information of the current authenticated user to lookup values in the specified

parameter map. Each individual piece of the user's identity (account name, group names, role

names) is used as a key into the map. The unique list of values that is retrieved from the map is

then returned as a string, where each value is surrounded by single quotes and where multiple

values are separated by commas.

Syntax

CSVIdentityName ( %parameter_map_name [ , separator_string ] )

Example

#CSVIdentityName ( %security_clearance_level_map )#

Result: 'level_500' , 'level_501' , 'level_700'

 

CSVIdentityNameList

Returns the pieces of the user's identity (account name, group names, role names) as a list of

strings. The unique list of values is returned as a string, where each value is surrounded by single

quotes and where multiple values are separated by commas.

Syntax

CSVIdentityNameList ( [ separator_string ] )

Example

#CSVIdentityNameList ( )#

Result: 'Everyone' , 'Report Administrators' , 'Query User'

Cognos 8 -- Framework Manager macro to get user identity info

Here are a couple of FM macros that I came across while trying to find all users that belong in the Administrators group.  My requirement was to render a pie chart to the user on the Report Studio report page if they belonged to a specific Finance group.
 
CAMIDList

Returns the pieces of the user's identity (account name, group names, role names) as a list of

values separated by commas.

Syntax

CAMIDList ( [ separator_string ] )

Example

#CAMIDList ( )#

Result: CAMID("::Everyone"), CAMID(":Authors"), CAMID(":Query Users"),

CAMID(":Consumers"), CAMID(":Metrics Authors")
 
 

CSVIdentityName

Use the identity information of the current authenticated user to lookup values in the specified

parameter map. Each individual piece of the user's identity (account name, group names, role

names) is used as a key into the map. The unique list of values that is retrieved from the map is

then returned as a string, where each value is surrounded by single quotes and where multiple

values are separated by commas.

Syntax

CSVIdentityName ( %parameter_map_name [ , separator_string ] )

Example

#CSVIdentityName ( %security_clearance_level_map )#

Result: 'level_500' , 'level_501' , 'level_700'

 

CSVIdentityNameList

Returns the pieces of the user's identity (account name, group names, role names) as a list of

strings. The unique list of values is returned as a string, where each value is surrounded by single

quotes and where multiple values are separated by commas.

Syntax

CSVIdentityNameList ( [ separator_string ] )

Example

#CSVIdentityNameList ( )#

Result: 'Everyone' , 'Report Administrators' , 'Query User'

Cognos 8 -- using DOS command to start or stop Cognos service

Open the registry to this key :
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services

Search [F3] for the executable of your service.
Check for the key "DisplayName" wich is the name of the service.

Then use the DOS command:
net start Service
Where Service is the value found in "DisplayName".

Cognos 8 -- using DOS command to start or stop Cognos service

Open the registry to this key :
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services

Search [F3] for the executable of your service.
Check for the key "DisplayName" wich is the name of the service.

Then use the DOS command:
net start Service
Where Service is the value found in "DisplayName".

Cognos 8 BI and Microsoft

 
If you are exploring whether or not Cognos is compatible with your planned project architecture then you should review the link noted above.  This could also help to answer some of your questions if you're planning a Cognos SDK project.
 
 

Cognos 8 BI and Microsoft

 
If you are exploring whether or not Cognos is compatible with your planned project architecture then you should review the link noted above.  This could also help to answer some of your questions if you're planning a Cognos SDK project.
 
 

Cognos SDK Guide by BI Centre Update!

 
This blog entry discusses the rendering of the report output to the end user in their ASP.NET C# web solution by using the Cognos SDK.

Cognos SDK Guide by BI Centre Update!

 
This blog entry discusses the rendering of the report output to the end user in their ASP.NET C# web solution by using the Cognos SDK.

Cognos 8 Logging Levels

If you're involved with troubleshooting your Cognos 8 environment then you should become familiar with your logging tools.  From within Cognos Connection you can set the logging levels for your C8 environment.  This will allow key information such as user logons, error messages, and report requests to be captured in the log files such as cogserver.log. 
 
You would set the level of detail to log through the Server Administration tool.  It will provide you with 5 levels of logging -- Minimal, Basic, Request, Trace, Full.  You should review the performance impact on your environment before keeping the selected logging level.  It would be a safe assumption that a FULL logging setting should not be applied to your PRODUCTION environment.  It is recommended to set your environments to either Basic or Request logging levels.

Cognos 8 Logging Levels

If you're involved with troubleshooting your Cognos 8 environment then you should become familiar with your logging tools.  From within Cognos Connection you can set the logging levels for your C8 environment.  This will allow key information such as user logons, error messages, and report requests to be captured in the log files such as cogserver.log. 
 
You would set the level of detail to log through the Server Administration tool.  It will provide you with 5 levels of logging -- Minimal, Basic, Request, Trace, Full.  You should review the performance impact on your environment before keeping the selected logging level.  It would be a safe assumption that a FULL logging setting should not be applied to your PRODUCTION environment.  It is recommended to set your environments to either Basic or Request logging levels.

Cognos 8 Three Tiered Architecture

Cognos 8 Three Tiered Architecture

 

The Cognos 8 BI can be considered to be separated into a 3 tier architecture layout.

 

1st tier – Web Server

2nd tier – Applications

3rd tier – Data

 

The tiers are based on component function, and are normally separated by firewalls.  The C8 user interface rests above the tiers.  Primarily, the communication between the tier components is based on the both the SOAP and HTTP protocols.  Third party applications can use either a URL API or the SOAP API.  The SOAP API uses the BI Bus to move information from one service to another by moving the packets of data.

 

The 1st tier (Web Server) hosts the Cognos gateway, which: encrypts and decrypts passwords; extracts information needed to submit the request to a Cognos BI server; attaches environment variables for the Web server; adds a default namespace to the request to help ensure that the server authenticates the user in the correct namespace; and passes requests to a Cognos 8 BI dispatcher for processing.

 

The 2nd tier (Applications) hosts the Cognos 8 BI server and its associated services.  It is comprised of: Application Tier Components, Content Manager, and Bootstrap service.

 

The 3rd tier (Data) contains the Content Store, Data Sources, Metric Store

Cognos 8 Three Tiered Architecture

Cognos 8 Three Tiered Architecture

 

The Cognos 8 BI can be considered to be separated into a 3 tier architecture layout.

 

1st tier – Web Server

2nd tier – Applications

3rd tier – Data

 

The tiers are based on component function, and are normally separated by firewalls.  The C8 user interface rests above the tiers.  Primarily, the communication between the tier components is based on the both the SOAP and HTTP protocols.  Third party applications can use either a URL API or the SOAP API.  The SOAP API uses the BI Bus to move information from one service to another by moving the packets of data.

 

The 1st tier (Web Server) hosts the Cognos gateway, which: encrypts and decrypts passwords; extracts information needed to submit the request to a Cognos BI server; attaches environment variables for the Web server; adds a default namespace to the request to help ensure that the server authenticates the user in the correct namespace; and passes requests to a Cognos 8 BI dispatcher for processing.

 

The 2nd tier (Applications) hosts the Cognos 8 BI server and its associated services.  It is comprised of: Application Tier Components, Content Manager, and Bootstrap service.

 

The 3rd tier (Data) contains the Content Store, Data Sources, Metric Store