Group rows in cognos report list

Case:

When you create a standard table in a report you can have double rows with the same data

group_rows_1

In Cognos it is possible to group these rows

Solution:

Follow the next steps to group the rows in the table

1. Select the column in the table witch you want to group

group_rows_2

2. Choose in Report Studio –> Structure –> Group/degroup

group_rows_3

3. The result in the table after that:

group_rows_4

4. Next run the report and the result looks like:

group_rows_5

Hide and Show Fields Based on Prompt Values

Information on hide and show fields based on prompt value can be found on the following URL:

http://www.ibm.com/developerworks/data/library/cognos/page370.html

Open the ZIP with information direct:

http://www.ibm.com/developerworks/apps/download/index.jsp?contentid=465599&filename=conditionally_hiding_and_displaying_items_on_a_report.zip&method=http&locale=

Button types for Cognos

On a site I found various types for creating buttons on your cognos report:

PDF Button:

<input type=’Button’ value=”Report in PDF” onclick=”javascript:gCognosViewer.getRV().viewReport(‘PDF’)”>

CSV Button:

<input type=’Button’ value=”Report in CSV” onclick=”javascript:gCognosViewer.getRV().viewReport(‘CSV’)”>

XML Button:

<input type=’Button’ value=”Report in XML” onclick=”javascript:gCognosViewer.getRV().viewReport(‘XML’)”>

Excel single Sheet:

<input type=’Button’ value=”Report in Single Excel Sheet” onclick=”javascript:gCognosViewer.getRV().viewReport(‘singleXLS’)”>

Active Report button:

<input type=’Button’ value=”Report in Active Report” onclick=”javascript:gCognosViewer.getRV().viewReport(‘MHT’)”>

Excel 2007 Button:

<input type=’Button’ value=”Report in Excel2007″ onclick=”javascript:gCognosViewer.getRV().viewReport(‘spreadsheetML’)”>

 

 

PDF button in report

I came across a solution to get a PDF button in the report.
Drag a HTML item into the report and put in the following script:
<html>
<head>
<script language=”javascript”>
function gotoPDF()
{var obj=document.all[‘OutputFormat’];
var value=”PDF”;
/* Below function passed the selected output format to the server */
window.onload(gCognosViewer.getRV().viewReport (value));
}
</script>
</head>
<body>
</body>
<button style=”background-color:white” onclick=”gotoPDF()”>Open in PDF</button>
Another option is to create a drill link to the report it self.