Posts

Sending Charts as Email Attachments from APEX Application

Image
In this blog, I will share well known process of sending a chart from an Oracle APEX application as an email attachment. This feature can be especially useful for sharing data visualizations directly from your application with team members or stakeholders. We will cover the steps to create a chart, add a button to trigger the email, and use both JavaScript and PL/SQL to send the chart as an attachment. Step 1: Create a Chart To begin, we need to create a chart in our Oracle APEX application. For this demonstration, let's create a chart with a static ID reg_dept_emp_chart . Instructions: In your Oracle APEX application, create a new chart region. Set the Static ID of the chart region to reg_dept_emp_chart . Step 2: Add a Button Next, we will add a button to trigger the process of sending the chart as an email attachment. Step 3: JavaScript Function to Save the Chart Now, we will create a JavaScript function called saveJETChart . This function captures the chart as an image and send

Creating Custom Date Selectors in Oracle APEX: Month, Quarter, and Year

Image
Introduction Ever craved more control over date pickers in your Oracle APEX applications? The buit-in options might not always offer the perfect fit. This post explores a technique to create custom date selectors for specific needs: Month Selector  -> choose just month and year Quarter Selector -> select quarter and year Year Selector -> pick only the year  Crafting Custom Selectors:   Create Text Fields: We'll create three page items of type Text Field  : P2_MONTH, P2_QTR and P2_YEAR Add Calendar Buttons with jQuery: We'll leverage jQuery to dynamically add calendar buttons next to each text field. These buttons trigger the datepicker functionality. In the Post Text attribute of each item, add the following code: For P2_MONTH < button type = "button" style = " height:100%" class = "a-Button a-Button--calendar" onclick = " $ ('#P2_MONTH'). datepicker ('show');" > < span class