COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: KANUL on 18 Nov 2008 10:43:20 PM

Title: hOW TO GET TOTAL NUMBER OF PAGES IN REPORT HEADER(REPORT STUDIO)
Post by: KANUL on 18 Nov 2008 10:43:20 PM
HI EVERY ONE .

I WANT TO DISPLAY TOTAL NUMBER OF PAGES PRESENT IN MY REPORT ON THE FIRST PAGE OF MY REPORT .
IF THE REPORT CONTAINS 20 PAGES , WHEN I RUN THE REPORT I SHOULD GET 20  ON TOP OF THE REPORT.
Title: Re: hOW TO GET TOTAL NUMBER OF PAGES IN REPORT HEADER(REPORT STUDIO)
Post by: sivabisani on 19 Nov 2008 03:36:36 AM
Hi,

As per my understanding we can take the layout calculation
in that we put the report function in first layout calc pagenumber() and text item as -of-  and second layout calculation we can put the report function as it is PageCount().
By producing this function we can achieve this.

Thanks,
siva
Title: Re: hOW TO GET TOTAL NUMBER OF PAGES IN REPORT HEADER(REPORT STUDIO)
Post by: Suraj on 20 Nov 2008 10:42:32 AM
Yes, but it only works when the report is rendered in PDF or saved in html/pdf.
When you just run the report as html, it'll not count all the pages.
Title: Re: hOW TO GET TOTAL NUMBER OF PAGES IN REPORT HEADER(REPORT STUDIO)
Post by: DanSev on 20 Nov 2008 11:36:10 AM
the report function only works if the whole report rendered. If you know how many rows are being displayed per page, then you can count the number of rows returned by the report and divide that number by the amount of rows per page to get a page total amount. It is a work around, but it'll do the job.