Dynamically creating table and inserting rows and columns using JSP

Hi,
I'm using mysql and JSP to create web interface for my forms/tables. I wanna create the table dynamically depending on the data in the table and for each particualar record. and these values shud be loaded on the form after loading from the databaes as soon as the form loads.
also i want to have a button which shud add new rows dynamically. and same one for columns.
how do i calculate the values across the rows on the forms
I'm new to JSP. Please point me in the right direction...any tutorials or code will be helpful.
Any help is appreciated.
Thanks
Ayesha

u write the code in sequence:
1 write jdbs to select count(* )from table
2 put in array e.g. String doc_no=new String[count];
3 write jdbs to select * from table with condition
//for no. of records just write
for(int j=0;j<(count);j++){
<% while(rs4.next()){
     doc_no=rs4.getString(2);
                    date1[i]=rs4.getString(3);
     doc_type[i]=rs4.getString(4);
     location[i]=rs4.getString(5);
     cheque[i]=rs4.getString(6);
     rate[i]=rs4.getInt(7);
     deb_qty[i]=rs4.getInt(8);
     cre_qty[i]=rs4.getInt(9);
     deb_amt[i]=rs4.getInt(10);
     cre_amt[i]=rs4.getInt(11);
     i++;
     //rs4.close();
               for(int j=0;j<(count);j++){
               System.out.println("Data count= "+j);
               %>
<tr>
<td width="15%"><font size="1"><%=doc_no[j] %></font></td>
<td width="10%"><font size="1"><%=date1[j] %></font></td>
<td width="12%"><font size="1"><%=doc_type[j] %></font></td>
<td width="9%"><font size="1"><%=location[j] %></font></td>
<td width="9%">
<div align="left"><font size="1"><%=cheque[j] %></font></div>
</td>
<td width="8%">
<div align="right"><font size="1"><%=deb_qty[j] %></font></div>
</td>
<td width="8%">
<div align="right"><font size="1"><%=cre_qty[j] %></font></div>
</td>
<td width="9%">
<div align="right"><font size="1"><%=deb_amt[j] %></font></div>
</td>
<td width="10%">
<div align="right"><font size="1"><%=cre_amt[j] %></font></div>
</td>
</tr>
write if there is any specific problem
bye,
Samir

Similar Messages

  • Tables and Columns used in Universe (BO 6.5)

    Hi All,
    Please help me out with the below queries:
    1. Is there any automated way to find out which report is using which universe? (may be through a SQL fired in BO repository)
    (Note: As per the BO Documentation, OBJ_X_DOCUMENTS This is the only table in the document domain. It stores the binary content of all documents sent to the repository (through the user actions Publish to corporate documents, Send to users or Send to Broadcast Agent). The document contents are stored as BLOBs (Binary Large Objects) stored in slices.)
    2. I need to identify the universes which use certain tables and columns.
    I fired the following SQL in BO repository:
    SELECT
    UNV_UNIVERSE.UNI_FILENAME,
    UNV_UNIVERSE.UNI_LONGNAME,
    UNV_TABLE.TAB_NAME,
    UNV_COLUMNS.COLUMN_NAME
    FROM UNV_UNIVERSE, UNV_TABLE,UNV_COLUMNS
    WHERE
    UNV_UNIVERSE.UNIVERSE_ID = UNV_TABLE.UNIVERSE_ID
    AND UNV_TABLE.TABLE_ID = UNV_COLUMNS.TABLE_ID
    But as 'UNV_COLUMNS' table is empty, no data is returned. My question is is this table supposed to be empty in BO repository?
    Is there any other way to find out this (identify the universes which use certain tables and columns)?
    Many Thanks & Regards,
    Sandeep

    Hi,
    Please find the below list of tables created in the BO repository, which helps you to retrieve the information related to reports, universes, users e.t.c.
    OBJ_M_ACTOR
    OBJ_M_ACTORDOC
    OBJ_M_ACTORLINK
    OBJ_M_CATEG
    OBJ_M_CONNECTDATA
    OBJ_M_CONNECTION
    OBJ_M_DOCAT
    OBJ_M_DOCATVAR
    OBJ_M_DOCCATEG
    OBJ_M_DOCCST
    OBJ_M_DOCUMENTS
    OBJ_M_GENPAR
    OBJ_M_MAGICID
    OBJ_M_OBJSLICE
    OBJ_M_REPOSITORY
    OBJ_M_RESERVATION
    OBJ_M_RESLINK
    OBJ_M_TIMESTAMP
    OBJ_M_UNIVCST
    OBJ_M_UNIVDBCST
    OBJ_M_UNIVERSES
    OBJ_M_UNIVSLC
    OBJ_M_USRATTR
    OBJ_X_DOCUMENTS
    UNV_AUDIT
    UNV_CLASS
    UNV_CLASS_DATA
    UNV_COLUMNS
    UNV_COLUMN_DATA
    UNV_CONTEXT
    UNV_CONTEXT_DATA
    UNV_CTX_JOIN
    UNV_DIMENSION
    UNV_DIM_OBJ
    UNV_JOIN
    UNV_JOINCONTENT
    UNV_JOIN_DATA
    UNV_JOIN_OBJECT
    UNV_OBJCONTENT
    UNV_OBJECT
    UNV_OBJECT_DATA
    UNV_OBJECT_KEY
    UNV_OBJ_COLUMN
    UNV_OBJ_TAB
    UNV_PROPERTY
    UNV_PROP_DATA
    UNV_PROP_TAB
    UNV_RELATIONS
    UNV_TABLE
    UNV_TABLE_DATA
    UNV_TAB_OBJ
    UNV_TAB_PROP
    UNV_UNIVERSE
    UNV_UNIVERSE_DATA
    UNV_X_UNIVERSES
    Hope this tables helps you.

  • Sql query parsing (retrieve tables and columns used in query)

    Hi,
    1. Is there any view in Oracle which can tell me, which tables and columns were used in the last ran query, no matter how complex the query is.
    2. Secondly I can get table names, used in stored procedures and views, using USER_DEPENDENCIES VIEW, however this System View does not return column names, used in that procedure / view, any idea please .
    Thanks and Regards,
    Luqman

    luqman123 wrote:
    Hi,
    1. Is there any view in Oracle which can tell me, which tables and columns were used in the last ran query, no matter how complex the query is.I don't believe so. You can look at V$SQL and retrieve the actual SQL text from there.
    2. Secondly I can get table names, used in stored procedures and views, using USER_DEPENDENCIES VIEW, however this System View does not return column names, used in that procedure / view, any idea please .Oracle added fine grained dependency tracking in 11g, but didn't expose any views to query this information. However, it has been reverse engineered a bit: About Oracle: DBA_DEPENDENCY_COLUMNS

  • Create Tables and UDO using Addon

    Hi,
    I created addon using simple installer. Before installing that add on i have manually create UDO and tables. is there any way i can modify my Addon which will create UDO and tables when i install addon in server.
    Developed my Add on using C#. for package using  B1DE Simple installer.
    Can some send me sample code for this at [email protected] or reply to this post your suggestions.
    Appreciate your help

    > UDO's are not accessable via code. 
    Hi Edward,
    but I created UDO via code and it works correctly.
    P Guddimath, here is a thread where I paste a code to create UDF, UDT and UDO Problem With Tables
    Regards,
    Hmg

  • How to create Reports and Forms using JSP

    Hi,
    How to create reports using JSP. And how many types of reports can be created using JSP.Can anyone explain with example please.
    Thanks,
    Vijayalakshmi.M

    Here is some code that creates xml for any SQL that returns a ResultSet. Note this uses my default out-of-the-box XML template, but you can quickly create and use your own templates to generate xml to look anyway you desire.
    FormattedDataSet fds=FormattedDataSet.createInstance();
    Map miscData=new HashMap();
    map.put("rootElement", "musicgroups");
    String xml=fds.getFormattedDataSet("select * from groups", miscData, "xml1");
    String xml has the value:
    <musicgroups>
    <row rowID='1'>
      <group_id>1</group_id>
      <group_name>Rolling Stones</group_name>
      <type>Rock</type>
    </row>
    <row rowID='2'>
      <group_id>2</group_id>
      <group_name>Beatles</group_name>
      <type>Rock</type>
    </row>
    <row rowID='3'>
      <group_id>3</group_id>
      <group_name>Led Zepplin</group_name>
      <type>Rock</type>
    </row>
    </musicgroups>steve -
    http://www.fdsapi.com - The easiest way to generate dynamic HTML and XML
    http://www.jamonapi.com - A performance tuning and scalability measuring API

  • Retrieve tables and column names in a universe

    Hi - Is there a way to retrieve tables and columns used in a given universe? We have to do analysis and need to know the tables as well as fields used anywhere in any object defined in the universe.
    I tried Query Builder and did some selection on ci_infoobjects and ci_appobjects; they don't seem to have that kind of information.
    Please advise.
    Thanks

    Hi.
    Are you try with the option save as ... and choose to pdf inside the designer?
    In designer tools->option you can choose what you want it print/PDF.
    I hope it be helpfull for you.
    Regards.

  • Capture DB Table and column comments when creating new Business Area/Folder

    Does anyone know if it is possible to pull the DB table and column comments into Discoverer when creating new Business Area/Folders? Our developers take the time to put the information in the Db data dictionary and we would like to leverage it (reduce need for manually adding descriptions) ... has anyone done this?
    If there isn't a way to automatically do it, would there be any harm in using a sql script to populate the description fields from the DB data dictionary directly into the EUL tables appropriate?
    I have been searching through documentation and forums for information - with no luck at this point.
    Thanks!

    Hi Seymour
    You can add column comments to views as well, as this example will show:
    CREATE OR REPLACE FORCE VIEW MY_SEQUENCE
    (SEQ_ID, SEQ_NAME, SEQ_NEXTVAL)
    AS
    SELECT "SEQ_ID","SEQ_NAME","SEQ_NEXTVAL" FROM EUL5_SEQUENCES;
    COMMENT ON COLUMN MY_SEQUENCE.SEQ_NAME IS 'The sequence';
    So you could add the comments at the view level and then refresh Discoverer.
    Best wishes
    Michael

  • How can i edit perticular row in dynamically created table

    Hi to All,
    Here my requirement is create table dynamically from existing XML and first column with radio buttons,column data and row wise data there on XML but i'm able to create table and displaying data then whenever i click on first column radio button that row editable and remaining rows in disable mode then i edit that row and click on save button that particular row data will be inserted to XML.Please tell me how can i achieve this requirement.
    Thanks and Regards,
    surya.

    Hi surya
    - Use RadioButtonGroupByIndex for the first column.
    - Disable automatic change of table's lead selection: selectionChangeBehaviour = manual, selectionMode = none.
    - In onSelect event handler of the RadioButtonGroupByIndex set new table's lead selection from the code to the row where the button is clicked.
    - Add calculated read-only attribute isRowEditable (boolean) to the table's node. Getter shall be like this:
    return (element.index() == element.node().getLeadSelection());
    - Bind the cell editors' enabled property to isRowEditable attribute.
    BR, Siarhei
    PS: this is my message #666 - do not trust it
    Edited by: Siarhei Pisarenka on Feb 23, 2010 2:29 PM

  • Table and columns in small caps!

    Dear All,
    My database is 11gR2 and Linux is the OS.
    One of my application, whose code I am unable to access, it trying to insert records in Oracle database. The problem is that application is case sensitive and try to find table name and columns in small caps, while it gets upper case from Oracle and give error or invalid identifier.
    Is there any option to create table and fields with small letters.
    Kindly help.
    Regards,
    Imran

    misterimran wrote:
    ...The problem is that application is case sensitive and try to find table name and columns in small caps...What application could look for tables/columns in small caps ? As stated above, creating tables/columns enclosed by double quotes might help, but that'd mean the code must use double quotes everywhere...
    while it gets upper case from Oracle and give error or invalid identifier. It get as is, please show the error.
    Nicolas.

  • Can we hide the tables and columns from subject areas in the front end

    Hi,
    Is there any way to hide the tables and columns from the subject area in front end.I need to create a report with some tables which the user does not want to see.So after creating the reprot can I hide those tables and columns in the front end

    Hi,
    Your question is not that clear to me...do you want to hide the entire table/column that dont want to show up in the front end then you could do in Presneation Layer in the RPD by going Permissions in the property of that object.
    But if you want to hide the column in the report that can be visible in the subject Area: go to column properties -> Column fomat...thereis Hide option.
    Can you please elaborate your question...what exactly you are looking for...
    --SK                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Using of already existing logical tables and columns in a new subject area.

    Hi Every one,
    i am new to OBIEE technology.
    In my project i need to create a new subject area for already existing RPD.
    In that RPD there are some logical tables and column created for previous project and i need to use those in this new subject area that i am going to create.
    My question is what is the best way to use them .
    I mean just to drag and drop them into new subject area or any other way.
    please have your valuable suggestions
    thanking you

    Yes, you can basically copy paste all the tables that you need from BMM layer into your new folder in the presentation layer. Just make sure all the joins are defined well between all the tables that exists in the new folder, so you wont end up running into ODBC errors when you run analysis.
    Hope this helps.
    Thanks,
    -Amith.

  • Get description of tables and columns

    Good afternoon.
    Is there any option in SAP B1 to get a description of table and column dynamically? That is, without the "Tools -> Queries -> Query Generator"?
    I am developing an add-on, which lists all the tables and columns of the sap, and I have to bring the descriptions automatically. If you do not have to get the SDK route descriptions, as you suggest doing this?
    Edited by: Harley Rodrigues on Feb 1, 2012 9:38 PM

    Hi Harley,
    Welcome to the Forum!
    please refer to your SDK Help. you can find it from this path C:\Program Files\SAP\SAP Business One SDK\Help
    also alternatively you can view it from your MS SQL Server Management under Databases
    regards,
    Fidel

  • Help with adding a table and column which are strings to a database

    I want to add a column and table into a database.
    I want to do this both for the Table and Column.
    I want (Data) and Test to be replaced with my strings.
    String MyData = "My column"; // This will change at times.
    String MyData2 = "My table";
    String sql = "Insert into Test (Data) Values (?)";     
    How can I change (Data) and Test to add variables "MyData" and "MyData2".
    Thanks.

    This is a fairly short intro to JDBC that gives the details:
    http://java.sun.com/docs/books/tutorial/jdbc/basics/index.html

  • Including table and column comment in the Data Modeler

    Hi all,
    I used Oracle's SQL Developer Data Modeler (Version 3.0.0.665) and created a data model for my project. I e-mailed a PDF format of the data model to our Systems Analyst. She asked if I could re-create the data model and include table and column comments. Is this a possibility and if so how is this done?
    Thank you for your input,
    Seyed

    Hi Kent,
    Using the information you provided and Oracle’s Working with SQL Developer Modeler Reporting I did the following:
    1) Created a Reporting Schema User
    1.1) Using my Oracle 10g Personal Edition, I created a new user and gave him DBA administrative privileges
    2) Exported Relational Design to Reporting Schema
    2.1) Opened the Relational Design
    2.2) Exported it to the Reporting Schema. Note, I never got a message ‘Design has been exported successfully’.
    3) Reviewed the Report Results
    I think exporting the relational design was not successful, and didn’t get any error messages. Had step 2 completed successfully, I would have reviewed the Report Results in SQL Developer. By the way, I know I have marked this topic as closed, but would like to learn your method too.
    Thank you for your help,
    Seyed

  • Parse SQL query and extract source tables and columns

    Hello,
    I have a set of SQL queries and I have to extract the source tables and columns from them.
    For example:
    Let's imagine that we have two tables
    CREATE TABLE T1 (col1 number, col2 number, col3 number)
    CREATE TABLE T2 (col1 number, col2 number, col3 number)
    We have the following query:
    SELECT
    T1.col1,
    T1.col2 + T1.col3 as field2
    FROM T1 INNER JOIN T2 ON T1.col2=T2.col2
    WHERE T2.col1 = 1
    So, as a result I would like to have:
    Order Table Column
    1 T1 col1
    2 T1 col2
    2 T1 col3
    Optionally, I would like to have a list of all dependency columns (columns used in "ON", "WHERE" and "GROUP BY" clauses:
    Table Column
    T1 col2
    T2 col1
    T2 col2
    I have tried different approaches but without any success. Any help is appreciated. Thank you in advance.
    Best regards,
    Beroetz

    I have a set of SQL queries and I have to extract the source tables and columns from them. In a recent db version you can use Re: sql injection question for this.

Maybe you are looking for

  • Error while accessing Access Manager

    Hi All, I am getting the following error after configuring access manager and restarting the web server. [25/May/2006:18:14:16] info ( 1724): CORE1116: Sun Java System Web Server 6.1SP5 B01/15/2006 23:04 [25/May/2006:18:14:30] info ( 1724): HTTP3072:

  • I lost my apps after changing my operating system. iTunes no longer recognized my iPod Touch. Will I ever get my apps back or be able to sync ANYTHING ever again?

    When we went from Vista to Windows 7 and tried to sync the iPod Touch - I lost my apps. Can these be recovered somehow?

  • IPhone 3G screen

    I have noticed some threads on other websites where people are seriously ****** that their iPhone 3G has a yellowish tint to the screen. I compared my iPhone 3G to the 1st generation iPhone which I purchased on 6/29/07. The 3G does have a yellowish t

  • PLEASE HELP ME!!! DVD MENU

    Ok, Bare with me I'll try to explain as best as I can. I want to play the DVD menu to 1 entire song. I changed the menu duration in the preferences to 4min 28 sec... the length of the song. I added my menu video clip from FCP and set it to the same l

  • ROLES IN WORKFLOW

    how to find the linkage between workflow, tasks with roles. In workflow, mostly all the tasks and workflow template are assigned to Roles. So, based on the roles assigned to users, The respective set of workflow are available to each users. so, how t