Search code examples
javascriptbirtrpt

Need help indexing a list in BIRT Report Designer


I have a list ( not advanced, only one key value) that will be used to generate a table in an rptdesign file. What I need to do is have each of these list/table entries indexed as 1,2,3,....n Would there be an auto number setting in BIRT that can allow me to do so or would I need to script it in? If so, where would I input the script. Any assistance would be appreciated


Solution

  • You can just use the expression row.__rownum + 1

    row.__rownum is 0 for the first row, 1 for the second row, and so on. If there aren't any rows, row.__rownum is -1, which is useful inside a visibility expression for list/table items.