Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
toc with dynamic page numbers
digiSeryog
hi i have a toc it looks like
1. Topic 1 ............
2. Topic 2 ............
2.1 Bla ............
2.2 Bla ............
3. Topic 3 ............
each topic is an label and i want to add a page number to the end of the text when all charts/tables are generated
1. Topic 1 ............1
2. Topic 2 ............3
2.1 Bla ............3
2.2 Bla ............3
3. Topic 3 ............4
have someone ideas how to add the pagenumber?
Find more posts tagged with
Comments
mwilliams
If you store the page number into a persistent global variable, in the onCreate of each element, you can recall the variable in the onRender of your TOC. You'll have to make sure you use separate run and render tasks for this to work, though. Let me know if you need an example. I've got one somewhere, I just need to find it.
digiSeryog
thx it works<br />
<br />
<strong class='bbc'>onCreate:</strong><br />
<br />
reportContext.setPersistentGlobalVariable("pageTopic1", pageNumber+"");<br />
<br />
<strong class='bbc'>onRender:</strong><br />
<br />
this.text += reportContext.getPersistentGlobalVariable("pageTopic1");<br />
<br />
<strong class='bbc'>java implement:</strong><br />
<br />
IRunTask run = engine.createRunTask(design);<br />
<br />
run.setParameterValues(mp);<br />
run.run(config.getLayoutPath() + "/" + rpt+"-bin");<br />
//run.close();<br />
<br />
IReportDocument doc = engine.openReportDocument( config.getLayoutPath() + "/" + rpt +"-bin");<br />
<br />
IRenderTask render = engine.createRenderTask(doc);<br />
render.setRenderOption( options );<br />
render.render();<br />
run.close();<br />
render.close();<br />
<br />
File f = new File( config.getLayoutPath() + "/" + rpt +"-bin");<br />
f.delete();
mwilliams
No problem. Let us know whenever you have questions!