2004 IR Help Posted August 23, 2006 Share Posted August 23, 2006 By: Jose - josejose same jrxml, producing different html output 2005-09-22 11:13 Hi, An html report for same jrxml is generated using ireport and my application. ireport prints output correctly, my application do not. I am using the same browser to display both html. I am stuck with this for couple of days now. Could you Please help to figure out why this is happening.! Following is the jrxml and generated html. the generated html code look same in both cases. Only difference I noticed is that the ireport generated html when viewd in notepad shows all html tags wrapped together with a box character (linefeed ?) inbetween tags. The application generated html show the tags on separate lines. I am not sure this has anything to do with the problem. htmltest.jrxml ========== <?xml version="1.0" encoding="UTF-8" ?> <!-- Created with iReport - A designer for JasperReports --> <!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd"> <jasperReport name="htmltest" columnCount="1" printOrder="Vertical" orientation="Portrait" pageWidth="595" pageHeight="842" columnWidth="535" columnSpacing="0" leftMargin="30" rightMargin="30" topMargin="20" bottomMargin="20" whenNoDataType="NoPages" isTitleNewPage="false" isSummaryNewPage="false"> <property name="ireport.scriptlethandling" value="0" /> <import value="java.util.*" /> <import value="net.sf.jasperreports.engine.*" /> <import value="net.sf.jasperreports.engine.data.*" /> <background> <band height="0" isSplitAllowed="true" > </band> </background> <title> <band height="50" isSplitAllowed="true" > </band> </title> <pageHeader> <band height="50" isSplitAllowed="true" > </band> </pageHeader> <columnHeader> <band height="30" isSplitAllowed="true" > </band> </columnHeader> <detail> <band height="100" isSplitAllowed="true" > <staticText> <reportElement mode="Transparent" x="159" y="40" width="81" height="18" forecolor="#000000" backcolor="#FFFFFF" key="staticText-1" stretchType="NoStretch" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" lineSpacing="Single"> <font fontName="Arial" pdfFontName="Helvetica" size="10" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="Cp1252" isStrikeThrough="false" /> </textElement> <text><![CDATA[ é©©é></text> </staticText> </band> </detail> <columnFooter> <band height="30" isSplitAllowed="true" > </band> </columnFooter> <pageFooter> <band height="50" isSplitAllowed="true" > </band> </pageFooter> <lastPageFooter> <band height="50" isSplitAllowed="true" > </band> </lastPageFooter> <summary> <band height="50" isSplitAllowed="true" > </band> </summary> </jasperReport> ireport generated output (Correct output) ============================= é©©é ireport generated html source ====================== <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <style type="text/css"> a {text-decoration: none} </style> </head> <body text="#000000" link="#000000" alink="#000000" vlink="#000000"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr><td width="50%"> </td><td align="center"> <a name="JR_PAGE_ANCHOR_0_1"/> <table style="width: 595px" cellpadding=0 cellspacing=0 border=0 bgcolor=white> <tr> <td><img src="htmltest.html_files/px" style="width: 189px; height: 1px"></td> <td><img src="htmltest.html_files/px" style="width: 81px; height: 1px"></td> <td><img src="htmltest.html_files/px" style="width: 325px; height: 1px"></td> </tr> <tr valign=top> <td colspan=3><img src="htmltest.html_files/px" style="width: 595px; height: 190px"></td> </tr> <tr valign=top> <td><img src="htmltest.html_files/px" style="width: 189px; height: 18px"></td> <td><span style="font-family: Arial; font-size: 10.0px;"> 驩馬t;/span></td> <td><img src="htmltest.html_files/px" style="width: 325px; height: 18px"></td> </tr> <tr valign=top> <td colspan=3><img src="htmltest.html_files/px" style="width: 595px; height: 634px"></td> </tr> </table> <br> <br> </td><td width="50%"> </td></tr> </table> </body> </html> application generated output (wrong) ========================== 驩鼯span> application generated html source ======================== <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <style type="text/css"> a {text-decoration: none} </style> </head> <body text="#000000" link="#000000" alink="#000000" vlink="#000000"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr><td width="50%"> </td><td align="center"> <a name="JR_PAGE_ANCHOR_0_1"/> <table width=595 cellpadding=0 cellspacing=0 border=0 bgcolor=white> <tr> <td><img src="image?image=px" width=189 height=1></td> <td><img src="image?image=px" width=81 height=1></td> <td><img src="image?image=px" width=325 height=1></td> </tr> <tr valign=top> <td colspan=3><img src="image?image=px" width=595 height=190></td> </tr> <tr valign=top> <td><img src="image?image=px" width=189 height=18></td> <td><span style="font-family: Arial; font-size: 10.0px;"> 驩馬t;/span></td> <td><img src="image?image=px" width=325 height=18></td> </tr> <tr valign=top> <td colspan=3><img src="image?image=px" width=595 height=634></td> </tr> </table> <br> <br> </td><td width="50%"> </td></tr> </table> </body> </html> By: JArmy - jaycobbsk8 RE: same jrxml, producing different html outp 2005-09-26 02:35 Try to read the third part - http://jasperreports.sourceforge.net/tips.tricks.html By: Jose - josejose RE: same jrxml, producing different html output 2005-09-30 13:36 Thanks for the response. I went thru the third part. It is talking about resolving band width issues. I am afraid I did not get how it is related to my question. Can you please hint. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now