Some asked a question about creating drill through links in a pie chart. Cognos says it's coming soon but you can't do it in RS now.
Here is a way you can get around it until it comes with the product.
Here is a way you can get around it until it comes with the product.
Code:
<script language="javascript">
/*
To make this work:
1 - Create a new report
2 - Add your chart (I've only tested with pie charts)
3 - Turn on tooltips for the chart (to make it create the area elements)
4 - Add a list, it will probably work with a crosstab also.
5 - Add drill through to the list, using the same column you added as the Series for the pie chart
when you click on the pie chart, it will look for the drill through link with the same label and call the
onclick method.
You could change it pretty easily to hide the list if you really didn't want it in the report.
Dave
*/
attachEvent("onload", initChartDrill);
function initChartDrill(){
//Find all of the <area> elements on the page and add the doChartDrill function
var areas = document.getElementsByTagName("area");
for (var i = 0, ii = areas.length; i < ii; i++)
{
areas[i].onclick = doChartDrill;
}
}
function doChartDrill(){
//Start by getting the label from the tooltip.
var alt = this.alt;
alt=alt.substring(alt.indexOf("="));
alt=alt.substring(2, alt.indexOf("\n"));
//Now find a link that matches our label and call the onclick function.
var links = document.getElementsByTagName("A");
for(var i = 0, ii = links.length; i < ii; i++){
if( links[i].innerText == alt && links[i].onclick){
links[i].onclick();
}
}
}
</script>