Monday, 14 May 2012

Cognos Content Caching in Apache 2.2

Step 1: 
  •  Open the Apache configuration file 'httpd.conf' with a text editor.
  • Find the line which reads `#LoadModule file_cache_module modules/mod_file_cache.so`
  • Remove the # from the beginning of the line so it reads  
Step 2:
  • In Command Prompt , run the following
 FOR /F "Tokens=* Delims=" %i in ('dir /S "C:\Program Files\ibm\cognos\c10\webcontent\pat\images" /A -D /B') DO @echo MMapFile "%i" >> "C:\Program Files\Apache Software Foundation\Apache2.2\conf\file_cache.lst"

Step 3:
  •  Open the Apache configuration file 'httpd.conf' with a text editor.
  • Add the line
    • include "C:\Program Files\Apache Software Foundation\Apache2.2\conf\file_cache.lst"
  • Save the `httpd.conf` file.
Step 4: Restart Apache  Http Server to enable Caching

Configuring Cognos 10.1 with Apache 2.2 Module

Creating  Cognos Configuration   file

Step 1: Open Notepad   and paste the below content

# Apache Configuration for IBM Cognos 10.1

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

# Set some directory aliases and security settings

ScriptAlias /ibmcognos/cgi-bin "C:/Program Files/ibm/cognos/c10/cgi-bin"
Alias /ibmcognos "C:/Program Files/ibm/cognos/c10/webcontent"


Options Indexes MultiViews
   AllowOverride None
   Options None
   Order allow,deny
   Allow from all



    AllowOverride None
    Options None
    Order allow,deny
    Allow from all


Alias /Documentation "C:/Program Files/ibm/cognos/c10/documentation"

   
    Options Indexes MultiViews
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all



# Enable the gateway diagnostics


      SetHandler cognos-handler
    Order allow,deny
    Allow from all


# Configure the user directory


  CGIBinDir "C:/Program Files/ibm/cognos/c10/cgi-bin"
 


Step 2: Save the notepad with name "Cognos.conf"  under   "C:\Program Files\Apache Software Foundation\Apache2.2\conf" folder

Step 3: Add the following line Include "C:/Program Files/Apache Software Foundation/Apache2.2/conf/cognos.conf"   to  "C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf" file

Step 4:
Open Cognos Configuration and change the  end of the `Gateway URI` from

cgi-bin/cognos.cgi to cgi-bin/mod2_2_cognos.dll

 Step 5: Restart Cognos Services and Apache HTTP Server


Step 6: Using this url  to access cognos http://servername/ibmcognos/cgi-bin/mod2_2_cognos.dll

Tuesday, 2 August 2011

Remove Prompt Name and Hyphen (Dashes) from the Prompt s

Launch the Report Studio ,drag HTML object into workspace and paste the below code

<script>


document.formWarpRequest._oLstChoicesReportDetailID.remove(0);
document.formWarpRequest._oLstChoicesReportDetailID.remove(0);
document.formWarpRequest._oLstChoicesReportDetailID.removeAttribute('hasLabel');
setTimeout('listBoxReportDetailID.checkData()', 100)

</script>

In the above code,ChoicesReportDetailID is the ID of the Prompt

JavaScript to limit the number of items in multi-select Text Box Prompt - Cognos 8

<script>
var form = getFormWarpRequest();
var textBox = form._textEditBoxMarketID;
var parent=textBox.parentNode;
var select;
do {
parent= parent.parentNode;
var select= parent.getElementsByTagName("select");
} while(select.length ==0);
var opt = select[0].childNodes;
var length=opt.length

if (length > 5) // User can select maximum of 5 values from prompt.
{
alert("You have selected " + length + " O&Ds, Please select only 5 or less ");
}
</script>

In the above code, MarketID is the ID of the TextEditBox Prompt

Close Additional popup window opens in cognos 8 and cognos 10

1. Go to \webcontent\pat folder
2. In the pat folder, locate rsapp.htm and make a copy of this file as a
backup.
3. Open rsapp.htm in any editor preferably HTML editor and scroll to the bottom
of this file.
4. Add the following code above the </body></html>

<script>var myparent = window.opener; myparent.close();</script>


5. Save the rsapp.htm. (Ensure you save this file against as HTML
format)

Saturday, 9 July 2011

How to recover a Framework Manager model from the content store in Cognos 8

It is possible to recover a model from the project store by creating a cqeconfig.xml file in the /bin directory, and accessing the deleted model within Cognos 8 Report Studio. The model will be saved within the <c8root>/data/cqe/rtmodel directory.
Access the model by creating an empty model in Framework Manager, and overwriting the model.xml file with the xml file extracted from the content store.

Steps:
1. Create a cqeconfig.xml file and save under /configuration Place the following in the file. Due to this file the XML version of the model will be stored in the rtmodel directory as well:

<?xml version="1.0" encoding="UTF-8" ?>
<configuration company="Cognos" version="0.1" rendition="cer2">
<component name="CQE">
<section name="General Options">
<entry name="KeepModelXML" value="1" />
</section>
</component>
</configuration>



2. Stop 'Cognos 8' service and rename the <C8Root>/data/cqe/rtmodel directory, or delete all content. When a framework is opened the rtmodel version of the framework is copied there again.
3. Restart the 'Cognos 8' Service
4. Open Cognos 8 Report Studio, and create a new report based on the package you wish to recover. Run the report.
5. Check if a new /data/cqe/rtmodel directory has been created, and that an XML file has been added to the /data/cqe/rtmodel directory. Copy the XMl file which contain your framework content to another directory ie. c:\fm_rescue.
6. Rename or delete cqconfig.xml or delete it.
7. Restart the 'Cognos 8' Service again.
8. Open Framework Manager, and create a new, empty project. (Select the design language, and cancel out at the MetaData wizard step and save).
9. Close Framework Manager.
10. Goto the directory for the empty Framework Manager project.
11. Copy the generated xml file by Cognos 8 content query engine from the c:\fmrescue directory, into the framework Manager project directory.
12. In the Framework Manager project directory, delete the original model.xml file and rename the generated xml file to model.xml.
13. Open the restore model in Framework Manager and save it.

note: Don't forget to change the name for the publish package, if you want to publish the model without overwriting the original one.

Saturday, 4 June 2011

IBM Cognos 10 New Features

This demo elaborates on the new features that has beenintroduced in IBM Cognos 10

Click on cognos 10 New Features