Hi,
I want to get the page numbers from the cognos report, using javascript.
please let me know your suggestions.
Thanks ,
Aravind
I don't think that's possible, but someone more schooled in JS than me might be able to give you a solution. The page numbers are only rendered when the report is run, based on the number of lines per page etc. which is why in HTML format it doesn't know how many pages there are in the as a whole.
Hi,
you can surround the PageNumber by a div
put a PageNumber control from toolbox then put two HTML one before the PageNumber and the other after it
then in the first HTML put
<div id="pageNumber">
and in the second HTML put
</div>
then add another HTML wherever you want and put code like that
script>
function showPageNumber()
{
var pageNumber = document.getElementById("pageNumber").firstChild;
alert(pageNumber .innerHTML);
}
</script>
<button type="button" onclick="showPageNumber();" > Click Me!</button>
so you can alert the page number
use it as you want after that