Thursday, November 17, 2011

Configuring Cognos 8.4 with Apache 2.2 Module Gateway


Most Cognos systems are set up to run the standard Cognos CGI gateway but Cognos also comes with Apache module which can give more  performance through the Apache web server.

Unfortunately the instructions provided by IBM to set up this module are not enough to configure apache module instead of the standard cgi.

First Install Apache 2.2

We need to make  a few additions to the Apache configuration file `httpd.conf`.

open `httpd.conf`. in wordpad (you can open it start->programs->apache)

at the end of the file,  go the new line and  enter the following command to load the Cognos Apache 2.2 module

LoadModule cognos_module "C:/Program Files/cognos/c8/cgi-bin/mod2_2_cognos.dll"

Then  add the following settings for virtual directories and security.

# Set some directory aliases and security settings

ScriptAlias /cognos8/cgi-bin "C:/Program Files /Cognos/c8/cgi-bin"
Alias /cognos8 "C:/Program Files (x86)/Cognos/c8/webcontent"
<Directory "C:/Program Files (x86)/Cognos/c8/webcontent">
   Options Indexes MultiViews
                AllowOverride None
                Options None
                Order allow,deny
                Allow from all
</Directory>

<Directory "C:/Program Files/Cognos/c8/cgi-bin">
                AllowOverride None
                Options None
                Order allow,deny
                Allow from all
</Directory>

Alias /Documentation "C:/Program Files/Cognos/c8/documentation"

<Directory "C:/Program Files (x86)/Cognos/c8/documentation">    
                Options Indexes MultiViews
                AllowOverride None
                Options None
                Order allow,deny
                Allow from all
</Directory>
 
(Optional Settings start)

Continuing with the same file, add settings for gateway diagnostics and the user directory like so...

# Enable the gateway diagnostics
 <Location /cognos8/cgi-bin/mod2_2_cognos.dll>
                SetHandler cognos-handler
                Order allow,deny
                Allow from all
</Location>

# Configure the user directory
 <IfModule mod2_2_cognos.c>
                CGIBinDir "C:/Program Files (x86)/Cognos/c8/cgi-bin"
 </IfModule>

(Optional Settings end)

  • Now save the file ….
  • restart Apache.
  • open Cognos Configuration
  • Click Enivronment in the leftpane
      in the right pane, change the  end of the `Gateway URI` from ...
     ....cgi-bin/cognos.cgi  to....  ....cgi-bin/mod2_2_cognos.dll

Restart the cognos services.. and use the following kind of URL to start cognos HOME page

http://servername/cognos8/cgi-bin/mod2_2_cognos.dll

Enjoy with this Technique

Wednesday, July 6, 2011

Cognos filter & prompts ?


Filters:
Filters are used to remove unwanted data from the report.
Filters are two types 1) detailed filter 2) summary filter
Detail filter: The working of detail filter is based on APPLICATION
For Ex:
The report has the following columns
[year], [product name],[Quantity]
The filter I applied as follows….

If I select “Before auto aggregation”, what will happen?
The data will be filtered based on qty<500 at database level. Whatever the records are there which are less than 500 will be summed up for year, product line and result will be displayed.

If I select “After auto aggregation”, what will happen,
First the records are aggregated for year, productname  then the filter qty<500 will be applied on those aggregated records, If there are any records statisfying qty<500 then we will  get the output


Summary filter:
IF I want to use this summary filter, I should have groups and groups totals in the report.

While applying summary filter, we should set scope to specify particular subtotals to apply the filter weather filter to be applied on product type totals, or product line total or year totals…

PROMPTS:

All the filter are hardcoded. IF u run the report any number of times the same filter will be applied and the same output we will get.
Suppose If you want to select filter values at run time, then we use prompts..
There are several prompts that cognos supports
  1. Text box prompt
  2. Value prompt
  3. Select & search prompt
  4. Data prompt
  5. Time prompt
  6.  Date & time prompt
  7. Tree prompt
  8. Interval prompt
  9. Generated prompt

There are several ways to get the prompts…

     1) When we use parameter( for ex: ?x? ) in the filter then we will get prompt automatically..

When we run the report, Cognos will create a prompt automatically as follows...

The automatic generated prompt may not consistent…, suppose if you want prompt at center of the page, it is not possible here, suppose if I want select & search prompt, I cant change here..

     2) Select the columns in the report page for which u want to create prompts, then go to tools menu, select Build prompt page option as follows…

Then the prompt page will be created automatically with prompts for all the three columns..


This method is the quickest way to create prompts…

      3) Fully customized method. In this method we can create prompt page and prompts manually..
Point on Page explorer and click on “Prompt page” folder as follows..

Drag  “page” from tool box to prompt page folder…


Doubl click on Prompt page1 to maximize prompt page..

Text box prompt
 It does not display values in it, we have to imagine values
Value prompt
This will display values from database.
Drawbacks:
1)   1) Performance is slower (Every time u run the report, it has to connect to the database and bring the values..)
        2)      It can't display more than 5000 values
3)     3)    We have to scroll down/up for searching the values..
Select & search prompt….
All the above drawback will be resolved in S&S prompt…