APEX 5 - report Ineractive: sort by value returned in LOV
Hi Experts,
It is possible to sort by the return value of the list of values defined for some of the interactive report columns?
Example: DB 2015123, 2015124, 2015125, 201410 value (the values are order NRs, does not order ID)
The user wants to see the values in the format 123/2015, 124/2015... 10/2014 (who are just a test of values, there are many more of them)
I used LOV to translate it into readable format. (I hope that return value can be used )
Is it possible to use the return value in LOV like value used for the sorting of the IR?
concerning
J
Jozef Demovic SVK wrote:
It is possible to sort by the return value of the list of values defined for some of the interactive report columns?
Example: DB 2015123, 2015124, 2015125, 201410 value (the values are order NRs, does not order ID)
The user wants to see the values in the format 123/2015, 124/2015... 10/2014 (who are just a test of values, there are many more of them)
I used LOV to translate it into readable format. (I hope that return value can be used)
Is it possible to use the return value in LOV like value used for the sorting of the IR?
It is not possible using a LOV, but it is simple to implement.
1 Add the command formatting value NR as a column in the report query, called ORDER_NR_DISPLAY.
2. set the display hidden column [Column] ORDER_NR_DISPLAY type so it does not appear in the report.
3. change the original ORDER_NR column and set the property Expression HTML #ORDER_NR_DISPLAY #.
Tags: Database
Similar Questions
-
Bug report: lv2010. Incompatible value returned by sub - vi
LV2010 WIndows XP
I have a vi that always writes to a variable via a local variable.
In the next section of the sequence, the variable may be written if this case, it is incorporated in is true.
In lv2009 when I called this vi he also returns the result to expect.
In lv2010 if I call vi in slow-mo debugging it always returns the correct value
If lance in real-time execution speed, it returns 0 if the case of writing embedded is NOT running.
The value of the indicator on the front of the Sub vi is always correct, even if the value returned to the caller vi is not.
If I change the vi to write in the variable for each case, the returned value is consistent.
It is worrying that I now need to check each vi to see if I have integrated unique business written variable
Appellant vi are run as re-entrant with multiple instances running - but all, but we the vi are idle.
I have not checked if this is relevant, that is to say also is it a calling not renetrant
My vi is complicated I need to see if I can reproduce it with a simpler version.
Michael
-
You should check the no. values returned by lov in the shuttle
Jin
I create a shuttle service that will populate the employee shuttle (left) on the selection of the Department only.
now I want to check the number of employees filled in the shuttle (left) and if the number of populous employees is null so I want to fill the shuttle with the EMP. who are on the bench..,.
can someone pls suggest me a solution.now how to make the "bench".
When we communicate bench? You have not given me a clear answer on that yet?
You said key first, and then you answered page gets sent. So at what point do you do this?Just to make my question more clear
If the number of employees is null
When you want to check - when the Department is changed?
-
How set the value of a LOV in CO prgramatically and get the Pkey value?
Hello
I need to get the Primaykey LOV will return and set a value for a LOV, say ItemLOV in a page through CO. How can I achieve this?
Req:
1. set the nom_element, say "DELL_1618" so that the page displays this in the LOV.
2 get the PK value returned by LOV in the backend in an attribute of VO say Item_ID, ' 100009881'.
Thank you
Sicard.Hi Santosh,
Sorry, I responded to general LOV scenario, but want to put it right,
You need run your LOV query to the controller for the "DELL_1618" element using the prepared command, get the value of the value display and Id and assign the LOV and FormVlaue in the PR of the controller.
Kind regards
Out Sharma -
Hello
I use APEX 4.1.0.00.32 and I have a simple report as
SQL :*
SELECT * in the region
Region WHERE the like '% "| P3_REGION | » %'
and country like "%" | P3_COUNTRY | » %'
and the city like '% "| P3_CITY | » %'
Elements:*.
P3_REGION:
Select a separate region as d, r of the region of the region
Display the Null value: YES
Value null, display value: - Select -
Return value of NULL: + 0 +.
P3_COUNTRY:
Select distinct country as d, r of the region of the country where region =: P3_REGION
Display the Null value: YES
Value null, display value: - Select -
Return value of NULL: + 0 +.
Cascading LOV Parent article (s): P3_REGION
P3_CITY:
+ select distinct city, city as the region r, whose country =: P3_COUNTRY
Display the Null value: YES
Value null, display value: - Select -
Return value of NULL: + 0 +.
Cascading LOV Parent article (s): P3_COUNTRY
The LOVs work very well and the correct values are displayed if cascade through them
So, I want to the last step to filter the report with the values that were selected in the lovs. And that I does not.
I tried to add a button with the SUBMISSION of the page. After choosing values in all the LOVs and by clicking on the button SUBMIT page supports, alle LOVs are disabled (with value - select-) and the report shows all lines.
I tried to change the "redirecting to Page 3" button and setting the values P3_REGION, P3_COUNTRY, P3_CITY P3_REGION., P3_COUNTRY. & P3_CITY. but without success.
I tried to use the 'Page Action time value' parameter to 'Validate' or 'redirect and set' for all the element LOVs or only the last element LOV, but then the cascade of the LOVs is not working properly and the report does not change.
I am confused as I Don t know what I can do so far. I think this should be a condition easy limit/filter the report with the values in the LOVs.
In addition, it should be possible to choose only the LOV region and then limit the report with this region (not select country and city)
Thanks in advance!I had a problem similar to a previous version, fixed when I updated element Source value or Expression (the section of the Source) to himself.
I mean:
for the P3_REGION, defined as & P3_REGION element.
for the P3_COUNTRY, defined as & P3_COUNTRY element.
for the P3_CITY, defined as & P3_CITY element.It will be useful.
-
ORA-20987: APEX - interactive report region does not exist in the application
ORA-20987: APEX - interactive report region does not exist in the application
I'm trying to get the query of an international registration (interactive report) on a specific page in my application.
The code I am using is thesi:
create or replace function get_report_query (nPage_id number)
return varchar2
as
l_report apex_ir.t_report;
l_query varchar2 (32767).
l_list varchar2 (32767).
number of nRegion_id;
number of nIR_id;
OWA.vc_arr nm;
VL owa.vc_arr;
BEGIN
SELECT region_id
IN nRegion_id
Of apex_application_page_regions
WHERE application_name = "E-BRIL.
AND page_id = nPage_id
AND source_type = "interactive report";
nIR_id: =.
apex_ir.get_last_viewed_report_id (p_page_id = > nPage_id,)
p_region_id = > nRegion_id);
NM (1): = "DUMMY_JUST_TO_SET_UP_OWA_UTIL";
VL (1): = 'WHATEVER ';
OWA.init_cgi_env (nm.count, nm, vl);
l_report: = APEX_IR. () GET_REPORT
p_page_id = > nPage_id,
p_region_id = > nRegion_id,
p_report_id = > 0);
l_query: = l_report.sql_query;
because me in 1.l_report.binds.count
loop
l_list: = l_list | i||'. '|| l_report. Binds (i) .name | » ='|| l_report. Binds (i) .value;
end loop;
Return l_query;
end;
/
I want to get the query of the IR on my page 3. And I run;
get_report_query (3)
That's what I get:
ORA-20987: APEX - interactive report region does not exist in application, page 3 and 1278226325207011749 region. -Contact your administrator of the application.
ORA-06512: at "APEX_040200.WWV_FLOW_ERROR", line 630
ORA-06512: at "APEX_040200.WWV_FLOW_ERROR", line 911
ORA-06512: at "APEX_040200.WWV_FLOW_WORKSHEET_UTIL", line 33
ORA-06512: at "APEX_040200.WWV_FLOW_WORKSHEET_UTIL", line 55
ORA-06512: at "EBR_OWNER. GET_REPORT_QUERY', line 19
The regio_id seems ok, because when I ask this region_id of apex_application_page_regions, id 1278226325207011749 is returned.
Page 3 is also correct.
I tried to follow Denes Kubicek his blog (Denes Kubicek ApEx BLOG: interactive report query is).
What I'm doing wrong here?
We use the Apex 4.2.
Thanks in advance.
Reg,
Chris
1717220 wrote:
Please update your forum profile with a recognizable username instead of "1717220": Video tutorial how to change username available
ORA-20987: APEX - interactive report region does not exist in the application
I'm trying to get the query of an international registration (interactive report) on a specific page in my application.
The code I am using is thesi:
create or replace function get_report_query(nPage_id IN number) return varchar2 as l_report apex_ir.t_report; l_query varchar2(32767); l_list varchar2(32767); nRegion_id number; nIR_id number; nm owa.vc_arr; vl owa.vc_arr; BEGIN SELECT region_id INTO nRegion_id FROM apex_application_page_regions WHERE application_name = 'E-BRIL' AND page_id = nPage_id AND source_type = 'Interactive Report'; nIR_id := apex_ir.get_last_viewed_report_id (p_page_id => nPage_id, p_region_id => nRegion_id); nm(1) := 'DUMMY_JUST_TO_SET_UP_OWA_UTIL'; vl(1) := 'WHATEVER'; owa.init_cgi_env( nm.count, nm, vl ); l_report := APEX_IR.GET_REPORT ( p_page_id => nPage_id, p_region_id => nRegion_id, p_report_id => 0); l_query := l_report.sql_query; for i in 1..l_report.binds.count loop l_list := l_list||i||'. '||l_report.binds(i).name||'='||l_report.binds(i).value; end loop; return l_query; end;
I want to get the query of the IR on my page 3. And I run;
get_report_query (3)
That's what I get:
ORA-20987: APEX - interactive report region does not exist in application, page 3 and 1278226325207011749 region. -Contact your administrator of the application.
ORA-06512: at "APEX_040200.WWV_FLOW_ERROR", line 630
ORA-06512: at "APEX_040200.WWV_FLOW_ERROR", line 911
ORA-06512: at "APEX_040200.WWV_FLOW_WORKSHEET_UTIL", line 33
ORA-06512: at "APEX_040200.WWV_FLOW_WORKSHEET_UTIL", line 55
ORA-06512: at "EBR_OWNER. GET_REPORT_QUERY', line 19
The regio_id seems ok, because when I ask this region_id of apex_application_page_regions, id 1278226325207011749 is returned.
Page 3 is also correct.
I tried to follow Denes Kubicek his blog (Denes Kubicek ApEx BLOG: interactive report query is).
What I'm doing wrong here?
We use the Apex 4.2.
The '0' in line 31 should be "nIR_id".
What is the purpose of the lines 24-26?
-
Put text Logo with SORT column values?
Hello
I have a page open IRR w / filters IRR past as follows.
.. /f?p=200:21:0::no:CIR:IREQ_RELEASE,IREQ_PLATFORM:11.2.0.4,Linux:Yes I want to give the page a title with the SORT column values passed as follows.
"LINUX 11.2.0.4 Report" on the text Logo.
Is it possible that I can do this? Or if not possible, a way to put it on the field of text or something?
Hello
To set the value of your property, you will need to pass something in it:
https://Apex.Oracle.com/pls/Apex/f?p=9086:2:113599573679605:P2_TITLE:Linux % 20Server % 20Report
So when I had a session in your application and a value passed to the item value has changed
I'm not fully grasp what you are trying to reach. Are you try to click on the pencil edit go to one another form of change in the title of your page will be set to the column name in the report on your previous page?
You try to dynamically update an element on the page you are on when a filter is added?
If you can give me more tips, I'm happy to help, if your app is just a demo app on apex.oracle.com and you are happy for me to connect and make changes that might help, I'm happy to do.
Thank you
Paul
-
Interactive report Question (sort of)
This has probably been concave, but I have not found how to ask the question to find the answer, so I apologize in advance.
Running APEX 4.2.3 I need do the following:
I need to be able to send an email to all registrants in a filtered interactive report, with one of the interactive report fields e-mail address. So I imagine something like this:
1 run an interactive report and it returns 1000 rows.
2. I filter the report so that the subset resulting contains 30 rows.
3. I click on a button that says Compose Message
4. a box perhaps (a modal window?) to allow the body of the message type.
5. click a button to send a Message
6 to run a PL/SQL procedure cycles to each line of the EIS filtered to get the email address. (This IS THE PART that I KNOW not HOW to DO it)
7. use the same PL/SQL procedure from step 6 to send the e-mail message.
I understand how do anything but striking since the interactive report filtered e-mail addresses.
Any help would be greatly appreciated.
Bob
Now look at the process... You need build the e-mail process, but the query NOW respect filtering done on the report. I added a function to your workspace that you want to download where you want to develop this...
This function determines the ACTIVE query for the report, binds with the values bind variables and returns the query, where I add a selection to the e-mail address to select it and build an array of values to loop through...
Thank you
Tony Miller
Software LuvMuffin
Ruckersville, WILL -
Value of return in LOV not used on the first page visit
I have a report at the Apex 3.2 based on a search of the P20_APP selection list field with an LOV.
The first time I visit this page return the value of the LOV is empty, but I don't see the display value. I can also see it in debug mode:
«0.03: binding: ": P20_APP"= "P20_APP" value = "»
0.03:... Session state: Save "P20_APP" - registration of same value:
If I change the value in the list once, the return value is set, e.g.:
0.07: binding: ": P20_APP"= "P20_APP" value = "0" '.
0.07:... Session state: Save "P20_APP" - registration of same value: "0".
So, how to get the return value the first time that I come to the page? My report is executed immediately with the first value from the LOV when you access the page. Since there is no value, the output is incorrect.
Thank you.
Published by: Ino Laurensse on July 28, 2009 16:02Hello
You can set a default value in the attributes of the element. Simply click on the element in the application builder page and scroll down until you see by default. You can specify it in a number of ways, defined by a menu drop-down.
See you soon
Ben
http://www.munkyben.WordPress.com
Don't forget to mark the answers useful or correct ;) -
Hello to the forum of the APEX
My Apex version is 4.2.1
version of database is Oracle 10 g XE on Windows 7 Pro
After upgrading from version 3.2 to 4.2.1 report columns sorting does not work when 'Enable partial Refresh of Page' is on 'yes '.
When 'Enable partial Refresh of Page' is 'No' sort is OK.
Help, please
Concerning
MarkHi Mark,
Looks like your json.js causes unrest. It extends to each "object" in JavaScript with two methods called parseJSON and toJSONString. I did a quick debugging and it seems that when we build our AJAX request to sort, AJAX jQuery handling trying to serialize these two functions, because he thinks it of regular data and fails with a JavaScript error.
Looking at the original source of your library to https://github.com/douglascrockford/JSON-js even the creators had some doubts in using this version of the library
JSON.js: this file does everything what json2.js done. It also adds a toJSONString method and a parseJSON method to Object.prototype. Use of this file is not recommended.
Are you sure you have the parseJSON and toJSONString methods? Maybe you're good with json2.js, as well.
Concerning
Patrick
-----------
My Blog: http://www.inside-oracle-apex.com
APEX Plug-Ins: http://apex.oracle.com/plugins
Twitter: http://www.twitter.com/patrickwolf -
Better display of the values of shuttle LOV in a report
Hello
I created a LOV shuttle service in a form, then a report indicating (among others) the values chosen this LOV shuttle.
If the user choose multiple values I don't like how they appear in the report (they must go in a single cell) because
the user sees a list of items separated by ': '.
Is there a simple way to show them for example as a list of points of ball or another form readable nicer human?
Thank you
AntonellaHello Antonella,.
use
select case when your_column_name is not null then '
- '||replace(your_column_name,':','
- ')|| '
to avoid the ball when you have a NULL value.
Concerning
Patrick
-----------
My Blog: http://www.inside-oracle-apex.com
APEX Plug-Ins: http://apex.oracle.com/plugins
Twitter: http://www.twitter.com/patrickwolf -
APEX 4.2 Radio Group NULL value behaves differently than on APEX 4.1.1
DB version: 11.2.0.3 Linux
APEX: 4.2
APEX listener 1.1.4 on tomcat6
Firefox 16.0.2
Values NULL Radio Group behave differently than on APEX 4.1.1.
4.2 creating radio group and selecting:
Display Null value = Yes
NULL, Display value = no value (or any string)
NULL Return Value = (leave blank, for the NULL value returned)
When the user selects that option 'No value', then APEX point value is set on "on", but on APEX 4.1, the element has the value NULL as expected.
When you look at the Web page source code, the reason seems to be that APEX does not generate an attribute value for the NULL value (if the browser returns the default "on"):<input type="radio" id="P1_X_0" name="p_t01" ><label for="P1_X_0">No value</label>
Hi Ilmar,
same thing here. The best solution I could come up with is to create a process to request again (before the calculation / validation)
BEGIN FOR x IN ( SELECT * FROM ( SELECT item_name FROM apex_application_page_items aapi WHERE aapi.application_id = :app_id AND aapi.page_id = :app_page_id AND LOWER (aapi.lov_display_null) = 'yes' AND aapi.display_as_code='NATIVE_RADIOGROUP' AND aapi.lov_definition IS NOT NULL AND aapi.lov_null_value IS NULL AND ROWNUM > 0 ) x WHERE LOWER (v (x.item_name)) = 'on' ) LOOP apex_util.set_session_state (x.item_name, NULL); END LOOP; END;
Jens
-
This is the code I have.
Copy the following code sorts the plan by its key. But I want to sort the plan of its value. How can I do?public class MapSortTest1 { private static class ValueComparer implements Comparator { private Map _data = null; public ValueComparer( Map data ) { super(); _data = data; } public int compare( Object o1, Object o2 ) { String e1 = (String) _data.get( o1 ); String e2 = (String) _data.get( o2 ); return e1.compareTo( e2 ); } } public static Map getDurationRangeMap() { HashMap<String,String> durationRangeUnsorted = new HashMap<String,String>(); ValueComparer bvc = new ValueComparer(durationRangeUnsorted); TreeMap<String,String> sorted_map = new TreeMap(bvc); durationRangeUnsorted.put( "5 minutes", "5" ); durationRangeUnsorted.put( "10 minutes", "10" ); durationRangeUnsorted.put( "15 minutes", "15" ); durationRangeUnsorted.put( "20 minutes", "20" ); durationRangeUnsorted.put( "30 minutes", "30" ); durationRangeUnsorted.put( "45 minutes", "45" ); durationRangeUnsorted.put( "1 hour", "60" ); durationRangeUnsorted.put( "2 hours", "120" ); durationRangeUnsorted.put( "3 hours", "180" ); durationRangeUnsorted.put( "4 hours", "240" ); durationRangeUnsorted.put( "5 hours", "300" ); durationRangeUnsorted.put( "6 hours", "360" ); durationRangeUnsorted.put( "7 hours", "420" ); durationRangeUnsorted.put( "8 hours", "480" ); durationRangeUnsorted.put( "9 hours", "540" ); durationRangeUnsorted.put( "10 hours", "600" ); durationRangeUnsorted.put( "11 hours", "660" ); durationRangeUnsorted.put( "12 hours", "720" ); durationRangeUnsorted.put( "1 day", "1440" ); durationRangeUnsorted.put( "2 days", "2880" ); durationRangeUnsorted.put( "3 days", "4320" ); durationRangeUnsorted.put( "4 days", "5760" ); durationRangeUnsorted.put( "5 days", "7220" ); durationRangeUnsorted.put( "6 days", "8640" ); durationRangeUnsorted.put( "7 days", "10080" ); durationRangeUnsorted.put( "Custom time", "customtime" ); sorted_map.putAll( durationRangeUnsorted ); return sorted_map; } public static void main( String[] args ) { System.err.println( "" + getDurationRangeMap()); } }
Published by: EJP on 18/11/2011-16:44: added {noformat}{noformat} tags, and got rid of all the boldface. Please note how it is done here. Edited by: ttsdinesh on Nov 18, 2011 11:46 AM
ttsdinesh wrote:
Copy the following code sorts the plan by its key.Lol actually sorting happens value only. Comparing the value as a string value.
String e1 = (String) _data.get( o1 ); String e2 = (String) _data.get( o2 ); return e1.compareTo( e2 );
Look at the comparison above. If you need to convert the entire string (this depends on the value) and then use logical conditions to perform the comparison.
For example,.
public int compare( Object o1, Object o2 ) { String e1 = (String) _data.get( o1 ); String e2 = (String) _data.get( o2 ); int a = Integer.parseInt(e1); int b = Integer.parseInt(e2); if(a>b) { return 1; } else if(a == b) { return 0; } else { return -1; } }
In your case, the next value will result in error for the above example.
durationRangeUnsorted.put( "Custom time", "customtime" );
-
Thus,.
I have three values in column K - 'A', 'B', 'C '. Column I is numeric values.
I am trying to create a formula that selects all rows in the K column with a specfic value (in this case 'A' 'B' or 'C'), then grab the corresponding value (on the same line) of column I, then add up all the results for a total.
IF rows in column K returns 'A', THEN take the VALUE of corresponding column I, and THEN SUM all the values returned.
Or something like that.
You can try something like this:
The formula in B2, filled to the bottom, is:
SUMIF (table 1::K, A2, table 1::L)
SG
-
The list of values - return value identical to the display value
I fill a selection list with the names of the members with a lov sql like the following
< tt > select memberName d, r FROM whateverTable < /tt > memberId
The problem is that in the database, the stored value is the Member ID. I really want the real memberName stored in the database instead I want to use this name of Member elsewhere in my application.
When the integrated trigger executes its code
< tt >
if NVL (:old. CONTACT_PERSON,'0') ! = NVL (:new. CONTACT_PERSON,'0'( ) then
Insert into eba_ca_history ()table_name component_rowkey COMPONENT_ID column_name old_value new_value) values
('EVENTS', :new.row_key, :new.event_id, 'EVENT_OWNER',:old. CONTACT_PERSON,:new. CONTACT_PERSON()
end if ;
< /tt >
I get the following text shows on my apps update page-"owner of an event has changed from 457879885611315631565 to 2546454654546546546546..."
I want the value of the actual display to display for an update instead of the return value.
I tried to convert the value to help
But which causes the following error
How can I make sure that the return value of the lov being stored in the database matches the display value for the lov?
Hi Richie,
If I understand your request, simply set your LOV query with the same column like screen and return:
select memberName as display_value, memberName as return_value FROM whateverTable
If this isn't what you're asking, I apologize for the misunderstanding.
Thank you
Erick
Maybe you are looking for
-
How can I delete my history of cards in iOS 10?
-
Drive recovery for Equium A60-157 PSA67E
Has anyone got a copy of the disc recovery issued with an equium A60-157 PSA67E as I am trying to get this laptop for work and unable to get its hotkeys control and be able to work. I think I've worn out my wellcome with Equium forum and technical ap
-
Is it possible to read a code bar directly in Labview?
I have a bar code reader that bed codes in Notepad as planned, but I'll have a chance to read a code in Labview 8.6. Is it possible to read a code directly in Labview using a barcode reader. The drive that I use is a symbol DS6708. Thank you.
-
load Web page and get/send info to him
Hello We try to do a mapping for our robot system using gps signals. After much trying, we think we may have found something that has a chance of working. By doing a php page that stored map information on this, we are able to load everything that is
-
Cannot send emails with Outlook Express
original title: I AM NOT ABLE to SEND EMAIL WITH OUTLOOK EXPRESS but CAN RECIEVE I AI PARLEES WITH OPTUS AND CHECXKED all THE SETTINGS AND ARE OK I CHECKED WITH OPTUS OUR CARRIER AND WE CANNOT SEND EMAILS VIA OUTLOOK EXPRESS, THEY SEEM TO THINK THAT