Hi,
I have been able to use a java script code to handle the runtime selection of report output. But the problem that I am now facing is, that if there are any filter prompts in this new prompt page, then the selection of the prompts is ignored and the PDF/Excel/HTML report that opens, has all the records. Any ideas anyone how to tackle that? I guess the problem is because of the function <<< window.onload(gCognosViewer.getRV().viewReport( >>> which is ignoring the filters ....
<html>
<head>
<script language="javascript">
function gotoUrl(value)
{
Var1 = ""
if (value=='Excel2002') {
window.onload(gCognosViewer.getRV().viewReport('XLWA'));
} else if(value=='PDF'){
window.onload(gCognosViewer.getRV().viewReport('PDF'));
}
else if(value=='Web'){
window.onload(gCognosViewer.getRV().viewReport(''));
}
}
</script>
</head>
<body>
<!-- <select name="singleXLS
OnChange="javascript:gotoUrl(this.options[this .selectedIndex].value)"> -->
Select display format
<input type="radio" value="Excel2002" name="ExcelOptions" onClick = "Var1='Excel2002'">View in Excel 2002</input>
<input type="radio" value="PDF" name="ExcelOptions" onClick="Var1 = 'PDF' ">PDF</input>
<input type="radio" value="Web" name="ExcelOptions" onClick="Var1 = 'Web' ">Web</input>
<button value="Finish" name="Finish" Onclick="javascript:gotoUrl(Var1);">Finish</button>
</select>
</body>
</html>
I was trying to attach a document that shows a drill through method to achieve this, but get an error:
"The attachments upload directory is not writable. Your attachment or avatar cannot be saved"
I'll see if I can find it posted elsewhere.
Hi Lynn,
You could perhaps upload it to a public site such as Skydrive and add a link to it? If you don't have that facility I can put it up for you?
Cheers!
M
This might work (thanks to the muppet):
https://docs.google.com/viewer?a=v&pid=explorer&chrome=true&srcid=0B6m-USVf1p1nNzdiMTZkMzUtYjY4Ni00OTlhLWIwNWUtOTliY2YxOTVmYTJi&hl=en_US
Quote from: Lynn on 29 Nov 2011 03:15:33 PM
This might work (thanks to the muppet):
https://docs.google.com/viewer?a=v&pid=explorer&chrome=true&srcid=0B6m-USVf1p1nNzdiMTZkMzUtYjY4Ni00OTlhLWIwNWUtOTliY2YxOTVmYTJi&hl=en_US
Mwahahahaha! You are now eternally in my debt! Oh, no, wait! You bought me a beer once so maybe not! :)
Thanks Lynn. This works fine. Its just that I wanted to make this work on a single prompt page. Not sure if that is possible or not ??
I think I had to have the second prompt page because it is doing a drill through back to itself, so all the prompt selections have to be made prior. A user can't click the link without responding to the prompts.
Maybe if all your prompts are optional it might work?
Also, I did this quite a while ago and haven't looked to see if newer versions offer other techniques to achieve this requirement.
Thanks,Lynn.Appreciate it.