Monday, November 25, 2013

COGNOS: Add a Multimedia File to a Report

Place your Video ( .wmv or .avi  format)  in the following path

C:\Program Files\ibm\cognos\c10\webcontent\samples\images\

Note: You must have Windows Media Player installed on your computer.


  1. In the Insertable Objects pane, on the Toolbox tab, drag the HTML Item object  to the report.
  2. Select the HTML Item.
  3. double-click the HTML Item 
  4. In the HTML dialog box, type the following:
    <OBJECT classid="CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6"> <PARAM NAME="URL" VALUE="/c10/webcontent/samples/images/yourVideo.wmv"/> </OBJECT>

Run the report and click on Video and enjoy...



Monday, November 18, 2013

Cognos: Age calculation


We have two ways to calculate age in years and age in yy years mm months and dd days format


Calculate Age in years...

Create a query Calculation as below...

_years_between (current_date, [Birth date column])

Calculate Age in yy years, mm months and dd days format...
(replace [Birth Date] with your own Data of birth column)


substring (cast(_ymdint_between  (current_date, [Birth date]),char(6)),1,2) || ' Years '||

substring (cast(_ymdint_between  (current_date, [Birth date]),char(6)),3,2)

|| ' months ' ||

substring (cast(_ymdint_between  (current_date, [Birth date]),char(6)),5,2)

|| ' Days '