I've got an interactive report in Apex with some columns.
The user has the option to download the report as CSV file with the standard functionality.
Is there a way to hide a column in the export but display it on the screen.
(Background: one column is a custom link that should not be exported into the CSV)
Thank you !
Paul
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,'EMPTY') NOT 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, 'EMPTY') != 'SEND_EMAIL'
This one did not work for me:
NVL(:REQUEST,'EMPTY') NOT IN('CSV','XLS','PDF','XML','RTF','HTMLD')
So another workaround could be the following:
instr(nvl(:REQUEST,'~'),'XLS') = 0 and instr(nvl(:REQUEST,'~'),'PDF') = 0 and instr(nvl(:REQUEST,'~'),'HTMLD') = 0
Same logic applies for csv, rtf, etc.
The most upvoted answer didn't work for me.
The workaround from #George worked for me as well:
instr(nvl(:REQUEST,'~'),'XLS') = 0 and
instr(nvl(:REQUEST,'~'),'CSV') = 0
I applied this at an Interactive Report column (APEX 21.2)
Related
JavaScript code to add 60 days automatically to release_date field when enter an date to resignation_date field in Oracle Apex .
I think Damir's suggestion to use a Dynamic Action with PL/SQL is a good one. But if you want a true client-side solution, look into https://date-fns.org/. See the addDays function: https://date-fns.org/v2.8.0/docs/addDays
How can I overcome this {Ajax call returned server error ORA-01403: no data found for} problem? Problem arises ,When I want to set Order_Status_Field value 2 in IG where query was Order_Status_Id=1.
My IG query was :
SELECT P.ORDER_ID, P.ORDER_STATUS_ID FROM ORDER_DETAILS P WHERE P.ORDER_STATUS_ID=1;
My Workspace Name: ZISHAN
User: ZISHANIIUC#GMAIL.COM
Pass: 123
Problem Page No: 3 (Order Report)
1. Before Updating Order Status:
2. After Updating Order Status:
I saw your are using standard "Interactive Grid - Automatic Row Processing (DML)" process, which is an AJAX approach. this apex behaviour is a call ajax using json format for data. so you have a filter on your sql query
SELECT T.ORDER_ID,
T.TABLE_ID,
T.TAKEN_BY,
T.ORDER_STATUS_ID,
T.TOTAL_COST
FROM ORDER_DETAILS T
WHERE T.ORDER_STATUS_ID=2
and you want to update your filter column (data has change) it's seem like apex do not find the prevouis data filter and return no_data_found (not really sure what happen ) but for solution : .
put your filter in interactive grid --> action button ---> filter
or
write your own custom process
When i tried do alter the process from the "Interactive Grid - Automatic Row Processing (DML)" that apex creats, for my own custom PL/SQL Code i needed to choose one of the columns from the query to be the primary key, and then i could use the pl/sql custom process as found here on this blog:
https://mikesmithers.wordpress.com/2019/07/23/customizing-dml-in-an-apex-interactive-grid/ without the no data found error.
I have APEX 5 app and want to create Interactive Report region with pl/sql source. What I want is to have some columns as link to another page. But, when I put in select, for example, select d_01, ..., '' || d_26 || '' d_26 I get column d_26 as text a href="f? ..., but not value as link.
What am I doing wrong?
You will have to unescape special characters of the column. Change Columns > Security > Escape special characters property of link column to No
Also, you can do this in a declarative way by changing Column Type from Plain Text to Link and then linking it to the desired page.
So I've been working on an application in Oracle Application Express 5, in which I have multiple interactive reports with an update form. I have noticed that when I use aliases in the SQL query of the report, the edit on the report stops working. When I want to edit a row, I just get the blank form for adding a new entry, even though I can see in the URL that the primary key has been sent.
Is this a known issue, and is there any way to make this work?
My column names are partly Croatian abbreviations, so leaving the original column names would be too messy.
Here's an example of my code which works:
select "SIFRA_A_P",
"SIFRA_P",
"NAZIV_P",
"CIJENA"
from "#OWNER#"."PJESMA"
Writing it like this
select "SIFRA_A_P" as "ALBUM",
"SIFRA_P" as "ID",
"NAZIV_P" as "TITLE",
"CIJENA" as "PRICE"
from "#OWNER#"."PJESMA"
makes it stop working properly.
Go on your page where you have the problematic report, go at Report Attributes and in the Link Column section now you have something like this
Name Value
Item 1:P3_SIFRA_A_P Value 1: #SIFRA_A_P#
Item 2:P3_SIFRA_P Value 2: #SIFRA_P#
Change the #SIFRA_A_P# to #ALBUM# and #SIFRA_P# to #ID# in the value column.
include rowid in your select statement.
select rowid,"SIFRA_A_P" as "ALBUM", "SIFRA_P" as "ID", "NAZIV_P" as "TITLE", "CIJENA" as "PRICE" from "#OWNER#"."PJESMA"
I'm using Apex 4.2 and Oracle 11.g
I have a column called "Transaction Detail" that I display in an interactive report. The report column's Display Text As selection is set to "Standard Report Column".
The report column is selected from a varchar2 table column called transaction_detail. I'm just building the table as well. The transaction_detail table column is populated from a Procedure with the following code:
Insert into mail_log (transaction_type, transaction_detail)
Values ('FTP Transaction',
'Filename=' || p_image_filename ||
'<br/>' || 'Event Description=' || l_event_description);
The procedure code can be easily changed.
The report just displays:
Filename=myfile.jpg<br/>Event Description=my description
I've tried using CHR(13) in the procedure instead of the html characters and then tried to replace the CHR(13) in apex with html characters. Instead of simply selecting the column:
, transaction_detail
I tried:
, REPLACE(transaction_detail, CHR(13), '<br/>')
but I couldn't get past an Apex error: ORA-12899: value too large for column "APEX_040200"."WWV_FLOW_WORKSHEET_COLUMNS"."DB_COLUMN_NAME" (actual: 49, maximum: 30)
Shouldn't Apex be able to interpret the as a new line if the column is a Standard Report Column?
Thanks for looking at this.
This was answered on the OTN forum by Jorge (jrimblas) and others. The link to that discussion is above. Short summary, In the stored procedure I got rid of the '<br/>' and replaced it with CHR(13). Then, in the Apex interactive report, I did NOT need to change the column to "Standard Report Column". I placed the following in the "HTML expression" for the column.
<div style="width:240px">
<pre style="font-family:Arial; font-size:12px; white-space:pre-wrap">#TRANSACTION_DETAIL#</pre>
</div>