qberta01
Programmer
- Nov 14, 2005
- 113
Hello,
I know it's posisble to put a prompt on a report so the user can select the output type. This is handy because when the report is typically rendered in HTML, it re-runs the report again when the user selects "View report in... Format". Is there a way to turn off the reload of the report when exporting in a different format? That would seem the easiest option. However, if not possible how would I prompt the user? The code I have is buggy. It uses javascript and loads when the prompt looses focus. Also, it does not keep the slected value. This is the code I put in an html tag:
<html>
<head>
<script language="javascript">
function gotoUrl()
{
var obj=document.all['OutputFormat'];
window.onload(gCognosViewer.getRV().viewReport(obj.options[obj.selectedIndex].value));
}
</script>
</head>
<body>
<select name="OutputFormat" OnBlur="javascript:gotoUrl()">
<option value="HTML">HTML</option>
<option value="PDF">PDF</option>
<option value="XLWA">Excel 2002</option>
<option value="spreadsheetML">Excel 2007</option>
<option value="CSV">Delimited text (CSV)</option>
</select>
</body>
</html>
Any suggestions would be appreciated.
Q
I know it's posisble to put a prompt on a report so the user can select the output type. This is handy because when the report is typically rendered in HTML, it re-runs the report again when the user selects "View report in... Format". Is there a way to turn off the reload of the report when exporting in a different format? That would seem the easiest option. However, if not possible how would I prompt the user? The code I have is buggy. It uses javascript and loads when the prompt looses focus. Also, it does not keep the slected value. This is the code I put in an html tag:
<html>
<head>
<script language="javascript">
function gotoUrl()
{
var obj=document.all['OutputFormat'];
window.onload(gCognosViewer.getRV().viewReport(obj.options[obj.selectedIndex].value));
}
</script>
</head>
<body>
<select name="OutputFormat" OnBlur="javascript:gotoUrl()">
<option value="HTML">HTML</option>
<option value="PDF">PDF</option>
<option value="XLWA">Excel 2002</option>
<option value="spreadsheetML">Excel 2007</option>
<option value="CSV">Delimited text (CSV)</option>
</select>
</body>
</html>
Any suggestions would be appreciated.
Q