Apex – Interactive Report – Hide Column in CSV Download?

You can hide it by putting a condition on the column of type PL/SQL Expression and using the following as the expression:

NVL(:REQUEST,’MY_REQ’) IN(‘CSV’,’XLS’,’PDF’,’XML’,’RTF’,’HTMLD’)

That will check the APEX bind variable “REQUEST”, and if it is CSV, XLS, PDF, XML, RTF or HTML then the column will not be shown!

More info

To stop a column from showing up for an email, you can use the following:

NVL(wwv_flow.g_widget_action, ‘MY_REQ’) != ‘SEND_EMAIL’

 

Advertisements

Move the entire row to next page when one or more text fields data overflows to next page

Usually, Clients needs data to be displayed neatly at server UI level though it would be an excel extract or pdf extract.

This tip is useful when report text fields data overflows to next page with wired look and feel.

Solution : 
1) Remove “Detail Over flow” option for all the text elements that are kept on detail band if  the property is already applied.
2) Select the detail band and look into the properties of it.

Chose Split Type = Prevent instead Stretch

 

Screenshot_1

Oracle apex Classic report CSV download to Restrict the columns

Use the below code to restrict what are the columns download the csv download in Oracle apex Classic report.

1. if one column is hidden column, if you download the csv you want the hidden column
NVL(:REQUEST, 'MY_REQ') LIKE 'FLOW_EXCEL_OUTPUT%'
NVL(:REQUEST, 'MY_REQ') NOT LIKE 'FLOW_EXCEL_OUTPUT%'

Check the below example

https://apex.oracle.com/pls/apex/f?p=44666:2:104537404919649::NO:::

Restrict Numbers only in apex 5 input type

Use the below javascript in common js file and change input type in number the input only accept the 0-9 and dot only.

$(document).ready(function() {
    $(".number_field").keydown(function (e) {
        // Allow: backspace, delete, tab, escape, enter and .
        if ($.inArray(e.keyCode, [46, 8, 9, 27, 13, 110, 190]) !== -1 ||
             // Allow: Ctrl+A, Command+A
            (e.keyCode === 65 && (e.ctrlKey === true || e.metaKey === true)) || 
             // Allow: home, end, left, right, down, up
            (e.keyCode >= 35 && e.keyCode <= 40)) {
                 // let it happen, don't do anything
                 return;
        }
        // Ensure that it is a number and stop the keypress
        if ((e.shiftKey || (e.keyCode  57)) && (e.keyCode  105)) {
            e.preventDefault();
        }
    });
});

RUPEE SYMBOL IN REPORTS IN ORACLE APEX 4.2 USING HTML

Most of the Applications includes Accounts Reports like Employee Payroll Reports, Company Purchase Reports, Invoice Reports,etc.  Now using this method user can add RUPEE symbol in your reports.
Step 1: Create Report (Interactive Report (or) Classical Report)
Step 2: Place the below SQL Query in Report Region Source
SELECT    ‘<span style=”font-weight:bold;”>₹</span>’
       || ‘ ‘
       || CASE
             WHEN NVL (SUM (amount), 0) = 0
                THEN ‘0.00’
             ELSE TO_CHAR (NVL (SUM (amount), 0), ‘99999999999.99’)
          END amount
  FROM reimbursement_dtls
OUTPUT: