I had a requirement today to use the Saved Reports feature of APEX to create a list of reports for users to pick from. The issue was with the default report name. We wanted the name to reflect what the report was designed for. Showing a label of “All Data” was mare appropriate for the default report rather than the given “1. Primary Report” label.

Default

Messages and Translation

As with many things software, there is almost always more than one way to accomplish a result.

In Oracle, you can change most of the text options using translations. Oracle invests a lot of effort in supporting multi lingual implementations. If this is your situation also, I strongly recommend using the translation mechanic to change the default text. Even if you only develop in one language, you can leverage this capability.

Creating a Text Message with the value of APEXIR_PRIMARY_REPORT will change the listing for the “PRIMARY REPORT” label on ALL interactive reports across your application.

Message Setting

The value entered for the translation will apply to all interactive reports in your application.

Result of Test Message

Option: Specific Value per Interactive report

If your use case is to have the default report named differently on each interactive report instance, you have an option to adjust the listing using Dynamic Actions and a bit of JavaScript.

Create a dynamic action on the Interactive Report region – for the After Refresh event.

Dynamic Action Event

Add an execute JavaScript action.

Dyanmic Action Code

The concept of the JavaScript is to locate the report list and re-name the un-translated APEX provided name to a custom value.

var my_primary_report_name = 'My Name of Choice';

$('#'+this.triggeringElement.id+' .a-IRR-selectList').find('option').each(function(index,elem){
  $(elem).text(function(i,text){
    return text.replace('1. Primary Report',my_primary_report_name);
  }); // end of text change
}); // end of option walk

This JavaScript code executed in a Dynamic Action – can reference the REGION_ID, allowing each interactive report implementation to have a different name.

3 Interactive Report Example

References

Documentation
Full list of text replacements in Oracle Documnets
Inspiration and Similar Posts
Stack Overflow – Post with similar methodology for 4.2