Purchase your Section 508 Compliance Support guide now!

Purchase your Section 508 Compliance Support guide now!

Cognos 8 Report Studio -- upgrade package items from within Cognos Connection

In Cognos 8 MR2 and higher you can update all objects based on a package by creating a 'Report Upgrade Task' from within Cognos Connection.  

 

In order to do this go to:

 

  • Tools / Content Administration / ‘New Report Upgrade' from within the new content maintenance dropdown in the button bar.
  • Enter a name that represents the objects that you will upgrade
  • Select the items that you want to upgrade by navigating to their folder location and adding them to the ‘selected entries’ panel on the right side.
  • Click OK / Next / Finish
  • Click Run if you want to execute this task now
  • [I always check the box for view details] / Click OK

 

 

Cognos 8 Report Studio -- upgrade package items from within Cognos Connection

In Cognos 8 MR2 and higher you can update all objects based on a package by creating a 'Report Upgrade Task' from within Cognos Connection.  

 

In order to do this go to:

 

  • Tools / Content Administration / ‘New Report Upgrade' from within the new content maintenance dropdown in the button bar.
  • Enter a name that represents the objects that you will upgrade
  • Select the items that you want to upgrade by navigating to their folder location and adding them to the ‘selected entries’ panel on the right side.
  • Click OK / Next / Finish
  • Click Run if you want to execute this task now
  • [I always check the box for view details] / Click OK

 

 

Cognos 8 SDK -- Groups

You may be tasked with finding all groups that a particular Congos user belongs to for another piece of your Cognos SDK functionality.  If so, then you should note the difference in values between the default namespace entry of “:” and specifying a specific namespace id value.  I was only able to expose the Everyone group after setting the defaut namespace id value to “:”

 

 

 

public baseClass[] getGroups(string strNamespaceId)

        {

            string groups = "CAMID(\"" + strNamespaceId + "\")//group";

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

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

            searchPathMultipleObject spMulti = new searchPathMultipleObject();

            spMulti.Value = groups;

 

            try{

                groupObjects = 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);

            }

 

            string[] groupSeachPaths = new string[groupObjects.Length];

 

            if (groupObjects.Length == 0)

            {

                MessageBox.Show("there were no Groups found");

            }

 

            return groupObjects;

        }

 

Cognos 8 SDK -- Groups

You may be tasked with finding all groups that a particular Congos user belongs to for another piece of your Cognos SDK functionality.  If so, then you should note the difference in values between the default namespace entry of “:” and specifying a specific namespace id value.  I was only able to expose the Everyone group after setting the defaut namespace id value to “:”

 

 

 

public baseClass[] getGroups(string strNamespaceId)

        {

            string groups = "CAMID(\"" + strNamespaceId + "\")//group";

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

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

            searchPathMultipleObject spMulti = new searchPathMultipleObject();

            spMulti.Value = groups;

 

            try{

                groupObjects = 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);

            }

 

            string[] groupSeachPaths = new string[groupObjects.Length];

 

            if (groupObjects.Length == 0)

            {

                MessageBox.Show("there were no Groups found");

            }

 

            return groupObjects;

        }

 

Cognos Business Intelligence Comptency Centre (BICC) -- QUESTION for you!

Hello, I’m in the process of establishing a BICC within my organization and I’m facing the obstacle of – change.  As in most organizations, I need to justify why a BICC would be more beneficial than multiple environments with multiple Cognos resources all doing the same task. 

 

I need to identify, from a management perspective, how employee X will no longer be spending 100% on Cognos task A or B because that task would ideally be the responsibility of the BICC.

 

I would love to hear your lessons learned because our organization is looking to introduce the BICC concept to our business lines within the next month and I need to be prepared to field some questions.  Feel free to email me at businessintelligencecentre@gmail.com with your experience establishing a BICC.

 

Thank you.

Cognos Business Intelligence Comptency Centre (BICC) -- QUESTION for you!

Hello, I’m in the process of establishing a BICC within my organization and I’m facing the obstacle of – change.  As in most organizations, I need to justify why a BICC would be more beneficial than multiple environments with multiple Cognos resources all doing the same task. 

 

I need to identify, from a management perspective, how employee X will no longer be spending 100% on Cognos task A or B because that task would ideally be the responsibility of the BICC.

 

I would love to hear your lessons learned because our organization is looking to introduce the BICC concept to our business lines within the next month and I need to be prepared to field some questions.  Feel free to email me at businessintelligencecentre@gmail.com with your experience establishing a BICC.

 

Thank you.

Cognos Report Studio -- Display custom message when no rows returned

Your end users may appreciate the ability to have a message returned when there is no related data for their search.  It could give them a nice, warm and fuzzy feeling knowing that they did perform the correct steps but unfortunately there just was no data. 

From within Cognos Report Studio you would have to create a footer for the list with the custom message.  You would then make it conditional based upon the number of rows returned.  If the number of rows returned is not greater than 0, then the report would show your custom message.

 

Here are the steps to achieve this task:

  1. From within Cognos Report Studio you would create a list report and select the list using the select ancestor tool in the properties panel.
  2. Create a List Footer and select the text item in the List Footer. Modify it to the custom message you want, ie: “There are no records for your selection”.
  3. Create a new boolean variable. Using the Cognos Report Studio built-in function RowNumber(), create the following expression: RowNumber() > 0
  4. Select the List Footer in the list in your report and set the Conditional Style in the properties panel to use the variable you just created.
  5. Using the Conditional Explorer select the "Yes" value from your variable.
  6. Set the "Box Type" property for the List Footer to "None".
  7. Change the "Border" property to be style set to "None" on all sides and apply
  8. Turn off the Conditional Explorer and use a prompt or filter to test your report.

Cognos Report Studio -- Display custom message when no rows returned

Your end users may appreciate the ability to have a message returned when there is no related data for their search.  It could give them a nice, warm and fuzzy feeling knowing that they did perform the correct steps but unfortunately there just was no data. 

From within Cognos Report Studio you would have to create a footer for the list with the custom message.  You would then make it conditional based upon the number of rows returned.  If the number of rows returned is not greater than 0, then the report would show your custom message.

 

Here are the steps to achieve this task:

  1. From within Cognos Report Studio you would create a list report and select the list using the select ancestor tool in the properties panel.
  2. Create a List Footer and select the text item in the List Footer. Modify it to the custom message you want, ie: “There are no records for your selection”.
  3. Create a new boolean variable. Using the Cognos Report Studio built-in function RowNumber(), create the following expression: RowNumber() > 0
  4. Select the List Footer in the list in your report and set the Conditional Style in the properties panel to use the variable you just created.
  5. Using the Conditional Explorer select the "Yes" value from your variable.
  6. Set the "Box Type" property for the List Footer to "None".
  7. Change the "Border" property to be style set to "None" on all sides and apply
  8. Turn off the Conditional Explorer and use a prompt or filter to test your report.

Cognos 8 Framework Manager -- setting object security

Extract from “Securing the Cognos 8 Environment

 

Add or Remove Object Security within Cognos 8 Framework Manager

 

“Metadata security can be applied directly to objects in a project. When you add object-based security, you apply a specific user, group, or role directly to the object. You choose to make the object visible to selected users or groups.  If you do not set object-based security, all objects in your project are visible to everyone who has access to the package. When you apply security to one object, all objects in the model will also have security applied to them. They will not be visible to anyone. Once you set security for one object, you need to set it for all objects.  You can make every object in a main project namespace visible to selected users, groups or roles, except relationships. For example, in your project, you may have a Salary query subject. You can make the Salary query subject visible to the Managers group, and keep it hidden from everyone else. 

 

If a user is a member of multiple user groups and an object is visible to one user group and denied to the other, the user will not have access to the object. For example, Jane belongs to two user groups: Sales and Marketing.  The Sales group has access to the Products and Sales query subjects, and denied access to the Sales Forecast query subject. The Marketing group has access to Products, Sales and Sales Forecast query subjects. Jane will not have access to Sales Forecast. 

 

When you secure an object, a package is automatically created in Framework Manager. The package name consists of an underscore (_) and the name if the secured object. These object-based packages are visible in the Explorer.  You can use this package to see which objects in the project are included, hidden, or excluded from a specific user group.  Every time you include that object in a package, and publish it for report

authors, the same security rules apply for that object. When you publish a package that contains secured objects, the visible objects for users are the intersection of the package definition and the object security settings. If object-based security is not used, security to a package remains unchanged.”

Cognos 8 Framework Manager -- setting object security

Extract from “Securing the Cognos 8 Environment

 

Add or Remove Object Security within Cognos 8 Framework Manager

 

“Metadata security can be applied directly to objects in a project. When you add object-based security, you apply a specific user, group, or role directly to the object. You choose to make the object visible to selected users or groups.  If you do not set object-based security, all objects in your project are visible to everyone who has access to the package. When you apply security to one object, all objects in the model will also have security applied to them. They will not be visible to anyone. Once you set security for one object, you need to set it for all objects.  You can make every object in a main project namespace visible to selected users, groups or roles, except relationships. For example, in your project, you may have a Salary query subject. You can make the Salary query subject visible to the Managers group, and keep it hidden from everyone else. 

 

If a user is a member of multiple user groups and an object is visible to one user group and denied to the other, the user will not have access to the object. For example, Jane belongs to two user groups: Sales and Marketing.  The Sales group has access to the Products and Sales query subjects, and denied access to the Sales Forecast query subject. The Marketing group has access to Products, Sales and Sales Forecast query subjects. Jane will not have access to Sales Forecast. 

 

When you secure an object, a package is automatically created in Framework Manager. The package name consists of an underscore (_) and the name if the secured object. These object-based packages are visible in the Explorer.  You can use this package to see which objects in the project are included, hidden, or excluded from a specific user group.  Every time you include that object in a package, and publish it for report

authors, the same security rules apply for that object. When you publish a package that contains secured objects, the visible objects for users are the intersection of the package definition and the object security settings. If object-based security is not used, security to a package remains unchanged.”

Cognos 8 Framework Manager -- what is metadata caching?

What is metadata caching?

 

When modeling and maintaining a model in Cognos 8 Framework Manager it is important to consider the potential impact of metadata caching.  Metadata, in the context of Framework Manager, is all the information stored within your Cognos model that describes the objects within a datasource and the manipulated objects created from your datasource.  In most standard scenarios all the properties required to describe an object in Framework Manager will be captured during the import from a datasource.

 

However, there are times when changes to the model will result in query subjects that could potentially have varying properties.  In cases where the metadata cannot be cached in the model then when running a report the information must be fetched from the datasource directly. Once the information is fetched from the datasource it will be cached for the duration of the connection to the datasource. It is important to note that retrieving the metadata from a datasource can add overhead to your complex reports.

 

Cognos 8 Framework Manager -- what is metadata caching?

What is metadata caching?

 

When modeling and maintaining a model in Cognos 8 Framework Manager it is important to consider the potential impact of metadata caching.  Metadata, in the context of Framework Manager, is all the information stored within your Cognos model that describes the objects within a datasource and the manipulated objects created from your datasource.  In most standard scenarios all the properties required to describe an object in Framework Manager will be captured during the import from a datasource.

 

However, there are times when changes to the model will result in query subjects that could potentially have varying properties.  In cases where the metadata cannot be cached in the model then when running a report the information must be fetched from the datasource directly. Once the information is fetched from the datasource it will be cached for the duration of the connection to the datasource. It is important to note that retrieving the metadata from a datasource can add overhead to your complex reports.

 

Cognos 8 -- Report Studio Comments box

I came across a posting on http://businessintelligence.ittoolbox.com that discussed adding an editable comment box for a Cognos Report Studio report. 

 

Here is how this could be implemented in Cognos 8 by using .ASP pages.

 

  1. Update your database source to contain an additional column named “Comments”.

 

  1. Update your Framework Manager model to have an updated Query Subject that contains the new “Comments” column.

 

  1. Generate a sample report from within Report Studio named “InteractiveComments” that contains an HTML Item that references an .ASP page.  You can display the comments by dragging the “Comments” model item to your report page.

 

For example, <a href="http://localhost/cognos8/samples/InteractiveComments/Comments.asp">Add Comments</a>

 

  1. Using Notepad, or a HTML editor, create an .ASP page called “Comments.asp” that has a submit button with the form action to post to “Results.asp”

 

  1. Create the “Results.asp” .ASP file, which will contain your .ASP logic for inserting the recordset to your database.  There are many sites on the web that can help you with this task.  (http://www.aspx.com, http://www.webmonkey.com, http://www.w3schools.com)

 

On this page you should also add a hyperlink reference back to the Cognos Connection location of your Report Studio report.   

 

For example, Click <a href="http://localhost/cognos8/cgi-bin/cognosisapi.dll?b_action=xts.run&m=portal/report-viewer.xts&ui.action=run&ui.object=%2fcontent%2fpackage%5b%40name%3d%27GOSR%27%5d%2freport%5b%40name%3d%27InteractiveComments%27%5d">here</a> to return to the report.

 

  1. This process can be done using any web scripting language, and I would also recommend making sure that you are able to associate an ID value to the report’s comment.

Cognos 8 -- Report Studio Comments box

I came across a posting on http://businessintelligence.ittoolbox.com that discussed adding an editable comment box for a Cognos Report Studio report. 

 

Here is how this could be implemented in Cognos 8 by using .ASP pages.

 

  1. Update your database source to contain an additional column named “Comments”.

 

  1. Update your Framework Manager model to have an updated Query Subject that contains the new “Comments” column.

 

  1. Generate a sample report from within Report Studio named “InteractiveComments” that contains an HTML Item that references an .ASP page.  You can display the comments by dragging the “Comments” model item to your report page.

 

For example, <a href="http://localhost/cognos8/samples/InteractiveComments/Comments.asp">Add Comments</a>

 

  1. Using Notepad, or a HTML editor, create an .ASP page called “Comments.asp” that has a submit button with the form action to post to “Results.asp”

 

  1. Create the “Results.asp” .ASP file, which will contain your .ASP logic for inserting the recordset to your database.  There are many sites on the web that can help you with this task.  (http://www.aspx.com, http://www.webmonkey.com, http://www.w3schools.com)

 

On this page you should also add a hyperlink reference back to the Cognos Connection location of your Report Studio report.   

 

For example, Click <a href="http://localhost/cognos8/cgi-bin/cognosisapi.dll?b_action=xts.run&m=portal/report-viewer.xts&ui.action=run&ui.object=%2fcontent%2fpackage%5b%40name%3d%27GOSR%27%5d%2freport%5b%40name%3d%27InteractiveComments%27%5d">here</a> to return to the report.

 

  1. This process can be done using any web scripting language, and I would also recommend making sure that you are able to associate an ID value to the report’s comment.

Cognos 8.2 SDK -- validateSeverityEnum

When using the Cognos 8.2 SDK it is important to note that the value keyTransformation of Enumeration Set validateSeverityEnum only partially works.

If you set enumeration set validateSeverityEnum to keyTransformation, you will get back all errors, warnings, and information messages, but you may get little or no information back regarding the transformation steps from the report specification to the native query sent to the data source.

While the documented description for the keyTransformation information is correct, the feature is only partially implemented at present and may not return data. This is currently a known issue by Cognos and documented in the Cognos 8.2 Read Me Guide.

Cognos 8.2 SDK -- validateSeverityEnum

When using the Cognos 8.2 SDK it is important to note that the value keyTransformation of Enumeration Set validateSeverityEnum only partially works.

If you set enumeration set validateSeverityEnum to keyTransformation, you will get back all errors, warnings, and information messages, but you may get little or no information back regarding the transformation steps from the report specification to the native query sent to the data source.

While the documented description for the keyTransformation information is correct, the feature is only partially implemented at present and may not return data. This is currently a known issue by Cognos and documented in the Cognos 8.2 Read Me Guide.

Cognos 8 Query Studio -- create a count

While on a client site an end user asked me to generate a Count from within Query Studio, and I actually forgot the steps. So my loss is your gain because here are the steps once again:

Note: You do not use the Calculation icon for counts, but instead you should use the Summarize icon.

1. Add three columns to your report.

2. Click Edit Data from the blue menu in the upper left hand corner.

3. Click the Column Title you want to perform the count on.

4. Click Summarize.

5. The Summarize frame will appear under the report, from the Summary for Footers list select Count.

Cognos 8 Query Studio -- create a count

While on a client site an end user asked me to generate a Count from within Query Studio, and I actually forgot the steps. So my loss is your gain because here are the steps once again:

Note: You do not use the Calculation icon for counts, but instead you should use the Summarize icon.

1. Add three columns to your report.

2. Click Edit Data from the blue menu in the upper left hand corner.

3. Click the Column Title you want to perform the count on.

4. Click Summarize.

5. The Summarize frame will appear under the report, from the Summary for Footers list select Count.

Cognos Report Studio -- Show 'Total Results' for a report in its header or footer section

From within Cognos Report Studio

1) Option A: Count(Rows for the report)

2) Option B:
Associate the Page object with the Query that serves the page, and then create a Query Calculation, not a Layout Calculation, that uses two key functions -- Count, for.

ie. count([Product Line] for report)

3) Additional Tips when there's no results at all:
You should create a Layout Calculation with the following expression:
IF ( [Query1].[Product Line Count] > 0 )
THEN ( [Query1].[Product Line Count] )
ELSE ( 0 )

Cognos Report Studio -- Show 'Total Results' for a report in its header or footer section

From within Cognos Report Studio

1) Option A: Count(Rows for the report)

2) Option B:
Associate the Page object with the Query that serves the page, and then create a Query Calculation, not a Layout Calculation, that uses two key functions -- Count, for.

ie. count([Product Line] for report)

3) Additional Tips when there's no results at all:
You should create a Layout Calculation with the following expression:
IF ( [Query1].[Product Line Count] > 0 )
THEN ( [Query1].[Product Line Count] )
ELSE ( 0 )

Cognos -- run multiple CRN instances on the same server

If you want to run more than one instance of CRN on your development server then all that you need to do is ensure that all the port numbers are different between your installs.

In Cognos Configuration, change the port numbers at the following locations:

1. click the environment tab and ensure that you change all the listed port numbers, 2. under the logging tab there is a port number,
3. under the ReportNet Service there is a shutdown port number

Note: that this will require multiple CRN installs

Cognos -- run multiple CRN instances on the same server

If you want to run more than one instance of CRN on your development server then all that you need to do is ensure that all the port numbers are different between your installs.

In Cognos Configuration, change the port numbers at the following locations:

1. click the environment tab and ensure that you change all the listed port numbers, 2. under the logging tab there is a port number,
3. under the ReportNet Service there is a shutdown port number

Note: that this will require multiple CRN installs

Cognos BI and BICC

BICC – Business Intelligence Competency Centre

 

In my humble opinion, a BICC is essentially a coordinated effort to achieve and maintain a set of best practices and standards for your BI implementations.  The BICC serves as the focal point for addressing all future BI development, acts as a front-line resource to answer how-to’s, and establishes a set of corporate standards.  The goal is to learn and document from the initial deployment, and then build a scalable template to repeat the process in the future.  Wash and rinse….wash and rinse.

 

In my particular organization we have a smorgasbord of Cognos products being used:  Power Play Transformer, Metric Manager, Access Manager, Report Studio, Impromptu, Cognos SDK, and the list goes on.  I wasn’t even aware of some of the resources that showed up on our Cognos Support contact list.  The point is that we do not have a centralized Cognos group and we are currently working in silos.

 

The good news is that we are in the infancy stages of establishing our internal BICC with a small group of resources that will dedicate a portion of their time.  The BICC will not take up 100% of everyone’s time, but as tasks come up then they will take priority and there will be monthly meetings to review statuses and make recommendations.

 

I think that it’s a valuable exercise to at least review the literature that Cognos is providing related to BICCs.  It appears that SAS is the cornerstone for most of the templates and processes that have been generated for BICCs, so you may want to also visit their site as well.  So now you’re a lit bit more familiar with BICCs and can 100% say that they are not just cigarette lighters!

 

 

 

 

Cognos BI and BICC

BICC – Business Intelligence Competency Centre

 

In my humble opinion, a BICC is essentially a coordinated effort to achieve and maintain a set of best practices and standards for your BI implementations.  The BICC serves as the focal point for addressing all future BI development, acts as a front-line resource to answer how-to’s, and establishes a set of corporate standards.  The goal is to learn and document from the initial deployment, and then build a scalable template to repeat the process in the future.  Wash and rinse….wash and rinse.

 

In my particular organization we have a smorgasbord of Cognos products being used:  Power Play Transformer, Metric Manager, Access Manager, Report Studio, Impromptu, Cognos SDK, and the list goes on.  I wasn’t even aware of some of the resources that showed up on our Cognos Support contact list.  The point is that we do not have a centralized Cognos group and we are currently working in silos.

 

The good news is that we are in the infancy stages of establishing our internal BICC with a small group of resources that will dedicate a portion of their time.  The BICC will not take up 100% of everyone’s time, but as tasks come up then they will take priority and there will be monthly meetings to review statuses and make recommendations.

 

I think that it’s a valuable exercise to at least review the literature that Cognos is providing related to BICCs.  It appears that SAS is the cornerstone for most of the templates and processes that have been generated for BICCs, so you may want to also visit their site as well.  So now you’re a lit bit more familiar with BICCs and can 100% say that they are not just cigarette lighters!

 

 

 

 

Cognos 8 SDK -- Report Request Service

If you’re responsible for doing more coding and development around Cognos 8, such as using the Cognos 8 SDK or utilizing web services, then you should check out their sample test package that is available for download off of their Support site.  The url is http://support.cognos.com/supported/tti/public/index.html under Development/Utilities.

 

Download their sample files for c8ReportRequestService which is designed for Cognos 8 and allows you to work with the SDK to communicate with the Cognos components.

 

Cognos defines it as: “This application provides the facility for a calling application to provide the data (in XML format) alongside the request. The application will save that data against a unique identifier and will pass this identifier to Cognos 8, allowing Cognos 8 to retrieve that data from the web service using either Composite or the built in XML data source support.”

 

TIP:  You may have to modify your port references from the default 8080 depending upon your development environment.

 

Cognos 8 SDK -- Report Request Service

If you’re responsible for doing more coding and development around Cognos 8, such as using the Cognos 8 SDK or utilizing web services, then you should check out their sample test package that is available for download off of their Support site.  The url is http://support.cognos.com/supported/tti/public/index.html under Development/Utilities.

 

Download their sample files for c8ReportRequestService which is designed for Cognos 8 and allows you to work with the SDK to communicate with the Cognos components.

 

Cognos defines it as: “This application provides the facility for a calling application to provide the data (in XML format) alongside the request. The application will save that data against a unique identifier and will pass this identifier to Cognos 8, allowing Cognos 8 to retrieve that data from the web service using either Composite or the built in XML data source support.”

 

TIP:  You may have to modify your port references from the default 8080 depending upon your development environment.

 

Data Warehouse -- and data marts?

My project is in the process of defining a corporate set of standards for reporting.  Our goal is to provide a template for our Accounting, Finance, HR and Inventory departments to use Cognos 8.  Currently, we are all operating in silos and are even running varying versions of Cognos.  We have one group using Cognos Series 7 where they rely on Impromptu and continually updating an outdated Catalogue, while my group is using Cognos 8.2 and Framework Manager with Report Studio. The other departments are using 8.1 and waiting to upgrade to 8.2.

 

Our goal is to have one central Data Warehouse for the entire organization and to provide Data Marts for each department.  I’m researching Data Mart best practices and wanted to share one of the knowledge sources that I came across.  If you’re getting involved with Data Marts then you might enjoy the link below.

 

http://blogs.ittoolbox.com/dw/design/archives/pt2-what-on-earth-is-a-data-mart-7978

 

Data Warehouse -- and data marts?

My project is in the process of defining a corporate set of standards for reporting.  Our goal is to provide a template for our Accounting, Finance, HR and Inventory departments to use Cognos 8.  Currently, we are all operating in silos and are even running varying versions of Cognos.  We have one group using Cognos Series 7 where they rely on Impromptu and continually updating an outdated Catalogue, while my group is using Cognos 8.2 and Framework Manager with Report Studio. The other departments are using 8.1 and waiting to upgrade to 8.2.

 

Our goal is to have one central Data Warehouse for the entire organization and to provide Data Marts for each department.  I’m researching Data Mart best practices and wanted to share one of the knowledge sources that I came across.  If you’re getting involved with Data Marts then you might enjoy the link below.

 

http://blogs.ittoolbox.com/dw/design/archives/pt2-what-on-earth-is-a-data-mart-7978

 

Cognos SDK -- Framework Manager model

You can use the Cognos SDK to load your Framework Manager model into memory and then parse or search the xml model schema.  For example, say if you wanted to build a small utility to determine the data that a query subject item was last changed.  Then you would load the model and search for the specific XML node and view its current value.  If you continue to expand on this concept then you can come up with developing your own version control monitory utility.

 

Don’t forget to place your TRY-CATCH logic around your test app!

 

 

private void getModel(String packageSearchPath){

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

       

        baseClass[] model = null;

        searchPathMultipleObject spMulti = new searchPathMultipleObject();

        spMulti.Value = packageSearchPath + "/model";

        //you need to append the model with a valid XML header

        string strXMLHeader = "<?xml version=" + "\"" + "1.0" + "\"" + " encoding=" + "\"" + "UTF-8" + "\"" + " ?>";

        string strXMLModel = null;

           

            //query the content store to retrieve the model                                      

            model = cmService.query(spMulti, props, new sort[]{}, new queryOptions());

        

            //iterate through the model schema

            for (int i = 0; i < model.Length; i++){

                       

            strXMLModel  = strXMLHeader + ((model)model[i]).model1.value;

            XmlDocument docXML = new XmlDocument();

            docXML.LoadXml(strXMLModel);

            //you could also call an existing model file to simplify the process

            //docXML.Load("C:\\MODELS\\XML Datasource Sample\\model.xml");

            XmlNode node;

            node = docXML.DocumentElement;

                  

 

            foreach (XmlNode node1 in node.ChildNodes)

                foreach (XmlNode node2 in node1.ChildNodes)

                  //for example purposes we’ll retrieve the project xml node.  Open your model file in Notepad or any XML viewer to review the model XML schema structure. 

if (node2.Name == "lastchanged")

                    {

                        string strProject = node2.InnerText;

                        string strNewProject = "lastUpdateWasAppliedAtThisTime";

                       //for example purposes were just going to update the existing value

node2.InnerText = strNewProject;

                    }

           

            //save the updated xml file

            docXML.Save("C:\\MyUpdatedModel.xml");

 

        }

Cognos SDK -- Framework Manager model

You can use the Cognos SDK to load your Framework Manager model into memory and then parse or search the xml model schema.  For example, say if you wanted to build a small utility to determine the data that a query subject item was last changed.  Then you would load the model and search for the specific XML node and view its current value.  If you continue to expand on this concept then you can come up with developing your own version control monitory utility.

 

Don’t forget to place your TRY-CATCH logic around your test app!

 

 

private void getModel(String packageSearchPath){

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

       

        baseClass[] model = null;

        searchPathMultipleObject spMulti = new searchPathMultipleObject();

        spMulti.Value = packageSearchPath + "/model";

        //you need to append the model with a valid XML header

        string strXMLHeader = "<?xml version=" + "\"" + "1.0" + "\"" + " encoding=" + "\"" + "UTF-8" + "\"" + " ?>";

        string strXMLModel = null;

           

            //query the content store to retrieve the model                                      

            model = cmService.query(spMulti, props, new sort[]{}, new queryOptions());

        

            //iterate through the model schema

            for (int i = 0; i < model.Length; i++){

                       

            strXMLModel  = strXMLHeader + ((model)model[i]).model1.value;

            XmlDocument docXML = new XmlDocument();

            docXML.LoadXml(strXMLModel);

            //you could also call an existing model file to simplify the process

            //docXML.Load("C:\\MODELS\\XML Datasource Sample\\model.xml");

            XmlNode node;

            node = docXML.DocumentElement;

                  

 

            foreach (XmlNode node1 in node.ChildNodes)

                foreach (XmlNode node2 in node1.ChildNodes)

                  //for example purposes we’ll retrieve the project xml node.  Open your model file in Notepad or any XML viewer to review the model XML schema structure. 

if (node2.Name == "lastchanged")

                    {

                        string strProject = node2.InnerText;

                        string strNewProject = "lastUpdateWasAppliedAtThisTime";

                       //for example purposes were just going to update the existing value

node2.InnerText = strNewProject;

                    }

           

            //save the updated xml file

            docXML.Save("C:\\MyUpdatedModel.xml");

 

        }