Hi,
I'm looking for a way let users click the 'Finish' button and have the report open in a new tab as it seems that functionality was removed from C10 to CA.
I'm attempting to add it back using JavaScript and I'm currently able to construct a URL with variables concatenated to it in order to let the user click the link and have the report run as desired. This only works with pre-defined variables as of right now since I am having trouble grabbing the selected values and storing them.
Current Code: Underlined code does not work and is possibly not the correct approach
<button class="button" onclick="runReport()">Finish</button>
<script>
function runReport(){
var report = cognos.Report.getReport("_THIS_"); var aPrompt = report.prompt.getControlByName(<prompt name>); var dPrompt = report.prompt.getControlByName(<prompt name>); var a = aPrompt.prompt.getValues()[0]; var d = dPrompt.prompt.getValues()[0];
window.open("cognos...filepath...promptA=a&promptD=d"); <--- Works if a and d are constant variables
}
</script>
Additional Info:
- I do not want the prompts to be auto submitted as this will run the report after the prompts are selected
- I've tried using a hyperlink item with drill-through but this also requires auto submit
------------------------------
Anthony Landati
------------------------------
#CognosAnalyticswithWatson