RowDisclosureListener af:table - Getting the Row in the Listener Method
Hi,
I am bit new to the adf. I have a requirement and it is as below.
(1) I am using only ADF faces, Not with Business Components. All values/ list comes from a ManagedBean
(2) I am displaying List of Employees in an <af:table>
(3) I have something as detailStamp
(4) For Some reason I have do some business logic (set some flag in the EmployeeBean) whenever it is Disclosed / selected
(5) One portion of it is done and that is when the row is selected.
(6) I dont know how to get the Row bean (Employee Bean) when it is disclosed
Any Ideas how to do that?
The code which I wrote to get the Employee Bean when it is selected (selectionListener) is as below and I want to do that in my RowDisclosureListener
//This Works fine//
public void messageSelectionListener(SelectionEvent selectionEvent) {
System.out.println("Entering messageSelectionListener : " + selectionEvent.getComponent().getClientId());
// set the selected message flag
if (((Employee)getSearchResultTable().getSelectedRowData()).isSelectedForView()) {
((Employee)getSearchResultTable().getSelectedRowData()).setSelectedForView(false);
TableUtils.closeRow(selectionEvent);
} else {
((Employee)getSearchResultTable().getSelectedRowData()).setSelectedForView(true);
TableUtils.discloseRow(selectionEvent);
// update table in UI
refreshTable();
//How to do it in RowDisclosureListener
public void messageDisclosureListener(RowDisclosureEvent rowDisclosureEvent) {
System.out.println("Entering messageDisclosureListener: " + rowDisclosureEvent.getComponent().getClientId());
RichTable table = (RichTable)rowDisclosureEvent.getSource();
//How to get the Employee Bean here?
refreshTable();
Thanks in Advance.
Krishna,
You code did the trick. But how does M_TABLES gets updated with the record count?
Wouldn't it be advisable to get the record count from the table itself rather than M_TABLES?
Thanks.
Similar Messages
-
Hi,
In my example I want to get all the rows of the table. The table has 20 rows. The visibleRowCount is set to 7 and firstVisibleRow is set to 3.
I have created the table as
var oTable = new sap.ui.table.Table({
id: "oTable",
title: "My Table",
visibleRowCount: 7,
firstVisibleRow: 3,
selectionMode: sap.ui.table.SelectionMode.Single
I tried to get the rows of the table using the below code
var table = sap.ui.getCore().byId("oTable");
var rows = table.getRows(); // Returns only 7 rows
How to get all the rows of the table when the table is populated with a odata service ?Hi Vishal,
The table only put in the html file the rows that you define in visiblerowcount (rows control). The method getRows, get this controls, and you only have 7. The table control render automacatically the data in thats rows when you scroll on it.
If that you want is to retrieve the data of the rows, you need catch it from the model:
oTable.getModel().getData();
Regards, -
How do I get the numbers ipad app to plot a graph of dates against values, where the most recent date is on the right of the graph, but the most recent date is at the top rather than bottom of the rows in the table?
Also how can it be a line graph without plotting a circle at each value?
Thanks this is very frustratingMake a copy of the table and produce your Line chart or Bar chart from the copy. Sort the copy into the order you want to see in your chart.
Alternately you could use a Scatter Chart...
Jerry -
Get the rows in the same order in which it has been inserted.
Hi,
I have a table with four columns(All varchars)...and there are no primary keys
i have inserted 15 rows where col1="xyz"
Now while retrieving the same...i dont get the same in the order i ahve inserted..
What is the way to get the rows in the same order in which it has been inserted..?
RegardsI have a table with four columns(All varchars)...and
there are no primary keys
i have inserted 15 rows where col1="xyz"
Now while retrieving the same...i dont get the same
in the order i ahve inserted..
What is the way to get the rows in the same order in
which it has been inserted..?
RegardsWhy? What is your business case behind this?
In my experience an "order by" is used way too much without any real need to do it. Are your users interested to know in what order a few records from two years ago have been inserted? What about updates since that time? -
How to list all the rows from the table VBAK
Friends ,
How to list all the rows from the table VBAK.select query and the output list is appreciated.Hi,
IF you want to select all the rows for VBAK-
Write-
Data:itab type table of VBAK,
wa like line of itab.
SELECT * FROM VBAK into table itab.
Itab is the internal table with type VBAK.
Loop at itab into wa.
Write: wa-field1,
endloop. -
Return the rows of the table where a column contains a specific value first
I want my query to return the rows of the table where a column contains a specific values first in a certain order, and then return the rest of the rows alphabetized.
For Example:
Country
ALBANIA
ARGENTINA
AUSTRALIA
CANADA
USA
Now i want USA and CANADA on top in that order and then other in alphabetized order.
Edited by: 986155 on Feb 4, 2013 11:12 PM986155 wrote:
If it is 2 then i can write a case... i want generalised one where may be around 5 or 6 mentioned should be in descending order at the top and remaining in ascending order there after.Computers tend not to work in 'generalized' ways... they require specifics.
If you store your "top" countries in a table you can then simply do something like...
SQL> ed
Wrote file afiedt.buf
1 with c as (select 'USA' country from dual union
2 select 'Germany' from dual union
3 select 'India' from dual union
4 select 'Australia' from dual union
5 select 'Japan' from dual union
6 select 'Canada' from dual union
7 select 'United Kingdom' from dual union
8 select 'France' from dual union
9 select 'Spain' from dual union
10 select 'Italy' from dual
11 )
12 ,t as (-- top countries
13 select 'USA' country from dual union
14 select 'United Kingdom' from dual union
15 select 'Canada' from dual
16 )
17 select c.country
18 from c left outer join t on (t.country = c.country)
19* ORDER BY t.country, c.country
SQL> /
COUNTRY
Canada
USA
United Kingdom
Australia
France
Germany
India
Italy
Japan
Spain
10 rows selected. -
Display all the rows in the table with Varray
I created two Varrays
CREATE TYPE phone_varray AS VARRAY(3) OF NUMBER(10);
CREATE TYPE email_varray AS VARRAY(3) OF varchar2(30);
CREATE TABLE ee
(id number(2),
phone phone_varray);
now i inserted some rows into ee table and displayed it as:
SELECT e1.id,e2.COLUMN_VALUE"PHONE NO" FROM ee e1,TABLE(e1.phone) e2;
ID PHONE NO
1 1111111111
1 2222222222
1 3333333333
1 1111111111
1 2222222222
1 4444444444
4 1111
4 2222
4 33334
5 1111
5 2222
5 33334
Then i altered the table with email_varray
desc ee;
Name Null? Type
ID NUMBER(2)
PHONE PHONE_VARRAY
EMAIL EMAIL_VARRAY
I updated some rows:
update ee e1 set email=email_varray('aasda') where id=4;
and when i try to display the table data by:
SELECT id,e2.*,e3.* from ee e1,TABLE(e1.phone) e2,TABLE(e1.email) e3;
it only displays the rows that contain all the details like
ID COLUMN_VALUE COLUMN_VALUE
4 1111 aasda
4 2222 aasda
4 33334 aasda
and not all the rows that are in the table which have id and phone and email as NULL
need help to display all the rows in the table.will this work for you ?
SELECT e1.id,e2.COLUMN_VALUE as PHONE_NO, null as email FROM ee e1,TABLE(e1.phone) e2
union
SELECT e1.id,null,e3.column_value as email from ee e1, TABLE(e1.email) e3; -
How can i select the rows from the 3 tables by particular column name?
Vehicle Passing Summary table structure
PsngSmry_ID(Number),Vehicle_iD(Number),PsngSmryTime(datetime)
Vehicle table structure
Vehicle_iD(Number),VehicleName(VarChar2),VehicleType(VarChar2)
Here Vehicle_iD is the Primary Key
Equipment Table Structure
Eqpmt_id(Number),Vehicle_iD(Number),EqpmtName(VarChar2),EqpmtType(VarChar2)
Here Eqpmt_id is the Primary Key and Vehicle_iD is the foreign Key
Equipment Component Table Structure
Eqpmt_Cmpnt_id(Number) ,Eqpmt_id(Number),EqpmtCmpntName(VarChar2),EqpmtCmpntName(VarChar2),Parent_Eqpmnt_ID(Number)
Here Eqpmt_Cmpnt_id is the Primary Key and Eqpmt_id is the foreign Key
The rows in the Vehicle Passing Summary table
PsngSmry_ID Vehicle_ID PsngSmryTime
111111 80986246 2010/10/11
111112 80986247 2010/10/12
111113 80986248 2010/10/10
The rows in the Vehicle Table
Vehicle_iD VehicleName VehicleType
80986246 Lorry Four Wheeler
80986247 Van Four Wheeler
80986248 Bus Four Wheeler
The rows in the Equipment Table:
Eqpmt_id Vehicle_iD EqpmtName EqpmtType
109846 80986246 2 Axle Lorry CAR
109821 80986246 4 Axle Lorry CAR
109825 80986246 4 Axle Lorry CAR
109562 80986247 2 Axle VAn CAR
109555 80986247 3 Axle VAn CAR
109777 80986247 3 Axle VAn CAR
109587 80986248 2 Axle Bus CAR
The rows in the Equipment Component Table :
Eqpmt_Cmpnt_id Eqpmt_id EqpmtCmpntName Parent_Eqpmnt_ID
20904146 109846 Truck
20904147 109846 Truck
20904148 109846 Axle 20904146
20904159 109846 Axle 20904146
20904167 109846 Wheel 20904148
20904177 109846 Wheel 20904148
20904185 109846 Wheel 20904159
20904325 109846 Wheel 20904159
20904188 109846 Axle 20904147
20904189 109846 Axle 20904147
20904195 109846 Wheel 20904188
20904196 109846 Wheel 20904188
20904197 109846 Wheel 20904189
20904398 109846 Wheel 20904189
10904146 109562 Truck
10904147 109562 Truck
10904148 109562 Axle 10904146
10904159 109562 Axle 10904146
10904167 109562 Wheel 10904148
10904177 109562 Wheel 10904148
10904185 109562 Wheel 10904159
10904325 109562 Wheel 10904159
10904188 109562 Axle 10904147
10904189 109562 Axle 10904147
10904195 109562 Wheel 10904188
10904196 109562 Wheel 10904188
10904197 109562 Wheel 10904189
10904398 109562 Wheel 10904189
Note : In Equipment Component Table,the hierarchy will be Truck-->Axle-->Wheel.So
1.the Parent_Eqpmnt_ID of Axle is Truck's Eqpmt_Cmpnt_id.
2.the Parent_Eqpmnt_ID of Wheel is Axle's Eqpmt_Cmpnt_id.
Now I want to write the store procedure which will take "PsngSmry_ID(Number)" as input and the o/p will be in the format :
Eqpmt_Cmpnt_id Eqpmt_id EqpmtCmpntName Parent_Eqpmnt_ID
20904146 109846 Truck
20904148 109846 Axle 20904146
20904167 109846 Wheel 20904148
20904177 109846 Wheel 20904148
20904159 109846 Axle 20904146
20904185 109846 Wheel 20904159
20904325 109846 Wheel 20904159
20904147 109846 Truck
20904188 109846 Axle 20904147
20904195 109846 Wheel 20904188
20904196 109846 Wheel 20904188
20904189 109846 Axle 20904147
20904197 109846 Wheel 20904189
20904398 109846 Wheel 20904189
10904146 109562 Truck
10904148 109562 Axle 10904146
10904167 109562 Wheel 10904148
10904177 109562 Wheel 10904148
10904159 109562 Axle 10904146
10904185 109562 Wheel 10904159
10904325 109562 Wheel 10904159
10904147 109562 Truck
10904188 109562 Axle 10904147
10904195 109562 Wheel 10904188
10904196 109562 Wheel 10904188
10904189 109562 Axle 10904147
10904197 109562 Wheel 10904189
10904398 109562 Wheel 10904189
**Please add these columns in the o/p **
1.EqpmtName and EqpmtType from Eqpmt table
2.VehicleName and Vehicle Type from Vehicle table
3.PsngSmryTime from PassingSummary table **
Can anyone tell me the solution?
Edited by: 865216 on Jun 22, 2011 2:14 AMHi,
I am new to this technology;But, just wanted to help you.
Please refer the code it might be atleast helpful for you.
But am facing PL/SQL: ORA-00933: error and unable to resolve it.could anyone please correct this code.
sorry if my code is totally wrong.
Thank you,
Rupa
create or replace procedure Equipment_proc
is
begin
DECLARE
TYPE EQP_record IS RECORD (
Vehicle_iD Vehicle.Vehicle_iD%TYPE,
Eqpmt_Cmpnt_id Equipment_Component.Eqpmt_Cmpnt_id%type,
EqpmtCmpntName Equipment_Component.EqpmtCmpntName%type,
Parent_Eqpmnt_ID Equipment_Component.Parent_Eqpmnt_ID%type,
Eqpmt_id Equipment.Eqpmt_id%type,
vehicleId NUMBER);
EQP_rec EQP_record;
CURSOR EQP_cursor IS
select a.Vehicle_iD,c.Eqpmt_Cmpnt_id,b.Eqpmt_id,c.EqpmtCmpntName,c.Parent_Eqpmnt_ID
from Vehicle a,Equipment b,Equipment_Component c
where a.Vehicle_iD=b.Vehicle_iD
and b.Eqpmt_id=c.Eqpmt_id
and a.vehicle_id=&EQP_rec.vehicleId;
BEGIN
OPEN EQP_cursor;
FETCH EQP_cursor INTO EQP_rec;
dbms_output.put_line(EQP_rec.Vehicle_iD,EQP_rec.Eqpmt_Cmpnt_id||','||EQP_rec.Eqpmt_id||','||EQP_rec.EqpmtCmpntName||','||EQP_rec.Parent_Eqpmnt_ID);
CLOSE EQP_cursor;
END;
END; -
VO got executed but is not showing the rows on the page the first time
Hi, Below are my senario:
I have one jspx which contain a panel tab and 2 tabs inside it: tab A and tab B, under each tab is its own taskflow, jsff page, and its own AM and datacontrol also.
tab A have a table
tab b have a table with search panel. The view criteria that used to generate the search panel is not check "Run Automatically"
What I am trying to do is in tab A, user can select some rows and click one button, then below action happen:
1. the id of the selected rows will be pass to a AM method of tab B as string that separated by comma, and this AM method will execute the VO that the table of Tab B is based on
2. set tab b disclosure to be true to show tab B
3. The row that selected in Tab a will be shown in the table of tab b
Below are the code in the AM of tab b, it is exposed to client and it will be invoked by the button actionlistener of Tab A from the bean:
public void applyDashbaordViewCriteria(String listOfPS) {
if (listOfPS != null) {
PullSequenceSetupVOImpl psvo = this.getPullSequenceSetupVO2();
ViewCriteria vc = psvo.createViewCriteria();
vc.setName("PSDashboardVC");
ViewCriteriaRow vcRow = vc.createViewCriteriaRow();
ViewCriteriaItem vcItem =
vcRow.ensureCriteriaItem(PullSequenceSetupVORowImpl.PULLSEQUENCEID);
vcItem.setOperator(JboCompOper.OPER_IN);
vcItem.getValues().get(0).setValue(listOfPS);
vc.add(vcRow);
psvo.applyViewCriteria(vc);
psvo.executeQuery();
However my issue here is:
Whenever the first time entering the page, which will show tab A, I select some rows in the table and click the button, AM got executed correctly and before it leave above code, VO executed and row count is correctly match with what user selected in Tab A. However, the rows in the vo is not showing in tab B. Table in tab B show no rows.
Workaround for the issue:
If first time entering the page, I go to tab B first, without doing anything then come back to tab A, select some rows and click the button again, then this time, the row I selected start showing in the table of Tab B.
So my question is, how can I solved this issue to make the selected rows show in tab B without going to tab B to load the page first? Is that something to do with datacontrol scope?
I am using Jdev 11.1.1.3.0
Thanks.Hi, now I think i know what is the root cause:
I overide executeQueryForCollection and executeQuery method in the VOImpl that table of Tab B is based on. And I notice the following:
Even when select row in tab A and click the button to call AM method to apply the view criteria and execute the query to return some row, when tab b loading the first time, I notice executeQueryForCollection is being fired again and invoked by executeEmptyRowSet.
It looks to me that even thought before the page load, VO already executed and have some row, somehow when ADF load the page, it will empty all the rows in the VO. And also since I have a query panel which I uncheck the Query Automatically. So even my applied view criteria still there, but VO will not get re executed again and show the result.
I think that is why this issue is happening. And also, that is why if I navigate to tab B first and come back to Tab A, now perform the same action, the selected rows start showing on the page.
Anybody can help me how can I resolved this issue? And also, I don't want to check the "Query Automatically" of the view criteria that I used to genreate the search panel because it may impact the performance.
Edited by: user10867484 on Apr 21, 2011 2:48 PM -
Select only the row with the latest updatedate
Hi to All !
Can anyone help me with this problem. If I want to select from the existing table:
ROWNUM:UPDATEDATE:NUMBER:UNIT:LOC:ONHAND:DESC:LOTEXP:EXTRACTIONDATE
6 106102 81016 CH9 ADMEIER 2 C4D84M 106104
5 106102 81016 CH9 ADMEIER 2 C4D84M 111030 106103
4 106102 81016 CH9 ADMEIER 2 C4D84M 111030 106102
3 106101 81016 CH9 ADMEIER 4 C4D84M 111030 106100
2 106081 81016 CH9 ADMEIER 0 C4D04Y 106100
1 106073 81016 CH9 ADMEIER 1 A4AU8W 106100
only the rows with the latest updatedate, results in : (row number 3,4,5 have to be out)
ROWNUM:UPDATEDATE:NUMBER:UNIT:LOC:ONHAND:DESC:LOTEXP:EXTRACTIONDATE
6 106102 81016 CH9 ADMEIER 2 C4D84M 106104
2 106081 81016 CH9 ADMEIER 0 C4D04Y 106100
1 106073 81016 CH9 ADMEIER 1 A4AU8W 106100
Any Ideas ? Thanks in advance ThomasThe select for the colums looks like:
UPDATEDATE, NUMBER, UNIT, LOC, ONHAND, DESC, LOTEXP, EXTRACTIONDATE
The table has the following unique key:
UPDATEDATE, NUMBER, UNIT, LOC, LOTEXP, EXTRACTIONDATE
how I have to use now PARTITION BY to get for each row the latest updatedate ?
Thomas -
Urgent : how to select the rows in the ALV Grid Control
How to select the rows in the ALV Grid control,
I am facing the situation where i need to select the row/rows in the Grid control and then to lock the entries,
If anyone have the solution please help me out
<b>Its very Urgent</b>Hi Bharath,
Go through this hope u can understand.
SEL_MODE. Selection mode, determines how rows can be selected. Can have the following values:
A Multiple columns, multiple rows with selection buttons.
B Simple selection, listbox, Single row/column
C Multiple rows without buttons
D Multiple rows with buttons and select all ICON
Setting and getting selected rows (Columns) and read line contents
You can read which rows of the grid that has been selected, and dynamic select rows of the grid using methods get_selected_rows and set_selected_rows. There are similar methods for columns.
Note that the grid table always has the rows in the same sequence as displayed in the grid, thus you can use the index of the selected row(s) to read the information in the rows from the table. In the examples below the grid table is named gi_sflight.
Data declaration:
DATA:
Internal table for indexes of selected rows
gi_index_rows TYPE lvc_t_row,
Information about 1 row
g_selected_row LIKE lvc_s_row.
Example 1: Reading index of selected row(s) and using it to read the grid table
CALL METHOD go_grid->get_selected_rows
IMPORTING
et_index_rows = gi_index_rows.
DESCRIBE TABLE gi_index_rows LINES l_lines.
IF l_lines = 0.
CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'
EXPORTING
textline1 = 'You must choose a valid line'.
EXIT.
ENDIF.
LOOP AT gi_index_rows INTO g_selected_row.
READ TABLE gi_sflight INDEX g_selected_row-index INTO g_wa_sflight.
ENDIF.
ENDLOOP.
Example 2: Set selected row(s).
DESCRIBE TABLE gi_index_rows LINES l_lines.
IF l_lines > 0.
CALL METHOD go_grid->set_selected_rows
exporting
it_index_rows = gi_index_rows.
ENDIF.
Reward points if helpful.
Thanks
Naveen khan -
To delete the row for the corresponding checked rows in alv
hi,
i have a alv report with check boxes,
can any one say how to delete the row for the corresponding checked rows.hi
give In REUSE_ALV_LIST_DISPLAY
I_CALLBACK_USER_COMMAND = P_USER_COMMAND
FORM F_USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
IF R_UCOMM = C_DELETE. where CONSTANTS : C_DELETE(6) TYPE C VALUE 'DELETE',
READ TABLE IT_ITAB WITH KEY REC_SEL = C_X.
LOOP AT IT_MARA WHERE REC_SEL = 'X'.
MOVE-CORRESPONDING IT_ITAB TO IT_TEMP.
APPEND IT_TEMP.
CLEAR IT_TEMP.
ENDLOOP.
where it_temp IT_TEMP TYPE STANDARD TABLE OF itab WITH HEADER LINE,
DELETE ITAB FROM TABLE IT_TEMP.
HOPE THIS HELPS
PRIYA -
I want to fill the rows of the report from the loop
I want to fill the rows of the report from the loop
For example, in forms
cursor bdl is select code,decode(:global.user_lang,1,name,2,latin_name) name
from GL_ANALYSISHDR
begin
go_block('bdls');
clear_block;
first_record;
for rec in bdl loop
:bdls.code:=rec.code;
:bdls.name:=rec.name;
next_record;
end loop;
go_block('bdls');
first_record;
end;
I tried to use the REF CURSOR
But it return the values in one time and does not allow me to conduct and control ofWhy do you need to do it by a curesor loop? Can't you put the query in the datamodel of the report and simply pass the parameter to restrict the query?
-
How to make every break column on the top of the rows in the same subgroup
hi, guys:
I was wondering if anyone could help me on this problem: I need to set up a break column on a classic report (I ma required to use classic report only), and it works, but I do not know how to make every break column on the top of the rows in the same subgroup. The break column only stays on the left to the rest columns as it is the first column. Anyone could help me on this problem? Here is the query:
select so.doc_number as "DOC Number", so.offender_id as "Offender ID", so.first_name||' '|| so.middle_name||' '||so.last_name as "Offender Name",
(select sc1.description from sor_code sc1 where sc1.code_id=so.race) as "Race",
(select sc2.description from sor_code sc2 where sc2.code_id=so.sex) as "Sex",
replace(replace(nvl2(sl.address1, sl.address1||' '||sl.address2 ||' '||sl.city ||' '||sl.county||' '||(select sc3.description from sor_code sc3 where sc3.code_id=sl.state)||' '||sl.zip, 'No Known Address'),'#'),',') as "Address",
(select sof.name||' '||sof.phone1||' '||sof.link from sor_offices sof where sof.office_id=sl.jurisdiction) as "Jurisidiction",
decode(rox.habitual, 'Y', 'Habitual', '') as "Habitual",
decode(rox.aggravated, 'Y', 'Aggravated', '') as "Aggravated",
floor(to_number(sysdate-so.date_of_birth)/365) as "Age"
from sor_location sl, sor_offender so, registration_offender_xref rox, sor_last_locn_v sllv
where rox.offender_id=so.offender_id
and sllv.offender_id(+)=so.offender_id
and sl.location_id(+)=sllv.location_id
and rox.status not in ('Merged')
and rox.reg_type_id=1
and upper(rox.status)='ACTIVE'
and nvl(rox.admin_validated, to_date(1,'J'))>=nvl(rox.entry_date, to_date(1,'J'))
and ((so.first_name is not null and upper(so.first_name) like '%'||upper(:P5_TF_FIRST_NAME)||'%') or (:P5_TF_FIRST_NAME is null))
and ((so.last_name is not null and upper(so.last_name) like '%'||upper(:P5_TF_LAST_NAME)||'%') or (:P5_TF_LAST_NAME is null))
and ((sl.address1||sl.address2 is not null and upper(sl.address1|| sl.address2) like '%'||upper(:P5_TF_ADDRESS)||'%')or (:P5_TF_ADDRESS is null))
and ((sl.city is not null and upper(sl.city) like '%'||upper(:P5_TF_CITY)||'%')or (:P5_TF_CITY is null))
and ((sl.county is not null and sl.county =:P5_SL_COUNTY)or (:P5_SL_COUNTY is null))
and (((select sc5.description from sor_code sc5 where sc5.code_id=sl.state and sc5.description=:P5_SL_STATE) is not null )or (:P5_SL_STATE is null))
and ((sl.zip is not null and sl.zip =:P5_TF_ZIP_CODE)
or (:P5_TF_ZIP_CODE is null))
union
select so.doc_number as "DOC Number", so.offender_id as "Offender ID", so.first_name||' '|| so.middle_name||' '||so.last_name as "Offender Name",
(select sc1.description from sor_code sc1 where sc1.code_id=so.race) as "Race",
(select sc2.description from sor_code sc2 where sc2.code_id=so.sex) as "Sex",
replace(replace(nvl2(sl.address1, sl.address1||' '||sl.address2 ||' '||sl.city ||' '||sl.county||' '||(select sc3.description from sor_code sc3 where sc3.code_id=sl.state)||' '||sl.zip, 'No Known Address'),'#'),',') as "Address",
(select sof.name||' '||sof.phone1||' '||sof.link from sor_offices sof where sof.office_id=sl.jurisdiction) as "Jurisidiction",
decode(rox.habitual, 'Y', 'Habitual', '') as "Habitual",
decode(rox.aggravated, 'Y', 'Aggravated', '') as "Aggravated",
floor(to_number(sysdate-so.date_of_birth)/365) as "Age"
from sor_location sl, sor_offender so, registration_offender_xref rox, sor_last_locn_v sllv
where rox.offender_id=so.offender_id
and sllv.offender_id(+)=so.offender_id
and sl.location_id(+)=sllv.location_id
and rox.status not in ('Merged')
and rox.reg_type_id=1
and upper(rox.status)='ACTIVE'
and nvl(rox.admin_validated, to_date(1,'J'))>=nvl(rox.entry_date, to_date(1,'J'))
and ((so.first_name is not null and upper(so.first_name) like '%'||upper(:P5_TF_FIRST_NAME)||'%') or (:P5_TF_FIRST_NAME is null))
and ((so.last_name is not null and upper(so.last_name) like '%'||upper(:P5_TF_LAST_NAME)||'%') or (:P5_TF_LAST_NAME is null))
and ((sl.physical_address1 is not null and upper(sl.physical_address1) like '%'||upper(:P5_TF_ADDRESS)||'%') or (:P5_TF_ADDRESS is null))
and ((sl.physical_city is not null and upper(sl.physical_city) like '%'||upper(:P5_TF_CITY)||'%') or (:P5_TF_CITY is null))
and ((sl.physical_county is not null and sl.physical_county =:P5_SL_COUNTY) or (:P5_SL_COUNTY is null))
and (((select sc5.description from sor_code sc5 where sc5.code_id=sl.physical_state and sc5.description=:P5_SL_STATE) is not null )or (:P5_SL_STATE is null))
and ((sl.physical_zip is not null and sl.physical_zip =:P5_TF_ZIP_CODE) or (:P5_TF_ZIP_CODE is null))
union
select so.doc_number as "DOC Number", so.offender_id as "Offender ID", so.first_name||' '|| so.middle_name||' '||so.last_name as "Offender Name",
(select sc1.description from sor_code sc1 where sc1.code_id=so.race) as "Race",
(select sc2.description from sor_code sc2 where sc2.code_id=so.sex) as "Sex",
replace(replace(nvl2(sl.address1, sl.address1||' '||sl.address2 ||' '||sl.city ||' '||sl.county||' '||(select sc3.description from sor_code sc3 where sc3.code_id=sl.state)||' '||sl.zip, 'No Known Address'),'#'),',') as "Address",
(select sof.name||' '||sof.phone1||' '||sof.link from sor_offices sof where sof.office_id=sl.jurisdiction) as "Jurisidiction",
decode(rox.habitual, 'Y', 'Habitual', '') as "Habitual",
decode(rox.aggravated, 'Y', 'Aggravated', '') as "Aggravated",
floor(to_number(sysdate-so.date_of_birth)/365) as "Age"
from sor_location sl, sor_offender so, registration_offender_xref rox, sor_last_locn_v sllv, sor_alias sa
where rox.offender_id=so.offender_id
and sa.offender_id=so.offender_id
and sllv.offender_id(+)=so.offender_id
and sl.location_id(+)=sllv.location_id
and rox.status not in ('Merged')
and rox.reg_type_id=1
and upper(rox.status)='ACTIVE'
and nvl(rox.admin_validated, to_date(1,'J'))>=nvl(rox.entry_date, to_date(1,'J'))
and ((sa.first_name is not null and upper(sa.first_name) like '%'||upper(:P5_TF_FIRST_NAME)||'%') or (:P5_TF_FIRST_NAME is null))
and ((sa.last_name is not null and upper(sa.last_name) like '%'||upper(:P5_TF_LAST_NAME)||'%') or (:P5_TF_LAST_NAME is null))
and ((sl.address1||sl.address2 is not null and upper(sl.address1|| sl.address2) like '%'||upper(:P5_TF_ADDRESS)||'%')or (:P5_TF_ADDRESS is null))
and ((sl.city is not null and upper(sl.city) like '%'||upper(:P5_TF_CITY)||'%')or (:P5_TF_CITY is null))
and ((sl.county is not null and sl.county =:P5_SL_COUNTY)or (:P5_SL_COUNTY is null))
and (((select sc5.description from sor_code sc5 where sc5.code_id=sl.state and sc5.description=:P5_SL_STATE) is not null )or (:P5_SL_STATE is null))
and ((sl.zip is not null and sl.zip =:P5_TF_ZIP_CODE)or (:P5_TF_ZIP_CODE is null))
union
select so.doc_number as "DOC Number", so.offender_id as "Offender ID", so.first_name||' '|| so.middle_name||' '||so.last_name as "Offender Name",
(select sc1.description from sor_code sc1 where sc1.code_id=so.race) as "Race",
(select sc2.description from sor_code sc2 where sc2.code_id=so.sex) as "Sex",
replace(replace(nvl2(sl.address1, sl.address1||' '||sl.address2 ||' '||sl.city ||' '||sl.county||' '||(select sc3.description from sor_code sc3 where sc3.code_id=sl.state)||' '||sl.zip, 'No Known Address'),'#'),',') as "Address",
(select sof.name||' '||sof.phone1||' '||sof.link from sor_offices sof where sof.office_id=sl.jurisdiction) as "Jurisidiction",
decode(rox.habitual, 'Y', 'Habitual', '') as "Habitual",
decode(rox.aggravated, 'Y', 'Aggravated', '') as "Aggravated",
floor(to_number(sysdate-so.date_of_birth)/365) as "Age"
from sor_location sl, sor_offender so, registration_offender_xref rox, sor_last_locn_v sllv, sor_alias sa
where rox.offender_id=so.offender_id
and sa.offender_id=so.offender_id
and sllv.offender_id(+)=so.offender_id
and sl.location_id(+)=sllv.location_id
and rox.status not in ('Merged')
and rox.reg_type_id=1
and upper(rox.status)='ACTIVE'
and nvl(rox.admin_validated, to_date(1,'J'))>=nvl(rox.entry_date, to_date(1,'J'))
and ((sa.first_name is not null and upper(sa.first_name) like '%'||upper(:P5_TF_FIRST_NAME)||'%') or (:P5_TF_FIRST_NAME is null))
and ((sa.last_name is not null and upper(sa.last_name) like '%'||upper(:P5_TF_LAST_NAME)||'%') or (:P5_TF_LAST_NAME is null))
and ((sl.physical_address1 is not null and upper(sl.physical_address1) like '%'||upper(:P5_TF_ADDRESS)||'%') or (:P5_TF_ADDRESS is null))
and ((sl.physical_city is not null and upper(sl.physical_city) like '%'||upper(:P5_TF_CITY)||'%') or (:P5_TF_CITY is null))
and ((sl.physical_county is not null and sl.physical_county =:P5_SL_COUNTY) or (:P5_SL_COUNTY is null))
and (((select sc5.description from sor_code sc5 where sc5.code_id=sl.physical_state and sc5.description=:P5_SL_STATE) is not null )or (:P5_SL_STATE is null))
and ((sl.physical_zip is not null and sl.physical_zip =:P5_TF_ZIP_CODE) or (:P5_TF_ZIP_CODE is null))I set up "Jurisdiction" to be displayed as the first column in report attributes and set up the first column to be break column, under the "When displaying a break column use this format, use #COLUMN_VALUE# subs", I fill in "Jurisdiction".lxiscas wrote:
Hi, fac586:
I am sorry for not being able to provide project online oracle to ask the question as some of the data needs to be approved to release.You don't need to use the actual data. Create simple test cases using data from Oracle's sample schemas: SCOTT, OE, HR etc.
I actually want something like this:
Jurisdiction: Bartlesville Police Department, 918-338-4001, http://www.cityofbartlesville.org/departments/police/
Smith , Carl Sherman ......
Smith , Tommy Nesby .....
Jurisdiction: Canadian County Sheriff's Office, 405-262-4787, Fax - 405-422-2430
Smith , Gabriel Ray ...
Smith , Michael Bert ...I omit the sensitive data with ...
but right now it shows as this way:
Jurisdiction: Bartlesville Police Department, 918-338-4001, http://www.cityofbartlesville.org/departments/police/ Smith , Carl Sherman ......
Smith , Tommy Nesby .....
Jurisdiction: Canadian County Sheriff's Office, 405-262-4787, Fax - 405-422-2430 Smith , Gabriel Ray ...
Smith , Michael Bert ...Is that possible to show the data as the upper way?The best way to do this is using a report with a custom named column template as in this example. See the following threads for solutions to similar problems:
<li>{thread:id=2402836}
<li>{message:id=9816577} -
Selecting the rows with the max rank
Using Siebel CRM and tested conditions in Answers - It was observed that one email ID is linked to multiple customers. For an email campaign we need to select only one customer per email basically had to remove all the duplicate email addresses from the list as customer IDs are anyways unique.
Tried using the RANK function - RANK(customer ID by Email) = 1 it gave me unique email addresses and customer IDs but the problem is that the RANK 1 is given to the latest customer added (customer IDs are numeric)
I need a solution to select all the rows with the max rank / all the customers that were added first for all the emailsDon't know what you want to achieve but here is way to do this:
SQL> select * from test;
NO
1
2
3
4
5
SQL> select * from test union all select * from test;
NO
1
2
3
4
5
1
2
3
4
5
10 rows selected.
Daljit Singh -
Insert the row in "navigatedOutRow" event method...
Hi guys,
I want to insert the row to the database
when user drop down to another row in Grid Control. I added
myNavBar.doClick(NavigationBar.BUTTON_INSERT);
to the detailGrid_navigatedOutRow even method.
but it doesn't work for me. Do i am wrong way?
(where myNavBar is an object of NevagationBar and detailGrid is an object of GridControl).
nullAli, how did you implement the myGirdRS.isDirty() function? It seems the _isDirty from navigationbar source code returns the value based on the entire sessionInfo. So when you have a pending transaction then open up a reference window to look up a value, when you close the reference window, the isDirty returns true? which is not true for the case of the reference window at all, any help???
Maybe you are looking for
-
Satellite Pro T130-14M - Will not boot up
I have the above laptop which does not include a DVD drive. Had recently updated Itunes and synch an Iphone. When I next switched on the machine started to boot as normal but ended up with a blank black screen on which the mouse pointer was visible a
-
Rectangle size grows while uploading in server
hi all, i put two table inside a ractangle. the two table has some data. while uploading the same in the server the rectangle size grows automatically but while checking in local it doesn't shows any problem. i am using ssrs 2008r2 for creating repor
-
If I update a book in iBooks will I lose my highlights/notes?
If an author updates a book purchased from iBooks will I lose the highlights or notes I have made in the current version? For example, if I own edition 1.0 of a book and the author provides a free upgrade to edition 1.1 will the highlights or notes I
-
Lightroom 3 won't open...
My computer recently had to be rebooted and partially rebuilt due to a virus. When all was fixed, we couldn't get Lightroom 3 to open when we clicked on the icon. We just receive the error message, "Adobe Lightroom has encountered a problem and needs
-
I am using Yosemite 10.10 can get update of 10.10.1
On my iMac , I used the beta version of Yosemite right through until the release without problems. Since the release of 10.10 I have been having issues with a number of things not the least of which my newer versions of PSE 12 and Premier Elements wo