我正在使用 iReport 来生成doc。我生成的模板上的两个子报告之间存在差距,这是不需要的。我无法弄清楚这种奇怪的行为。
Gap显示黄色突出显示。
输出图片:
输出图片:
:
编辑:
<?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="NoXmlDesignReport" pageWidth="595" pageHeight="842" columnWidth="515" leftMargin="40" rightMargin="40" topMargin="20" bottomMargin="20" uuid="d91cf50b-89e6-42ca-add4-132b6b296540">
<style name="Sans_Normal" isDefault="true" fontName="DejaVu Sans" fontSize="12" pdfEncoding="Cp1252" isPdfEmbedded="true"/>
<parameter name="imagePathInTemplate2" class="java.lang.String">
<defaultValueExpression><![CDATA["/home/jft/workspace/CvSurgeon/CvSurgeon /web-app/images/templateImages/template2"]]></defaultValueExpression>
</parameter>
<field name="personalDetail.fullNameInCamelCase" class="java.lang.String"/>
<field name="personalDetail.fullName" class="java.lang.String"/>
<field name="personalDetail.lastName" class="java.lang.String"/>
<field name="personalDetail.firstName" class="java.lang.String"/>
<field name="resume.careerProfile" class="java.lang.String"/>
<field name="address" class="java.lang.String"/>
<field name="personalDetail.phone1.number" class="java.lang.String"/>
<field name="personalDetail.phone2.number" class="java.lang.String"/>
<field name="personalDetail.email" class="java.lang.String"/>
<field name="newLineAddress" class="java.lang.String"/>
<field name="commaSeparatedAddress" class="java.lang.String"/>
<field name="website" class="java.lang.String"/>
<field name="personalDetailList" class="java.util.List"/>
<field name="interestList" class="java.util.List"/>
<field name="workDescriptionList" class="java.util.List"/>
<field name="skillList" class="java.util.List"/>
<field name="achievementList" class="java.util.List"/>
<field name="addedLanguageList" class="java.util.List"/>
<field name="professionalMembershipList" class="java.util.List"/>
<field name="educationHistoryList" class="java.util.List"/>
<field name="referenceList" class="java.util.List"/>
<field name="achievementSummary" class="java.lang.String"/>
<field name="skillSummary" class="java.lang.String"/>
<field name="resumeList" class="java.util.List"/>
<field name="userImagePath" class="java.lang.String"/>
<field name="headerImage" class="java.lang.String"/>
<field name="phoneImage" class="java.lang.String"/>
<field name="messageImage" class="java.lang.String"/>
<field name="skillInString" class="java.lang.String"/>
<field name="languageInString" class="java.lang.String"/>
<field name="languageRatingInString" class="java.lang.String"/>
<field name="achievementInString" class="java.lang.String"/>
<field name="interestInString" class="java.lang.String"/>
<field name="interestListInString" class="java.util.List"/>
<field name="educationJasperVOSet" class="java.util.List"/>
<field name="EXxxxxxxxxxxxxxxxxxxx" class="java.util.List"/>
<title>
<band height="22"/>
</title>
<detail>
<band height="200" splitType="Immediate">
<subreport>
<reportElement uuid="73e02b91-6b4b-43c1-adee-1362a56de44b" positionType="Float" x="0" y="0" width="515" height="18"/>
<subreportParameter name="careerProfile">
<subreportParameterExpression> <![CDATA[$F{resume.careerProfile}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="website">
<subreportParameterExpression> <![CDATA[$F{website}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="userImagePathInSubReport">
<subreportParameterExpression> <![CDATA[$F{userImagePath}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="fullName">
<subreportParameterExpression> <![CDATA[$F{personalDetail.fullName}]]></subreportParameterExpression>
</subreportParameter>
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{personalDetailList})]]> </dataSourceExpression>
<subreportExpression><![CDATA["/home/jft/workspace/CvSurgeon /CvSurgeon/web-app/report/template2/headerWithUserImage.jasper"]]></subreportExpression>
</subreport>
<subreport>
<reportElement uuid="56e1e17a-447f-455b-ba6b-10d0a3ec61ec" positionType="Float" x="0" y="0" width="140" height="200"/>
<subreportParameter name="address">
<subreportParameterExpression><![CDATA[$F{commaSeparatedAddress}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="userImagePathInSubReport">
<subreportParameterExpression><![CDATA[$F{userImagePath}]]></subreportParameterExpression>
</subreportParameter>
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{personalDetailList})]]></dataSourceExpression>
<subreportExpression><![CDATA["/home/jft/workspace/CvSurgeon/CvSurgeon/web-app/report/template2/leftSubReport.jasper"]]></subreportExpression>
</subreport>
<subreport>
<reportElement uuid="f59c20a5-0c61-46b9-8f14-dcaa27b88351" positionType="Float" x="140" y="18" width="395" height="18"/>
<subreportParameter name="imagePathInSubreport">
<subreportParameterExpression><![CDATA[$P{imagePathInTemplate2}]]></subreportParameterExpression>
</subreportParameter>
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{resumeList})]]></dataSourceExpression>
<subreportExpression><![CDATA["/home/jft/workspace/CvSurgeon/CvSurgeon/web-app/report/template2/profile.jasper"]]></subreportExpression>
</subreport>
<subreport>
<reportElement uuid="5f7ce0fd-233e-4edd-ad3e-13a700d80725" positionType="Float" x="140" y="36" width="395" height="18"/>
<subreportParameter name="imagePathInSubreport">
<subreportParameterExpression><![CDATA[$P{imagePathInTemplate2}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="skillSummary">
<subreportParameterExpression><![CDATA[$F{skillSummary}]]></subreportParameterExpression>
</subreportParameter>
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{skillList})]]></dataSourceExpression>
<subreportExpression><![CDATA["/home/jft/workspace/CvSurgeon/CvSurgeon/web-app/report/template2/skill.jasper"]]></subreportExpression>
</subreport>
<subreport>
<reportElement uuid="5500bbb2-c265-4a25-bdf3-0fcb953eba55" positionType="Float" x="140" y="54" width="395" height="18"/>
<subreportParameter name="imagePathInSubreport">
<subreportParameterExpression><![CDATA[$P{imagePathInTemplate2}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="achievementSummary">
<subreportParameterExpression><![CDATA[$F{achievementSummary}]]></subreportParameterExpression>
</subreportParameter>
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{achievementList})]]></dataSourceExpression>
<subreportExpression><![CDATA["/home/jft/workspace/CvSurgeon/CvSurgeon/web-app/report/template2/achievement.jasper"]]></subreportExpression>
</subreport>
<subreport>
<reportElement uuid="b39ad337-b7f0-4b3b-9249-a56abcf189d6" positionType="Float" x="140" y="72" width="395" height="18"/>
<subreportParameter name="imagePathInSubreport">
<subreportParameterExpression><![CDATA[$P{imagePathInTemplate2}]]></subreportParameterExpression>
</subreportParameter>
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{educationJasperVOSet})]]></dataSourceExpression>
<subreportExpression><![CDATA["/home/jft/workspace/CvSurgeon/CvSurgeon/web-app/report/template2/education.jasper"]]></subreportExpression>
</subreport>
<subreport>
<reportElement uuid="7b6d1440-dbca-4b68-9645-3a3c84ef7cb6" positionType="Float" x="140" y="90" width="395" height="18"/>
<subreportParameter name="imagePathInSubreport">
<subreportParameterExpression><![CDATA[$P{imagePathInTemplate2}]]></subreportParameterExpression>
</subreportParameter>
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{professionalMembershipList})]]></dataSourceExpression>
<subreportExpression><![CDATA["/home/jft/workspace/CvSurgeon/CvSurgeon/web-app/report/template2/professionalMembership.jasper"]]></subreportExpression>
</subreport>
<subreport>
<reportElement uuid="f7ac8c49-eda4-4103-99a0-381d5d8cad97" positionType="Float" x="140" y="108" width="395" height="18"/>
<subreportParameter name="imagePathInSubreport">
<subreportParameterExpression><![CDATA[$P{imagePathInTemplate2}]]></subreportParameterExpression>
</subreportParameter>
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{addedLanguageList})]]></dataSourceExpression>
<subreportExpression><![CDATA["/home/jft/workspace/CvSurgeon/CvSurgeon/web-app/report/template2/language.jasper"]]></subreportExpression>
</subreport>
<subreport>
<reportElement uuid="5a682419-298f-41e4-b9ed-73f27a668cd5" positionType="Float" x="140" y="126" width="395" height="18"/>
<subreportParameter name="imagePathInSubreport">
<subreportParameterExpression><![CDATA[$P{imagePathInTemplate2}]]></subreportParameterExpression>
</subreportParameter>
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{workDescriptionList})]]></dataSourceExpression>
<subreportExpression><![CDATA["/home/jft/workspace/CvSurgeon/CvSurgeon/web-app/report/template2/workExperience.jasper"]]></subreportExpression>
</subreport>
<subreport>
<reportElement uuid="87198838-f233-4c6d-97d0-edf50765805f" positionType="Float" x="140" y="144" width="395" height="18"/>
<subreportParameter name="imagePathInSubreport">
<subreportParameterExpression><![CDATA[$P{imagePathInTemplate2}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="interestListInString">
<subreportParameterExpression><![CDATA[$F{interestListInString}]]></subreportParameterExpression>
</subreportParameter>
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{interestList})]]></dataSourceExpression>
<subreportExpression><![CDATA["/home/jft/workspace/CvSurgeon/CvSurgeon/web-app/report/template2/interest.jasper"]]></subreportExpression>
</subreport>
<subreport>
<reportElement uuid="aab8beb1-97fd-493d-9d0c-69a72df54844" positionType="Float" x="140" y="162" width="395" height="18"/>
<subreportParameter name="imagePathInSubreport">
<subreportParameterExpression><![CDATA[$P{imagePathInTemplate2}]]></subreportParameterExpression>
</subreportParameter>
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{referenceList})]]></dataSourceExpression>
<subreportExpression><![CDATA["/home/jft/workspace/CvSurgeon/CvSurgeon/web-app/report/template2/reference.jasper"]]></subreportExpression>
</subreport>
<subreport>
<reportElement uuid="3c228f25-2992-434d-a99a-e89690c8cc66" positionType="Float" x="140" y="180" width="395" height="18"/>
<subreportParameter name="imagePathInSubreport">
<subreportParameterExpression><![CDATA[$P{imagePathInTemplate2}]]></subreportParameterExpression>
</subreportParameter>
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{EXxxxxxxxxxxxxxxxxxxx})]]></dataSourceExpression>
<subreportExpression><![CDATA["/home/jft/workspace/CvSurgeon/CvSurgeon/web-app/report/template2/extraSection.jasper"]]></subreportExpression>
</subreport>
</band>
</detail>
</jasperReport>
答案 0 :(得分:0)
看起来你的两个乐队彼此重叠。它允许使用pdf但不允许在docx文件中。这是代码段。
<subreport>
<reportElement uuid="73e02b91-6b4b-43c1-adee-1362a56de44b" positionType="Float" x="0" y="0" width="515" height="18"/>
<subreportParameter name="careerProfile">
<subreportParameterExpression> <![CDATA[$F{resume.careerProfile}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="website">
<subreportParameterExpression> <![CDATA[$F{website}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="userImagePathInSubReport">
<subreportParameterExpression> <![CDATA[$F{userImagePath}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="fullName">
<subreportParameterExpression> <![CDATA[$F{personalDetail.fullName}]]></subreportParameterExpression>
</subreportParameter>
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{personalDetailList})]]> </dataSourceExpression>
<subreportExpression><![CDATA["/home/jft/workspace/CvSurgeon /CvSurgeon/web-app/report/template2/headerWithUserImage.jasper"]]></subreportExpression>
</subreport>
第二个是:
<subreport>
<reportElement uuid="56e1e17a-447f-455b-ba6b-10d0a3ec61ec" positionType="Float" x="0" y="0" width="140" height="200"/>
<subreportParameter name="address">
<subreportParameterExpression><![CDATA[$F{commaSeparatedAddress}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="userImagePathInSubReport">
<subreportParameterExpression><![CDATA[$F{userImagePath}]]></subreportParameterExpression>
</subreportParameter>
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{personalDetailList})]]></dataSourceExpression>
<subreportExpression><![CDATA["/home/jft/workspace/CvSurgeon/CvSurgeon/web-app/report/template2/leftSubReport.jasper"]]></subreportExpression>
</subreport>
<subreport>
它应该是这样的:
<subreport>
<reportElement uuid="efe1e943-d0e7-4583-840b-197395fd5586" positionType="Float" x="0" y="0" width="515" height="15"/>
<subreportParameter name="careerProfile">
<subreportParameterExpression><![CDATA[$F{resume.careerProfile}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="website">
<subreportParameterExpression><![CDATA[$F{website}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="userImagePathInSubReport">
<subreportParameterExpression><![CDATA[$F{userImagePath}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="fullName">
<subreportParameterExpression><![CDATA[$F{personalDetail.fullName}]]></subreportParameterExpression>
</subreportParameter>
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{personalDetailList})]]></dataSourceExpression>
<subreportExpression><![CDATA["/home/jft/workspace/CvSurgeon/CvSurgeon/web-app/report/template2/headerWithUserImage.jasper"]]></subreportExpression>
</subreport>
和
<subreport>
<reportElement uuid="cc97b3ad-0ea3-4336-aba2-38bac2f7663a" positionType="Float" x="0" y="15" width="140" height="20"/>
<subreportParameter name="address">
<subreportParameterExpression><![CDATA[$F{commaSeparatedAddress}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="userImagePathInSubReport">
<subreportParameterExpression><![CDATA[$F{userImagePath}]]></subreportParameterExpression>
</subreportParameter>
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{personalDetailList})]]></dataSourceExpression>
<subreportExpression><![CDATA["/home/jft/workspace/CvSurgeon/CvSurgeon/web-app/report/template2/leftSubReport.jasper"]]></subreportExpression>
</subreport>
享受。 :d