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
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>
Thanks a lot. You saved my day.
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.