Jsp + display in table + certain records

Hello
I want to display records from database in a table .
There are lakhs of records but I want to display only 20 records in table on jsp
Rest should be displayed when user clicks on next page icon on jsp, then next 20 records,and so on����
How should I do this���.

How should I do this���.By limiting the result set.
If you are not using Hibernate or something similar
look at http://troels.arvin.dk/db/rdbms/ to find the the sql statement needed for your database to limit the result set.
andi

Similar Messages

  • Multiple display formats for several records coming from the same table

    Hello all,
    I want to create one Crystal Reports XI report to display several records coming from one table, but I need different display format for different records from that one table.
    There is a field RecordType and based on that value, the record will be displayed differently on the report page.
    Can I have several sections in the report and to define different SQL query in each of them?
    Example of the report I need to see on paper:
    ================================================
    Summary of 216 vehicles:  (the value 216 comes from record with RecordType=1)
    Vehicle Category    Number of Vehicles
              A                   5          (this value 5 comes from record with RecordType=2)
              B                   7          (this value 7 comes from record with RecordType=3)
              D                   4          (this value 4 comes from record with RecordType=4)
    Category A vehicle numbers:
    2345   6789   8765   5543   3452    (these five values come from records with RecordType=5)
    Category B vehicle numbers:
    9876   8876   9987   4321   6754   5215   4543    (these values come from records with RecordType=6)
    Category D vehicle numbers:
    2343   2344    2348   2377    (these values come from records with RecordType=8)
    ==============================================================
    Text is fixed (labels), number values are coming from table records.
    What would be a good way to do this in Crystal Reports XI ? In Cognos ReportNet, I would just create several Queries (SQL sentences) and place their outputs on a page, one after the other.
    I use Crystal Reports XI R2 and Oracle 10g database through and ODBC connection.
    Thank you,
    Milan

    Obaid and Debi,
    Thank you for your replies.
    I can create multiple sections in the report, but I don't know how to split the 20 records that I get back from the database to be displayed in 5 different report sections.
    How can I define different SQL statement for each of 5 report sections?
    How can I use cross-tabs to display what I need? Can I define SQL statement for each cross-tab and then I could place only RecordType=1 records into cross-tab-1 and all RecordType=2 records into cross-tab-2 ?
    In Cognos ReportNet, I defined 2 Queries (SQL statements) and I just placed them in the report one below the other. Query_1 returns 1 record where RecordType value =1. Query_2 returns 5 records where RecordType value =2 and etc. So each record "section" displays record in the way I want it.
    ================================
    Summary of 216 vehicles:  (the value 216 comes from record where RecordType=1)
    Category A vehicle numbers:
    2345   6789   8765   5543   3452    (these values come from records where RecordType=2)
    ================================
    How can I do that in Crystal Reports XI ?
    How can I run several SQL statements from one report?
    Thank you,
    Milan

  • Need to display Internal table records on screen without using table contro

    Hi Experts,
    I have a requirement to display internal table on screen which is having three columns (Material no, Serial No and quantity).
    But I can't use table control as it is not supported by hand held devices.
    They are going to use this transaction on hand held devices.
    Thanks In advance.
    Gaurav

    You should be able to use the good old STEP LOOP processing for this... create your three fields in the row then convert them to a STEP-LOOP.
    You can look up in the help how to work with STEP-LOOPs if you are not familiar with it. It was the way to manage table-like information before the age of table controls

  • I need to have both Next & Back buttons displayed for viewing 20 records at

    Hi Everybody,
    I have a JSP page which has 2 part: The header (Selection for search with the SEARCH button) and a search result table.
    Is it possible to remember the last record printed & start from the next record when I click on "Next" button? When I click on the "Next" button will it create new page? I need to have both Next & Back buttons displayed for viewing 20 records at a time.
    The current JSP is using "session.removeAttribute("XXXWorkItemVector") to print out records.
    I'm very new to JAVA and JSP, so please help me with my assignment and send me e-mail to [email protected]

    Check this:
    http://forum.java.sun.com/thread.jsp?forum=45&thread=188239
    This should be of help to you.

  • Array or Table of Records or...what is best for my scenario?

    I have been given task to trap last 5 action taken on a form application by user. This would be used where user gets a FRM or ORA error, dump last 5 steps to a table in the database along with error. Trapping FRM or ORA error is easy; I am wondering what & how should I note last 5 steps ( like, what page, what block & what form the user was clicking/entering data etc) when error occurred. I am planning to use when-mouse-click or some other triggers to capture the data; but at every action if I try inserting one record & deleting one record from the database table ( last one knocked out), there is going to be a lot of I/O & that table is going to be too hot. I am trying to avoid that unwanted I/O & keep those 5 steps info somewhere in forms till user gets a error. And, when he/she gets error, he/she can dump those 5 steps info along with error messages/number in a error table.
    My question is: what do I use? Array or Table of records..or something else. I have never used any of these & thought to discuss this before going deep into implementation.
    Any suggestion would be appreciated.
    Thanks.

    You could use a table of records or a record group. They both achieve similar results but with very different syntax. I am not sure if there is any difference in performance.
    Record groups are good for certain things like lists populated from the database because built-ins are provided for manipulating them. If you are going to do the manipulation programatically, I personally find the syntax for tables of records less cumbersome than record groups. Learning the syntax for tables of records is also likely to be more universally useful to you as they have various uses such as passing data between procedures.
    In your situation the table of records needs to exist throughout the forms session rather than just during the execution of a single pl/sql block. The way to do that is create a program unit which is a package header without a body. Declare the table in there and it can be used throughout the form.
    However, if you only ever want to keep 5 records, it would probably be easier just to have 5 ordinary items in a control block on the null canvas (or global variables). When you want to record your new action just do:
    :item5 := :item4;
    :item4 := :item3;
    :item3 := :item2;
    :item2 := :item1;
    :item1 := :new_stuff;
    You could even construct the above in a loop using
    copy(name_in('item'||i),'item'i+i)
    but with only 5 items to manipulate, is it worth the bother ?
    Whatever method you decide to use, you are not going to get anything simpler than 5 little assignment statements.

  • Error message: when downloading data from 2nd display tag table

    I am using disaply tag to display data in jsp page. I am using three different section to display the data with three display tag table. The data is displaying correctlly. The display tag downlod excel sheet is working for first display tag table. When i am trying to download data from 2nd and 3rd display tag table i am getting following error:
    Exception: [.TableTag] Unable to reset response before returning exported data. You are not using an export filter. Be sure that no other jsp tags are used before display:table or refer to the displaytag documentation on how to configure the export filter (requires j2ee 1.3).
         at org.displaytag.tags.TableTag.writeExport(TableTag.java:1438)
         at org.displaytag.tags.TableTag.doExport(TableTag.java:1364)
         at org.displaytag.tags.TableTag.doEndTag(TableTag.java:1215)
         at org.apache.jsp.InstalBase_005fReport_jsp._jspService(InstalBase_005fReport_jsp.java:974)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:595)
    As per the Exception i don't have any jsp tag before the display tag.
    Please help me if any body has any solution for the above exception.
    Thanks in advance.
    Smruti..

    See also http://helpx.adobe.com/acrobat/kb/pdf-browser-plugin-configuration.html

  • How can I include a MySQL table and records with the PUT of my Dreamweaver site?

    I am using .php to validate a user code against one of four codes that I am providing to potential clients.  They enter that code, along with a default user id and the appropriate page is then displayed for them.  Everything is working fine on the desktop.  I need to have this table and the records created on my remote server.  I tried saving the table in the Connections folder, but that didn't help.  Everytime I enter a code (valid or invalid) on the live site, I get the following message:  "Table 'boundsauctions_com.promocode' doesn't exist".  Is there someway to include the table and records in my Dreamweaver folders for the site? 
    Thanks for any help that you can offer.

    You can't.  Dreamweaver, or FTP for that matter has no connection to the MySQL database.  If you have created a MySQL database locally and now wish to move/copy it to your server you'll need to create a back up of your local database and then log into your database on the server and then restore that back up.
    An even easier way to do this, and if you are working with MySQL much at all  a good investement is to get the commercial version of Navicat MySQL - this is the best MySQL administrator I've found to date and is well worth the few bucks to buy it.  With Navicat you can connect to your local MySQL database and also create a connection to your remote database, then literally drag and drop your local database contents to copy them to your server. This function alone justifies buying Navicat. A huge time saver.   And no I do not work for or have any share or ties to Navicat.  I'd recommend something else if I knew of anything better, but so far I don't.
    Hope this helps. If you need any more details let me know.
    Lawrence Cramer - *Adobe Community Professional*
    http://www.Cartweaver.com
    Shopping Cart for Adobe Dreamweaver
    available in PHP, ColdFusion
    Stay updated - http://blog.cartweaver.com

  • Oracle ADF -  popup table's record gets empty or blank after any db action.

    Hi,
    I am using Oracle jDev 11.1.1.4.0.
    In my application i have find button in my jspx.
    On click of find button i have shown popup with table.
    As user selects record from popup table that record get displayed in form fields of jspx
    and user can edit that record and save it in the database.
    Suppose I have edited a record and saved the same in database.
    Now, when I click on that find button, pop up opens but the record which I have just edited is not getting displayed correctly in the table.
    Some fields are getting emptied.
    I have set the property of entity object's attribute, refresh after update and insert.
    But still selected record get empty in popup table after database transaction.
    appreciate your help..
    thanks
    Rupashree
    Edited by: 888077 on Sep 28, 2011 5:54 AM

    By the sounds of it you are in the wrong forum :)
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Oracle adf - popup table's record get empty after any database tranasction.

    Hi,
    I am using Oracle jDev 11.1.1.4.0.
    In my application i have find button in my jspx.
    On click of find button i have shown popup with table.
    As user selects record from popup table that record get displayed in form fields of jspx
    and user can edit that record and save it in the database.
    Suppose I have edited a record and saved the same in database.
    Now, when I click on that find button, pop up opens but the record which I have just edited is not getting displayed correctly in the table.
    Some fields are getting emptied.
    I have set the property of entity object's attribute, refresh after update and insert.
    But still selected record get empty in popup table after database transaction.
    appreciate your help..
    thanks
    Rupa

    By the sounds of it you are in the wrong forum :)
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Query in SQL to display count of all records but where condition is present

    Hi All,
    I have situation where I need to display count of all records all particular period but in where condition type condition has to be present :
    Please find the below sample data :
    PERIOD_ID     TYPE     MV_COUNT     IS_FLAG
    20110401     AM     1     0
    20110401     AM     1     0
    20110401     MS     29     0
    20110501     MS     1     0
    20110601     MS     14     0
    20110701     MS     2     0
    20110401     MS     1     0
    20110401     AM     2     0
    20110401     AM     69     0
    20110401     AM     2     0
    finally I need for type = MS
    i) total is_flag count for all the periods
    ii) for period=20110501 what is the mv_count
    I need to use the table single time (ie not self join outer joins )
    I have tried to use partition by clause but it will filter out the data .
    Cheers,
    Sp

    842106 wrote:
    finally I need for type = MS
    i) total is_flag count for all the periods
    ii) for period=20110501 what is the mv_count
    I need to use the table single time (ie not self join outer joins )
    I have tried to use partition by clause but it will filter out the data .
    select sum(is_flag) is_flg_count,
             sum
                 case when period = 20110501 then mv_count else 0 end
                ) mv_cnt_for_20110501
    from your_table
    where type = 'MS';

  • Database using in jsp : want to show 10 records on  a single page

    hi ,
    my probem is i want to show 10 records from database to html page using jsp in a table,with two links Next and Rrevious.when user click next table will show next 10 records and so on.
    and when user click on previous then table have to show previous 10 records to table.
    how can i do this i m using rs.abolute(), but it doesn't do as i want.
    plz help me

    afterv accessing alll the data from databse put them into an array and put this array in user's session and now when user clicks on next or previous extract the data from the array not from database it ill also decrease server load..

  • How to find if certain record exists from stored procedure

    Hello
    I am not an expert in this and am trying simple thing. I want to find if certain record exists in a table and if so set some boolean variable.
    create or replace procedure findit(param)
    AS
    return_group boolean;
    BEGIN
      myflag := false;
    --here goes my question
    -- say I have SELECT WHATEVER FROM TABLE WHERE BLA = param
    --if it returns at least one record set myflag to true;
    END;Any idea?

    THanks Satyaki_De,
    However, when I put simple SELECT statement in the body of my procedure it does not compile. Actually I should have said that before. So here is my code and where it breaks:
    create or replace procedure close_subjects(study_id varchar2)
    AS
    return_group boolean;
    BEGIN
    dbms_output.enable(1000000);
    FOR current_group IN(
       SELECT DISTINCT group_id from groups WHERE study_id=study_id
    ) LOOP
       FOR current_subject IN(
          SELECT individual_id from groups WHERE group_id=current_group.group_id AND study_id=study_id
       ) LOOP
          return_group := true;
          SELECT INDIVIDUAL_ID FROM ASSIGN WHERE DATE_TIME_ASSIGNED = ( SELECT MAX(DATE_TIME_ASSIGNED) FROM ASSIGN WHERE INDIVIDUAL_ID = current_subject.individual_id ) AND                            ASSIGN_STATUS_ID = 'A';
         IF SQL%RowCount = 0 THEN
           return_group := false;
             dbms_output.put_line(current_subject.individual_id);
          END IF;
       END LOOP;
    END LOOP;
    END;
    /If I comment out SELECT statement and leave dbms_output for testing purposes it works well. As I said I am faaaar from expert and seems to me that I cannot have SELECT in procedure BODY?

  • Negative number cannot be displayed in table if the column is too narrow

    Hi, All
    When a number is formatted  as a certain formatting(not locale formmatting),Negative number cannot be displayed in table if the column is narrower than the negative number, just minus is displayed.
    Can you help me? Thanks.
    Version: EHP1 for netweaver 7.0 SP3
    Best regards,
    Jiande Ding

    Hi,
    I think this has nothing to do with positive and negative numbers, By default the alignment of the text is Left, if you dont want to see '-' sign initially then you can change the alignment of the text to center or right in the display tab of properties for that column.
    As you as saying that at runtime the numbers are visible if manually adjusted. to icrease the width of that column permanently goto Layout tab of the story board and increase the size of the table and then increase the width of the column.
    the Fit Contents in the Layout should be set to "Actual Size".
    Regards,
    Rk.

  • Allow certain records a user can view

    Hello,
    Which method is best to implemet a solution to allow certain records from a table to be selected from a particular user? I can build a view and grant select on that view to the user but I like to know if there is a better solution? (lable security?) Thank you.

    You can look into Virtual Private Database (VPD), achieved by Fine-grained access control
    http://download.oracle.com/docs/cd/B19306_01/network.102/b14266/apdvpoli.htm#sthref2179

  • Blocking certain records

    Hi!
    i have a little problem like, i want to block certain records in USER1, so that other user should not see those blocked records when they issue SELECT STATEMENT from USER1,USER2 . like example (blocking record 1,2 in user USER1) . USER2,USER3 should see only 3,4 if they issue select statement.
    USER1(table name TEMP)
    A B
    1 cat
    2 rat
    3 mat
    4 hat
    USER2 (select * from USER1.TEMP)
    A B
    3 mat
    4 hat
    USER3 (select * from USER1.TEMP)
    A B
    3 mat
    4 hat
    hope its clear.
    thanks
    viq.

    Hi!
    I got the solution . i have applied VPD.
    thanks

Maybe you are looking for

  • Email attachment for text file using ABAP with funny format output

    Hi All, I am developing an ABAP program to generate an email to an external email address by using Function Module FUNCTION 'SO_DOCUMENT_SEND_API1. There is an attachment included in this program. The attachment is generated by reading through a data

  • IPod Shuffle: No recognition but somehow still being read?

    I have a iPod Shuffle (2gen) that I ended up getting for free from someone else. Problem is that it doesn't show up on my Mac (laptop) or iTunes whatsoever but from what I see when I look at the iPod it's blinking orange so it's being read? I just bo

  • Solid state hard drive is not big enough

    I recently purchased a PC with a 4 TB hard drive.  There is also a 60G Solid State hard drive on which the operating system is loaded.  There is not enough room for CS5.5 and the operating system.  I would like to uninstall CS5.5 and install it to th

  • Handling SAP Events from CPS

    Hello ,           is there anyway can we handle SAP events from CPS  , our scenario is if we schedule a job in SAP from CPS , the job in SAP is firing an SAP event based job , how can we get the status of event based job from SAP to CPS. Regards Ragh

  • Custom collection order in publish service

    In my publish service i have a problem. There is some collections which named by date of some period, and they update periodically (create new/delete old ). I need to sort them by descending, but they always sorted by ascending (it does not depens of