PageNumber problem on TOCEntry

Posted by: hyong on 4 August 2017, 3:06 pm EST

  • Posted 4 August 2017, 3:06 pm EST

    Hi


    I have a TOC on page 1 on my report. When I get the PageNumber from the TOCEntry,


    it returns incorrect page number "0".


       Report.TOC(0).PageNumber


    The page number on TOCEntry seems to return real page number -1.


    Is the PageNumber zero base?


    Regard,


    Hyong


     


     


     

  • Replied 4 August 2017, 3:06 pm EST

    The TOC entries are indexed by their page numbers and is a zero based collection.

    Some more information can be found here: http://www.datadynamics.com/Help/AR2Std/HX_ActiveReport_TOC.html
  • Replied 4 August 2017, 3:06 pm EST

    Thanks ZachB. I understand the TOCEntry is zero base on the collection but


    I wish to find out whether the PageNumber starts zero. I have a TOC on page


    1 on my report but PageNumber property on TOC object returns 0 not 1.


     


     


     

  • Replied 4 August 2017, 3:06 pm EST

    The page numbers are zero based as well: http://www.datadynamics.com/Help/AR2Std/HX_TOCEntry_pageNumber.html

    I believe this is done to match up with the pages collection, which is also zero based.  When printing out the page numbers, you'll need to add one.
  • Replied 4 August 2017, 3:06 pm EST

    Thanks Zach
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels