I generated some active reports in cognos. Then I got across with this Dynamic reporting in Cognos using JQuery: http://www.ibm.com/developerworks/library/ba-pp-reporting-advanced-report-design-page647/
I generated some interactive reports with JQuery. But now I want to genearate an active report using JQuery. I tried but it didn't work. So is there a way to use JQuery in mht files? (as active reports are stored in that format).
This is the code I took in HTML item in report studio:
<script type="text/javascript">
var j = jQuery.noConflict();
j(document).ready(function()
{
alert("hello");
j('.ShowHideMap').hide();
j('.ShowHideClicker').click(function()
{
j(this).next().toggle();
});
});
</script>
<div class="ShowHideClicker">Click here to show/hide the Map Report</div>
<div class="ShowHideMap">
Map comes here
</div>
I am using Firefox for opening the active reports. When I open the report, and click on "Click here to show/hide the Map Report", its not hiding.
I took a notepad and typed the following code and saved it as "test.mht"
<html>
<head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
<script type="text/javascript"
src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery-ui.min.js"></script>
<script type="text/javascript">
var j = jQuery.noConflict();
j(document).ready(function()
{
j('.ShowHideMap').hide();
j('.ShowHideClicker').click(function()
{
j(this).next().toggle();
});
});
</script>
</head>
<body>
<div class="ShowHideClicker">Click here to show/hide the Map Report</div>
<div class="ShowHideMap">
Map
</div>
</body>
</html>
It worked. When I click on "Click here to show/hide the Map Report", the word Map is showing/hiding. But when I took the same code in HTML item in active reports, reports are not showing/hiding.