java - JasperReports - Text File contains 2 Newline characters at the end of every page -
i'm new jasperreports , struggling 1 issue. have searched answers problem, have not had luck finding 1 (most seemingly relevant comments relate xls exports , missing data). example, have removed every section except detail (i still have same problem when page/column headers, etc. included). page breaking @ correct line count (66 lines/page in setup), there 2 newlines after every page break. not "blank lines" because padded out page width (133 columns ~ 1330 pixels @ 10 width), these additional x'0d0a' , can't rid of them.
here jrxml:
<?xml version="1.0" encoding="utf-8"?> <jasperreport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="textreport" whennodatatype="allsectionsnodetail" pagewidth="1330" pageheight="792" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0"> <property name="ireport.scriptlethandling" value="0"/> <property name="net.sf.jasperreports.export.text.character.width" value="10"/> <property name="net.sf.jasperreports.export.text.character.height" value="12"/> <style name="fixsizefontstyle" isdefault="true" fontname="dejavu sans mono" fontsize="10"/> <parameter name="querystring" class="java.lang.string"/> <querystring> <![cdata[$p!{querystring}]]> </querystring> <field name="prsn_id" class="java.math.bigdecimal"/> <detail> <band height="12"> <textfield> <reportelement x="25" y="0" width="100" height="12"/> <textfieldexpression><![cdata[$f{prsn_id}]]></textfieldexpression> </textfield> </band> </detail> </jasperreport>
and here how i'm running (actual query obfuscated):
map<string, object> jaspparms = new hashmap<string, object>(); jaspparms.put("querystring", "select * table col > value"); jasperreport jaspreport = jaspercompilemanager.compilereport(pathjrxml); jasperprint jaspprint = jasperfillmanager.fillreport(jaspreport, jaspparms, condb); jrtextexporter jasptextexport = new jrtextexporter(); jasptextexport.setexporterinput(new simpleexporterinput(jaspprint)); jasptextexport.setexporteroutput(new simplewriterexporteroutput(pathtext)); jasptextexport.exportreport();
here end of page, note spaces padding out - line 66 , expected:
please let me know i'm doing wrong.
Comments
Post a Comment