Forum Discussion

ABott73's avatar
ABott73
New Contributor II
2 years ago

Page Numbering Format for Books

Hi Just wondering if it's possible to format the page numbering when running books to ensure the output is based upon the page number and the total no of pages in the book.  For example if there were 30 pages in total in the book then I would need the format sequence as follows:

page 1 of 30, page 2 of 30, page 3 of 30 etc........... up to and including page 30 of 30.

With the current standard formula for suggested format : (i.e.)

The output is currently as follows:

page 1 of 1, page 2 of 2, page 3 of 3 etc............  (this isn't really useful for a book)

 

Thanks

 

 

 

  • JackLacava's avatar
    JackLacava
    Honored Contributor

    The posted formula works fine for me in OneStream 7.2.2: adding multiple Report items, {0} will contain the current page relative to the whole book, and {1} the total number of pages in the book. E.g. if ReportA has 1 page and ReportB has 2 pages, the footers will be "1 of 3", "2 of 3", and "3 of 3".

    • ABott73's avatar
      ABott73
      New Contributor II

      Thanks for the quick response.  We are currently on 7.1.1 and with multiple reports in the book the page numbering isn't working correctly.  Do you know if there was a fix to it between versions?  If not then I'll see if there is something else causing the issue.

      Thanks again

      • JackLacava's avatar
        JackLacava
        Honored Contributor

        One thing to note is that i didn't bother with the first SetPageNumberDisplayInfo "dummy" call to clear it, i just went straight for the second one.

        On fixes, I don't see anything in Release Notes but they don't list every little bug fixed. Maybe consider upgrading a dev environment to 7.2.2 and see how it goes.

    • Amarappan's avatar
      Amarappan
      New Contributor

      Hi Jack,

      we are using OS 7.2.2 version, and getting the output as "1 of 1" ; "2 of 2" as page number in report footer for books.

      Please let me know, if I am missing something. Thanks in advance.

       

      • JackLacava's avatar
        JackLacava
        Honored Contributor

        This is what I used.

         

        Dim uiItem As CVExtenderReportUIItem = args.Report.CurrentUIItem
        If uiItem.UIItemType = XFReportUIItemType.PageFooterPageNumber Then
        	uiItem.SetPageNumberDisplayInfo(True, "page {0} of {1}")
        End If

         

        I have a book with three report elements: 2 pages, 1 page, 2 pages. The output I get is not perfect all the time, so there might be a few gremlins still; today it looks like this:

         

        page 1 of 2
        page 2 of 2
        page 3 of 5
        page 4 of 5
        page 5 of 5

         

        So I would say {0} is reliable, whereas {1} might not always be.

        If that code doesn't work like that for you, consider opening a Support case.

  • T_Kress's avatar
    T_Kress
    Contributor III

    Anyone have an update on whether this works in books or not?  I tried in version 7.2.4 and when I put several reports (cube views) into a book, each report itself comes out as:

    Page 1 of 1

    Page 2 of 2

    Page 3 of 3

    etc.

     

    It is like it works for individual cube views but when cube views are combined in to a book, the numbering is not working.  Just wondering if a ticket was opened and this was resolved.

    I found the case which was opened and the bug which was referenced as PF-19009. It looks like there is no workaround at the moment.  I will let another partner know and see if they want their customer added to this bug.