How to delete multiple row in classic report.
Dear Friends,
i am using 4.1 ve.
i have created classic report.i want to delete row .
How can i do it.
i need check box in classic report and if i select multiple check box then row should delete and before delete pop up should be pop up to confirmation to delete.
How can i do it.
Thanks
Hi Vedant,
here you have one advanced example:
http://www.talkapex.com/2009/01/apex-report-with-checkboxes-advanced.html
But you can do it easier using only apex_item.checkbox (creating one column in report query with this function).
After you submit this page the value will be stored to apex_application.g_f0X variable where X is equal to p_idx param of function apex_item.checkbox.
Note: only checked values will be stored.
Br,
Marko Goricki
http://apexbyg.blogspot.com
Similar Messages
-
Deleting multiple rows in a report ?
db11gxe , apex 4.0 , firefox 24 ,
how to delete multiple rows in a report at one time ?
thanksHi newbi_egy,
Here is a small demo with few steps that can be used in your scenario-
1) Below is the query of a report on emp table which has empno column with unique values-
SELECT APEX_ITEM.CHECKBOX(1,empno) " ", ename, job FROM emp ORDER by 1
2) A Delete button is created that submits the page.
3) An on-submit process is created with Process point On Submit - After Computation and Validations with condition that the below process runs when Delete button clicked.
BEGIN
FOR i in 1..APEX_APPLICATION.G_F01.count
LOOP
delete from emp where empno=APEX_APPLICATION.G_F01(i);
END LOOP;
END;
I hope this might help you.
Regards,
Das123 -
How to select multiple row in ALV report
Hi friends,
1. How to select multiple row in ALV report
( How to set tab in ALV report and want to select multiple line.)
Thanking you.
SubashHi Sahoo,
If you are using the class CL_GUI_ALV_GRID. In methods SET_TABLE_FOR_FIRST_DISPLAY.
in layout structure you will find field SEL_MODE
pass :
LS_LAYOUT-SEL_MODE = 'A'.
In PAI.
CALL METHOD GRID->GET_SELECTED_ROWS
IMPORTING
ET_INDEX_ROWS = T_ROWS
ET_ROW_NO = T_ROWID.
Hope these will solve your problem.
Regards,
Kumar M. -
How to delete multiple rows from ADF table
How to delete multiple rows from ADF table
Hi,
best practices when deleting multiple rows is to do this on the business service, not the view layer for performance reasons. When you selected the rows to delete and press submit, then in a managed bean you access thetable instance (put a reference to a managed bean from the table "binding" property") and call getSeletedRowKeys. In JDeveloper 11g, ADF Faces returns the RowKeySet as a Set of List, where each list conatins the server side row key (e.g. oracle.jbo.Key) if you use ADF BC. Then you create a List (ArrayList) with this keys in it and call a method exposed on the business service (through a method activity in ADF) and pass the list as an argument. On the server side you then access the View Object that holds the data and find the row to delte by the keys in the list
Example 134 here: http://blogs.oracle.com/smuenchadf/examples/#134 provides you with the code
Frank -
hello
i want to delete selected multiple rows in sigle shot? can i have steps, very urgent?
Thanks
krishKrish,
Normally the multiple selection delete will come from a table,
In that case call a AM method
and in a while/for loop traverse through the VO records and check the Checked Value(chexbox value to delete)
and if the value is Y , do row.Remove()
At the end commit,
Eg.
XXPODskOrdLnsVORowImpl lineRow = (XXPODskOrdLnsVORowImpl)lineVO.first();
while(lineRow !=null)
//check the checkbox value
if("Y".equals(lineRow.getSelected))
lineRow.remove();
XXPODskOrdLnsVORowImpl lineRow = (XXPODskOrdLnsVORowImpl)lineVO.next();
Hoe this helps.
Thanks,
With regards,
Kali.
OSSI. -
How to delete multiple rows in a table of web dynpro for abap?
hi,
Experts ,
I want to delete the selected multiple records from a table from that i have inserted a check box ui element in a first column of a table what ever checkbox ix checked i want to delete those selected records from table .
please suggest me on
Thanks in advanceHi,
If you have DELETE button, in that action you write this code -
DATA lr_node type ref to if_wd_context_node.
lt_set = lr_node->get_elements( ).
loop at lt_set into ls_set.
ls_set->get_staitc_attributes
importing
static_attirbutes = ls_row.
if ls_row-check = 'X'.
lr_node->remove_element( ).
endif.
endloop.
Check the methods and thier types.
Regards,
Lekha. -
How do i delete multiple rows in JTable
hello
how i delete multiple rows in JTable
when i selected multiple rows from the jtable and delete its give the error ArrayIndexOutOfBoundException
e.g.
int rows[]=jtable.getSelectedRows();
for(int i=0;i<rows.length;i++)
DefaultTableModel model=(DefaultTableModel)jtable.getModel();
model.removeRow(rows);
like this
please help me
merajYou are trying to remove the rows an equal times to the amount of rows selected.
You should remove one row at a time:
model.removeRow(rows);
Change your code into this.
for(int i=0;i<rows.length;i++)
DefaultTableModel model=(DefaultTableModel)jtable.getModel();
model.removeRow(rows[i]); -
Updating and deleting multiple rows
Hi!
I have a form on a table with report page where I can filter data through columns.
1. Is it possible to create a button that will delete all the filtered data?
2. Also, I would like to be able to update any column of the filtered dataset to a certain value (that needs to be input somehow). Is that possible?
So far I can only update or delete one row at a time, which isn't useful as I sometimes need to change 100 rows at a time with the same value or delete them.
When I use tabular form, I can't filter rows, but I can delete multiple rows...
Also if there are similar examples, could you please send me a link; I can't seem to find any.
I'm using Apex 4.2.2.
Best Regards,
IvanDeleting multiple rows - [url https://forums.oracle.com/forums/thread.jspa?threadID=2159983]common question
Best answered with Martin's example
http://www.talkapex.com/2009/01/apex-report-with-checkboxes-advanced.html
Depends how you filter your data. You could identify all your limiting variables, and reverse the where clause in a delete process.
As for point 2, you can define a button that redirects to the page, and you can defined all the item values you like using the Action link.
There is likely an example in the supplied package applications.
Scott -
Best practice for deleting multiple rows from a table , using creator
Hi
Thank you for reading my post.
what is best practive for deleting multiple rows from a table using rowSet ?
for example how i can execute something like
delete from table1 where field1= ? and field2 =?
Thank youHi,
Please go through the AppModel application which is available at: http://developers.sun.com/prodtech/javatools/jscreator/reference/codesamples/sampleapps.html
The OnePage Table Based example shows exactly how to use deleting multiple rows from a datatable...
Hope this helps.
Thanks,
RK. -
Colourfull row in classical report
Hi,
I have classical report. I have to do colour full to row in report. how i can set green colour for a row in classical report.
Thanks & regards
Vedantrefer oracle apex - Colour report rows that contain the same product name - Stack Overflow
helps you
Pars -
Deleting Multiple Rows From Multiple Tables As an APEX Process
Hi There,
I'm interesting in hearing best practice approaches for deleting multiple rows from multiple tables from a single button click in an APEX application. I'm using 3.0.1.008
On my APEX page I have a Select list displaying all the Payments made and a user can view individual payments by selecting a Payment from the Select List (individual items are displayed below using Text Field (Disabled, saves state) items with a source of Database Column).
A Payment is to be deleted by selecting a custom image (Delete Payments Button) displayed in a Vertical Images List on the same page. The Target is set as the same page and I gave the Request a name of DELETEPAY.
What I tried to implement was creating a Conditional Process On Submit - After Computations and Validations that has a source of a PL/SQL anonymous block as follows:
BEGIN
UPDATE tblDebitNotes d
SET d.Paid = 0
WHERE 1=1
AND d.DebitNoteID = :P7_DEBITNOTEID;
INSERT INTO tblDeletedPayments
( PaymentID,
DebitNoteID,
Amount,
Date_A,
SupplierRef,
Description
VALUES
( :P7_PAYMENTID,
:P7_DEBITNOTEID,
:P7_PAID,
SYSDATE,
:P7_SUPPLIERREF,
:P7_DESCRIPTION
DELETE FROM tblPayments
WHERE 1=1
AND PaymentID = :P7_PAYMENTID;
END;
The Condition Type used was Request = Expression 1 where Expression 1 had a value of DELETEPAY
However this process is not doing anything!! Any insights greatly appreciated.
Many thanks,
Gary....the "button" is using a page level Target,...
I'm not sure what that means. If the target is specified in the definition of a list item, then clicking on the image will simply redirect to that URL. You must cause the page to be submitted instead, perhaps by making the URL a reference to the javaScript doSubmit function that is part of the standard library shipped with Application Express. Take a look at a Standard Tab on a sample application and see how it submits the page using doSubmit() and emulate that.
Scott -
Delete multiple rows in a JTable ADF Swing.
hi guys,
Would anyone know tell me how do I delete multiple rows in a JTable ADF Swing?
JDeveloper.Hi,
I would configure the table for multi row selection. Then get the selected row index, access the iterator in the PageDef file (through the panelBinding reference you have in ADF Swing) and then iterate over the selected row indexes, make an index to become the current row and call remove() on it
Frank -
Adding and Deleting Multiple Rows or Columns
How do you add or delete more than one row or column at a time.
Robby! wrote:
That's a great finding!
I just wrote a feedback requesting a shortcut like this.
It is a pity though that they desing it to work only if you select the header of the row/column. It should be enabled to work from within any cell in the table.
Who wrote such an error ?
These interesting shortcuts behave flawlessly even if the cursor was in D18 for instance.
(a) I never saw them in the delivered resources.
(b) they aren't responding to the OP's question which was about "Adding and Deleting Multiple Rows and Columns"
Yvan KOENIG (from FRANCE vendredi 3 octobre 2008 18:39:01) -
Delete Multiple Rows of JTable by selecting JCheckboxes
Hi,
I want delete rows of JTable that i select through JCheckbox on clicking on JButton. The code that i am using is deleting one row at a time. I want to delete multiple rows at a time on clicking on Button.
This is the code i m using
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.table.*;
public class TableTest extends JFrame implements ActionListener
JButton btnAdd;
BorderLayout layout;
DefaultTableModel model;
JTable table;JButton btexcluir;
public static void main(String[] args)
TableTest app = new TableTest();
app.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
public TableTest()
super("Table Example");
btnAdd = new JButton("Add");
btnAdd.addActionListener(this);
model = new DefaultTableModel()
public Class getColumnClass(int col)
switch (col)
case 1 :
return Boolean.class;
default :
return Object.class;
table = new JTable(model);
table.setPreferredSize(new Dimension(250,200));
// Create a couple of columns
model.addColumn("Col1");
model.addColumn("Col2");
JCheckBox cbox = new JCheckBox();
// Append a row
JPanel painel = new JPanel();
model.addRow(new Object[] { "v1",new Boolean(false)});
model.addRow(new Object[] { "v3", new Boolean(false)});
JScrollPane scrollPane = new JScrollPane(table);
scrollPane.createVerticalScrollBar();
btexcluir= new JButton("Excluir");
btexcluir.addActionListener(this);
painel.add(btexcluir);
painel.add(btnAdd);
getContentPane().add(scrollPane, BorderLayout.NORTH);
getContentPane().add(painel, BorderLayout.SOUTH);
setSize(600, 600);
setVisible(true);
public void actionPerformed(ActionEvent e) {
if (e.getSource() == btnAdd)
model.addRow(new Object[] { "Karl", new Boolean(false)});
if (e.getSource()==btexcluir){
for (int i=0; i <=model.getRowCount(); i++){
if (model.getValueAt(i,1)==Boolean.FALSE)
JOptionPane.showMessageDialog(null, "No lines to remove!!");
else if(model.getValueAt(i,1)==Boolean.TRUE)
model.removeRow(i);
}Please reply me with code help.
Thanks
NitinHi,
Thanks for ur support. My that problem is solved now. One more problem now . Initially i want that delete button disabled. When i select any checkbox that button should get enabled. how can i do that ?
Thanks
Nitin -
How to get multiple rows from database table?
hello !
I need to get multiple rows from a OLEDB database table and display them on a table object.
I did "Wrap in subfrom" on the table, set subform of the table to "flowed", and checked "Repeat row for each data item" of Row1 of the table.
But I can get only one row on the table object.
I need your help.
ThanksHi,
best practices when deleting multiple rows is to do this on the business service, not the view layer for performance reasons. When you selected the rows to delete and press submit, then in a managed bean you access thetable instance (put a reference to a managed bean from the table "binding" property") and call getSeletedRowKeys. In JDeveloper 11g, ADF Faces returns the RowKeySet as a Set of List, where each list conatins the server side row key (e.g. oracle.jbo.Key) if you use ADF BC. Then you create a List (ArrayList) with this keys in it and call a method exposed on the business service (through a method activity in ADF) and pass the list as an argument. On the server side you then access the View Object that holds the data and find the row to delte by the keys in the list
Example 134 here: http://blogs.oracle.com/smuenchadf/examples/#134 provides you with the code
Frank
Maybe you are looking for
-
RAID 5 array on PERC6/i offline
Ok, so we have a 2970 with a PERC6/i. 5 drives in a RAID 5 array, and one hot spare. I apparently lost two drives today, one to a failure, and one began showing as a foreign config. I cleared the foreign config and replaced the drive, but now on my a
-
What more can I tell you? Firefox recommends 5.0 be installed. When I try to do so, I get a message that says some addons are not compatible. specifically avast web rep 20110101. I have no idea what avast web rep 20110101 is and am concerned that it
-
How to use custom authority object to execute certain code?
Hi Gurus, I'm trying to use an authority-check just to execute certain ABAP code for some roles only, but I don't get to make it work as every user gets to exectute the code. I'm also not sure of which field(s) I should add to my authorization object
-
Hello All, I have 2 questions: 1) I have loaded all my data from R/3 to ODS and now want to load from ODS to Cube. SO I have generated an export datasource by right clicking on the ODS and selecting "Generate Export..." and it gave a successful messa
-
Solaris 10 question: What is the maximum memory support at a x64 system?
I am trying to install Solaris 10 U4 at a x64 Intel system. When the OS installation cd boot, it can only recognize up to 32GB memories. After installation with 64GB memories, at the 1st boot, the system will continuously reboot automatically. So I w