Saturday, February 5, 2011

Highlight current record in Interactive Report


- Create an interactive report with an ID column. On the page must be an item (Pxx_ID which holds the ID, for example an item in a form region to edit the details of a selected record, based on the same table on the same page.
- Don't define a link in the reports attribute page, but do it at the ID column. The reason is that you can't use the #ID# syntax in the link icon property.
- At the property of the link icon of the column with the ID, define the image tag with an additional attribute:  value="#ID#". When the user clicks on the link, the value of the ID must be stored in the previously defined id-item. Also define the rest of the brach logic when a user clicks on the link. 

At page level include in the 'Execute when Page Loads' property, the following jQuery javascript:

$('img[value=' + $v('Pxx_ID') +']').parents('tr:first').children('td').css('background-color','#CCFFFF');