Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Control Break by Numeric Value in Interactive Report — Display Text but Sort by Number

Inês Tomé18 hours ago

Hi everyone,

I’m working with an Interactive Report and trying to implement a control break that sorts by a numeric value but displays a corresponding text label.

In my SQL query, I have two derived columns:

get_categoria_do_posto(sg.id) AS CATEGORIA_POSTO, -- text label
get_categoria_ord(sg.id) AS CATEGORIA_ORD -- numeric order

My goal is to group the report using CATEGORIA_ORD so that the control break follows the correct numeric order, rather than the default alphabetical order of CATEGORIA_POSTO.

To achieve this, I’ve set the control break on CATEGORIA_ORD, and in the Column Formatting > HTML Expression, I use:

#CATEGORIA_POSTO#

This way, the user sees the readable text (CATEGORIA_POSTO) in the browser, even though the break is based on the numeric value (CATEGORIA_ORD).

However, when I download the report as PDF, the control break label shows:

Categoria ORD: 1

Instead of the expected text label from CATEGORIA_POSTO.

What I need is:

  • The control break to be sorted by CATEGORIA_ORD (numeric)
  • But the displayed label — both in the browser and in the PDF — to show the text from CATEGORIA_POSTO

Has anyone faced this issue or found a workaround to display the correct label while keeping the numeric sort order?

Thanks in advance!

Comments
Post Details
Added 18 hours ago
0 comments
26 views