"cellspacing" in html table of report's result

Hi people !!!
I would like to put the "cellspacing" html attribute in the <table> TAG HTML that mounts the results of a report, for that the cells (columns of report) stay like spaced.
How can I do this?
Thanks a lot
Alisson
[email protected]

Try Transporting/Importing the report object (including all objects classes) from another source client (Ex Development).
T Codes CJEO/CJEQ
Regards
Sreenivas

Similar Messages

  • Query results to HTML table

    I'm looking for a more efficient way to convert a query result into an HTML table so that I can paste it into an email. The procedure in sqldeveloper (version 3.1.07) is just too clunky and involves too many keystrokes and mouse clicks. And you can't save the HTML to the clipboard. (I'm talking about the "Export..." action here.)
    Am I missing something? Are there any alternatives?
    Thanks!

    ... but sqlplus is so last millenium....
    Seriously? I'm from the last millennium too, nevertheless I don't consider myself out of date
    SQL*PLUS is still my first choice when I have to run a script. I'ts behaviour is reliably the same whereever my script is executed. I would never trust a script that needs another tool to be executed.
    Generating a HTML-mail is IMHO out of scope for a database tool. It's a feature I would expect in a BI tool that specializes on reporting.
    Regards
    Marcus

  • Show results from the database to html tables?

    Hi,
    I am a PHP programmer and did a successful CMS program for a company. Now I have another project which is a web based system.
    I basically know how to do it and finish it in PHP.. but I am trying to do it using J2EE.. I am trying to learn J2EE now since I have been programming
    on J2SE for quite sometime..
    I am trying to show the results from a MySQL database on a table on J2EE but I am having hard time doing that. I am trying to research online and reading books but with no luck I can't find any resources on how to do that..If you guys can lead me into a resource where I can read how to do it? or just give any ideas on how to do it correctly I'll try to read and learn I will very much appreciate it.. here's my coding please look at it. Thank you very much
    I want to make it like this in a html table:
    userid username activated task
    1 alvin y delete(this will be a link to delete the user)
    Right now this is what I was able to do so far:
    Userid username activated task
    1
    alvin
    y
    Here are my codes... I am not even sure if I am doing it in the correct way...
    User.java
    mport java.sql.Connection;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    import java.util.ArrayList;
    import java.util.List;
    public class Users {
    public List getUsers(){
    List names = new ArrayList();
    try{
    Connection con = DBConnect.getConnection();
    Statement stmt = con.createStatement();
    String sql = "select * from users";
    ResultSet rs = stmt.executeQuery(sql);
    while(rs.next())
    String userid = rs.getString("user_id");
    String usernames = rs.getString("user_name");
    String password= rs.getString("password");
    String activated= rs.getString("activated");
    names.add(userid);
    names.add(usernames);
    names.add(password);
    names.add(activated);
    catch(SQLException e)
    System.out.print(e);
    catch(Exception e)
    System.out.print(e);
    return names;
    UserServlet.java
    import java.io.IOException;
    import java.util.List;
    import javax.servlet.RequestDispatcher;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    public class UsersServ extends HttpServlet {
    private static final long serialVersionUID = 1L;
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    Users be =new Users();
    List result = be.getUsers();
    request.setAttribute("user_results", result);
    RequestDispatcher view = request.getRequestDispatcher("manage_users1.jsp");
    view.forward(request, response);
    manage_users1.jsp
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <%@page import = "java.util.*" %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
    </head>
    <body>
    <%
    List results = (List)request.getAttribute("user_results");
    Iterator it = results.iterator();
    out.print("<table border = 1>");
    out.print("<th>");
    out.print("userid");
    out.print("</th>");
    out.print("<th>");
    out.print("username");;
    out.print("</th>");
    while(it.hasNext()){
    out.print("<tr><td> " + it.next()+"</td></tr>");
    out.print("</table>");
    %>
    </body>
    </html>

    I suggest:
    1: you use this:
    e.printStackTrace()
    instead of this:
    System.out.print(e);
    so it will tell you what line it crashed on.
    2: In the code below,here is how you mix coding html tags and java scriptlets
    (you should never have to use out.print()):. In a later project, you can learn how to use JSTL
    instead of java scriplets (I suggest using java scriptlets for now until you have more JSP experience).
    FROM:
    <html>
    <%
    //some java code goes here
    out.print("<th>");
    //some more java code goes here
    out.print("<tr>");
    %>
    TO:
    <html>
    <% //some java code goes here%>
    <th>
    <%//some more java code goes here%>
    <tr>
    3: Put a lot of System.println() statements in your *.java classes to verify what its doing (you can learn how to use a debugger later).
    4: I highly recommend reading a book on JSP/servlets cover to cover.
    Here's a simple MVC design approach I previously posted:
    http://forums.sun.com/thread.jspa?messageID=10786901

  • Query in Servlet not displaying results in html table

    Hi,
    I am aware that putting html in a servlet is not good practice. In my case, it is just for testing purposes.
    Environment: WLS 12c on Windows, DB 11.2.0.3
    I created an html form and a servlet in a Dynamic Web Project. The form parameters are sent to the servlet,
    but the results are not being displayed.
    HTML form:
    <input text name="p_1"
    Servlet:
    import javax.servlet.ServletException;
    import javax.servlet.annotation.WebServlet;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import java.io.PrintWriter;
    import java.sql.Connection;
    import java.sql.SQLException;
    import java.sql.Statement;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    * Servlet implementation class QueryServlet
    @WebServlet("/QueryServlet")
    public class QueryServlet extends HttpServlet {
        private static final long serialVersionUID = 1L;
         * @see HttpServlet#HttpServlet()
        public QueryServlet() {
            super();
            // TODO Auto-generated constructor stub
         * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
        protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
            // TODO Auto-generated method stub
            response.setContentType("text/html");
            PrintWriter out = response.getWriter();
            Connection conn = null;
            Statement stmt = null;
            try {
                conn = DriverManager.getConnection("jdbc:oracle:thin:@home-server:1521:val01", "USER", "PW");
                stmt = conn.createStatement();
    String sqlStr = "SELECT....
    ... WHERE p_1 =
    +  "'" + request.getParameter("p_1") + "'"
    out.println("<html><head><title>Query Results</title></head><body>");
                out.println("<p>Your query is: " + sqlStr + "</p>");
                out.println("<p>Your are connected to: " + conn + "</p>");
    --> OUTPUT ONLY UNTIL HERE <--           
                // Get data
                ResultSet rset = stmt.executeQuery(sqlStr);
                int count = 0;
                while(rset.next()){
                    int cid  = rset.getInt("CID");
    // Display data in html table
    out.println("<table>");
                    out.println("<tr>");
                    out.println("<td>" + cid + "</td>");
    rset.close();
                out.println("<p>====== " + count + " records found =======</p>");
                out.println("</body></html>");
                 catch (SQLException ex) {
                    ex.printStackTrace();
                    finally {
                        out.close();
                        try {
                            if (stmt != null) stmt.close();
                            if (conn != null) conn.close();
                        } catch (SQLException ex) {
                            ex.printStackTrace();
    Help greatly appreciated. Thanks!

    Possibly, the js file is not being detected by the javascript runtime.It would be better if you tried something like :
    ("<script src="<%=request.getContextPath()%>/WEB-INF/classes/ua.js"></script>

  • How to pass query result to HTML table?

    Hi,
      i want to get the query result in HTMl table instead of Display Grid. how to do it? i searched in help, it suggests use icommand to do this. but i dont know how to pass the select query result to HTML table.. please help me.
    -senthil

    Hi Senthil,
    You can create an icommand query. You can then use the icommand retrieval methods to capture and manipulate the query data.
    (http://help.sap.com/saphelp_xmii115/helpdata/en/Applet_Reference_Details/iCom
    mand_Reference.htm)
    Basically what we did was, use the getColumnCount() and getRowCount() methods, once you have these two numbers you can set two for loops and use String getValue(int ColID, int RowID) , within the for loops you can generate the inner html content and write the values either in a html table or html form (which is what we did). This seems to work well, I'm still playing around with it and may post this approach on sdn by end of this week.
    Mahwish

  • Creating a selectable HTML table with Sahrepoint list data dind

    Hi All,
    I m creating an app for sharepoint2013 , on my app I want to read data from SP list and display on something like HTML table/ grid view.
    What I have done is as follows.
    <table cellpadding="0" cellspacing="0" border="0" class="display" id="TermList">
                        <thead>
                            <tr>
                                        <th>Start Date</th>
                                <th>End Date</th>
                                <th>Term Type(s)</th>
                                <th>Specialty</th>
                                <th width="12%">Sub Specialty</th>
                            </tr>
                        </thead>
                                            <tbody>
                            </tbody>
    </table>
    var context = SP.ClientContext.get_current();
    var user = context.get_web().get_currentUser();
    var Termsitems, web, hostcontext, currentusertitle;
    var hosturl;
    (function () {
    $(document).ready(function () {
        gethostdata();
        getUserName();
        $('#TermList').dataTable(
                        "sScrollY": 200,
                            This will enable jQuery UI theme
                        "bJQueryUI": true,
                            will add the pagination links
                        "sPaginationType": "full_numbers"
        getTermdetails();
    function gethostdata() {
        hosturl = decodeURIComponent(getQueryStringParameter("SPHostUrl"));
        context = new SP.ClientContext.get_current();
        hostcontext = new SP.AppContextSite(context, hosturl);
        web = hostcontext.get_web();
        context.load(web, 'Title');
        context.executeQueryAsync(onSiteLoadSuccess, onQueryFailed);
    function onSiteLoadSuccess(sender, args) {
        //   alert("site title : " + web.get_title());
    function onQueryFailed(sender, args) {
        alert('request failed ' + args.get_message() + '\n' + args.get_stackTrace());
    function getQueryStringParameter(urlParameterKey) {
        var params = document.URL.split('?')[1].split('&');
        var strParams = '';
        for (var i = 0; i < params.length; i = i + 1) {
            var singleParam = params[i].split('=');
            if (singleParam[0] == urlParameterKey)
                return decodeURIComponent(singleParam[1]);
    // This function prepares, loads, and then executes a SharePoint query to get the current users information
    function getUserName() {
        context.load(user);
        context.executeQueryAsync(onGetUserNameSuccess, onGetUserNameFail);
    // This function is executed if the above call is successful
    // It replaces the contents of the 'message' element with the user name
    function onGetUserNameSuccess() {
    currentusertitle= user.get_title();
      $('#message').text('Hello ' + user.get_title());
    // This function is executed if the above call fails
    function onGetUserNameFail(sender, args) {
        alert('Failed to get user name. Error:' + args.get_message());
    function getTermdetails() {
        var Termlist = web.get_lists().getByTitle("TraineeTermsSPlist");
        context.load(Termlist)
        var camlQuery = new SP.CamlQuery();
        camlQuery.set_viewXml('<View><Query><Where><Eq><FieldRef Name="Title" />' +
                                 '<Value Type="Text"> + currentusertitle + </Value></Eq></Where></Query></View>');
        Termsitems = Termlist.getItems(camlQuery);
        context.load(Termsitems);
        context.executeQueryAsync(getTermdetailsQuerySuccsess, getTermdetailsQueryFails)
    function getTermdetailsQuerySuccsess(sender, args) {
        var listEnumerator = Termsitems.getEnumerator();
        var datatable = document.getElementById("TermList");
        while (listEnumerator.moveNext()) {
            var oListItem = listEnumerator.get_current();
            var startdate = listEnumerator.get_current().get_item('startdate');
            var enddate = listEnumerator.get_current().get_item('Enddate');
            var termtype = listEnumerator.get_current().get_item('TermType');       
            var Specialty = listEnumerator.get_current().get_item('Specialty');
            var Specialty = listEnumerator.get_current().get_item('Subspecialty');
            $("#TermList").append("<tr align='middle'  class='gradeA'>" +
                                      "<td align='left'>" + startdate +
    "</td>" +
                                      "<td align='left'>" + enddate + "</td>"
    +
                                      "<td align='left'>" + termtype + "</td>"
    +
                                      "<td align='left'>" + Specialty +
    "</td>" +
                                      "<td align='left'>" + Specialty +
    "</td>" + "</tr>");
    function getTermdetailsQueryFails(sender, args) {
        alert(' Error:' + args.get_message());
    Now what I want to do is allow user to select rows on the table. Once they select a row I want to get that selected row and search SP list based on the selected value.  Also I would like to make this table with search area to search records.
    Can someone please help me to do this, or are there any easy way to do this. Sample code or useful link much appreciate.
    Thank you very much.
    d.n weerasinghe

    Instead of writing in dive each and every time directly,
    just have a div in html, and inside the while loop
    write and store in the variable like
      output += "<li><a href='#' style='display:none'>" + usernames[i] + " </a> "
                         + "<table id='results' width='100%'>"
                         + "
    <tr style='border-bottom:1px silver solid;'>"
                         + "
    <td style='width:60px;height:70px;' >"
                         + "
    <img alt=\"profile pic\" src= '" + pictureuri[i] + "'  style='width:60px;height:60px;'/>"
                         + "
    </td>"
                         + "
    <td >"
                         + "
    <table style='height:100%'>"
                         + "
    <tr>"
                         + "
    <td style='padding-padding-vertical-align:top;height:10px' >"
                         + "
    <a href='" + personaluri[i] + "' classq='ms-bold ms-subtleLink' style='color: gray; font-size: 12px; font-weight: bold;'>" + tempnames[i] + "</a>"
                         + "
    </td>"
                         + "
    </tr>"
                         + "
    <tr>"
                         + "
    <td  style='padding-vertical-align:top;height:50px;color:#ADAEAD;font-size:14px;' >" + deptNames[i]
                         + "
    </td>"
                         + "
    </tr>"
                         + "
    </table>"
                         + "
    </td>"
                         + "
    </tr>"
                         + "</table>"
                         + "</li>"
    and finaly oyutside the loop 
    $(#div).html(output);

  • JSF component inside HTML table -- not rendering properly

    I have a HTML table like the one below. In one of those columns (td) I have a JSF component. When I run the app, the JSF component (even if its a simple inputText or panelGrid or panelGroup) is not getting inside the td. Instead, it forms a seperate table after this td.
    Code I have:
    <table border="0" cellpadding="0" cellspacing="0">
    <tbody>
    <tr>
    <td>... ..MULTIPLE Td's here - Deleted for simplicity </td>
    <td class="topNav">
    Blog Directory
    </td>
    <td>
    <img src="./images/top_button_right.gif"/>
    </td>
    <td class="topNav">
    <f:panelGroup>
    <h:inputText value="Username"/>
    <h:inputSecret value="Password"/>
    </f:panelGroup>
    </td>
    </tr>
    </tbody>
    </table>
    What I expected:
    username, passwd field inside the top level HTML table.
    What comes: (as a result of running thsi JSF page )
    <table> -- Original table
    <td> </td> -- -TD that had the inputText - comes empty here
    </table>
    <table>
    <tbody>
    <tr>
    <td><input type="text" name="_id1:header:EasyHeader:_id4" value="Username" /><input type="password" name="_id1:header:EasyHeader:_id5" value="" /></td>
    </tr>
    <tr>
    <td><table>
    I am a newbie to JSF & due to the complexity of the layout & page, I m unable to get rid of the HTML tags totally.
    Thanks in advance.
    Ganesh

    Found the solution to the problem.
    wrapped the entire HTML page till the JSF component ( panelGrid) under <f:verbatim>.
    something like this
    <f:verbatim>
    <table>
    <tr> <td>...</td>
    <td>
    </f:verbatim>
    <h:panelGrid> ... </h:panelGrid>
    <f:verbatim>
    </td>
    </table>
    </f:verbatim>

  • Problem in generating HTML tables in apex

    Hi friends,
    I coulnt able to generate an email in the HTML table format with a background color since im receiving only in a plain text manner.
    The below is the coding only based on HTML in which i can able to view it in the HTML tables and this is it
    <html>
    <head><title>Report 1</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <base href="http://erpdev01.ti.com:7777/pls/apex/" />
    <style type="text/css">
    table.apex_ir_html_export {
    background-color:#F2F2F5;
    border-width:1px 1px 0px 1px;
    border-color:#C9CBD3;
    border-style:solid;
    table.apex_ir_html_export td {
    color:#000000;
    font-family:Tahoma,Arial,Helvetica,Geneva,sans-serif;
    font-size:9pt;
    background-color:#EAEFF5;
    padding:8px;
    background-color:#F2F2F5;
    border-color:#ffffff #ffffff #cccccc #ffffff;
    border-style:solid solid solid solid;
    border-width:1px 0px 1px 0px;
    table.apex_ir_html_export th {
    font-family:Tahoma,Arial,Helvetica,Geneva,sans-serif;
    font-size:9pt;
    padding:8px;
    background-color:#CFE0F1;
    border-color:#ffffff #ffffff #cccccc #ffffff;
    border-style:solid solid solid none;
    border-width:1px 0px 1px 0px;
    white-space:nowrap;
    </style>
    </head>
    <style type="text/css">
    body{font-family: Arial, Helvetica, sans-serif;
                        font-size:10pt;
                        margin:30px;
                        background-color:#ffffff;}
    span.sig{font-style:italic;
    font-weight:bold;
    color:#811919;}
    </style>
    </head>
    <body>
    <table border="0" cellpadding="0" cellspacing="0" class="apex_ir_html_export">
    <thead><tr><th id=></th><th id=></th></tr></thead>
    <tr>
    <td>Employee Number</td>
    <td>:P36_EMPLOYEE_NUMBER</td>
    </tr>
    <td>Reason</td>
    <td>:P36_REASON</td>
    </tr>
    <td>Position Title</td>
    <td>:P36_POSITION_TITLE</td>
    </tr>
    <td>Qualification Displayed</td>
    <td>:P36_QUALIFICATION_DISPLAYED</td>
    </tr>
    <td>Qualification Title</td>
    <td>:P36_QUALIFICATION_TITLE</td>
    </tr>
    <td>Mobile Number</td>
    <td>:P36_MOBILE_NUMBER</td>
    </tr>
    <td>Desk Number</td>
    <td>:P36_DESK_NUMBER</td>
    </tr>
    <td>Fax Number</td>
    <td>:P36_FAX_NUMBER</td>
    </tr>
    <td>Email Address</td>
    <td>:P36_EMAIL</td>
    </tr>
    <td>Effective Date</td>
    <td>:P36_EFFECTIVE_DATE</td>
    </tr>
    <td>Location</td>
    <td>:P36_LOCATION</td>
    </tr>
    <td>Type-I</td>
    <td>:P36_TYPE1</td>
    </tr>
    <td>Type-II</td>
    <td>:P36_TYPE2</td>
    </tr>
    <td>Status</td>
    <td>:P36_STATUS</td>
    </tr>
    </table>
    </body>
    </html>
    kindly ignore div class="jive-quote" and div
    as it is generated by the forum software in the above coding. The above is working perfectly as i can able to see it in the table manner with a background color.
    The same thing it needs to work on in apex while clicking the button, the html table with contents has to be send as an email when an button is pressed, i tried with the below coding, but i couldnt able to see the HTML table with a background color, it is showing in the plain text only. it is not showng html table with a background color in it. This is the coding.
    DECLARE
    l_mail_id NUMBER;
    l_body VARCHAR2(4000);
    l_body_html VARCHAR2(4000);
    BEGIN
    l_body_html := '<html>'||
    ' <head><title>Report 1</title>'||
    '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">'||
    '<base href="http://erpdev01.ti.com:7777/pls/apex/" />'||
    '<style type="text/css">'||
    'table.apex_ir_html_export {'||
    'background-color:#F2F2F5;'||
    'border-width:1px 1px 0px 1px;'||
    'border-color:#C9CBD3;border-style:solid;}'||
    'table.apex_ir_html_export td {'||
    'color:#000000;'||
    'font-family:Tahoma,Arial,Helvetica,Geneva,sans-serif;'||
    'font-size:9pt;'||
    'background-color:#EAEFF5;'||
    'padding:8px;'||
    'background-color:#F2F2F5;'||
    'border-color:#ffffff #ffffff #cccccc #ffffff;'||
    'border-style:solid solid solid solid;'||
    'border-width:1px 0px 1px 0px;'||
    '}'||
    'table.apex_ir_html_export th {'||
    'font-family:Tahoma,Arial,Helvetica,Geneva,sans-serif;'||
    'font-size:9pt;'||
    'padding:8px;'||
    'background-color:#CFE0F1;'||
    'border-color:#ffffff #ffffff #cccccc #ffffff;'||
    'border-style:solid solid solid none;'||
    'border-width:1px 0px 1px 0px;'||
    'white-space:nowrap;'||
    '}'||
    '</style>'||
    '</head>'||
    '<style type="text/css">'||
    'body{font-family: Arial, Helvetica, sans-serif;'||
                        'font-size:10pt;'||
                        'margin:30px;'||
                        'background-color:#ffffff;}'||
    'span.sig{font-style:italic;'||
    'font-weight:bold;'||
    'color:#811919;}'||
    '</style>'||
    '</head>'||
    '<body>'||utl_tcp.crlf;
    l_body_html :=
    '<table border="0" cellpadding="0" cellspacing="0" class="apex_ir_html_export">'||
    '<thead><tr><th id=></th><th id=></th></tr></thead>'||
    '<tr><td>Employee Number</td><td>'||:P36_EMPLOYEE_NUMBER||'</td></tr>'||
    '<tr><td>Reason</td><td>'||:P36_Reason||'</td></tr>'||
    '<td>Position Title</td><td>'||:P36_POSITION_TITLE||'</td></tr>'||
    '<td>Qualification Displayed</td><td>'||:P36_QUALIFICATION_DISPLAYED||'</td></tr>'||
    '<td>Qualification Title</td><td>'||:P36_QUALIFICATION_TITLE||'</td></tr>'||
    '<td>Mobile Number</td><td>'||:P36_MOBILE_NUMBER||'</td></tr>'||
    '<td>Desk Number</td><td>'||:P36_DESK_NUMBER||'</td></tr>'||
    '<td>Fax Number</td><td>'||:P36_FAX_NUMBER||'</td></tr>'||
    '<td>Email Address</td><td>'||:P36_EMAIL||'</td></tr>'||
    '<td>Effective Date</td><td>'||:P36_EFFECTIVE_DATE||'</td></tr>'||
    '<td>Location</td><td>'||:P36_LOCATION||'</td></tr>'||
    '<td>Type-I</td><td>'||:P36_TYPE1||'</td></tr>'||
    '<td>Type-II</td><td>'||:P36_TYPE2||'</td></tr>'||
    '<td>Status</td><td>'||:P36_STATUS||'</td></tr></table>'||utl_tcp.crlf;
    l_body_html := l_body_html ||'<p>Thank you for your interest in the <strong>APEX MAIL</strong></p>'||utl_tcp.crlf;
    l_body_html := l_body_html ||' Sincerely,
    '||utl_tcp.crlf;
    l_body_html := l_body_html ||' <span class="sig">The APEX Dev Team</span>
    '||utl_tcp.crlf;
    l_body := 'Request for an Salary Certificate Request'||utl_tcp.crlf;
    l_mail_id := apex_mail.send(
    p_to => '<[email protected]>',
    p_bcc => '<[email protected]>',
    p_from => :P36_EMAIL,
    p_body => l_body,
    p_body_html => l_body_html,
    p_subj => 'Salary Certificate Request With Request No' ||:P36_DIS_REQ_ID
    apex_mail.push_queue();
    END;
    kindly ignore div class="jive-quote" and div in the above codings too.
    Why it is not generating in a table via email, what is the issue.
    Thanks
    Saro.
    Edited by: Saro on May 17, 2011 12:50 PM

    Hello Saro,
    first of all: the html code you are generating is not valid html. There is no closing body and html tag. Ther eis one closing head tag to much. In your table many opening row tags are missing.
    second: have a closer look at what you are doing with your variable l_body_html. At first, you add your styles to it and then you overwrite it with your table instead of adding it.
    Regards,
    Dirk

  • HTML Table with alternative row color, Using SQL XML

    Hi,
    I want to send out an email and the email body contains a table with data. I am using SQL to create the HTML table and to populate values inside the table. Below is the code I have so far
    DECLARE
    @HTML NVARCHAR(MAX)
    IF (SELECT
    COUNT(*)
    from Employee])
    != 0
    Begin
    SET
    @HTML =
    '<html><style>
          tr:nth-of-type(even) {
          background-color:#ccc;
    </style><body><h1 style="font-family:Tahoma; font-size:12px;">Hi,</h1>'
    +
    'Below is the report'+
    '<br></br>'+
    '<table border="1" width="100%" style="border:1px solid #77bfe4;font-family:Tahoma; font-weight:normal; font-size:12px;" cellpadding="4" cellspacing="0">'
    +
    '<tr bgcolor="yellow" style="font-family:Tahoma; font-weight:bold; font-size:12px;"><td colspan="2"><center>Report</center></td></tr>'+
    '<tr bgcolor="Blue" style="font-family:Tahoma; font-weight:bold; font-size:12px;"><td><center>Col1</center></td><td><center>col2</center></td></tr>'
    +
    CAST((
    Select
    td =
    col1, '',
    td
    = col2
    , '' from
    (Select ID as col1, Emp as Col2
    from
    Employee) E
    FOR XML
    PATH('tr'),
    TYPE
    AS NVARCHAR(MAX))
    + '</table><br>Thank you</br></body></html>'
    END
    select
    ISNULL(@HTML,'NoEmail')
    But I am having trouble generating alternative colors for each row (tr:nth-of-type(odd) is not working for me)
    Below is what the table should look like 
    Please help.
    Thank you for your help in advance. 

    Thank you for the response, I got the code to work.
    DECLARE @HTML NVARCHAR(MAX) ;
    IF (SELECT COUNT(*) from Employee]) != 0
    Begin
    SET @HTML = '<h1 style="font-family:Tahoma; font-size:12px;">Hi,</h1>' +
    'Below is the report'+
    '<br></br>'+
    '<table border="1" width="100%" style="border:1px solid #77bfe4;font-family:Tahoma; font-weight:normal; font-size:12px;" cellpadding="4" cellspacing="0">' +
    '<tr bgcolor="yellow" style="font-family:Tahoma; font-weight:bold; font-size:12px;"><td colspan="2"><center>Report</center></td></tr>'+
    '<tr bgcolor="Blue" style="font-family:Tahoma; font-weight:bold; font-size:12px;"><td><center>Col1</center></td><td><center>col2</center></td></tr>' +
    CAST(( SELECT CASE when (ROW_NUMBER() over (Order by Col1 DESC))%2 = 0 then '#E0E0E0' else 'white' END as "@bgcolor", '',
    td = col1, '',
    td = col2 , '' from
    (Select ID as col1, Emp as Col2
    from Employee) E
           FOR XML PATH('tr'), TYPE
    ) AS NVARCHAR(MAX)) + '</table><br>Thank you</br></body></html>'
    END
    select ISNULL(@HTML,'NoEmail')

  • Excel issues with importing CSV or HTML table data from URL - Sharepoint? Office365?

    Greetings,
    We have a client who is having issues importing CSV or HTML table data as one would do using Excel's Web Query import from a reporting application.  As the error message provided by Excel is unhelpful I'm reaching out to anyone who can help us begin to
    troubleshoot problems affecting what is normal standard Excel functionality.  I'd attach the error screenshot, but I can't because my account is not verified....needless to say it says "Microsoft Excel cannot access  the file https://www.avantalytics.com/reporting_handler?func=wquery&format=csv&logid=XXXX&key=MD5
    Where XXXX is a number and MD5 is an md5 code.  The symptoms stated in the error message are:
    - the file name or path does not exist
    -The file is being used by another program
    -The workbook you are trying to save has the same name as a currently open workbook.
    None of these symptoms are the case, naturally. The user encountered this with Excel2010, she was then upgraded to Excel2013 and is still experiencing the same issue. The output of this URL in a browser (IE, Chrome, Firefox) is CSV data for the affected
    user, so it is not a network connectivity issue.  In our testing environment using both Excel2010 or 2013 this file is imported successfully, so we cannot replicate.  The main difference I can determine between our test environment and the end-user
    is they have a Sharepoint installation and appear to have Office365 as well.
    So,  my question might more appropriately be for Sharepoint or Office365 folks, but I can't be sure they're  a culprit.  Given this - does anyone have any knowledge of issues which might cause this with Sharepoint or Office365 integrated with
    Excel and/or have suggestions for getting more information from Excel or Windows other than this error message?  I've added the domain name as a trusted publisher in IE as I thought that might be the issue, but that hasn't solved anything.  As you
    can see its already https and there is no authentication or login - the md5 key is the authentication.  The certificate for the application endpoint is valid and registered via GoDaddy CA.
    I'm at a loss and would love some suggestions on things to check/try.
    Thanks  -Ross

    Hi Ross,
    >> In our testing environment using both Excel 2010 and 2013 this file is imported successfully, so we cannot replicate.
    I suspect it is caused by the difference of web server security settings.
    KB: Error message when you use Web query to a secure Web page (HTTPS://) in Excel: "Unable to open"
    Hope it will help.
    By the way, this forum is mainly for discussing questions about Office Development (VSTO, VBA and Apps for Office .etc.). For Office products feature specific questions, you could consider posting them on
    Office IT Pro forum or Microsoft Office Community.
    Regards,
    Jeffrey
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Export to excel with javascript/vbscript or with plsql(html table)

    i have searched for a way to export data from OracleXe to excel without losing formatting .
    So far i have found 2 possible relatively easy ways that i am still researching
    (i do not include the ask tom sylk format way of exporting )
    1 to export the query to a html table, while using stylesheets for formatting
    (using microsoft specific styles)
    2. use of javascript/vbscript to fill an array and write this array to excel with use
    of visual basic for applications in excel.This also provides charting capabilities.
    I am still researching this two ways, and have
    encountered a few obstacles (help would be appreciated)
    1 the first way:
    a. create a button " export to excel"
    b. create the following pl/sql procedure:
    owa_util.mime_header('application/vnd.ms-excel');
    owa_util.http_header_close;
      HTP.PRINT('<html>');
      HTP.PRINT('<head>');
      HTP.PRINT('<meta http-equiv="Content-Type" content="text/html">');
      HTP.PRINT('<title>Title of the HTML File</title>');
      HTP.PRINT('</head>');
      HTP.PRINT('<body TEXT="#000000" BGCOLOR="#FFFFFF">');
      HTP.PRINT('<h1>Heading in the HTML File</h1>');
      HTP.PRINT('<p>Some text in the HTML file.');
      HTP.PRINT('</body>');
      HTP.PRINT('</html>');
    htmldb_application.g_page_text_generated := true;
    htmldb_application.g_unrecoverable_error := true;
    c: run the procedure conditionally based on the button  "export to excel"
    the problem with this way is that using htmldb_application.g_unrecoverable_error := true; is not the ideal way, because it
    stops further processing, but if i leave it out, the export doesn't happen.
    To export to excel while retaining data formatting  you have to use microsoft excel
    specific styles(Seedocumentation on the microsoft site)
    2.The second way:
    a create a pl/sql procedure or sql query.
    b use this query to fill a vbscript/javascript array with values
    c write these values to excel with use of vba in excel :
    the obstacle i encountered here was that i dont know how to export the result of a
    query to a visual basic script or javascript array.

    Using approach 1) works fine for me.
    the problem with this way is that using htmldb_application.g_unrecoverable_error := true;
    is not the ideal way, because it
    stops further processing, but if i leave it out, the export doesn't happen. Why is this a problem?
    I created the button to export the excel file on page 1 and created your pl/sql procedure on page 2 using an onload process.
    Works fine.
    Other approaches for exporting to excel are:
    http://www.oracle.com/technology/pub/articles/saternos_broadcast.html
    http://htmldb.oracle.com/pls/otn/f?p=18326:54:5685133631021176591::::P54_ID:1962
    ~Dietmar.

  • Please!!!!!!   How can i add rows in html table dynamically [use jsp,bean]

    hello, i am a fresher in jsp. i want to add new rows in html table dynamically.In my coding, just only shows in one row . please help my problem with correct coding and i don't want to use database. Thanks ...............!
    Here is my coding-------------------
    ---------------- form.jsp --------------------->
    <%@ page import="java.util.*,newtest1.Validation" %>
    <jsp:useBean id="mybean" scope="page" class="newtest1.Validation" />
    <jsp:setProperty name="mybean" property="name" param="name" />
    <jsp:setProperty name="mybean" property="age" param="age" />
    <% s[i][j] %>
    <html>
    <head><title>Form</title></head>
    <body>
    <form method="get">
    <table border="0" width="700">
    <tr>
    <td width="150" align="right">Name</td>
    <td width="550" align="left"><input type="text" name="name" size="35"></td>
    </tr>
    <tr>
    <td width="150" align="right">Age</td>
    <td width="550" align="left"><input type="text" name="age" size="35"></td>
    </tr>
    </table>
    <table width="100%" border="0" cellspacing="0" cellpadding="5">
    <tr><td> </td></tr>
    <tr><td><input type="submit" name="submit" value="ADD"></td></tr>
    <tr><td> </td></tr>
    <tr><td width="100%" align="center" border=1>
    <% int count=mybean.getStart();
    for(int i=count; i<count+1; i++) { %>
    <tr>
    <td><jsp:getProperty name="mybean" property="name" /></td>
    <td><jsp:getProperty name="mybean" property="age" /></td>
    <td><%= count %></td>
    <% count+=1; %>
    </tr>
    <% } %></td></tr>
    </table>
    </form>
    </body>
    </html>
    ----------------- Validation.java ----------------->
    package newtest1;
    import java.util.*;
    public class Validation {
    private String name;
    private String age;
    static int start=0;
    public Validation() {    name=null;
    age=null;
    ++start;}
    public void setName(String username) { if(username!="")
    name=username;
    public String getName() { return name;  }
    public void setAge(String userage) {  if (age!="")
    {age=userage;}
    public String getAge() {  return age;   }
    public int getStart() {
    return start; }

    Hi, Do you mean to say,
    You have an HTML page in which you have a text field and an add button. If you enter anything in that text field and click on Add button the text field contents should be displayed in the same HTML page and you should be able to go on entering new values into the text field and you should be able to retain and display all the previously entered values..
    and finally the list of added items are not stored in the database..
    If this is the case
    i. Your html form should be submitted to the same page.
    ii. You need to have a Vector which holds the entered values.
    iii. Bind the vector object to the request object and collect the same vector object from the request and display its contents...
    I think this would help...

  • How to convert html table with all its css properties into excel , by javascript or jQuery

    hi,
    <script type="text/javascript">
    //working java script
    function CreateExcelSheet()
    var x = Table1.rows
    var xls = new ActiveXObject("Excel.Application")
    xls.Workbooks.Add
    for (i = 0; i < x.length; i++) {
    var y = x[i].cells
    for (j = 0; j < y.length; j++) {
    xls.Cells(i + 1, j + 1).Value = y[j].innerText
    } xls.visible = true
    function write_to_excel()
    str = "";
    debugger;
    var mytable = document.getElementsByTagName("table")[0];
    var rowCount = mytable.rows.length;
    var colCount = mytable.getElementsByTagName("tr")[0].getElementsByTagName("td").length;
    var ExcelApp = new ActiveXObject("Excel.Application");
    var ExcelSheet = new ActiveXObject("Excel.Sheet");
    debugger;
    ExcelSheet.Application.Visible = true;
    for (var i = 0; i < rowCount; i++)
    for (var j = 0; j < colCount; j++)
    str = mytable.getElementsByTagName("tr")[i].getElementsByTagName("td")[j].innerText;
    ExcelSheet.ActiveSheet.Cells(i + 1, j + 1).Value = str;
    //new funtion
    function ExportToExcel(mytblId) {
    debugger;
    var htmltable = document.getElementById('Table1');
    var html = htmltable.innerHTML;
    window.open('data:application/vnd.ms-excel,' + encodeURIComponent(html));
    //new funtion 2
    function write_to_excel2() {
    str = "";
    debugger;
    var mytable = document.getElementById("Table1");
    var rowCount = mytable.rows.length;
    var colCount = mytable.getElementsByTagName("tr")[0].getElementsByTagName("th").length;
    var ExcelApp = new ActiveXObject("Excel.Application");
    var ExcelSheet = new ActiveXObject("Excel.Sheet");
    //ExcelSheet.Application.Visible = true;
    for (var i = 0; i < rowCount; i++)
    for (var j = 0; j < colCount; j++)
    debugger;
    // if (i == 0) {
    // str = mytable.getElementsByTagName("tr")[i].getElementsByTagName("th")[j].innerText;
    str = mytable.getElementsByTagName("tr")[i].getElementsByTagName("td")[j].innerText;
    ExcelSheet.ActiveSheet.Cells(i + 1, j + 1).Value = str;
    ExcelSheet.autofit;
    ExcelSheet.Application.Visible = true;
    DisplayAlerts = true;
    CollectGarbage();
    //csss
    function excelExportHtml(Table1, css1)
    debugger;
    if (css1) {
    var styles = [];
    //grab all styles defined on the page
    $("style").each(function(index, domEle) {
    styles.push($(domEle).html());
    //grab all styles referenced by stylesheet links on the page
    var ajaxCalls = [];
    $("[rel=stylesheet]").each(function() {
    ajaxCalls.push($.get(this.href, '', function(data) {
    styles.push(data);
    return $.when.apply(null, ajaxCalls)
    .then(function() {
    return "<html><style type='text/css'>" + styles.join("\n") + "</style>\n" + table.outerHTML + "</html>";
    else {
    return $.when({ owcHtml: Table1.outerHTML })
    .then(function(result) {
    return "<html>" + result.owcHtml + "</html>";
    //new
    function ExportToExcel() {
    $(document).ready(function() {
    $("#btnExport").click(function(e) {
    window.open('data:application/vnd.ms-excel,' + $('#Table1').html());
    alert("jhhklhhklhklh");
    //new
    $(document).ready(function() {
    debugger;
    $("[id$=myButtonControlID]").click(function(e) {
    window.open('data:application/vnd.ms-excel,' + $('div[id$=divTableDataHolder]').html());
    e.preventDefault();
    alert("k");
    function excel()
    {debugger;
    var tableToExcel = (function() {
    var uri = 'data:application/vnd.ms-excel;base64,'
    , template = '<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--></head><body><table>{table}</table></body></html>'
    , base64 = function(s) { return window.btoa(unescape(encodeURIComponent(s))) }
    , format = function(s, c) { return s.replace(/{(\w+)}/g, function(m, p) { return c[p]; }) }
    return function(table, name) {
    if (!table.nodeType) table = document.getElementById(table)
    var ctx = { worksheet: name || 'Worksheet', table: table.innerHTML }
    window.location.href = uri + base64(format(template, ctx))
    </script>
    i have tried all the above java script and jquery to convert an html table to excel, data are exporting correctly but i want that css of the table should also implent to excel thats not happening,even the property defined inside td and tr aare not implementing
    in excel

    Hi avinashk89,
    Welcome to post in MSDN forums.
    This is not the right forum for your question. Please post in
    ASP.NET forums where you could get better support.
    Thanks for your understanding.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Choosing which table is used for results

    To make this simple I am going to use two dimension tables and one fact table.
    If you were to have two dimension tables. One for Country and one for Region.
    Then you have one fact table which shows transactions at the Region Level, but Country is also in the PK for the table. So there is a join from Country to F1 and another from Region to F1.
    When I select Country and Region in my query and no fact, it is using the fact table to get the results. The problem with this is that if there are no transactions for a given Region then the data does not exist. I would like the result to pull from the Country Dimension for Country and the Region Dimension for Region.
    Any help is greatly appreciated.

    Hi user10800227,
    So if I understand your situation correctly, you have the following going on:
    TABLES)
    COUNTRY_DIM
    REGION_DIM
    FACT
    JOINS)
    REGION_DIM.F1 1-to-many FACT.F1 many-to-one COUNTRY_DIM.F1 (INNER JOINS)
    In your report, you pull one field from COUNTRY_DIM and one field from REGION_DIM.
    Assuming that the above is correct, then what you are seeing is the right behavior. Each Answer Request is sent out as a single query. So when you pull a field from REGION_DIM and COUNTRY_DIM, OBIEE has to find a way to join those two tables together in a single query. Based on the metadata you setup in the RPD, OBIEE sees that the proper way to relate a REGION_DIM record to a COUNTRY_DIM record is through the FACT table. So when it generates SQL it joins REGION_DIM to the FACT, and the FACT to COUNTRY_DIM. Hence, if all your joins are inner joins, then if there are no transactions for a given COUNTRY&REGION combination, you won't see it in your list.
    If you want to see all the data points, you might want to make that join an outer join in the repository.
    Your other option is to use Nico's data densification technique. Visit this link for details: http://gerardnico.com/wiki/dat/obiee/logical_sql/obiee_sql_densification
    Good luck and if you found this post useful, please award points!
    Best regards,
    -Joe

  • Do you need to generate HTML table rows from XML in InDesign?

    General issue: you export XML and you get a bunch of content for xml elements that were a table in inDesign. But they don't have any rows, just cell after cell. What will make rows in your output?
    Solution: XSLT; you need to use the @aid:tcols attribute of exported XML to determine the number of columns that your table should be. This is written in XSLT 1.1 so it shoud work with an export from InDesign. If you have problems with using it on export of XML, try using it on the XML afetr it has been exported, in Oxygen or other XSLT processor. Best to save acopy of your files before using the XSLT with them.  Copy all of the plain text and past into a new file, save with your own filename, ending with .xsl file extension. Then when exporting XML from InDesign CS3-5, browse to your new .xsl file and select it. PLEASE read about XSLT files at w3c.schools or other resource if you want to understand what is going on with this file.
    BTW <!-- indicates comments in code -->
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- NO WARRANTY that this example code will work as written for your XML file in InDesign. You can add more templates to the output to map your heading styles to h1, h2, etc. -->
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.1"
        xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/"
        xmlns:aid5="http://ns.adobe.com/AdobeInDesign/5.0/" exclude-result-prefixes="xsl aid aid5">
        <xsl:output method="html" indent="yes" encoding="UTF-8"
            doctype-public="http://www.w3.org/TR/xhtml/DTD/xhtml-transitional.dtd"/>
    <!-- parameter to use the name of element with attribute aid:theader as the th output -->
        <xsl:param name="tableElem">//*[local-name()][@aid:table='table']</xsl:param>
        <xsl:param name="colheadStyle">
            <xsl:value-of select="//*[local-name()][@aid:theader][1]"/>
            <!-- i.e. colHead-->
        </xsl:param>
    <!-- parameter to use the name of element with attribute aid:cell but not aid:theader as the td  output -->
    <!--i.e. tabletext or whatever the name of your Cell level  element is in InDesign -->
        <xsl:param name="cellStyle">
            <xsl:value-of select="//*[local-name()][@aid:table='cell' and not(@aid:theader)][1]"/>
        </xsl:param>
        <!-- handles a Story element marked up with HTML-type elements, but uses the <Table> element of IDD  -->
        <!-- if a true HTML table is in the content, it will be passed through -->
        <xsl:template match="Story"><!-- make a basic HTML file from a Story -->
            <html>
                <head>
                    <title>Sample Table</title>
                </head>
                <body>
                    <xsl:apply-templates><!-- will handle direct text of the  <Story>, and <Table> -->
                        <xsl:with-param name="colheadStyle" select="$colheadStyle"/>
                        <xsl:with-param name="cellStyle" select="$cellStyle"/>
                    </xsl:apply-templates>  
                </body>
            </html>
        </xsl:template>
       <!-- use the styles to find the elements of IDD <Table> element -->
        <xsl:template match="Table">
            <xsl:param name="colheadStyle">
                <xsl:value-of select="$colheadStyle"/>
            </xsl:param>
            <xsl:param name="cellStyle">
                <xsl:value-of select="$cellStyle"/>
            </xsl:param>
            <xsl:variable name="cellsPerRow">
                <xsl:value-of select="@aid:tcols"/>
            </xsl:variable>
            <table><!-- start the table -->
                <!-- xhtml requires lower-case name for table element-->
                <tr>
                    <xsl:apply-templates select="*[@aid:theader='']">
                        <xsl:with-param name="colheadStyle" select="$colheadStyle"/>
                        <xsl:with-param name="cellStyle" select="$cellStyle"/>
                    </xsl:apply-templates>
                </tr>
                <!--  and @aid:style=$cellStyle -->
                <xsl:for-each
                    select="*[@aid:table='cell'][not(@aid:theader='')][position() mod $cellsPerRow = 1]">
    <!-- some code adapted with  permission, from http://www.computorcompanion.com/LPMArticle.asp?ID=202
    Building HTML Tables with XSL by James Byrd; please include this acknowledgement in all files that use his code -->
    <!-- this is the tricky bit of the code that James Byrd set up
    p-class-tabletext-[position() mod $cellsPerRow = 1 continues looping until the position of the active element divided by $cellperRow (@aid:tcols value) tried with [@aid:style=$cellStyle] has a remainder of 1 -->
    <!--  .|following-sibling::p-class-tabletext-[position() &lt;  $cellsPerRow] applies first to the currently selects cell with "." then continues with the following-siblings whose position is less than  the value of cells per row (@aid:tcols value) -->
                    <tr>
                        <xsl:apply-templates
                            select=".|following-sibling::*[@aid:table='cell'][not(@aid:theader='')][position() &lt; $cellsPerRow]"
                        />
                    </tr>
                </xsl:for-each>
            </table>
        </xsl:template>
        <xsl:template match="*">
            <xsl:param name="colheadStyle">
                <xsl:value-of select="$colheadStyle"/>
            </xsl:param>
            <xsl:param name="cellStyle">
                <xsl:value-of select="$cellStyle"/>
            </xsl:param>
            <xsl:variable name="cellsPerRow">
                <xsl:value-of select="parent::Table/@aid:tcols"/>
            </xsl:variable>
            <xsl:choose>
                <!-- colHead aid:table="cell" aid:theader=""-->
                <xsl:when test="parent::Table and @aid:theader">
                    <th>
                        <xsl:apply-templates>
                            <xsl:with-param name="colheadStyle" select="$colheadStyle"/>
                            <xsl:with-param name="cellStyle" select="$cellStyle"/>
                        </xsl:apply-templates>
                    </th>
                    <xsl:if test="(position() = last()) and (position() &lt; $cellsPerRow)">
                        <xsl:call-template name="FillerCells">
                            <xsl:with-param name="cellCount" select="$cellsPerRow - position()"/>
                        </xsl:call-template>
                    </xsl:if>
                </xsl:when>
                <xsl:when test="parent::Table and @aid:table='cell' and not(@aid:theader)">
                    <td>
                        <xsl:apply-templates>
                            <xsl:with-param name="colheadStyle" select="$colheadStyle"/>
                            <xsl:with-param name="cellStyle" select="$cellStyle"/>
                        </xsl:apply-templates>
                    </td>
                    <xsl:if test="(position() = last()) and (position() &lt; $cellsPerRow)">
                        <xsl:call-template name="FillerCells">
                            <xsl:with-param name="cellCount" select="$cellsPerRow - position()"/>
                        </xsl:call-template>
                    </xsl:if>
                </xsl:when>
    <!-- for non-table elements this generic element handler will  pick up an aid:pstyle (if present) and create a class attribute from it. Works for any element that has the same name as HTML element such as <p> but it doesn't add wrapper elements like <ul> or <ol> for lists. -->
                <xsl:otherwise>
                    <xsl:element name="{name()}">
                        <xsl:if test="@aid:pstyle">
                            <xsl:attribute name="class">
                                <xsl:value-of select="@aid:ptyle"/>
                            </xsl:attribute>
                        </xsl:if>
                        <xsl:apply-templates>
                            <xsl:with-param name="colheadStyle" select="$colheadStyle"/>
                            <xsl:with-param name="cellStyle" select="$cellStyle"/>
                        </xsl:apply-templates>
                    </xsl:element>
                </xsl:otherwise>
            </xsl:choose>
        </xsl:template>
        <!-- take care of text that is a direct child of the <Story> by wrapping it in a <p> to make valid HTML -->
        <xsl:template match="text()">
            <xsl:variable name="myString">
                <xsl:value-of select="string-length(normalize-space(.))"/>
            </xsl:variable>
            <xsl:choose>
                <xsl:when test="parent::Story">
                    <xsl:if test="$myString > 0">
                        <xsl:element name="p">
                            <xsl:attribute name="class">text</xsl:attribute>
                            <xsl:value-of select="normalize-space(.)"/>
                        </xsl:element>
                    </xsl:if>
                </xsl:when>
                <xsl:otherwise>
                    <xsl:value-of select="normalize-space(.)"/>
                </xsl:otherwise>
            </xsl:choose>
        </xsl:template>
       <!-- make br element conform to good HTML markup -->
        <xsl:template match="br">
            <br />
        </xsl:template>
        <!-- this recursive template calls itself until its test condition is satified -->
        <!-- it outputs a cell whose only content is a non-breaking space -->
        <!-- do not use   in place of Unicode &#160; for the non-breaking space -->
        <!-- the value of $cellCount is set in the main XSL template -->
        <xsl:template name="FillerCells">
            <xsl:param name="cellCount"/>
            <td>&#160;</td>
            <xsl:if test="$cellCount > 1">
                <xsl:call-template name="FillerCells">
                    <xsl:with-param name="cellCount" select="$cellCount - 1"/>
                </xsl:call-template>
            </xsl:if>
        </xsl:template>
    </xsl:stylesheet>
    Message was edited by: HoneoyeFalls
    Sample XML file exported from IDD
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Story><Table xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/" xmlns:aid5="http://ns.adobe.com/AdobeInDesign/5.0/" aid:table="table" aid:trows="2" aid:tcols="2"><colHead aid:table="cell" aid:theader="" aid:crows="1" aid:ccols="1" aid:ccolwidth="44">1 colHead</colHead><colHead aid:table="cell" aid:theader="" aid:crows="1" aid:ccols="1" aid:ccolwidth="56">2 colHead</colHead><tabletext aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="44">1 tabletext</tabletext><tabletext aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="56">2 tabletext</tabletext><tabletext aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="44">row 2 1 tabletext</tabletext><tabletext aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="56">row 2 2 tabletext</tabletext></Table>
    <table><tr><th>normal HTML table heading</th></tr>
    <tr><td>normal HTML table<br/>cell text</td></tr></table></Story>

    You can use RECORD type declaration:
    SQL> declare
      2   type rec_type is record (
      3    ename emp.ename%type,
      4    sal emp.sal%type
      5   );
      6   type rc is ref cursor return rec_type;
      7   rc1 rc;
      8   rec1 rec_type;
      9  begin
    10   open rc1 for select ename, sal from emp;
    11   loop
    12    fetch rc1 into rec1;
    13    exit when rc1%notfound;
    14    dbms_output.put_line(rec1.ename || ' ' || rec1.sal);
    15   end loop;
    16   close rc1;
    17  end;
    18  /
    SMITH 800
    ALLEN 1600
    WARD 1250
    JONES 2975
    MARTIN 1250
    BLAKE 2850
    CLARK 2450
    SCOTT 3000
    KING 5000
    TURNER 1500
    ADAMS 1100
    JAMES 950
    FORD 3000
    MILLER 1300or use, for example, VIEW to declare rowtype:
    SQL> create view dummy_view as select ename, sal from emp;
    View created.
    SQL> declare
      2   type rc is ref cursor return dummy_view%rowtype;
      3   rc1 rc;
      4   rec1 dummy_view%rowtype;
      5  begin
      6   open rc1 for select ename, sal from emp;
      7   loop
      8    fetch rc1 into rec1;
      9    exit when rc1%notfound;
    10    dbms_output.put_line(rec1.ename || ' ' || rec1.sal);
    11   end loop;
    12   close rc1;
    13  end;
    14  /
    SMITH 800
    ALLEN 1600
    WARD 1250
    JONES 2975
    MARTIN 1250
    BLAKE 2850
    CLARK 2450
    SCOTT 3000
    KING 5000
    TURNER 1500
    ADAMS 1100
    JAMES 950
    FORD 3000
    MILLER 1300 Rgds.

Maybe you are looking for

  • Gonna Take my G5 in for service (Applecare) What to expect?

    Hey guys, years ago i bought my beloved dual G5. This thing has served me INCREDIBLY well and has taken some serious abuse, not physically, but constant rendering 24/7, heavy audio recording, more rendering+assigning net-rendering, basically one huge

  • Adobe PDF presets...

    I have an ID file open... I go to File... Adobe PDF presets... smallest file size. The Save As dialog box comes up with a different file name than the file that I have open and trying to convert to a PDF. This happens occasionally... most the time th

  • Adobe Camera Raw (ACR), Jpeg Files and Metadata

    I have been using Adobe Camera Raw (ACR) with my Canon EOS 30D, an 8 MP camera, for a while now. I would make non-destructive changes to the raw file (.CR2) in ACR where the changes would be stored in an adjoining .xmp file. Jpegs of the unedited and

  • BB App World Icon Missing After Upgrading to OS 4.0.0.65

    Hi, i'm using blackberry bold 9780. after upgrading to OS 4.0.0.65 my BB app world was missing. i have tried to reboot and re-install the app world but it doesn't work... appreciate that someone can resolve this.. Solved! Go to Solution.

  • Planning at client level for raw materials

    HI all,              I've several plants under one company code, sometimes same raw materials are used to produce finished products in various plants. Here, we are using central purchasing department to procure the raw materials. For instance, in pla