Sign Up

Hey, Dev!
Are you looking for a forum full of active developers to help you?
So if you want to:
➡️ Get answers for your development issues
➡️ Help others
➡️ Write an article
➡️ Get rewarded for your active participation
Then you are going to love this place.

Have an account? Sign In


Have an account? Sign In Now

Sign In

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

Sorry, you do not have a permission to ask a question, You must login to ask question.

Forgot Password?

Need An Account, Sign Up Here
Sign InSign Up

OrclQA.Com

OrclQA.Com Logo OrclQA.Com Logo
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Blog
  • New Questions
  • Tutorials
    • Oracle Apex
    • Python
  • Tags
  • Users
  • Badges & Points
  • About
Home/Questions/Q 3792
In Process
pavlos
pavlos

pavlos

  • 16 Questions
  • 64 Answers
  • 0 Best Answers
  • 173 Points
View Profile
  • 0
pavlosProfessional
Asked: November 28, 20202020-11-28T15:54:25+05:30 2020-11-28T15:54:25+05:30

How to highlight row based on condition using Classic Report

  • 0

Hi!

I use nested report with two Classic Reports, how can I use highlight based on column value for both?.

Thanks in advance!

oracle apex
  • 9
  • 107
  • 0
  • 0
  • Share
    • Share on Facebook
    • Share on Twitter
Answer

    9 Answers

    1. afzal

      afzal

      • India
      • 0 Questions
      • 23 Answers
      • 0 Best Answers
      • 154 Points
      View Profile
      afzal Professional
      2020-11-29T15:33:58+05:30Added an answer on November 29, 2020 at 3:33 pm

      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”});
      }
      });

      • 1
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
      • pavlos

        pavlos

        • 16 Questions
        • 64 Answers
        • 0 Best Answers
        • 173 Points
        View Profile
        pavlos Professional
        2020-11-29T19:59:19+05:30Replied to answer on November 29, 2020 at 7:59 pm
        This answer was edited.

        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

        • 0
        • Share
          Share
          • Share on Facebook
          • Share on Twitter
        • afzal

          afzal

          • India
          • 0 Questions
          • 23 Answers
          • 0 Best Answers
          • 154 Points
          View Profile
          afzal Professional
          2020-11-30T10:19:15+05:30Replied to answer on November 30, 2020 at 10:19 am

          Hi pavlos,

          are you using plugging for nested report ?

           

           

           

          • 0
          • Share
            Share
            • Share on Facebook
            • Share on Twitter
          • pavlos

            pavlos

            • 16 Questions
            • 64 Answers
            • 0 Best Answers
            • 173 Points
            View Profile
            pavlos Professional
            2020-12-03T01:32:56+05:30Replied to answer on December 3, 2020 at 1:32 am
            This answer was edited.

            I created nested report manually.

            • 0
            • Share
              Share
              • Share on Facebook
              • Share on Twitter
    2. pavlos

      pavlos

      • 16 Questions
      • 64 Answers
      • 0 Best Answers
      • 173 Points
      View Profile
      pavlos Professional
      2021-01-23T15:23:13+05:30Added an answer on January 23, 2021 at 3:23 pm
      This answer was edited.

      Hi!

      How can I compare date column with JavaScript?
      I want to change row color where date is less than current date.

      • 0
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
      • Vinish

        Vinish

        • 1 Question
        • 422 Answers
        • 40 Best Answers
        • 2k Points
        View Profile
        Vinish Legendary
        2021-01-24T07:27:08+05:30Replied to answer on January 24, 2021 at 7:27 am

        Create a dynamic action as Style type and specify the JavaScript expression for the dynamic action as following:

        new Date($v("P1_yourdate")).getTime() < new Date($v("P1_CURRDATE")).getTime()

        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.

        • 0
        • Share
          Share
          • Share on Facebook
          • Share on Twitter
        • pavlos

          pavlos

          • 16 Questions
          • 64 Answers
          • 0 Best Answers
          • 173 Points
          View Profile
          pavlos Professional
          2021-01-24T14:02:23+05:30Replied to answer on January 24, 2021 at 2:02 pm
          This answer was edited.

          How can I get vales into :P1_yourdate for all rows and compare them?

          • 0
          • Share
            Share
            • Share on Facebook
            • Share on Twitter
          • Vinish

            Vinish

            • 1 Question
            • 422 Answers
            • 40 Best Answers
            • 2k Points
            View Profile
            Vinish Legendary
            2021-01-25T06:19:08+05:30Replied to answer on January 25, 2021 at 6:19 am

            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).

            • 0
            • Share
              Share
              • Share on Facebook
              • Share on Twitter
    3. afzal

      afzal

      • India
      • 0 Questions
      • 23 Answers
      • 0 Best Answers
      • 154 Points
      View Profile
      afzal Professional
      2021-01-25T10:14:33+05:30Added an answer on January 25, 2021 at 10:14 am

      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”});
      }
      });

      • 0
      • Share
        Share
        • Share on Facebook
        • Share on Twitter

    You must login to add an answer.

    Forgot Password?

    Sidebar

    Ask Question
    Write a Post
    • Recent
    • Answers
    • Engr. SM Hasem

      How to insert item data with default IG in IG ...

      • 0 Answers
    • suriya

      how to download multiple view/table data in one excel

      • 1 Answer
    • Engr. SM Hasem

      How to add one column data to another column in ...

      • 11 Answers
    • Bheem

      What is best way to design school time table?

      • 0 Answers
    • Vinish
      Vinish added an answer Below is an example to download the CSV file using… January 25, 2021 at 12:54 pm
    • afzal
      afzal added an answer step 1--- report query like-- select EMPNO, ENAME, JOB, MGR,… January 25, 2021 at 10:14 am
    • Engr. SM Hasem
      Engr. SM Hasem added an answer Thank you so much sir. January 25, 2021 at 9:22 am
    • Vinish
      Vinish added an answer For all rows? It seems you want to compare the… January 25, 2021 at 6:19 am
    • Vinish
      Vinish added an answer Ok, then create a dynamic action on the bill month… January 25, 2021 at 6:17 am

    Recent Blog Posts

    • Vinish

      Pro*C - Connect to Oracle Database

    • Vinish

      Copy URL to Clipboard on Button Click Examples

    • Vinish

      Find When Your Mac Was Last Shutdown

    • Vinish

      Oracle SELECT Statement

    • Vinish

      Python Append List to List Example

    Explore

    • Home
    • Blog
    • New Questions
    • Tutorials
      • Oracle Apex
      • Python
    • Tags
    • Users
    • Badges & Points
    • About

    © 2020 OrclQA.Com. All Rights Reserved. Privacy Policy