Hi!
I use nested report with two Classic Reports, how can I use highlight based on column value for both?.
Thanks in advance!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
step -1
give class name for your report like– emp
at report region , appearance section “CSS Classes” => emp
step -2
create a dynamic action at page load
action == execute javascript code
like–
//– replace your conditional column with “DEPTNO”, AND ALSO REPLACE TEXT ==’10’ WITH YOUR CONTENT
$(‘.emp [headers=DEPTNO]’).each(function(){
console.log($(this).text());
var text=$(this).text();
if (text == ’10’){
$(this).closest(“tr”).children().css({“background-color”:”red”});
}
});
Thanks a lot!
It works for parent region, but doesn’t work for nested child region.
I would like to disable hover, background color is changed to default when mouse is over highlighted row
Hi pavlos,
are you using plugging for nested report ?
I created nested report manually.
step 1—
report query like–
select EMPNO,
ENAME,
JOB,
MGR,
HIREDATE,
SAL,
COMM,
DEPTNO,
to_date(to_char(sysdate,’dd-mm-yyyy’),’dd-mm-yyyy’)-to_date(to_char(HIREDATE,’dd-mm-yyyy’),’dd-mm-yyyy’) as dummy
from EBA_DEMO_CHART_EMP
step-2 column-name– HIREDATE
KEEP HTML EXPRESSION LIKE — <span data-id=#DUMMY#>#HIREDATE#</span>
step-3 make dummy column as hidden column
step-4
give class name for your report like– emp
at report region , appearance section “CSS Classes” => emp
step-5
create a dynamic action at page load
action == execute javascript code
like–
//– replace your conditional column with HIREDATE
$(‘.emp [headers=”HIREDATE”]’).each(function(index,element){
var x= element.innerHTML;
//console.log($(element).children().attr(‘data-id’));
var text= parseInt($(element).children().attr(‘data-id’));
if (text > 1){
$(this).closest(“tr”).children().css({“background-color”:”red”});
}
});
Hi!
How can I compare date column with JavaScript?
I want to change row color where date is less than current date.
Create a dynamic action as Style type and specify the JavaScript expression for the dynamic action as following:
Here the P1_yourdate is the item with which you want to compare with the current date. Also, create an item P1_currdate and on page load assign the current date to it.
How can I get vales into :P1_yourdate for all rows and compare them?
For all rows? It seems you want to compare the date in the interactive grid. Then you just need to refer the IG column (:YOURDATE) instead of the page item (P1_yourdate).