I'm working with oracle apex where i had a report type calender.
Now, I need to use the CSS attributes
I tried to write a sql query which contain case statement as following: " case ACTIVE_SERVER
when (SELECT DISTINCT ACTIVE_SERVER FROM EBA_BT_BACK_UP WHERE ACTIVE_SERVER =:P107_ACTIVE_SERVER) then
(SELECT SERVER_COLOR FROM EBA_BT_SERVERS WHERE SERVER_ID =:P107_ACTIVE_SERVER)
end as css_class"
and in the attributes css section i choosed the "css_class" but no color appear in the calender
How can I achieve that?
Related
is it possible to add a dynamic value on filter.
I'm trying to save a report with a filter using the current user:
A solution to this problem is to include the variable as a column in your query and then filter on that column.
Example:
Your select would be something like
SELECT
your_value1,
CASE WHEN created_by = :APP_USER THEN 1 ELSE 0 END AS is_current_user
FROM
your_table
If you then set a filter on is_current_user you'll only get the rows where created_by = :APP_USER.
Maybe it is possible; though, I don't know how. Whichever option I tried:
:APP_USER
&APP_USER.
v('APP_USER')
created a page item whose source is :APP_USER and base filter on that item
nothing worked. Apex applies single quotes around those expressions and - therefore - treats them as strings, e.g. ':APP_USER'.
However, what you might do in this particular case is to edit the query itself and add WHERE condition:
where blocked_by = :APP_USER
That would certainly work.
I've been browsing and to no avail, I can't find any information on how to select/show only the column header. My objective is to select only column header . I've uploaded a picture for better illustration on my objective. In the picture shown, I'm trying to only select and display the one ive highlighted in the red box.
Oracle table:
The only information I found from the net is selecting an individual column, and with that. It will display the data as well which is not my objective. my main objective is to only select column headings.
In Oracle APEX SQL Workshop you can describe a table with this command:
desc table_name
If you're using a query, you can click on the "Describe" tab below the query and above the result grid.
I had a similar requirement, so in page designer I plugged in a "Where Clause = Sysdate-1"
you can use select and null to pick columns and use alias to name them
select null AS column_name,null AS column_name
from TABLE_NAME
The first problem is that I have a button. I created a process called nextweek( to get data for next week from reservation table). I tried this The PL/SQL only as a trial:
begin
if :RESERVNO is null then
select RESERVNO
into :RESERVNO
from reservation;
end if;
end;
but the page keeps telling me "NO DATA FOUND". I would like to create a report with the result of my PL/SQL Query
My second problem is that I want to take values from a textfield and use it in my PL/SQL Query in another button as the "ACCEPT" in oracle.
As I understand, you need following:
Create report: click Create new page button (or create region if you already have a page), then choose region type Report. Write your source SQL query in the field Region source (choose Source type - SQL Query).
Create an item (textfield). For example, with the name P_MY_ITEM
Create a button. Here you don't need to change default properties. (Action on button click should be Submit page)
Add this item name to the source query in the region. It should look like:
select column1, column2, column3
from table1, table2, table3
where column4 = :P_MY_ITEM
and <other conditions>
After that, user can write something to the input field and press the button, page will be reloaded, and report will be changed accordingly to the item value.
Oracle Apex 4.2
Oracle 11g
Below is some SQL that generates an interactive report.
I have 2 pages items both are date pickers named :P55_STARTD and P55_ENDD.
I've also have a button to fire a refresh on all the report region. But still get nothing. I thing this is some type of session issue. Any ideas guys.
Select * from
(SELECT REPORT_MISSED_ORDERS_ALL.CUSTOMER_REF,
REPORT_MISSED_ORDERS_ALL.LINE_NO,
REPORT_MISSED_ORDERS_ALL.SKU,
REPORT_MISSED_ORDERS_ALL.PICK_FROM,
REPORT_MISSED_ORDERS_ALL.ORDERED_BY,
REPORT_MISSED_ORDERS_ALL.HR,
REPORT_MISSED_ORDERS_ALL.ORDER_PLACED_DATE,
TO_CHAR(REPORT_MISSED_ORDERS_ALL.ORDER_PLACED_DATE, 'MONTH') AS months,
LOGI_ORDERS.AUTH_TYPE_ID
FROM REPORT_MISSED_ORDERS_ALL
LEFT JOIN LOGI_ORDERS
ON REPORT_MISSED_ORDERS_ALL.CUSTOMER_REF = LOGI_ORDERS.CALLNUMBER
AND REPORT_MISSED_ORDERS_ALL.LINE_NO = LOGI_ORDERS.LINE_NUMBER)t1
where T1.AUTH_TYPE_ID is null
and trunc(t1.ORDER_PLACED_DATE) between :P55_STARTD and :P55_ENDD ;
Have you put date items in "Page items to submit" field?
How can I load images dynamically in place of cell data in a report in Oracle Application Express?
E.g.
A table has 'Y' and 'N' entries. When I display it as a report, I want to use certain images according to the data in the table. If it's a 'Y', display one image and if it's a 'N', display another image.
You can do this:
select id,
htf.img (case when flag='Y' then 'yesicon.png'
else 'noicon.png' end) flag_icon
from mytable
where ...
You probably need to add a path for the filenames e.g. '#WORKSPACE_IMAGES#yesicon.png' etc.
If you will be using this a lot it would be worth building a function to simplify it:
select id,
mypkg.yesno_icon (flag) flag_icon
from mytable
where ...