Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select report type output from prompt

Status
Not open for further replies.

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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top