Smartform to print table of contents page
I am developing a smartform to print price catalogs. As part of this I need to print table of contents in the first page with certain catagoriers and page numbers. The problem here is that I wouldn't know which category will start on which page until I process the entire form. I have tried one approach where I defined the window in first page as 'Final Window', collect all the page numbers from the subsequent pages and print them in this 'final window'. But the issue is this table of contents can go for more than one page. I can't do a 'Go to new page' in a secondary window and defining it as a main window will not be processed as a 'final window'. If i processed this table of contents page at the end of all pages, I am not sure if there is a way to change the sequence of pages again at the end. Please share your suggestions.