Cognos Analytics

Cognos Analytics

Connect, learn, and share with thousands of IBM Cognos Analytics users! 

 View Only
  • 1.  Total Page Count in all html

    Posted Mon June 01, 2020 08:15 AM
    Edited by System Admin Fri January 20, 2023 04:36 PM
    Hi Cognos Expert,

    I am trying to implement Page number of Total Page like if I have 3 page then 1 of 3, 2 of 3 and 3 of 3.

    I tested using Page Count () function which are working as expected but in html it is showing  1 of ?

    Could you please share any java script to show this as I need to display in html as well.


    Thanks,
    Pankaj

    #CognosAnalyticswithWatson


  • 2.  RE: Total Page Count in all html

    Posted Tue June 02, 2020 12:16 PM
    Hi Pankaj,
    This will always show the "?" in the interactive HTML output.  if you run and save the output, you will see that this "?" does show the actual page count in the saved output.  The interactive HTML output does not render the entire result, and therefore does not calculate the total # of pages.  PDF and EXCEL output will show the total page count.



    ------------------------------
    Albert Valdez
    albert@intelalytics.com
    ------------------------------



  • 3.  RE: Total Page Count in all html

    Posted Tue June 02, 2020 03:00 PM
    If it's a simple list report maybe you could calculate the number of pages based on the total row count / number of rows per page?  Just a thought.

    ------------------------------
    Jeremy Aude
    Channell Commercial Corporation
    Rockwall TX
    ------------------------------



  • 4.  RE: Total Page Count in all html

    Posted Tue June 02, 2020 03:04 PM
    There is a reason for it i HTML, reason is performance, you don't want to query the pagelist

    ------------------------------
    Sanjay Chakravarty
    ------------------------------



  • 5.  RE: Total Page Count in all html

    Posted Tue June 02, 2020 05:46 PM
    Typically, in html we just show total records to indicate there are multiple pages.

    However, Based on report property rows per page set at object level, You can calculate total page by  total records/rows per page and display total number of pages available in html.

    You may append it then to Page Number function in lay out to display 1 of <calculated item>.


    ------------------------------
    Buddhi Gupta
    ------------------------------