Home > Enterprise >  Jquery bold a row in Oracle Apex Classic Report
Jquery bold a row in Oracle Apex Classic Report

Time:01-11

I'd like to bold only rows with values like Suma: in Oracle Apex Classic Report. I tried to execute that feature with below code but I do not know how to replace == with SQL like clause.

$('#myreport td[headers="PROGRAMY"]').filter(function(){
    return $(this).text() == 'Suma:'
}).parent().children().css('font-weight', 'bold');

The code should bold only rows where programy like 'Suma:%

CodePudding user response:

I don't know about a Classic Report, but - why wouldn't you use an Interactive Report instead? Its "Actions" already offers Highlight which lets you do it with no effort.

For example (left: the "Highlight" options; right: the result):

enter image description here

CodePudding user response:

The other way is to create a column in your query, setting it to Hidden.

case when programy like 'Suma:% then 'u-bold' end extra_class

Then add the following HTML expression to your existing column

<span >#PROGRAMY#</span>

As for your jQuery, you may consider

$(this).text().substr(0,4)

eg, check out result of

'Suma:abc'.substr(0,4)
  •  Tags:  
  • Related