Hi I have a main report which contains multiple subreports in its detail band. These subreports cause the main PDF output to be of multiple pages. I need to capture the current page number in the subreports. For this I passed a parameter(MAIN_PGNUM) to the subreport with its expression being $V{PAGE_NUMBER}. The problem that I am facing is, in the subreport the parameter MAIN_PGNUM always takes a value of 1, irrespective of the current page number from where the subreport is being called. I beleive the problem is with the evaluation time of the variable $V{PAGE_NUMBER} before it is being passed to the subreport. If I use a Text Field in detail band of Main Report, with expression (""+$V{PAGE_NUMBER}) and evaluation time as 'Now ', I get output as 1 on PDF. But if I use evaluation time as Page(or if I use the text field in header or footer Band), I get the correct page number as output. So, is there any way to change evaluation time of variable before it is being passed onto subreport? I know that if I use the subreport in the summary band, I can get the correct page number passed. But because of the layout and design for final output, I need to have the subreports in the detail band. P.S.: To give an insight, I need to create a TOC with page numbers. For this I was thinking about adding to a map, the key element and its corresponding actual Page number on the PDF. As the key elements are a part of subreports, I need to have the actual page number in subreport to be able to add it to the map. With this map, I would then generate TOC with page numbers. Any suggesstions about other approaches for creating TOC are welcome. Post Edited by alcoholic at 05/27/2009 15:00 Post Edited by alcoholic at 05/27/2009 15:04