does someone know how to put a text next to or instead of the icon of a select list of an element in Oracle APEX. For example I use the icon "calender search", how do I put the word "month" next to or instead of the icon.
Thank you all.
The component "Popup LOV" supports icons declaratively if the list of values is created as a shared component.
Example:
create a List Of Values shared component with source:
WITH vals (rv, dv, icon) AS
(
SELECT 1, 'foo', 'fa-user' FROM DUAL UNION ALL
SELECT 2, 'bar', 'fa-user' FROM DUAL
)
SELECT rv, dv, icon FROM vals
and map column "icon" to value "Icon" in the column mapping section.
Use this as a shared component source for your list of values (needs to be Popup LOV)
Related
I want to add an option for the user when creating the report to select the columns that the report will show. See the attached image below on how it is suppose to look.
Is there a way to do that?
I don't know about the parameter dialog, but assuming that your column names are in an array.
You can have an SQL query with all possible column names
(probably you should use special comments to mark the beginning and end of the select list).
E.g.
select
'X' as dummy
-- BEGIN COLS
, column1
, column2
...
-- END COLS
from ...
where ...
order by ...
Then, in the beforeOpen event of the query, you can access and modify the query with this.queryText (IIRC) and remove all those lines ("," + columnname) in the marked part for which columnname is not contained in the array.
I am using Apex 20.1.0.00.13, trying to create link on a column of a Classic Report.
I have followed the step to create the link for a column and redirect it to a page in the same application as the steps below :
To create a link to another page, in the Link Builder - Target dialog:
Type - Select Page in this Application.
Page - Specify the target page number.
Set Items - Select a Name and Value to specify session state for an item.
Clear Session State, Clear Cache - Specify the page numbers on which to clear cache. To specify multiple page, enter a comma-delimited list of page numbers.
Rest Pagination - Select Yes to reset pagination for this page.v
Advanced, Request - Specify the request to be used.
Click OK.
But when I am setting the item and values to specify session state for an item, the Set Items : Name doesn't populate the columns, it appears blank, Could someone let me know where I am going wrong.
I am trying to achieve a link from page 1 say a row with dept no - 2, to be directed to page 2 with details of dept 2 . Is there any other way to do it. Since its a column and not an item I am unable to pass it as a parameter to the next page.
Thanks in advance !
Right; there are no "items" here, you have to create hyperlinks within the report.
Suppose that this is classic report's query:
with test (id, name) as
(select 1, 'Google' from dual union all
select 2, 'Yahoo' from dual union all
select 3, 'Bing' from dual
)
select
id,
'<a href="' || case
when name = 'Google' then 'https://www.google.com'
when name = 'Yahoo' then 'https://www.yahoo.com'
when name = 'Bing' then 'https://www.bing.com'
end
|| '" target="_blank">' || name || '</a>' as link
from test
order by name;
Go to LINK column's properties and set "Escape special characters" to "No". Run the report; everything should work OK.
If - as you say - use it to navigate to another page in your application and set some items to some values (from the IR), then you'd do something like this:
SELECT
'f?p=&APP_ID.:217' ||
':&APP_SESSION.::NO::P217_ID' ||
':' || r.id
as link, ...
FROM my_table r ...
In other words: it navigates to page 217 and passes r.id column value into P217_ID item which is located on page 217.
link column from such a query can be referenced when creating a link column. It would be a
link to custom target
target type = URL
URL = #link# (literally, type #link#)
Probably you could change and merge these two pages into one Master-Detail page. This way you could use the built in lookup function.
I have a dataset with 4 columns, namely:
Sales, Year, Type, ID
Question:
How can I show the TOP 10 based on sales, showing other 3 columns using PowerPivot?
For example like this:
ID Year Type Sales
X X X X
You don't need power pivot for that purpose. A simple table will do the job. Format/Insert your dataset as a table and Do as follows (Office 365):
Click on Sales (the 'Down Button')
Select Number Filters
Select Top 10.
In the dialogue box select "Top", "10", "Items"
If it has to be power pivot/pivot table, I think you will have to merge the three columns 'ID', 'Year', 'Type'
Screenshot attached:
enter image description here
There is a Table in a report , then I inserted a Group within it. Then I added a footer row within the Table. I want to hide this row if the Group has just 1 row result. So how to know the number of results of the Group ?
Select the table -> binding tab -> Add aggregation
Select "count" as function, select any field as expression and set "aggregate on" to the group. Then use this new binding in visibility expression of the footer row.
I am trying to create a 360 questionnaire dynamically using a classic report in Oracle Apex. Got the first part to work nicely using the following:
SELECT q.display_text,
apex_item.radiogroup(rownum, 1, a.answer, null, null, null, null) "ineffective",
apex_item.radiogroup(rownum, 2, a.answer, null, null, null, null) "sometimes"
FROM xxpay_360_questions q,
xxpay_360_answers a
where a.question_id (+) = q.question_id
and a.user_name (+) = :APP_USER
order by q.questionnaire_id,
q.display_sequence
This outputs 3 report columns. The first one is the question and the second two are the horizontal radio buttons to select answer 1 or 2. The 360 questionnaire also needs sections and sub sections and some textarea questions. For those I would like to merge the 3 report columns into 1 column (akin to colspan=1). I would probably need to output them using a union in the above select, but I'm not sure how to dynamically output a colspan and a single report column value.
Note that I am using theme 20 in order to get the Oracle Applications look and this uses table layout.
Anyone know how to output a single report column instead of 3 for some rows and then colspan=1 it? Changing the font for the section and sub-section would be a bonus.
Not sure whether css can do colspan when using table layout.
Add a column to your report query that will serve as a flag for the
3 in 1 column rows.
Create a new report template, make it a "named column" style.
Create the two different column formats you want using the #COLUMN_NAME# token for columns.
Set the condition for each of these two formats using the value of your new flag column.
The added benefit to this is you can now use HTML to do whatever formatting you end up needing later.
I have made following.
Test table:
create table tst as
select 1 a, 2 b, 3 c, 4 d, 5 e from dual
union all
select 11, 12, 13, null, null from dual
union all
select 21, 22, 23, 24, 25 from dual;
Region source:
select a, b,
case when d is null and e is null then
'<td colspan="3">' || c || '</td>'
else '<td>' || c || '</td><td>' || d || '</td><td>' || e || '</td>'
end merged_column
from tst
Report properties: Display as - Standard Display Column, Heading of a column merged_column:
<th>C</th><th>D</th><th>E</th>
Result looks like this:
Maybe it is not so cool and useful example, but cells in second row look merged (and they are really merged, of course). Also it is impossible to sort by columns 4 and 5, and you need manually align text there.
Sorry, can't give a link to the page, apex.oracle.com upgraded to version 5.0, version 4.2 is unavailable now.
I wish I had more time to work up a proper example, but you can use Oracle's LISTAGG function to group the answers into a single row per question and add some HTML tags for styling. Generally speaking, I generate something like this:
<SPAN TITLE="Some help text">Some question text?</SPAN>
<UL>
<LI>[RADIO group1 value1] radio_label1</LI>
<LI>[RADIO group1 value2] radio_label2</LI>
</UL>
Hopefully, you can use this example as a starting point to coding what you want.
As an aside, I should point out one potential issue with what you are trying to do. You may already be aware of it but, via this method, Apex is limited to displaying no more than 50 questions at a time because the value for p_idx has to be a whole number between 1 and 50. (Source: Apex documentation) You can work within that limitation, but being aware of the issue from the start is much easier than discovering it half-way through.
Good Luck!