Pages

Tuesday, 28 January 2014

Remove Dotted Line From Value Prompt In IBM Cognos10 Report Studio.



Remove Dotted Line From Value Prompt.
In this paper we will discuss how we remove dotted line from value prompt. Cognos report studio support many built-in functionality that helps in reporting. But for some functionality we can use code of HTML (Hyper Text Markup Language) and JS (Java Script). That supports the cognos very well.

Steps :

·         Create a list report.

·         Select the value prompt from tool box.

·         Drag it on to the work area.

·         Write the name of prompt click next.

·         Select package item from available items.

·         Select the operator that you want to use like =,>, <, in, not in etc.

·         Choose the value that you want to display from available package items.

·         Click finish.

·         Drag HTML Item from tool box.







·         Double click on it and write the code using java script and HTML.

·         Code will be :

/* 
<script language="javascript">
// for removing elements in the prompt according to their indexes (position)
var list=document.getElementsByTagName("SELECT")[0];
list.remove(1);
list.remove(0);
list.removeAttribute("hasLabel");
list.options[0].selected = true;
canSubmitPrompt();
</script>          
*/
·         Remove ‘/*’ from the beginning and end of the code.
·         If you want to remove the element that is at index [0] then add  list.remove(0);
·         At position [0] there will be a name of column.
·         For removing the element from   position 2 add list.remove (2); etc.

·         list.remove(1); // for removing dotted line because it is at position 1.

·         list.remove(0); // for removing column name because it is at position 0.

·         Run the report.


   
For Further visit: http://www.segmentbi.com/

           

Monday, 27 January 2014

Content Manager And Its Infrastructure In IBM Cognos 10



What is Content Manager?

The IBM Cognos service that uses the content store is named Content Manager.

·         Content Manager is the IBM Cognos BI service that manages the storage of customer application data, including security, configuration data, models, metrics, report specifications, and report output.

·         Content Manager is needed to publish packages, retrieve or store report specifications, manage scheduling information, and manage the Cognos namespace.
·         Content Manager performs general functions, such as add, query, update, delete, move, and copy. It also performs content store management functions, such as export and import.
The information stored by Content Manager includes
  • reports
Reports contain specifications, properties, security settings, and outputs. This includes analyses created in Analysis Studio, queries created in Query Studio, and reports created in Report Studio.
  • report packages
Packages contain metadata, reports, and folders.
  • metric packages
Metric packages contain metadata, scorecards, and folders.
  • agents
Agents include the conditions, schedules, and tasks used to monitor events and deliver notifications. This includes the list of recently detected instances of an event.
  • server configuration
Server configuration contains directory information, the Cognos namespace Cognos Namespace, and information about contacts, distribution lists, data sources, and printers.
  • personal user information
Personal user information consists of My Folders and My Pages.
  • language information
Language information includes names, descriptions, and tool tips in different languages to support IBM Cognos BI multilingual capabilities.


Difference between Content Store and Content manager.

The content store is a relational database that contains data that IBM Cognos needs to operate,
 Such as
·         Report specifications, published models, and the packages that contain them.
·         Connection information for data sources.
·         Information about the external namespace, and the Cognos namespace itself.
·         Information about scheduling and bursting reports.
·        The relational database can be Cognos Content Database or another supported database.
·        Design models and log files are not stored in the content store.

  Content Manager uses a JDBC (Java Database Connectivity) API to access the content store and metric stores. IBM Cognos comes with the JDBC drivers for IBM Cognos Content Database and MS SQL Server. If you are using Oracle, IBM, or Sybase databases, ensures you obtain the appropriate JDBC drivers.
Report results in other formats, such as HTML, XML, and CSV (comma separated values), are stored in compressed form and are uncompressed by Content Manager before they are sent to a user.

Infrastructure of Content Manager.


                                            
Authentication Flow.
·      User makes request to access IBM Cognos Connection
·      Gateway accepts request and sends it to the Dispatcher
·      Dispatcher detects no Passport and sends request to Content Manager
·      Content Manager sends request to Cognos Access Manager
·      CAM returns fault with required information

o   System recoverable – Single Sign On (step 9)
o   User recoverable – Basic authentication

·      Content Manager returns request and fault to Dispatcher
·      The Dispatcher sends the request to the Presentation Service
·      The Presentation Service generates the login page and returns the page through the Dispatcher and Gateway to the user
·      The User enters their credentials, or it is pulled from the environment for Single Sign On
·      The Dispatcher sends the request to Content Manager
·      Content Manager sends the request to CAM
·      If the details are valid, CAM issues a passport and sends request to Content Manager.


Content Manager Cache Service:

·         Each Dispatcher maintains a local cache for objects retrieved from Content Manager Service.
·         Used to decrease load on the active Content Manager and improve speed Objects subject to caching.
i)        Report, Report Cache, Package, Package Configuration, model, model Views, Data source Signon, account, session.

For Further visit: http://www.segmentbi.com/

Thursday, 23 January 2014

How We Add Comment In Cognos Report And Store In Database

Scenario:

 Suppose u have a report in cognos report studio  and  want to add a comment under the report and all comments are store in database.
We can do all this stuff through creating a store procedure in database


Steps for creating store procedure:



·         Before creating procedure we can create a table first having 2 columns.
·         Creating a store procedure in your hand store the values of store procedure in above create table.
·         Open a query analyzer or sq server and write the procedure:
·         Code is:

create table creating_comments (cust_comp_res varchar(200),comments varchar(200))

 
            CREATE  PROCEDURE COMMENTS
            @cust_comp_res   nvarchar(15) ,   @comments_value varchar(50)
 AS
BEGIN
            INSERT INTO creating_comments (cust_comp_res,comments) values(@cust_comp_res,             @comments_value)
            select * from creating_comments  where  cust_comp_res = @cust_comp_res
END


Steps in framework manager

1.      Open a existing package in a framework manager.

2.      Import store procedure as a query subject or import through run metadata wizard.

3.      Right click on store procedure and the below window will open .


 
4. Click on … button in value column of @country and insert a prompt  macro 


5.      In prompt macro insert a parameter having prompt name that u r using in a report studio.
6.      Like:      # prompt( 'country1')#   ‘country1’ is your value prompt name in report studio. From where you select country.
7.      Click on … button in value column of @ID (it means comments) and insert a prompt  macro .
8.      In prompt macro insert a parameter having prompt name that u r using in a report studio.
9.      Like:      # prompt( 'comment1')#               ‘comment1’ is your test prompt name in report studio. From where write a comments against any country.
10.      Test the value and save the model and publish the package.


Steps in Report studio



1.      Drag a list report and drag data item country in it and any other column that you want.

2.      Create a value prompt on country data item and write the prompt name same that you put in macros in framework manager [Hint: # prompts (‘country1’) #] prompt name is “country1”.

3.      Create an empty text prompt having t names same that you put in macros in framework manager [Hint: # prompts (‘comment1’) #] prompt name is “comment1”. 

4.      Drag a list report and drag a data item of comments that you make in a procedure in list report

5.      Save the report and run it.    

6.      After some formatting report will be shown like this in report studio before execution.



8.      After execution report will be shown like this.

Keep in mind the each and every comment are saved in database against selected country




  For Further visit: http://www.segmentbi.com/