You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Oracle Apex交互式报表整行高亮实现方案咨询

Solution for Whole-Row Highlighting in Oracle APEX Interactive Report

Got it, let's fix that whole-row highlighting issue for your Oracle APEX interactive report. The approach you're using right now only styles the Status column text, but we can adjust this to color the entire row based on the status value. Here are two reliable methods, starting with the most maintainable one:

This is the official, low-maintenance way—no need to mess with your SQL or write custom CSS directly in queries.

  • Open your interactive report's edit page.
  • Click the Actions menu (top-right of the report) → Format → Conditional Formatting.
  • Hit Add Format Rule to create a rule for each status:
    1. For "Open" status:
      • Rule Name: Open Issues - Green Row
      • Format Type: Select Row (this is the key difference from your current column-only formatting)
      • Condition: Choose Column Value, pick the Status column, set operator to =, and value to Open
      • Style: Click CSS and paste your desired row styling, e.g., background-color: #d4edda; color: #155724; (light green background with dark green text)
    2. Repeat for "On-Hold" and other statuses:
      • For "On-Hold", use something like background-color: #f8d7da; color: #721c24; (light red background with dark red text)
  • Save the rules, then refresh your report—you'll see entire rows highlighted based on status.

Method 2: SQL + Custom CSS (For Advanced Customization)

If you need more control and prefer working with SQL, you can generate CSS classes per row and apply them directly.

Step 1: Modify Your Query

Add a computed column to generate a unique CSS class for each status:

SELECT 
    "P_IT_ISSUES"."ISSUE_SUMMARY" as "ISSUE_SUMMARY", 
    decode("P_IT_PEOPLE_1"."PERSON_NAME",NULL,'Unassigned', "P_IT_PEOPLE_1"."PERSON_NAME") as "ASSIGNED_TO", 
    "P_IT_ISSUES"."STATUS" as "Status",
    -- New column to define row CSS class
    CASE 
        WHEN "P_IT_ISSUES"."STATUS" = 'Open' THEN 'row-open'
        WHEN "P_IT_ISSUES"."STATUS" = 'On-Hold' THEN 'row-on-hold'
        ELSE 'row-closed'
    END AS "ROW_CLASS"
FROM "P_IT_PEOPLE" "P_IT_PEOPLE_1", 
     "P_IT_DEPARTMENTS" "P_IT_DEPARTMENTS", 
     "P_IT_PEOPLE" "P_IT_PEOPLE", 
     "P_IT_ISSUES" "P_IT_ISSUES" 
WHERE "P_IT_ISSUES"."IDENTIFIED_BY_PERSON_ID"="P_IT_PEOPLE"."PERSON_ID" 
  AND "P_IT_ISSUES"."ASSIGNED_TO_PERSON_ID"="P_IT_PEOPLE_1"."PERSON_ID"(+) 
  AND "P_IT_ISSUES"."RELATED_DEPT_ID"="P_IT_DEPARTMENTS"."DEPT_ID"

Step 2: Attach the CSS Class to Rows

  • Go back to your interactive report's edit page, switch to the Attributes tab.
  • Scroll down to the Row Attributes section, and in the CSS Classes field, enter &ROW_CLASS. (this references the new column we added).

Step 3: Add Custom CSS to Your Page

  • Open your page's Page Properties → CSS → Inline.
  • Paste in the styles for your row classes:
.row-open { background-color: #d4edda; color: #155724; }
.row-on-hold { background-color: #f8d7da; color: #721c24; }
.row-closed { background-color: #fff3cd; color: #856404; } /* Example for closed status */

Save everything, refresh your report, and you'll see entire rows styled based on their status.


内容的提问来源于stack exchange,提问作者Velocity

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.07 12:58:13