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…




 

Wednesday, March 2, 2011

COGNOS: Difference between Two values in a COLUMN

Suppose I have report output as follows…





Now, I want to find difference between 2006’s Revenue and 2007’s Revenue in its footer…
To Resolve this follow the steps
1)      Create a list report as follows

2)      Create a Filter to only show 2006 and 2007 as follows

3)      Create "list overall" footer as follows..

      4)      Select the summary row(The overall footer ) and split it
5)      Unlock the report
6)      Drag query calculation to the Cell as follows..

7)      Give any name and enter the following expression in Expression definition box..

8)      Click OK and  Run the report, you will get output as follows..

Saturday, February 19, 2011

Cognos: NTLM security

restart the services and enjoy logging with your windows usernames and passwords..

Regards
KSR

Friday, February 4, 2011

COGNOS: CSV or Excel output limitatoins

When saving a report in  Excel 2003, we can't save all the report output if the report output contains more than 65535 rows due to the  limitation of Excel .

 Excel 2007 limits : Worksheet size 1,048,576 rows by 16,384 columns

By default, .CSV files are opened in Excel, so even though .CSV files don't have the 65k row limitation, the file will be truncated if it is opened in Excel.


Resolving the problem
View the file as a CSV and change the format from Excel to a text file. Steps:
  1. After generating the report in HTML format, select the toolbar button to View in CSV Format
  2. Once the File Download dialogue appears?click Save and the Save As dialogue will appear
    (Note: If you do not see a Save As dialogue, verify in Internet Explorer you have Automatic prompting for file download set to ENABLE under Tools -> Internet Options -> Security -> Custom level)
  3. From the Save as Type list?change the format from Microsoft Excel Worksheet to All Files
  4. Change the File Name from reportfile.xls to reportfile.txt and click Save
This will create a Tab-Delimited text file that can be used as a data source.

Thursday, January 13, 2011

Cognos: Page break on reporting objects

suppose we have list, cross tab, chart reports on single page and when we run the report, we want to have list on one page, cross tab on another page and chart on third page..

Just watch the following vedio...

Friday, January 7, 2011

Adding 'ALL' value to value prompt and displaying all values when we select 'ALL' in the prompt

The following video will guide you in adding 'ALL' value to value prompt and when we select 'ALL' in the value prompt, the report will show all values