If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

How to select desired output using value prompt

Started by lskumar, 22 Nov 2012 04:38:12 AM

Previous topic - Next topic

lskumar

Hi, I have a scenario where a value prompt is to be created for selecting desired output method for viewing the report i.e value prompt should contain pdf, html, excel , csv etc.. and when i select csv in prompt, the report should be displayed in csv mode.
Desperately need some help



HalfBloodPrince

Drag HTML item from tool box on prompt page and put following code

<html>
<head>
<script language="javascript">
function gotoUrl()
{var obj=document.all['OutputFormat'];
/* Below function passed the selected output format to the server
*/
window.onload(gCognosViewer.getRV().viewReport(obj.options[obj.
selectedIndex].value));
}
</script>
</head>
<body>
<-- Below will create a dropdown with choices -->
<select name="OutputFormat" OnBlur="javascript:gotoUrl()">
<option value="HTML">HTML</option>
<option value="PDF">PDF</option>
<option value="singleXLS">Excel 2000 Single Sheet</option>
<option value="spreadsheetML">Excel 2007</option>
<option value="XLWA">Excel 2002</option>
<option value="XLS">Excel 2000</option>
<option value="CSV">Delimited text (CSV)</option>
<option value="XML">XML</option>
</select>
</body>
</html>

lskumar


Lynn

The attached document describes an approach to prompt for output format without using Java Script. Sometimes Java Script can break when upgrading so I try to avoid it when there are other methods available to achieve the requirement.