How to Generate Report on HTML?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • NeOnSQL
    New Member
    • Oct 2011
    • 4

    How to Generate Report on HTML?

    0 down vote favorite
    share [fb] share [tw]


    I want to make report using HTML from Planon (it's a CMMS application).

    I have this html code:
    Code:
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252" /> 
    <title>List of Stock Items Sorted by Code</title>
    <STYLE TYPE="text/css">
    	thead {color:green}
    	tbody {color:blue;height:50px}
    	table.PrintForm
    	{
    		width: 620px;
    		font-family: Verdana, sans-serif, Arial;
    		border: 1px #000000 solid;
    		border-collapse: collapse;
    		border-spacing: 0px;
    			}
    	td.HeaderForm
    	{ 
    		border: 1px #000000 solid;
    	}
    	td.LabelForm
    	{ 
    		border-bottom: 1px #6699CC dotted;
    		text-align: left;
    		font-family: Verdana, sans-serif, Arial;
    		font-weight: bold;
    		font-size: .7em;
    		padding-top: 4px;
    		padding-bottom: 4px;
    		padding-left: 8px;
    		padding-right: 0px; 
    	}
    	td.LabelSimple
    	{ 
    		text-align: left;
    		font-family: Verdana, sans-serif, Arial;
    		font-weight: bold;
    		font-size: .7em;
    		padding-top: 4px;
    		padding-bottom: 4px;
    		padding-left: 8px;
    		padding-right: 0px; 
    	}
    	td.SubTitle
    	{ 
    		border-bottom: 1px #6699CC dotted;
    		text-align: left;
    		font-family: Verdana, sans-serif, Arial;
    		font-weight: bold;
    		font-size: .9em;
    		padding-top: 4px;
    		padding-bottom: 4px;
    		padding-left: 10px;
    		padding-right: 0px; 
    	}
    	td.ValueForm
    	{ 
    		border-bottom: 1px #6699CC dotted;
    		text-align: left;
    		font-family: Verdana, sans-serif, Arial;
    		font-weight: normal;
    		font-size: .7em;
    		padding-top: 4px;
    		padding-bottom: 4px;
    		padding-left: 8px;
    		padding-right: 0px; 
    	}
    	td.ValueSimple
    	{ 
    		text-align: left;
    		font-family: Verdana, sans-serif, Arial;
    		font-weight: normal;
    		font-size: .7em;
    		padding-top: 4px;
    		padding-bottom: 4px;
    		padding-left: 8px;
    		padding-right: 0px; 
    	}
    td.ValueBold
    	{ 
    		text-align: left;
    		font-family: Verdana, sans-serif, Arial;
    		font-weight: bold;
    		font-size: .7em;
    		padding-top: 4px;
    		padding-bottom: 4px;
    		padding-left: 8px;
    		padding-right: 0px; 
    	}
    	br 
    	{ line-height:2 px; } 
    
    	.textAr { 
    		visibility: hidden; 
    		width: 1%;
    		height: 1px ;
    	} 
    	table.BR_SR1
    	{
    	 border-bottom: 1px #6699CC dotted;
    	  text-align: left;
    	  font-family: Verdana, sans-serif, Arial;
    	  font-weight: normal;
    	  font-size: .8em;
    	  padding-top: 4px;
    	  padding-bottom: 4px;
    	  padding-left: 8px;
    	  padding-right: 0px; 
    	}
    	
    </STYLE>
    
    </head>
    <body >
    
    
    <table class="PrintForm" cellspacing="0" >
    	<tr>
    		<td class="HeaderForm" ><img src="\\192.168.2.6\Data\Templates\images\strata-hestia.gif" ></td>
    		<!--<td class="HeaderForm" >
    		<table border="0">
    			<tr><td colspan="2" align ="center">&nbsp; Tools issue form n° &lt;Number&gt;</td></tr>
    			<tr><td align ="right">Store :</td><td align ="left">&lt;Property.Description&gt;</td></tr>
    		</table> 
    		</td>/-->
    	</tr>
    </table>
    
    <table class="PrintForm" cellspacing="0" >
    	<form>
    	<thead>
    	<tr>
    		<td class="ValueForm" colspan="3" >CODE</td>
    		<td class="ValueForm" colspan="3" >ITEMS</td>
    		<td class="ValueForm" colspan="3" >QTY</td>
    		<td class="ValueForm" colspan="3" >UNIT</td>
    		<td class="ValueForm" colspan="3" >PRICE</td>
    		<td class="ValueForm" colspan="3" >TOTAL</td>
    	</tr>
    	</thead>
    	
    	<tbody>
    	<tr>
    		<td class="ValueForm" colspan="3" id="code">&lt;Code&gt;</td>
    		<td class="ValueForm" colspan="3" id="item">&lt;Item Description&gt;</td>
    		<td class="ValueForm" colspan="3" id="qty">&lt;Qty&gt;</td>
    		<td class="ValueForm" colspan="3" id="unit">&lt;Unit&gt;</td>
    		<td class="ValueForm" colspan="3" id="price">&lt;Price&gt;</td>
    		<td class="ValueForm" colspan="3"id="total">&lt;Total&gt;</td>
    		
    		<script type="text/javascript">
    		listCode = document.getelementById("code").childNodes[0].nodeValue;
    		listItem = document.getelementById("item").childNodes[0].nodeValue;
    		listQty = document.getelementById("qty").childNodes[0].nodeValue;
    		listUnit = document.getelementById("unit").childNodes[0].nodeValue;
    		listPrice = document.getelementById("price").childNodes[0].nodeValue;
    		listTotal = document.getelementById("total").childNodes[0].nodeValue;
    		document.write(listCode + " " + listItem + " " + listQty + " " + listUnit + " " + listPrice + " " + listTotal);
    		</script>
    		
    	</tr>
    	</tbody>
    	</form>
    </table>
    
    </body>
    
    </html>
    Then I got this result https://picasaweb.google.com/lh/phot...eat=directlink

    The problem is, I couldn’t get all the list in one page when I preview it. I got one item only as shown on the link above. And the other items it opens on separate pages and it populates my internet explorer with so many items.

    Anyone, please help! How to put altogether the items in one page? Thank you in advanced!
  • drhowarddrfine
    Recognized Expert Expert
    • Sep 2006
    • 7434

    #2
    If you are saying your problem is with the data generator, then you are in the wrong forum. Your HTML is invalid. Validate for that list.

    Comment

    • NeOnSQL
      New Member
      • Oct 2011
      • 4

      #3
      Hi drhowarddrfine,

      I was trying to create that template on HTML to generate the report. It generates but on one item only that appear on the report. So you mean my HTML is wrong? That's why I came to this page to ask some help how to get it right...

      Comment

      • drhowarddrfine
        Recognized Expert Expert
        • Sep 2006
        • 7434

        #4
        What's confusing me is HTML does not generate reports. Yes, your HTML is wrong but that won't affect any report generation.

        Comment

        • NeOnSQL
          New Member
          • Oct 2011
          • 4

          #5
          I don't know, because I'm just new on HTML... so maybe I called it wrong... but on this

          Code:
           <td class="ValueForm" colspan="3" id="code">&lt;Code&gt;</td>
                  <td class="ValueForm" colspan="3" id="item">&lt;Item Description&gt;</td>
                  <td class="ValueForm" colspan="3" id="qty">&lt;Qty&gt;</td>
                  <td class="ValueForm" colspan="3" id="unit">&lt;Unit&gt;</td>
                  <td class="ValueForm" colspan="3" id="price">&lt;Price&gt;</td>
                  <td class="ValueForm" colspan="3"id="total">&lt;Total&gt;</td>
          codes it pulls data from other software...

          Comment

          • NeOnSQL
            New Member
            • Oct 2011
            • 4

            #6
            so this HTML template having this kind of code &lt;Code&gt; then list the corresponding code. If you see what it looks like this is the link https://picasaweb.google.com/lh/phot...eat=directlink, that is the output using that HTML template...

            Comment

            • drhowarddrfine
              Recognized Expert Expert
              • Sep 2006
              • 7434

              #7
              HTML does not pull data from anywhere. The data is inserted by other programs and, apparently, the CMS you mention. You'll have to look elsewhere for answers to that.

              Comment

              Working...