How to add a new row in Tabular Form based on a table

Hi
I have tabular form based on a table.
I want the table to have an empty row when there is no data
in the table so that I can enter data directly.
But right now whenever the page is launched, its showing a no data found message and I have to press the 'Add Row' button to enter data.
Can anyone help me out on this?
Thanks

Hi Leo
Your suggestion works fine in the APEX 2.1
But in 3.0.1 it gives this error :
Error in add row internal routine: ORA-01476: divisor is equal to zero
Error Unable to add rows.
I am not sure why this happens.

Similar Messages

  • How to stop insert of new row in tabular form if it's also being deleted

    Suppose you have a tabular form, and one of the fields is a not-null column. A user checks a button to "add additional row", which adds a new row to the form, defaulting that not-null column to null. Assume it's a name or something, so there is no reasonable non-null default value that can be entered here to keep it from being null.
    Now suppose the user makes a series of changes on the page, but then decides they don't want that row they just added, so they mark it for deletion, then click on "Delete Checked Rows". The not-null column was left blank.
    The page is constructed in such a way that the ApplyMRD process runs first, then the ApplyMRU process. (I do this so that the user doesn't lose all their updates if they want to delete a row. I've had a few people complain when they tried to combine both operations, and unexpectedly lost their updates when they hit delete instead of submit.)
    What happens? The page errors out because the ApplyMRU process is trying to insert a row with a null value in a not-null column. The ApplyMRD process ran fine, but because the row marked for deletion didn't exist in the database to begin with, it effectively did nothing. But ApplyMRU still tries to add the row, even though it was marked for deletion.
    Is there any way to prevent this scenario from happening, without requiring the user to Cancel instead of deleting the blank row, which would cause all other changes on the page to be lost? I'd also like to avoid losing the ApplyMRU process when the user clicks "Delete", since it's more effective to combine operations and this will address the UI complaints I'd received otherwise.
    (This is on ApEx 4.0, if it matters.)
    Thanks,
    Keith

    Thinking about this some more, doing the delete and update together may not be an easy thing to accomplish after all.
    Consider the above scenario, but the user puts a dummy value like "ignore-me" into the not-null text field, so the error doesn't come up with ApplyMRU is fired. But if ApplyMRD runs before ApplyMRU, it still doesn't do anything because there is no row in the database with the value "ignore-me". Then ApplyMRU runs and it adds that row, even though it was marked for deletion.
    So you probably need to always run ApplyMRU before ApplyMRD. But then you wind up inserting a row before you delete it, and that may have unintended side effects, if the user really never wanted to add it in the first place.
    Right now, the only workaround I can think of is to:
    1) put ApplyMRU before ApplyMRD
    2) add a pre-commit validation that checks to see if a row is blank AND checked, and if so, put a dummy value into the not-null field
    3) let that row get added and then deleted, and make sure there are no side effects from this (for example, there is an audit table that tracks updates to the base table -- I can add a trigger that does nothing if presented with this dummy value)
    Hopefully, though, there is an easier and more "built-in" way to achieve what I'm aiming for.

  • How to add a new column (Project Number) in the action items table under NPD Module?

    There are two projects with same name and created by same person in NPD.
    So when it is displayed in "Action Items" table, It looks similar.
    To avoid this, I need one more column (Project Number) to be added in the "Action Items" table and " Strategic briefs and projects" table.
    So, How to add a new column (Project Number) in the "Action Items" table and " Strategic briefs and projects" table under NPD Module?
    Please do the needful.

    There is no out of the box configuration available to add columns to NPD action items.   As always we welcome enhancement requests. 
    Thanks
    Kelly

  • How to add entire new row at the top of table in pdf report from c# windows forms using iTextSharp

    Hi for past 3 days i was thinking and breaking my head on how to add entire new at top table created in pdf report from c# windows forms with iTextSharp.
    First: I was able to create/export sql server data in form of table in pdf report from c# windows forms. Given below is the code in c#.
    using System;
    using System.Collections.Generic;
    using System.Configuration;
    using System.Text;
    using System.Data;
    using System.IO;
    using System.Data.SqlClient;
    using System.Windows.Forms;
    using iTextSharp.text;
    using iTextSharp.text.pdf;
    namespace DRRS_CSharp
    public partial class frmPDFTechnician : Form
    public frmPDFTechnician()
    InitializeComponent();
    private void btnExport_Click(object sender, EventArgs e)
    Document doc = new Document(PageSize.A4.Rotate());
    var writer= PdfWriter.GetInstance(doc, new FileStream("Technician22.pdf", FileMode.Create));
    doc.SetMargins(50, 50, 50, 50);
    doc.SetPageSize(new iTextSharp.text.Rectangle(iTextSharp.text.PageSize.LETTER.Width, iTextSharp.text.PageSize.LETTER.Height));
    doc.Open();
    PdfPTable table = new PdfPTable(7);
    table.TotalWidth=585f;
    table.LockedWidth = true;
    PdfPTable inner = new PdfPTable(1);
    inner.WidthPercentage = 115;
    PdfPCell celt=new PdfPCell(new Phrase(new Paragraph("Institute/Hospital:AIIMS,NEW DELHI",FontFactory.GetFont("Arial",14,iTextSharp.text.Font.BOLD,BaseColor.BLACK))));
    inner.AddCell(celt);
    Paragraph para = new Paragraph("DCS Clinical Report-Technician wise", FontFactory.GetFont("Arial", 14, iTextSharp.text.Font.BOLD, BaseColor.BLACK));
    para.Alignment = iTextSharp.text.Element.TITLE;
    iTextSharp.text.Image png = iTextSharp.text.Image.GetInstance("logo5.png");
    png.ScaleToFit(95f, 95f);
    png.Alignment = Element.ALIGN_RIGHT;
    SqlConnection conn=new SqlConnection("Data Source=NPD-4\\SQLEXPRESS;Initial Catalog=DRRS;Integrated Security=true");
    SqlCommand cmd = new SqlCommand("Select t.technician_id,td.Technician_first_name,td.Technician_middle_name,td.Technician_last_name,t.technician_dob,t.technician_sex,td.technician_type from Techniciandetail td,Technician t where td.technician_id=t.technician_id and td.status=1", conn);
    conn.Open();
    SqlDataReader dr;
    dr = cmd.ExecuteReader();
    table.AddCell("ID");
    table.AddCell("First Name");
    table.AddCell("Middle Name");
    table.AddCell("Last Name");
    table.AddCell("DOB" );
    table.AddCell("Gender");
    table.AddCell("Designation");
    while (dr.Read())
    table.AddCell(dr[0].ToString());
    table.AddCell(dr[1].ToString());
    table.AddCell(dr[2].ToString());
    table.AddCell(dr[3].ToString());
    table.AddCell(dr[4].ToString());
    table.AddCell(dr[5].ToString());
    table.AddCell(dr[6].ToString());
    dr.Close();
    table.SpacingBefore = 15f;
    doc.Add(para);
    doc.Add(png);
    doc.Add(inner);
    doc.Add(table);
    doc.Close();
    The code executes well with no problem and get all datas from tables into table in PDF report from c# windows forms.
    But here is my problem how can i align Title(DCS Clinical Report-Technician wise) center of pdf report with image named:logo5.png immediately coming to it's right?.
    As the problem i am facing is my title or Header(DCS Clinical Report-Technician wise) is at top of my image named:logo5.png and not coming to it's center position of my image.
    Second the problem i am facing is how to add new entire row to top of existing table in pdf report from c# windows form using iTextSharp?.
    given in below is the row and it's data . So how do i add the given below row and it's data to my top my table in pdf report from c# windows forms using itextsharp?
    as you can see how i create my columns in table in pdf report and populate it with sql server data. Given the code below:
    Document doc = new Document(PageSize.A4.Rotate());
    var writer= PdfWriter.GetInstance(doc, new FileStream("Technician22.pdf", FileMode.Create));
    doc.SetMargins(50, 50, 50, 50);
    doc.SetPageSize(new iTextSharp.text.Rectangle(iTextSharp.text.PageSize.LETTER.Width, iTextSharp.text.PageSize.LETTER.Height));
    doc.Open();
    PdfPTable table = new PdfPTable(7);
    table.TotalWidth=585f;
    table.LockedWidth = true;
    Paragraph para = new Paragraph("DCS Clinical Report-Technician wise", FontFactory.GetFont("Arial", 14, iTextSharp.text.Font.BOLD, BaseColor.BLACK));
    para.Alignment = iTextSharp.text.Element.TITLE;
    iTextSharp.text.Image png = iTextSharp.text.Image.GetInstance("logo5.png");
    png.ScaleToFit(95f, 95f);
    png.Alignment = Element.ALIGN_RIGHT;
    SqlConnection conn=new SqlConnection("Data Source=NPD-4\\SQLEXPRESS;Initial Catalog=DRRS;Integrated Security=true");
    SqlCommand cmd = new SqlCommand("Select t.technician_id,td.Technician_first_name,td.Technician_middle_name,td.Technician_last_name,t.technician_dob,t.technician_sex,td.technician_type from Techniciandetail td,Technician t where td.technician_id=t.technician_id and td.status=1", conn);
    conn.Open();
    SqlDataReader dr;
    dr = cmd.ExecuteReader();
    table.AddCell("ID");
    table.AddCell("First Name");
    table.AddCell("Middle Name");
    table.AddCell("Last Name");
    table.AddCell("DOB" );
    table.AddCell("Gender");
    table.AddCell("Designation");
    while (dr.Read())
    table.AddCell(dr[0].ToString());
    table.AddCell(dr[1].ToString());
    table.AddCell(dr[2].ToString());
    table.AddCell(dr[3].ToString());
    table.AddCell(dr[4].ToString());
    table.AddCell(dr[5].ToString());
    table.AddCell(dr[6].ToString());
    dr.Close();
    table.SpacingBefore = 15f;
    doc.Add(para);
    doc.Add(png);
    doc.Add(table);
    doc.Close();
    So my question is how to make my column headers in bold?
    So these are my questions.
    1. how can i align Title(DCS Clinical Report-Technician wise) center of pdf report with image named:logo5.png immediately coming to it's right?.
    2. how do i add the given below row and it's data to my top my table in pdf report from c# windows forms using itextsharp?
    3.how to make my column headers in bold?
    I know that i have to do some modifications to my code but i dont know how to do it. Can anyone help me please.
    Any help or guidance in solving this problem would be greatly appreciated.
    vishal

    Hi,
    >>1. how can i align Title(DCS Clinical Report-Technician wise) center of pdf report with image named:logo5.png immediately coming to it's right?.
    2. how do i add the given below row and it's data to my top my table in pdf report from c# windows forms using itextsharp?
    3.how to make my column headers in bold?<<
    I’m sorry for the issue that you are hitting now.
    This itextsharp is third party control, for this issue, I recommended to consult the control provider directly, I think they can give more precise troubleshooting.
    http://sourceforge.net/projects/itextsharp/
    Thanks for your understanding.
    Regards,
    Marvin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to create a new row for a VO based on values from another VO?

    Hi, experts.
    in jdev 11.1.2.3,
    How to create a new row for VO1 based on values from another VO2 in the same page?
    and in my use case it's preferable to do this from the UI rather than from business logic layer(EO).
    Also I have read Frank Nimphius' following blog,but in his example the source VO and the destination VO are the same.
    How-to declaratively create new table rows based on existing row content (20-NOV-2008)
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/13-create-with-params-169140.pdf
    I have tried:
    1.VO1(id,amount,remark1) and VO2(id,amount,remark2) are based on different EO,but render in same page,
    2.Drag and drop a Createwithparams button for VO1(id,amount,remark),
    3.add: Create insertinside Createwithparams->Nameddata(amount),
    4.set NDName:amount, NDValue:#{bindings.VO2.children.Amount}, NDtype:oracle.jbo.domain.Number.
    On running,when press button Createwithparams, cannot create a new row for VO1, and get error msg:
    <Utils> <buildFacesMessage> ADF: Adding the following JSF error message: For input string: "Amount"
    java.lang.NumberFormatException: For input string: "Amount"
         at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    Can anyone give some suggestions?
    Thanks in advance.
    bao
    Edited by: user6715237 on 2013-4-19 下午9:29

    Hi,CM,
    I'm really very appreciated for your quick reply! You know, today is Saturday, it's not a day for everyone at work.
    My principal requirement is as follows:
    1.select/check some rows from VO2, and for each selection create a new row with some attributes from VO2 as default values for VO1's corresponding attributes, and during this process the user may be cancel/uncheck or redo some of the selections.
    --so it's better to implement it in UI rather than in EO.
    2.it's better to implement this function with declarative way as in Frank Nimphius' blog.
    --little Jave/JS coding, the better. I only have experience in ORACLE FORMS, little experience in JAVA/JS.
    In order to get full information for the requirements of my use case, can take a check at:
    How to set default value for a VO query bind variable in a jspx page?
    (the end half of the thread: I have a more realworld requirement similar to the above requirement is:
    Manage bank transactions for clients. and give invoices to clients according to their transaction records. One invoice can contain one or many transactions records. and one transaction records can be split into many invoices.
    Regards
    bao
    Edited by: user6715237 on 2013-4-19 下午11:18
    JAVE->JAVA

  • Add a new row in Detail form in MASTER DETAIL FORM

    Hello Everyone,
    I need help on the following.I have master detail form .In detail form i have Add Row button which adds a new row and i have save button to save the record .But now if i am adding a row its not adding a new row .It says it process but didn't show the new row .
    Can somebody help me on this
    thanks in advance

    Hello,
    How many records do you show in your detaii region and how many are there for that master? Maybe the new row is in the next set of records - or at the 'bottom' of the last set of records?
    Did you check if the row is inserted in the database (and just didn't show up for one reason or another)?
    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    http://www.bloggingaboutoracle.org/
    http://www.logica.com/

  • Detail tabular form based on two tables

    db11gxe , apex 4.0 , firefox 24 ,
    hi all ,
    i have a master detail form based on two tables , the detail form ofcourse based on one table , the problem is i want to include a column of another
    table into the tabular form , so i have changed the query of the tabular form and included the column in it correctly ,
    but the problem is about saving data , i can not save the data , i think
    because the "mru" process is based on one table , that is because i face an error talking about "mru" process when i try to save the data ,
    Error in mru internal routine: ORA-20001: no data found in tabular form Unable to process update.
    so
    what should i do to save the data ? should i create another "mru" process based on the other table or what ?
    thanks

    Anything beyond "simple" requires that you do it yourself.  I believe that what you want is "beyond simple"
    As far as I know, you can only use the 'mru' on one table.
    (I could be wrong)
    If the conditions are right, you might be able to simplify things such that you can use the 'mru'.
    ie CREATE VIEW on the two tables.
    However, you need to understand how Oracle treats DML operations on views, what type of views can be updated, etc., etc.
    If just creating the view doesn't work, creating an INSTEAD OF trigger on the view come to mind...
    (lol) - at that point, you have already started down the 'dark path' of creating your own 'MRU'
    personal note:  triggers have a really baaaddd habit of hiding code from other developers.  you are better off, in the long run, creating your own 'mru'..
    ie a package with procedures to handle INSERT, UPDATE, and DELETES
    MK

  • How to add a new row at the top of manual tabular form

    I have a manual tablular form. I'm trying to add a row at the top of the form, instead of new row of being displayed at the bottom. any ideas are appreciated.
    thanks,
    Surya

    This will depend on two things:
    1. sorting of the columns - needs to be a some kind of a descending sorting on a hidden column, enabled within the Report Attributes and not in the SQL Query
    2. Report Attributes => Layout and Pagination => Sort Nulls First
    You will need to play with those settings a bit. One thing to consider is that you should sort your report on a hidden column and you shuldn't enable the sorting on visible columns, because it will mess up your row positioning.
    See this example:
    http://apex.oracle.com/pls/otn/f?p=31517:215
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Dynamic Action on new row in Tabular Form

    Hi Guys,
    APEX version is 4.1
    I created a dynamic action on change of a select list, if changed then disable the related fields on the same row.
    This is working fine for all EXISTING rows on the tabular form.
    However, if I click on ADD ROW button, a new row is added to the page, but the change event on select list is
    not triggerred from the dynamic action.
    Is there any thoughts or workaround on this interesting problem?
    Thanks in advance,
    Frank

    I got it working by adding a onchange event which is triggering js function on the page.

  • Add a new Row in detail form

    Hello Everyone ,
    I have add row Botton on details form to add row and save button to save data .
    When I clicking to add row its creating new row but as i am saving it it says 1 row inserted but when i am accessing the same data the new added row was not showing there .
    I am not getting any error .I have master detail form
    Thanks in advance

    I'm having the same issue.
    However, I've noticed that the ROW in question is getting added to the database, but it's not populating the KEY column that links the sub table.
    MASTER TABLE
    MK_ID number
    MK NAME varchar
    SUB TABLE
    SK_ID number
    MK_ID number (should link to above)
    SK_NAME varchar
    I get the message that the row has been added in APEX, but then nothing shows on the web form.
    Doing a quick query of the Sub Table, I can see the row (minus the Master Table key).
    MASTER TABLE
    MK_ID = 1
    MK_NAME = KEN
    SUB TABEL
    SK_ID = 3
    MK_ID is NULL !!
    SK_NAME CHILD1
    It "ALMOST" works.
    I used the wizard to create this, and did NOT modify anything, so I assume this should be an open bug, and people shouldn't use it.
    Cheers!
    Edited by: Canucklehead on Nov 23, 2008 4:52 PM

  • Insert a number of rows for tabular form based on frequency value

    Hi,
    I have a page with two search items.
    Based on the values in the search item, a report is created as tabular form.
    The information displayed has a frequency column.
    Values for frequency can be Q, Y, M, D
    I would like to know if it is possible to to load the form with a standard numbers of row depending on the frequency.
    Example: If frequency is Q ,then when i click the go button in the search region, the tabular shoud load with the information displaying 4 rows, even if the information returned is less than 4 rows.
    If frequency is Y ,then when i click the go button in the search region, the tabular shoud load with the information displaying 2 rows, even if the information returned is less than 2 rows.
    When no data is found, the form should load displaying a number of empty rows depending on the frequency.
    Thanks

    Following this example:
    http://apex.oracle.com/pls/otn/f?p=31517:209
    you should be able to achive that.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • URGENT: tabular form based on multiple tables

    Hi All,
    Its very urgent.......Can anybody tell me how to create a single tabular form to insert/update values from different tables.
    I want to create a tabular form with 3 cols. 1st col should be from one table and another two cols from other table.Please help.........
    Thank You
    Regards,
    Vinaya.

    You can use iframes in your page: (an iframe is a frame in your page. In this frame you can load another page) that way you can create three pages. The first page is the master page. The second and third page which also have tabular forms, are loaded as iframes in the first page
    The iframe is created as follows on your first page:
    1.create a html region
    2 create the tabular form on the second and third page
    3.reference the pages by entereing  the following code in the regions that will be used for displaying them:
    <iframe name="Your_region_name"   id="123" frameborder = "0" src=the page referenced width="580 px" height="250px" scrolling = "auto"></iframe>
    for example:
    <iframe name="Charge_Region"   id="123" frameborder = "0" src="f?p=&APP_ID.:14:&SESSION." width="580 px" height="250px" scrolling = "auto"></iframe>

  • How to add a new row in rich table when a button clicks which isinatemplate

    i am new to j developer 11g. i have problem when i click a reset button located in the template
    will clear all data from the rich table and it is in a add mode,ie table with only one empty row
    Regards
    rajesh
    Edited by: [email protected] on Mar 10, 2009 11:30 PM

    Hi,
    and here is a blog entry about global buttons in templates
    http://thepeninsulasedge.com/frank_nimphius/2007/11/23/adf-faces-rc-implementation-strategies-for-global-buttons-in-page-templates/
    Frank

  • Add Row on Tabular Form - column from read only to update/insert allowed

    APEX 4.2.2
    Newbie in the APEX forums, go easy please.
    I'm building a rather simple tabular form based on a table with a primary key (emp_number). Sounds like an Oracle tutorial but trust me, it's a real table. This table has, for this example's sake the following attributes:
    Table Name: EMP_EXCEPTIONS
    EMP_NUMBER      NUMBER (PK)
    UPDATE_EXEMPT VARCHAR2(1)
    I've used the Tabular Form wizard to create a nice looking tabular form page, all good and works as intended. Of course the primary key value is non update able by the wizard and that's by design - I've no need to update any primary keys. When I click the add rows button however, I'd like to be able to include the emp_number field as a input able field. At the moment, when I click the add rows button it inherits the property of the emp_number as read only. The user entering the new row would know the employee number and whether they were update_exempt or not. So rewinding my head in Oracle Forms, this would have been done by setting the row attribute as update allowed when the button is clicked. Is there such simple functionality in APEX and if so can you point me in the right direction?

    It seems to be true:
    - if there is ascending order on columns which fields are null in new line (have no default value), new row is visible in current "pagination" page
    - but if there is DEScending order OR ANY sort order is set on columns which fields are NOT null in new line (have default value), new row is NOT visible in current "pagination" page
    thank you!

  • How to add a new column to specific position

    Hi,
    How to add a new column to specified position in a existing table.
    I have using the oracle database 10g.
    This below code is not working in oracle 10 g
    example:
    ALTER TABLE EMPLOYEE ADD DEPT NUMBER FIRST:
    ALTER TABLE EMPLOYEE ADD DEPT NUMBER AFTER JOB:
    Please provide the correct syntax.

    Hi,
    When you add a column to the existing table, the column added i.e., for ex updatedon appers in the last. If you want the columns to be
    displayed in Specific order. Just give the column names in the SELECT.. statement.
    For your Information, But it is not good in Table design. Just to give something useful.
    If you want to add a column at a specified position,
    Rename the position column to the new column name
    For Ex: (OLD_COLUMN_NAME-Hiredate)
    ALTER TABLE EMP RENAME COLUMN OLD_COLUMN_NAME TO TEMP_HIREDATE;Add a New Column to Table
    ALTER TABLE EMP ADD LAST_DATE DATE;Then, Alter the Table to rename the new column that is added.
    ALTER TABLE EMP RENAME COLUMN LAST_DATE TO OLD_COLUMN_NAME;And, Rename TEMP_HIREDATE to your actual collumn.
    ALTER TABLE EMP RENAME COLUMN TEMP_HIREDATE TO LAST_DATE;In practise, this won't be a good approach but you can get something useful about renaming the
    column atleast.
    Thanks,
    Shankar

Maybe you are looking for

  • Can't access any photos, Camera Roll sends me to home screen?

    Yesterday I took over 100 photos on my phone for work.  After returning to the office and attempting to sync them to the cloud the process froze and never completed. Afterward I am unable to view any of the photos in the Camera Roll.  Each time I cli

  • Problems printing a form with Adobe 8 Standard

    I created a form using LifeCycle Forms ES and sent it out for use in our company. I have received comments back from Adobe 8 Standard users that when they print the form the form rearranges itself.  Has anyone ever run into this issue or know how to

  • Turning image traced PNG to paths?

    Hello, I am trying to make a crack wall texture effect on some text in illustrator cs6. I have some crack texture photoshop brushes I really like, so I brushed on a blank psd canvas and saved it to PNG with transparent background. I placed that in il

  • Computer needs for DW & PS?

    I own a HP OMNI 120- 1125 with AMD X2 E-450, 4GB, 500 GB, AMD HD 6320. I want to purchase Dreamweaver & Photoshop. Is my computer good enough to run them. If not I'm buying a second computer for a home network and would love any suggestions for makes

  • When I send a text, it says -from: name lastname- instead of my number

    When I send a text, it says -from: name lastname- instead of my phone number, how do I remove this? I have deleted any old mail accounts and changed Appleid.