Help Required  !!! -- Dynamic table on specific height of JSP page

I have large data.
I have to show this data in dynamic table on jsp page.
the JSP page is logically divided in different pages (as this page is used for printing on specified size of page)
I can only display atmost 12 single rows on one page
but some times text of one column of row become so large that rows expands vertically and occupies space of 2 or 3 rows (thats why now i have to display 8 or 9 rows on first page and then remaining on next )
becoz of this i cant implement this check (only show 12 rows on a page).
so what can i do to show specified height of table on one page and remaining move to next page.

This is an impossible requirement. Page, font and element height is not only browser dependend, but also depending on the settings of the user. Some users will override the font size to be smaller or bigger using a browser option, resizing your table accordingly. Mac fonts might have different sizes if the fonts are antialiased, etc.
You'd have more success if you could output the table as PDF, there are far more table spacing options available, it's portable and you have 100% control over the output. Check out the iText API for example. The only problem with this is that the PDF will be opened by a PDF viewer which you cannot control, so you cannot make it automatically print.

Similar Messages

  • Dynamic table on specific height of JSP page

    I have large data.
    I have to show this data in dynamic table on jsp page.
    the JSP page is logically divided in different pages (as this page is used for printing on specified size of page)
    I can only display atmost 12 single rows on one page
    but some times text of one column of row become so large that rows expands vertically and occupies space of 2 or 3 rows (thats why now i have to display 8 or 9 rows on first page and then remaining on next )
    becoz of this i cant implement this check (only show 12 rows on a page).
    so what can i do to show specified height of table on one page and remaining move to next page.

    This is an impossible requirement. Page, font and element height is not only browser dependend, but also depending on the settings of the user. Some users will override the font size to be smaller or bigger using a browser option, resizing your table accordingly. Mac fonts might have different sizes if the fonts are antialiased, etc.
    You'd have more success if you could output the table as PDF, there are far more table spacing options available, it's portable and you have 100% control over the output. Check out the iText API for example. The only problem with this is that the PDF will be opened by a PDF viewer which you cannot control, so you cannot make it automatically print.

  • Have to display a dynamic table on specific height of JSP page

    I have large data.
    I have to show this data in dynamic table on jsp page.
    the JSP page is logically divided in different pages (as this page is used for printing on specified size of page)
    I can only display atmost 12 single rows on one page
    but some times text of one column of row become so large that rows expands vertically and occupies space of 2 or 3 rows (thats why now i have to display 8 or 9 rows on first page and then remaining on next )
    becoz of this i cant implement this check (only show 12 rows on a page).
    so what can i do to show specified height of table on one page and remaining move to next page.

    hi,
    its not so easy ...i had this problem once befor 2 months in the work
    i think u have to implement a Controller.java class that controll the iterating between pages ...
    u should have an pageIndex and just play with this index (increment and decrement)

  • How to retrieve multiple data from table and represent it in jsp page

    Hi
    The below JavaScript code is used to add row in the table when I want to add multiple row data into table for single entry no field.
      <html>  function addRow()
                i++;
                var newRow = document.all("tblGrid").insertRow();
                var oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='srno"+i+"' type='text' id='srno"+i+"' size=10>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='itmcd"+i+"' type='text' id='itmcd"+i+"' size='10'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='itmnm"+i+"' type='text' id='itmnm"+i+"' size='15'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='indentqty"+i+"' type='text' id='indentqty"+i+"' size='10'>";
                oCell = newRow.insertCell();
                    oCell.innerHTML = "<input name='uom"+i+"' type='text' id='uom"+i+"' size='10'><input type='hidden' name='mcode"+i+"'id='mcode"+i+"'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='packqty"+i+"' type='text' id='packqty"+i+"' size='10'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='packuom"+i+"' type='text' id='packuom"+i+"' size='10'><input type='hidden' name='pack"+i+"' id='pack"+i+"'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='rate"+i+"' type='text' id='rate"+i+"' size='10'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='dor"+i+"' type='text' id='dor"+i+"' size='0' onClick='"+putdate(this.name)+"'>";           
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='bccode"+i+"' type='text' id='bccode"+i+"' size='10'></td><input type='hidden' name='bcc"+i+"' id='bcc"+i+"'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='cccode"+i+"' type='text' id='cccode"+i+"' size='10'></td><input type='hidden' name='ccc"+i+"' id='ccc"+i+"'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='remark2"+i+"' type='text' id='remark2"+i+"' size='20'>";           
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input type='button' value='Delete' onclick='removeRow(this);' />";
               // oCell = newRow.insertCell();
               // oCell.innerHTML = "<input type='button' value='Clear' onclick='clearRow(this);' />";
            }<html>  Then this data are send to the next Servlet for adding into two table.
    My header portion data are added into one table which added only one row in table. while footer section data are added into the no of rows in another table dependent on No. of
    Rows added into jsp page.
    Here is an code for that logic.
    <html>
    ArrayList<String> mucode = new ArrayList<String>();
                                ArrayList<Integer> serials = new ArrayList<Integer>();
                                ArrayList<Integer> apxrate = new ArrayList<Integer>();
                                ArrayList<Integer> srname = new ArrayList<Integer>();
                                ArrayList<String> itcode = new ArrayList<String>();
                                ArrayList<String> itname = new ArrayList<String>();
                                ArrayList<Integer> iqnty = new ArrayList<Integer>();
                                ArrayList<String> iuom = new ArrayList<String>();
                                ArrayList<Integer> pqnty = new ArrayList<Integer>();
                                ArrayList<String> puom1 = new ArrayList<String>();
                               ArrayList<Integer> arate = new ArrayList<Integer>();
                                ArrayList<String> rdate = new ArrayList<String>();
                                ArrayList<String> bcs = new ArrayList<String>();
                                ArrayList<String> ccs = new ArrayList<String>();
                                ArrayList<String> remarkss = new ArrayList<String>();
                                //ArrayList<Integer> qtyrecs = new ArrayList<Integer>();
                                //ArrayList<String> dors = new ArrayList<String>();
                                //ArrayList<String> remarks = new ArrayList<String>();
                     String entryn = request.getParameter("entryno");       
                        String rows = request.getParameter("rows");
                        out.println(rows);  
                        //String Entryno = request.getParameter("entryno");
                       // out.println(Entryno);
                      int entryno = 0,reqqty = 0,srno = 0,deprequest = 0,rowcount = 0;
                                if(!Entryno.equals("")){
                                        entryno = Integer.valueOf(Entryno);
                                if(!rows.equals("")){
                                        rowcount = Integer.valueOf(rows);
                               for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("srno"+i)!=null){
                                                serials.add(Integer.valueOf(request.getParameter("srno"+i).trim()));
                                                out.println(serials.size());
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("srno"+i)!=null){
                                                srname.add(Integer.valueOf(request.getParameter("srno"+i).trim()));
                                out.println(srname.get(0));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("itmcd"+i)!=null){
                                                itcode.add(request.getParameter("itmcd"+i).trim());
                                        } //out.println(itcode.get(i));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("itmnm"+i)!=null){
                                                itname.add(request.getParameter("itmnm"+i).trim());
                                        }//out.println(itname.get(i));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("indentqty"+i)!=null){
                                                iqnty.add(Integer.valueOf(request.getParameter("indentqty"+i).trim()));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("uom"+i)!=null){
                                                iuom.add(request.getParameter("uom"+i).trim());
                                        }//out.println(iuom.get(i));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("mcode"+i)!=null){
                                                mucode.add(request.getParameter("mcode"+i).trim());
                               for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("packqty"+i).equals("")){
                                          pqnty.add(0);
                                        }else
                                            pqnty.add(Integer.valueOf(request.getParameter("packqty"+i).trim()));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("pack"+i)!=null){
                                                puom1.add(request.getParameter("pack"+i).trim());
                                       }else
                                        puom1.add("");
                               for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("rate"+i).equals("")){                                     
                                            arate.add(0);
                                        }else
                                        arate.add(Integer.valueOf(request.getParameter("rate"+i).trim()));   
                     /* for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("rate"+i)!=null){
                                                arate.add(Integer.valueOf(request.getParameter("rate"+i).trim()));
                              for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("dor"+i)!=null){
                                                try{
                                                        rdate.add(dashdate.format(slashdate.parse(request.getParameter("dor"+i).trim())));
                                                }catch(ParseException p){p.printStackTrace();}
                                        }else
                                           { rdate.add("");}
                                   for(int i=1;i<=rowcount;i++){
                                 if(request.getParameter("bcc"+i)!=null){
                                                bcs.add(request.getParameter("bcc"+i).trim());
                                        }out.println(bcs.get(0));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("ccc"+i)!=null){
                                                ccs.add(request.getParameter("ccc"+i).trim());
                                        }out.println(ccs.get(0));
                                for(int i=1;i<=rowcount;i++){
                                    out.println("remark2");
                                        if(request.getParameter("remark2"+i)!=null){
                                                remarkss.add(request.getParameter("remark2"+i).trim());
                                        }out.println(remarkss.get(0));
                        ArrayList<String> Idate = new ArrayList<String>();
                        for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("dateindent"+i)!=null){
                                                try{
                                                        Idate.add(dashdate.format(dashdate.parse(request.getParameter("dateindent"+i).trim())));
                                                }catch(ParseException p){p.printStackTrace();}
                    String Rdate = dashdate.format(new java.util.Date());
                     String tdate = dashdate.format(new java.util.Date());    
                     // String Indentdate = dashdate.format(new java.util.Date());
                   //  String ApprovedT1 = dashdate.format(new java.util.Date());
                   //  String ApprovedT2 = dashdate.format(new java.util.Date());
                       // String ApprovedT1=" ";
                        //String ApprovedT2="";*/
                    String ApprovedT1= dashdate.format(new java.util.Date());
                   out.println (ApprovedT1);
                      String ApprovedT2=dashdate.format(new java.util.Date());
                       out.println(ApprovedT2);
                    String Indentdate=(dashdate.format(slashdate.parse(request.getParameter("dateindent").trim())));
                       out.println(Indentdate);
                        String Cocode ="BML001";  
                        out.println(Cocode);
                        String Deptcode = request.getParameter("dept1");
                        out.println(Deptcode);
                        String Empcode = request.getParameter("emp");
                        out.println(Empcode);
                        String Refno =request.getParameter("rtype"); 
                         out.println(Refno);
                        String Divcode = request.getParameter("todiv1");
                        out.println(Divcode);
                        String Usercode = "CIRIUS";    
                         String Whcode = request.getParameter("stor");
                        out.println(Whcode);
                        // String Itemgroupcode = request.getParameter("");
                         String Itemgroupcode ="120000";
                         out.println(Itemgroupcode);
                        String Supplytypecode = request.getParameter("stype");
                        out.println(Supplytypecode);
                        String Delcode = request.getParameter("deliverycode");
                        out.println(Delcode);
                        String Itemclass="WS";
                        out.println(Itemclass);
                        // String Itemclass = request.getParameter("iclass");
                       // out.println(Itemclass);
                        String unitcode = request.getParameter("uni");
                        out.println(unitcode);
                         String Todivcode = request.getParameter("todiv1");
                        out.println(Todivcode);
                        String Appxrate = request.getParameter("rate");
                        out.println(Appxrate);
                        String Srno = request.getParameter("srno");
                        out.println(Srno);                
                    /*    String Indqty = request.getParameter("indentqty");
                      out.println(Indqty);*/
                  String Itemcode = request.getParameter("itmcd");
                       out.println(Itemcode);
                       String Othersp = request.getParameter("remark1");
                        out.println(Othersp);
                        String Reqdt = request.getParameter("dor");
                        out.println(Reqdt);
                        String Munitcode = request.getParameter("mcode");
                        out.println(Munitcode);
                        String Packqty = request.getParameter("packqty");
                        out.println(Packqty);               
                        String Packuom = request.getParameter("pack");
                        out.println(Packuom);
                        String Remark2 = request.getParameter("remark2");
                        out.println(Remark2);
                        String BC = request.getParameter("bcc");
                        out.println(BC);
                        String CC = request.getParameter("ccc");
                        out.println(CC);
                        try{
                            st=connection.createStatement();
                            connection.setAutoCommit(false);
                            String sql="INSERT INTO PTXNINDHDR(COCODE,DEPTCODE,EMPCODE,APPROVEDT1,APPROVEDT2,INDDT,ENTRYNO,REFNO,REMARKS,DIVCODE,USERCODE,WHCODE,ITEMGROUPCODE,SUPTYPECODE,DELCODE,UNITCODE,TODIVCODE,ITEMCLASS)VALUES('"+Cocode+"','"+Deptcode+"','"+Empcode+"','"+ApprovedT1+"','"+ApprovedT2+"','"+Indentdate+"',"+Entryno+",'"+Refno+"','"+Othersp+"','"+Divcode+"','"+Usercode+"','"+Whcode+"','"+Itemgroupcode+"','"+Supplytypecode+"','"+Delcode+"','"+unitcode+"','"+Todivcode+"','"+Itemclass+"')";
                            out.println(sql);
                            st.addBatch(sql);
                            for(int i=0;i<serials.size();i++){
                                out.println("Inside the Statement");
                                String query3="test query for u";
                                out.println(query3);
                               String queryx="Insert into PTXNINDDTL(APXRATE,ENTRYNO,BRKNO,INDQTY,ITEMCODE,OTHERSPFCS,MUNITCODE,PACKQTY,PACKUOM,REMARKS,DIMSUBGRPCODE,DIMCODE,REQDT)VALUES("+arate.get(i)+","+entryno+","+srname.get(i)+","+iqnty.get(i)+","+itcode.get(i)+",'"+Othersp+"','"+mucode.get(i)+"',"+pqnty.get(i)+",'"+puom1.get(i)+"','"+remarkss.get(i)+"','"+bcs.get(i)+"','"+ccs.get(i)+"','"+rdate.get(i)+"')";
                               out.println(queryx);
                                st.addBatch(queryx);
                           int[] result=st.executeBatch();
                           connection.commit();
                           for(int k=0;k<result.length;k++)
                           out.println("rows updated by "+(k+1)+"insert sta:"+result[k]+"");
                        catch(BatchUpdateException bue)
                        out.println("error1;"+bue+"");
                        catch(SQLException sql)
                        out.println("error2;"+sql+"");
                        catch(Exception l)
                        out.println("error3;"+l+"");
    </html>
       Now I looking for to retrieve this footer section data available in multiple rows from footer table and present it in jsp page .
    I am finding difficulties in how to show this multiple row data for dynamic no of rows .i.e. variable no. of rows.
    I have able to show the data in Header portions of page in this ways
    here i am adding the part of code which shows the data from header part of table i.e from Header table
      <html>
    <h2 align="center"><b>Indent Preparation</b></h2>
        <div align="left">
            <table width="849" border="0" cellspacing="3" cellpadding="3" align="center">
                <tr>
                    <td ><div align="left"><b>Indent No.</b></div></td>
                    <td ><label>
                            <input name="indentno" type="text" id="indentno" size="15" value="" /><input type="hidden" name="no" id="no">
                    </label></td>
                    <td ><div align="center"><strong>Indent Date</strong></div></td>
                    <td ><label>
                            <div align="center">
                                <input name="dateindent" type="text" id="dateindent"value="<%=date1%>"/><input type="hidden" name="no" id="no">
                            </div>
                    </label></td>
                    <td> </td>
                    <td><div align="right"><strong>Entry No.</strong></div></td>
                     <%if(oper!=null && oper.equals("view") && hdrcode!=null && hdrdetails!=null){%>
            <td><input type="text" value="<%=hdrcode.get(3)%>" size="10"></td>
    <%}else{%>
                   <td><input type="text" name="entryno" id="entryno" value="<%=entryNo%>"/></td>
                             <%}%>
                            <div align="right"></div>
                </tr>
                <tr>
                    <td><b>Division</b></td>
                    <%if(oper!=null && oper.equals("view") && hdrcode!=null && hdrdetails!=null){%>
    <td><input type="text" value="<%=hdrdetails.get(9)%>" size="20"</td>
    <td><input type="hidden" name="div1" id="div1" value='<%=hdrcode.get(10)%>'></td>
    <%}else{%>
                   <td><input type="text" name="div" id="div" /></td>
                   <td><input type="hidden" name="div1" id="div1" /> </td>
              <%}%>
                    <td> </td>
                    <td> </td>
                    <td><div align="right"><strong>Unit</strong></div></td>
                   <%if(oper!=null && oper.equals("view") && hdrcode!=null && hdrdetails!=null){%>
    <td><input type="text" value="<%=hdrdetails.get(14)%>" size="20"</td>
    <td><input type="hidden" name="uni" id="uni" value='<%=hdrcode.get(12)%>'></td>
    <%}else{%>
                   <td><input type="text" name="unit" id="unit" /></td>
                   <td><input type="hidden" name="uni" id="uni" /> </td>
              <%}%>
                </tr>
                <tr>
    </html>
      Any suggestion on any above works is highly appreciated.
    Thanks and regards
    harshal

    Too much code. It's also not well intented nor formatted. I don't see a question either or it got lost in that heap of unformatted code.
    I will only answer the question in the thread's subject:
    How to retrieve multiple data from table and represent it in jsp pageTo retrieve, make use of HttpServletRequest#getParameterValues() and/or #getParameter().
    To display, make use of JSTL's c:forEach.

  • Help generate dynamic table in xslt for apache FOP

    down vote favorite
    For the following xml file, i need to generate an xsl-fo file to be converted into pdf.
    I am new to style sheets and struggling to create dynamic table. Please help.
    Also, the width for each column varies,based on the column.How would i include this into the code?
    The Column Headers and Column Values are dynamically populated in the xml file. Below is a sample.
    Can anybody please help in generating xsl-fo or xslt code?
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <ReportData>
    <ColumnHeaders>
    <ColumnHeader>
    <Name>Col-Header1</Name>
    <Width>5</Length>
    </ColumnHeader>
    <ColumnHeader>
    <Name>Col-Header2</Name>
    <Width>10</Length>
    </ColumnHeader>
    <ColumnHeader>
    <Name>Col-Header3</Name>
    <Width>8</Length>
    </ColumnHeader>
    </ColumnHeaders>
    <Rows>
    <Row>
    <Column>Row1-Col1</Column>
    <Column>Row1-Col2</Column>
    <Column>Row1-Col3</Column>
    </Row>
    <Row>
    <Column>Row2-Col1</Column>
    <Column>Row2-Col2</Column>
    <Column>Row2-Col3</Column>
    </Row>
    </Rows>
    </ReportData>

    I did some xsl-fo a few years ago for a project.
    It was an invoice generator spawning multiple PDFs out of single XML document generated from the database. Pretty cool stuff but very resource-consuming.
    I'm a bit rusty but here's a basic example for a single table, based on your sample data :
    XSLT stylesheet :
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
      <xsl:output indent="yes"/>
      <xsl:template match="/ReportData">
        <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
          <fo:layout-master-set>
            <fo:simple-page-master master-name="Main" margin="8mm"
              page-width="250mm"
              page-height="100mm">
              <fo:region-body />
            </fo:simple-page-master>
          </fo:layout-master-set>
          <fo:page-sequence master-reference="Main">
            <fo:flow flow-name="xsl-region-body">
              <fo:block>
                <fo:table table-layout="fixed" border-style="solid">
                  <xsl:apply-templates select="ColumnHeaders/ColumnHeader" mode="column"/>
                  <xsl:apply-templates select="ColumnHeaders"/>
                  <fo:table-body>
                       <xsl:apply-templates select="Rows/Row"/>
                  </fo:table-body>
                </fo:table>     
              </fo:block>
            </fo:flow>
          </fo:page-sequence>
        </fo:root>
      </xsl:template>
      <xsl:template match="ColumnHeaders">
        <fo:table-header>
             <fo:table-row background-color="rgb(200,200,200)">
                  <xsl:apply-templates select="ColumnHeader" mode="header"/>
             </fo:table-row>
        </fo:table-header>
      </xsl:template>
      <xsl:template match="ColumnHeader" mode="column">
        <fo:table-column column-width="{concat(Width*10,'mm')}"/>
      </xsl:template>
      <xsl:template match="ColumnHeader" mode="header">
        <fo:table-cell border-style="solid">
          <fo:block font-weight="bold"><xsl:value-of select="Name"/></fo:block>
        </fo:table-cell>
      </xsl:template>
      <xsl:template match="Row">
           <fo:table-row>
          <xsl:apply-templates select="Column"/>
        </fo:table-row>
      </xsl:template>
      <xsl:template match="Column">
        <fo:table-cell border-style="solid">
          <fo:block><xsl:value-of select="."/></fo:block>
        </fo:table-cell>
      </xsl:template>
    </xsl:stylesheet>
    {code}
    Calling the XSLT engine and FOP :
    {code}
    D:\XSLT>gen_pdf_otn.bat
    D:\XSLT>java -jar saxon9he.jar -s:in/reportdata.xml -xsl:testfo.xsl -o:out/testfo.xml  2>errors.log
    D:\XSLT>java -jar fop.jar org.apache.fop.cli.Main -fo out/testfo.xml -pdf out/testfo.pdf -c morefontsconfig.xml  2>errors.log
    D:\XSLT>pause
    Appuyez sur une touche pour continuer...
    {code}
    Ouput :
    - The intermediate XSL-FO document :
    {code:xml}
    <?xml version="1.0" encoding="UTF-8"?>
    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
       <fo:layout-master-set>
          <fo:simple-page-master master-name="Main" margin="8mm" page-width="250mm" page-height="100mm">
             <fo:region-body/>
          </fo:simple-page-master>
       </fo:layout-master-set>
       <fo:page-sequence master-reference="Main">
          <fo:flow flow-name="xsl-region-body">
             <fo:block>
                <fo:table table-layout="fixed" border-style="solid">
                   <fo:table-column column-width="50mm"/>
                   <fo:table-column column-width="100mm"/>
                   <fo:table-column column-width="80mm"/>
                   <fo:table-header>
                      <fo:table-row background-color="rgb(200,200,200)">
                         <fo:table-cell border-style="solid">
                            <fo:block font-weight="bold">Col-Header1</fo:block>
                         </fo:table-cell>
                         <fo:table-cell border-style="solid">
                            <fo:block font-weight="bold">Col-Header2</fo:block>
                         </fo:table-cell>
                         <fo:table-cell border-style="solid">
                            <fo:block font-weight="bold">Col-Header3</fo:block>
                         </fo:table-cell>
                      </fo:table-row>
                   </fo:table-header>
                   <fo:table-body>
                      <fo:table-row>
                         <fo:table-cell border-style="solid">
                            <fo:block>Row1-Col1</fo:block>
                         </fo:table-cell>
                         <fo:table-cell border-style="solid">
                            <fo:block>Row1-Col2</fo:block>
                         </fo:table-cell>
                         <fo:table-cell border-style="solid">
                            <fo:block>Row1-Col3</fo:block>
                         </fo:table-cell>
                      </fo:table-row>
                      <fo:table-row>
                         <fo:table-cell border-style="solid">
                            <fo:block>Row2-Col1</fo:block>
                         </fo:table-cell>
                         <fo:table-cell border-style="solid">
                            <fo:block>Row2-Col2</fo:block>
                         </fo:table-cell>
                         <fo:table-cell border-style="solid">
                            <fo:block>Row2-Col3</fo:block>
                         </fo:table-cell>
                      </fo:table-row>
                   </fo:table-body>
                </fo:table>
             </fo:block>
          </fo:flow>
       </fo:page-sequence>
    </fo:root>
    {code}
    - and the PDF document :
    http://mbperso.pagesperso-orange.fr/oracle/testfo.pdf                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Sorting Dynamic Table by specific field

    Hi guys,
    I need to sort a dynamic table (without header line) by a certain field in order to achieve the client requierment. I really don't have any clue about how can i do this, because, it appears that is not possible to declarate a field symbol type standar table with a headerline...
    Regards,
    Eric

    Try this:
    TABLES T001.
    DATA: T_T001 LIKE STANDARD TABLE OF T001.
    FIELD-SYMBOLS: <TABLE> TYPE TABLE.
    DATA: FIELD1(30),
          FIELD2(30),
          FIELD3(30).
    SELECT * FROM T001 INTO TABLE T_T001.
    ASSIGN T_T001[] TO <TABLE>.
    FIELD1 = 'BUTXT'.
    SORT <TABLE> BY (FIELD1) (FIELD2) (FIELD3).
    LOOP AT <TABLE> INTO T001.
      WRITE: / T001-BUTXT, T001-BUKRS.
    ENDLOOP.
    U have to decide how many fields can be used to sort the table: in my example I suppose the user can use max 3 fields in the same time.
    The ALV use this way to sort the table.
    Max

  • Urgent Help on Dynamic Table name change in query !!!!!!!!

    Hi Everyone,
    I'm having a repeating frame which displays table_name, count_validate and count_error. How can i dynamically change my table_name in formula column apllied on count_validate and count_error. I can do this with multiple elsif statement, which makes my report slow at runtime. Select statement is same , only change is table_name ?
    Kindly let me know......

    Try to use dynamic ref cursors (defined in a database package).
    This is not exactly what you need, but see:
    "Dynamic Table in the Second Query with Oracle Reports"
    http://www.quest-pipelines.com/pipelines/plsql/tips03.htm#JULY
    Regards,
    Zlatko Sirotic

  • How to define the hyperlink command in the online help to go to a specific place on another page?

    Hi,
    I run my online help (WebHelp) in an application in Firefox. When clicking a link on a page, I want to go to a specific section on another page. In the hyperlink I am using the #<bookmark> to go to the bookmark on the other page. This works in IE, but not in FireFox. Do I need to use a different command or do I have to change some settings in my browser to make it work?
    Thanks!

    Does your page design use frames (classic frames or inline frames)?
    From past threads:
    Make sure your bookmark doesn't contain a #. In other words, if the bookmark is Chapter1, Firefox will require #Chapter1 on the link, but if the bookmark is #Chapter1, then Firefox will require ##Chapter1 on the link.
    If your page changes height after loading, for example, you use a script that collapses some sections, Firefox may go to the original location in the page instead of the updated location. The workaround for this would be to have a script in the page check the hash and scroll to the correct location after changing the height.

  • Looking to load embedded PDF at a specific height on the page

    I'm looking to load a PDF, scrolled down to a predetermined height on the page. I'm familiar with the 'page' param using <embed>, which will load a particular page, but I'd like to be able to have the document load such that it's displaying a particular portion beginning about 3" from the top. I'd even be happy with being able to load the vertical center of the page. Is there code or an application that will let me do that?
    Thanks!

    Not that I know of, but I have completely given up on Pages for anything. For labels I use Avery software which is free http://www.avery.com/avery/en_us/Templates-%26-Software/Software/Avery-Design--P rint.htm

  • Help! Errors seen during loading of a jsp page.

    Hi all,
    I'm a newbie in Tomcat and Jsp, whenever my jsp page loads, all these weird errors appeared, the 2Ballpoint_Pen.jpg image with the IOException actually existed.
    What does the rest of the errors mean? How do I fix them?
    Does all errors actually hangs my Tomcat? There's actually quite alot of such similar errors.
    I'm using Tomcat 3.3.1 and JDK 1.3.1_04.
    Please help me....
    2003-08-12 02:15:22 - Ctx(/osrs) : IOException in R( /osrs + /upload/2Ballpoint_Pen.jpg + null) - java.net.SocketException: Connection aborted by peer: socket write error
    at java.net.SocketOutputStream.socketWrite(Native Method)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:91)
    at org.apache.tomcat.modules.server.Http10.doWrite(Http10.java:436)
    at org.apache.tomcat.modules.server.HttpResponse.doWrite(Http10Interceptor.java:480)
    at org.apache.tomcat.core.OutputBuffer.realWriteBytes(OutputBuffer.java:188)
    at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:360)
    at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:338)
    at org.apache.tomcat.util.buf.IntermediateOutputStream.write(C2BConverter.java:234)
    at java.io.OutputStreamWriter.flushBuffer(OutputStreamWriter.java:225)
    at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:239)
    at org.apache.tomcat.util.buf.WriteConvertor.flush(C2BConverter.java:183)
    at org.apache.tomcat.util.buf.C2BConverter.flushBuffer(C2BConverter.java:126)
    at org.apache.tomcat.core.OutputBuffer.realWriteChars(OutputBuffer.java:337)
    at org.apache.tomcat.util.buf.CharChunk.flushBuffer(CharChunk.java:388)
    at org.apache.tomcat.core.OutputBuffer.flush(OutputBuffer.java:314)
    at org.apache.tomcat.core.OutputBuffer.close(OutputBuffer.java:305)
    at org.apache.tomcat.core.Response.finish(Response.java:271)
    at org.apache.tomcat.core.ContextManager.service(ContextManager.java:838)
    at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516)
    at java.lang.Thread.run(Thread.java:479)

    My codes are:
    <%
    String imagePath2 = JSPHelper.NOPIC_PATH;
    product = null;
    try
         product = (Product)list.get(count);
         imagePath2 = Validation.getImagePath(product.getImage2());
    catch(Exception e){}
    if(product != null)
    %>
    <img src="<%=imagePath%>" width="120" height="125" alt="For loose items, please collect it personally from General Office" style="cursor=hand" onClick='window.open("Image_view.jsp?id=<%=imagePath2%>","","width=640,height=480,")'>
    <%
    %>
    ----------------------------------------------------------------------

  • Can someone help me correct this sql statement in a jsp page?

    ive been getting the java.sql.SQLException: Incorrect syntax error for one of my sql nested statements. i cant seem to find similar egs online, so reckon if anyone here could help, really appreciate it.
    as im putting the nested sql in jsp page, it has to be with lots of " " n crap. very confusing if there are nested.
    heres the sql statement without those "" that i want to use:
    select top 5 * from(
    select top+"'"+offset+"'"+" * from prod where cat=" +"'" cat "'"+"
    )order by prodID desc
    when i put this in my jsp pg, i had to add "" to become:
    String sql = "select top 5 * from("+"select top"+"'"+offset+"'"+" * from prod where cat=" +"'" +cat+ "'"+")order by prodID desc";cat=" +"'" cat "'"+")order by prodID desc";
    all those "" are confusing me to no end, so i cant figure out what should be the correct syntax. the error says the syntax error is near the offset.

    If offset is, say, 10, and cat is, say, "new", then it looks like you're going to produce the SQL:
    select top 5 * from(
      select top '10' * from prod where cat='new'
    )order by prodID descThat looks exactly like incorrect syntax to me... top almost certainly can't handle a string literal as its operand... you almost certainly would want "top 10" instead of "top '10'"...
    If you use PreparedStatement, you don't have to remember what you quote and what you don't and you can have your SQL in a single static final string to boot...

  • Can we create a pivot table of Excel in a JSP page using POI

    Hello,
    I want to know whether we can create a pivot table of excel sheet in a jsp page using POI package from apache.
    thank you.

    Hi Alex,
    Many thanks for replying.
    I followed the link, but unable to get correct output.. I have shared the template earlier. I can share the template once again.
    It would be grateful if you give me share the working template with table of content.

  • Daniel or anyone else, Help on why I can't access certain jsp pages

    I have installed the Web Service Portlet Wizard to build my portlets. In particular,
    I have created a URL porlet jsp which receives its content from a URL.
    This URL that I retrive is an application that I have running on my Weblogic 6.1
    Server. I can access the login page, and can logon and do a few things but for
    some reason I Can't access certain pages. The pages I can't access are also jsp
    pages on the wlserver6.1 server(exactly the same as other ones I can access and
    interact with).
    The error I receive on the Portal Front end is attached in a word doc. I have
    also included in there, a snapshot of the access log for those pages, but I can't
    really make out what it is telling me (if anything!).
    For one of the pages, that I can't successfully access I get java.lang.ArrayIndexOutOfBoundsException
    This only happens with 1 of the pages. But trying to access the same page withouth
    going thru the portal I get NO errors what so ever.
    Please if anyone can give me any information on why I can't access certain pages
    via my portal It would be very helpful.
    Finally I have included the code of my Portlet which accesses the URL. This is
    also included in the word doc.
    Thanks
    Ramy
    [Portal.doc]

    Ramy,
    I don't know the Web Service Portlet Wizard too well, but I notice that
    login.htm never seems to be found (404 in logs). I would think that the two
    warnings below your JSP call (cookies, and portlet state) are your most
    likely culprits. If the Web Service Portlet Wizard does not handle cookies
    then the portal server will have to continiously reauthenticate. I will
    forward your email however and see if I can dig up a better diagnosis. Also,
    could you post the stack trace for the ArrayIndexOutOfBoundsException you
    are seeing.
    Sincerely,
    Daniel Selman
    "Ramy" <[email protected]> wrote in message
    news:[email protected]..
    >
    I have installed the Web Service Portlet Wizard to build my portlets. Inparticular,
    I have created a URL porlet jsp which receives its content from a URL.
    This URL that I retrive is an application that I have running on myWeblogic 6.1
    Server. I can access the login page, and can logon and do a few things butfor
    some reason I Can't access certain pages. The pages I can't access arealso jsp
    pages on the wlserver6.1 server(exactly the same as other ones I canaccess and
    interact with).
    The error I receive on the Portal Front end is attached in a word doc. Ihave
    also included in there, a snapshot of the access log for those pages, butI can't
    really make out what it is telling me (if anything!).
    For one of the pages, that I can't successfully access I getjava.lang.ArrayIndexOutOfBoundsException
    This only happens with 1 of the pages. But trying to access the same pagewithouth
    going thru the portal I get NO errors what so ever.
    Please if anyone can give me any information on why I can't access certainpages
    via my portal It would be very helpful.
    Finally I have included the code of my Portlet which accesses the URL.This is
    also included in the word doc.
    Thanks
    Ramy

  • Help required : Dynamic Radio Buttons.

    Hi All,
    Requirement is as follows :
    1. I am having an internal table , suppose it has 5 records , then I need 5 radio buttons on screen.
    2. I need to dynamically name these radio buttons , based on one of the field of same internal table .
    Please help to get an optimised approach to implement the same .
    Thanks and Regards
    Harsh

    Hi Harsh,
      A better approch would be to create a selection-screen with 15 buttons to start and make invisible other radio buttons that you dont want in the at selection-screen output event.
    You can try like below:
    parameters: r1 radiobutton group rad1 default 'X',
                        r2 radiobutton group rad1,
                       r15 radiobutton group rad1.
    at selection-screen output.
    describe table itab lines n.
    l_cnt = 15 - n.
    do l_cnt times.
    n = n+1.
    concatenate 'r'  n  into l_radioname.      <<< n no of radio buttons wanted
    loop at screen.
    if screen-name = l_radioname.
    screen-invisible = 1.
    modify screen.
    endif.
    endloop.
    enddo.
    i hope you got a breif idea as to how you can go forward.
    Regards,
    Himanshu

  • Help required on table maintenance generator

    Hi all,
           Would any one tell me what is the difference between one step and two step while creating a table maintenace generator for a table.
    one more question is i would like to know which search the following code follows while it is executed.
    select single vbeln
    from vbak into l_vbeln
    where vbeln in s_vbeln.
    and
    select vbeln
    from vbak
    into l_vbeln
    up to 1 rows
    where vbeln in s_vbeln.
    please do reply soon for the questions.

    Hi
    table maintanance Generator is used to manually
    input values using transaction sm30
    follow below steps
    1) go to se11 check table maintanance check box under
    attributes tab
    2) utilities-table maintanance Generator->
    create function group and assign it under
    function group input box.
    also assign authorization group default &NC& .
    3)
    select standard recording routine radio in table
    table mainitainence generator to move table
    contents to quality and production by assigning
    it to request.
    4) select maintaience type as single step.
    5) maintainence screen as system generated numbers
    this dialog box appears when you click on create
    button
    6) save and activate table
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ed2d446011d189700000e8322d00/content.htm
    http://help.sap.com/saphelp_46c/helpdata/en/a7/5133ac407a11d1893b0000e8323c4f/frameset.htm
    /message/2831202#2831202 [original link is broken]
    One step, two step in Table Maintenance Generator
    Single step: Only overview screen is created i.e. the Table Maintenance Program will have only one screen where you can add, delete or edit records.
    Two step: Two screens namely the overview screen and Single screen are created. The user can see the key fields in the first screen and can further go on to edit further details.
    Difference Between Select Single and Select UpTo One Rows
    According to SAP Performance course the SELECT UP TO 1 ROWS is faster than SELECT SINGLE because you are not using all the primary key fields.
    select single is a construct designed to read database records with primary key. In the absence of the primary key, it might end up doing a sequential search, whereas the select up to 1 rows may assume that there is no primary key supplied and will try to find most suitable index.
    The best way to find out is through sql trace or runtime analysis.
    Use "select up to 1 rows" only if you are sure that all the records returned will have the same value for the field(s) you are interested in. If not, you will be reading only the first record which matches the criteria, but may be the second or the third record has the value you are looking for.
    The System test result showed that the variant Single * takes less time than Up to 1 rows as there is an additional level for COUNT STOP KEY for SELECT ENDSELECT UP TO 1 ROWS.
    The 'SELECT SINGLE' statement selects the first row in the database that it finds that fulfils the 'WHERE' clause If this results in multiple records then only the first one will be returned and therefore may not be unique.
    Mainly: to read data from
    The 'SELECT .... UP TO 1 ROWS' statement is subtly different. The database selects all of the relevant records that are defined by the WHERE clause, applies any aggregate, ordering or grouping functions to them and then returns the first record of the result set.
    Mainly: to check if entries exist.
    Reward points for useful Answers
    Regards
    Anji

Maybe you are looking for

  • Error message iTunes was unable to load data class information from Sync Services

    I purchased some songs to download to my ipod and keep getting the following message:  iTunes was unable to load data class information from Sync Services. The songs have transferred okay to my ipad and iphone with no issue. ipod has sw update 6.1.6.

  • Problems with signal level around the house ????

    Hi Guys, I have had my BT Home HUb 2.0 for just about a month now and after having very little luck with my new laptop which i have replaced twice and am now on my 3rd (Samsung) all working well, i am still having problems with using my laptop with t

  • Display the totals only at Material level in ALV

    Hi........, I am calculating the subtotals and totals. I am having the columns Company Code , Plant and Material etc. First I did sort on table as : gr_sorts = gr_table->get_sorts( ).   gr_sorts->add_sort( columnname = 'C_CODE' subtotal = abap_true )

  • Carryforward residual budget (FMMPCOVR)

    Using FMAVCR01 (Display annual values for control objects) we can see the following for a particular fund, fund center and funded program for fiscal year 2010.. Consumable Buget = 6,981.24 Consumed Amt = 1,356.56 Available  Amt = 5,624.68 The consume

  • Report Not Appearing Dashboard

    Hi, I have added a report to the dashboard. Report has Title,Table and Filter View. I have page prompts for that report. The report is appearing properly when it meets the prompt condition. When there is no data matching the prompt condition.It shoul