ezoufe2006 Posted November 12, 2021 Share Posted November 12, 2021 I found that if I fill in "ABC" in the textField and use JasperCompileManager.compileReportToStream(jasperDesign, outputStream); to generate the jasper file is an error, but I can generate the jasper file directly in the Compile Report in JasperStudio.It seems that it will only make mistakes in certain Chinese, such as jasper JARS vision=6.8 Also TestedIn 6.18JasperCompileManager.compileReportToStream(jasperDesign,outputStream);[/code]<?xml version="1.0" encoding="UTF-8"?><!-- Created with Jaspersoft Studio version 6.8.0.final using JasperReports Library version 6.8.0-2ed8dfabb690ff337a5797129f2cd92902b0c87b --><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="Blank_A4_2" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="0b8cd9c2-b457-4132-9200-5edf8c71b367"> <queryString> <![CDATA[]]> </queryString> <field name="Field_1" class="java.lang.String"/> <background> <band splitType="Stretch"/> </background> <title> <band height="79" splitType="Stretch"/> </title> <pageHeader> <band height="35" splitType="Stretch"/> </pageHeader> <columnHeader> <band height="61" splitType="Stretch"/> </columnHeader> <detail> <band height="125" splitType="Stretch"> <textField isBlankWhenNull="true"> <reportElement x="160" y="25" width="190" height="45" uuid="1164df54-eb34-4833-af5f-371409e2a638"/> <textElement> <font fontName="宋" size="14"/> </textElement> <textFieldExpression><![CDATA[$F{Field_1}==null?" 住":"英文"]]></textFieldExpression> </textField> </band> </detail> <columnFooter> <band height="45" splitType="Stretch"/> </columnFooter> <pageFooter> <band height="54" splitType="Stretch"/> </pageFooter> <summary> <band height="42" splitType="Stretch"/> </summary></jasperReport>[/code] Link to comment Share on other sites More sharing options...
ezoufe2006 Posted November 12, 2021 Author Share Posted November 12, 2021 Fixed miss some jars 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