Jump to content
JasperReports Library 7.0 is now available ×

Level1Index in TOC report


Recommended Posts

Hi Community, 

Did anyone try level1Index in TOC report ? By default there is a variable called "level2Index" to display level-2 but there is no a variable to display level-1 index. 

The out of the box expression for level2Index is $F{level} == 1 ? 0 : ($F{level} == 2 ? ($V{level2Index} + 1) : $V{level2Index})

Tried creating level1Index as similar to above one as $F{level} == 0 ? 0 : ($F{level} == 1 ? ($V{level1Index} + 1) : $V{level1Index}) but it doesn't work and thrown null value.

In other words, from below I need the bold ones in level1 index in TOC. 


1. leve1

         1. level2

          2. level2

2. level1




Any help would appricated on this. 

Thank you in advance. 

Sadakar Pochampalli

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...