Sunday, April 26, 2020

How to hide Interactive Report Control Panel in Oracle APEX

So, you've created a beautiful Interactive Report and to make it even better and cater to user requirements, you added a bunch of filters, formatting for highlights and perhaps some control breaks as well.


Now your report looks even better and much more readable for users .. but now there's a big section on top of the IR showing all the controls/settings you incorporated and they don't want to see it as they are never going to modify it (or you don't want them to modify it so as to retain the fix format for your report).

But how can we do this ? We don't see any out of box option that will let us hide the Control Panel of an Interactive Report.


This is where again the power of humble CSS comes in handy. Let's see how we can achieve this.


So, let's take an example of below IR. By default, it will look like this after applying all the controls. You can see the Control Panel section appearing on top of IR -



To hide the Control Panel -

- Navigate to your IR

- Under Advanced section, enter a Static ID (EMPREPORT in this case)


- Now, let's navigate to Page (Page2: Employees in this case)

- Scroll down in Property Pane until you locate CSS section

- Under Inline section, enter below code (replace EMPREPORT with your IR's Static ID) -

#EMPREPORT_control_panel{

display:none;

}



- Save



Now when you run this report, you'll see the Control Panel section is no more visible and IR still retains all the settings you've incorporated -



Share:

Sunday, April 5, 2020

Open External URLs using Oracle Function

Oracle EBS seamlessly lets us open OAF pages via Functions but there isn't a straight forward way of calling a webpage/external URL via a Function.


Below trick lets us a function which can be attached to a menu to open any external URL.


Create a new function in EBS with below details -


Type: SSWA jsp function


Web HTML: oksAutoRenewalHelp.jsp?thanks=http://www.amazon.com


oksAutoRenewalHelp.jsp is a standard jsp provided by Oracle which simply redirects the http/https request to the URL mentioned in the parameter thanks.

Here, you can mention any external URL as indicated above in bold. Attach the function to desired menu and when clicked, it will open the external URL.



However, above trick will open the external URL in same window.

So what if you want to open the URL in new browser window, thereby retaining the EBS responsibility navigator page ?

To achieve this, you'll need to create a custom jsp (similar to standard one) using below code snippet and use this jsp file in Function definition. This will simply open the URL mentioned in LINK parameter in a new browser window -


<script>

<%out.println("var url=\"" + request.getParameter("LINK").trim() + "\";");%>

var load = window.open(url,'','resizable=yes');history.go(-1);

</script>


Share:

Friday, March 6, 2020

Add Top Scrollbars in Oracle APEX Interactive Reports

By default, Interactive Reports regions show horizontal scrollbars all the way in bottom. Due to this, users usually have to scroll all the way to right in order to find Vertical scrollbar just so that they can scroll to the bottom of the page to find Horizontal scrollbar... and vice-versa to reach top of the page.


As the column headers are fixed to the page, we can add horizontal scrollbar below the column header. This can be done with the power of CSS.

Just add below CSS in page header "Inline CSS" section -


#IRSTATICID .t-fht-thead{

overflow: auto !important;

}


For example, in Employee (IR) report, we set Static ID for IR to EMPREPORT -



Now, add below construct to Inline field under CSS section at Page level -


#EMPREPORT .t-fht-thead{

overflow: auto !important;

}



Save and run the report. You'll see a horizontal scrollbar has been added just under report heading along with original horizontal scrollbar in the bottom of the report -



Share:

Friday, February 21, 2020

Disable an APEX Application without deleting it

We had a requirement to deactivate/disable an APEX application but retain (not delete) the definition from developer console. This was so that users can start using another brand new application as a replacement to this old app and just so that they don't accidentally access the old app from bookmarks etc.


We can manually disable an application via

Shared Components -> Application Definition Attributes -> Availability -> Status


Set Status to Unavailable



And you can set the appropriate message to be shown in "Message for unavailable application" field -



Apply Changes


Share: