Discussions
Categories
- 196.8K All Categories
- 2.2K Data
- 235 Big Data Appliance
- 1.9K Data Science
- 449.9K Databases
- 221.6K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 549 MySQL Community Space
- 478 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3K ORDS, SODA & JSON in the Database
- 532 SQLcl
- 4K SQL Developer Data Modeler
- 186.9K SQL & PL/SQL
- 21.3K SQL Developer
- 295.5K Development
- 17 Developer Projects
- 138 Programming Languages
- 292.1K Development Tools
- 104 DevOps
- 3.1K QA/Testing
- 645.9K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 154 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.1K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 17 Java Essentials
- 158 Java 8 Questions
- 85.9K Java Programming
- 79 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.2K Java SE
- 13.8K Java Security
- 203 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 401 LiveLabs
- 37 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.6K Other Languages
- 2.3K Chinese
- 171 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 230 Portuguese
APEX_DATA_EXPORT.ADD_HIGHLIGHT buggy behavior

I'm using the APEX_DATA_EXPORT package to export an interactive report to Excel. I can't create the highlights I need in the IR because of the way the cell-based conditions work. You can set Cell X to be highlighted when the value of Cell X meets a certain condition. However, you can't set Cell X to be highlighted when the value of Cell Y meets a certain condition. Therefore, in the on-screen report, I'm highlighting the cells using CSS. However, that highlighting gets lost when you export to Excel.
The APEX_DATA_EXPORT.ADD_HIGHLIGHT procedure does allow (in fact it essentially requires) that cell highlighting be defined by two fields rather than one. I set up the highlights for one of two columns that required them and everything worked perfectly. I then set up the highlights for the second column, which uses the same color logic, but the column data can be different. Everything looked good until I realized that in the cases where the data was different and the colors should be different, Column 2 had the same background color as column 1. I went through multiple iterations of hair-pulling verifying that I was looking a the right columns/etc. for the highlight values.
There are six ADD_HIGHLIGHT calls for the two columns. What appears to be happening is that once any call-level color is defined for a given row, any other cell-level highlight used in that row will utilize the first color. Immediately below are the six called to ADD_HIGHLIGHT. Below that is a screenshot of three different behaviors. The leftmost is what happens when the code in my export procedure matches the below exactly. The middle cell shows what happens when I commented out the first three ADD_HIGHLIGHT calls (i.e. the ones for the 'Initial Rating' column. The last shows what happened when I moved the three calls for the 'Current Rating' column above the three ADD_HIGHLIGHT calls for the 'Initial Rating' column in my export procedure.
Maybe I'm doing something really stupid that I'm just not seeing, but if so... I'm not seeing it.
apex_data_export.add_highlight( p_highlights => l_highlights, p_id => 1, p_value_column => 'INIT_RATING_HL', p_display_column => 'INITIAL_RATING', p_text_color => '#000000', p_background_color => '#FF0000'); apex_data_export.add_highlight( p_highlights => l_highlights, p_id => 2, p_value_column => 'INIT_RATING_HL', p_display_column => 'INITIAL_RATING', p_text_color => '#000000', p_background_color => '#FFFF00'); apex_data_export.add_highlight( p_highlights => l_highlights, p_id => 3, p_value_column => 'INIT_RATING_HL', p_display_column => 'INITIAL_RATING', p_text_color => '#000000', p_background_color => '#33CC33'); apex_data_export.add_highlight( p_highlights => l_highlights, p_id => 4, p_value_column => 'CUR_RATING_HL', p_display_column => 'CURR_RATING', p_text_color => '#000000', p_background_color => '#6666CC'); apex_data_export.add_highlight( p_highlights => l_highlights, p_id => 5, p_value_column => 'CUR_RATING_HL', p_display_column => 'CURR_RATING', p_text_color => '#000000', p_background_color => '#CC99FF'); apex_data_export.add_highlight( p_highlights => l_highlights, p_id => 6, p_value_column => 'CUR_RATING_HL', p_display_column => 'CURR_RATING', p_text_color => '#000000', p_background_color => '#FF66FF');
Answers
-
I think I have exactly the same issue with row level highlights in Apex 20.2.
When I execute the same code in a free APEX.oracle.com workspace ( version 21.2 ) it works fine.
Did you solve the problem or is it a bug that is fixed in a later version of APEX?