📋Enhancing APEX Classic Reports with Instant Excel & PDF Export

🚩Introduction 

  • In Oracle APEX applications, Classic Reports let users view and analyze data in a structured table format. By default, downloading data as Excel or PDF requires using built-in export features, which can be difficult when users need to export reports frequently. 

  • To make it easier, we can add simple custom buttons that allow users to download the report in Excel or PDF with just one click. This can be implemented in Classic Reports without any plugins. This approach makes downloads faster, smoother, and much more user-friendly.

📑Why Simplify Downloads in Classic Reports

In Oracle APEX applications, Classic Reports let users view and analyze data in a simple table format. While APEX provides Printing Options to download reports as Excel or PDF, users usually have to go through multiple steps to generate the file. This can feel slow and repetitive, especially when downloads are needed frequently.

By adding simple custom download buttons, you can make this process much faster and more convenient. With just one click, users can download the report as Excel or PDF directly, without navigating the printing options every time.

  • Download Excel or PDF instantly with a single click

  • Avoid repetitive steps in the printing workflow

  • Saves time for users who export reports often

  • Improve overall user experience and efficiency

👉 Steps to Enable One-Click Download in Classic Reports

We can trigger an event when users download data from Classic Reports by creating custom download buttons, without using any plugins. This Improves the user experience to download the reports. Let’s see how to achieve this in the following steps.

Step 1: 

In the page designer, create the region and select the type as Classsic Report and select the source as sql query and enter your sql quey source for the report. 

Step 2:  

Create one page item and select the type as hidden, we are going to use this page item for downloading differenct file formats by assigning values to this.

Step 3:  

Create two buttons, one for PDF and another for EXCEL and change the button slot position to Copy under the Layout section in the button propertySelect the Text with Icon button template and give the respective icons for the button.

Step 4: 

Select the Classic Report and go to the Attribute section, under that you will see the Printing section in the last and check the Enabled property.

Attribute -> Printing -> Enabled


Once the Printing is enabled, you will new tab Printing in the top right of the properties section.
Now in the Printing tab, under the Output section, select the Derive from Item option in the Format property. Select the hidden page item, which we created in the previous steps and select the View File As option as Attachment.


After this save the page, the download link will be generated and accessible in the Printing tab, Link section. Printing -> Link -> Link Example.  Copy the part of the link which look like:

                                    FLOW_XMLP_OUTPUT_R143578172022238810915

Step 5: 

Now we are going to configure the button actions to download the report in PDF and Excel formats. To do so, click on the button let's take the PDF button, in the properties go to the Behaviour section. Under that select the Redirect to Page in this Application in the Action section.


A popup will be shown, in that select the same page, we will be redirecting to the same page. Now we need to set the hidden page item value to the required file format. To do so, select the hidden page item and set the value PDF for pdf format and under the advanced section, paste the copied link in the Request section.


In the same way, we are going to configure for the Excel button as well. Go to the Behaviour section and under action property, select the Redirect to Page in this Application. A popup will be shown in that select the same page id. Now we need to set the hidden page item value to XLS for excel format and under the advanced section, paste the copied link in the Request section.

Step 6: 

Now save the page and run the application, we will see the report with two buttons Excel and PDF. On clicking on each button, it will download the report in the respective formats pdf and excel.



🔥 Conclusion

Thus, adding custom download buttons for Classic Reports can be done without any plugins. This improves the user experience by enabling one-click Excel or PDF downloads.

Comments

Popular posts from this blog

🔍 Extending Smart Search Filter for Multiple Regions

💡 Designing Dynamic QuickPicks in Oracle APEX

📌Track Active Tab switch in Region Display Selector without any plugins