Forum Stats

  • 3,837,497 Users
  • 2,262,265 Discussions
  • 7,900,305 Comments

Discussions

Uniquely identify a tag within "After Each Row" part of report template

Tony Andrews
Tony Andrews Member Posts: 534 Bronze Badge
edited Aug 27, 2009 12:50PM in APEX Discussions
I have a report template where I'd like to add some extra HTML on to the end of each report row like this (in After Each Row section):

<td><div id="row#ROWNUM#">xxx</div></td></tr>

I'm trying to use #ROWNUM# to generate a unique ID for each row, but it doesn't work (in Apex 3.2) - I just get 'id="row#ROWNUM#"' in the rendered HTML. Am I doing anything wrong, or is there another way to achieve what I want?

Thanks,

Tony

Edited by: Tony Andrews on Aug 27, 2009 3:29 PM
Tagged:

Answers

  • ATD
    ATD Member Posts: 11,184
    Hi,

    You can use #ROWNUM# in the Before Each Row setting OR you can use #ROW_NUM# in the Column Template settings - according to the popup helps for these settings. There doesn't seem to be any for After Each Row. Unfortunately, the Before Each Row setting is also used for the heading row - a quick test showed that this gets #ROWNUM# whilst the data rows do get the row number correctly.

    However, what you could try is:

    1 - On your report, click the "Add Derived Column" task (on the right of the page)

    2 - Edit this new column, and in the HTML Expression setting enter the DIV tag exactly as you have it in your post (leave off the TD and TR tags as these are not needed - you just need the DIV tag and its contents). #ROWNUM# is replaced by the row number when the report is run.

    Andy
This discussion has been closed.