Tommaso.Tassoni Posted April 5, 2019 Share Posted April 5, 2019 Hi guys,first of all, please forgive my bad english.I am using JasperSoft Studio CE 6.6.0 portable (win) to make a report book. Since it was the first time for me, I used the wizard to create the book structure, then made my changes.The book structure is quite simple, I think:- Cover (one jrxml);- Table of contents (one jrxml);- Content (two jrxml: one of static text and one that loads data from a PostgresDB);- Backcover (one jrxml);I have persistent compilatione errors and cant figure how to solve them.This is what I've done:I compiled the jrxml files one by one with any error. All was allright.Then I compiled the whole book with any error too.JSS previews was ok. I closed JSS to do anything else. When I reopen JSS the day after, I got these errors: - The title section, the page and column headers and footers and the margins do not fit the page height. for the backcover file;- The title section, the page and column headers and footers and the margins do not fit the page height. --- net.sf.jasperreports.engine.design.JasperDesign@5b476930 for the cover fileI fixed them changing page margins and bands height, saved and compiled files one by one with no errors. Compiled the book with no errors. Close JSS.Once restarted JSS, however, the errors were still there. I looked the jrxml code again, but everything seemed fine. Then I thought to recompile all after a 'clean' (project menu >> clean) and all was allright: no errors. Ok, closed JSS.Today JSS shows same errors again.I have tried this solution without success:- https://stackoverflow.com/questions/46535197/why-does-sections-do-not-fit-the-page-heightand read this: https://community.jaspersoft.com/jasperreports-library/issues/4421.What am I missing?Thanks in advance.TommasoMaster book code:<?xml version="1.0" encoding="UTF-8"?><!-- Created with Jaspersoft Studio version 6.6.0.final using JasperReports Library version 6.6.0 --><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="Tariffario_Book" pageWidth="842" pageHeight="595" orientation="Landscape" sectionType="Part" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="d2716064-8ae4-40cf-a575-33afba400e3a"> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> <property name="net.sf.jasperreports.print.create.bookmarks" value="true"/> <property name="com.jaspersoft.studio.book.group.cover.header" value="Cover and Table of Contents"/> <property name="com.jaspersoft.studio.book.group.cover.footer" value="Backcover"/> <property name="com.jaspersoft.studio.property.dataset.dialog.DatasetDialog.sash.w1" value="438"/> <property name="com.jaspersoft.studio.property.dataset.dialog.DatasetDialog.sash.w2" value="548"/> <parameter name="RevTariffario" class="java.lang.String" evaluationTime="Early"> <defaultValueExpression><![CDATA[06/18]]></defaultValueExpression> </parameter> <parameter name="DCA_num" class="java.lang.String" evaluationTime="Early"/> <parameter name="DCA_data" class="java.lang.String" evaluationTime="Early"/> <queryString> <![CDATA[]]> </queryString> <variable name="TOCbookmark" class="java.lang.String"> <initialValueExpression><![CDATA["INDICE"]]></initialValueExpression> </variable> <group name="cover"> <groupHeader> <part uuid="7aed05b9-1301-4a53-b47e-34289560bc0c"> <p:subreportPart xmlns:p="http://jasperreports.sourceforge.net/jasperreports/parts" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/parts http://jasperreports.sourceforge.net/xsd/parts.xsd"> <subreportParameter name="DCA_num"> <subreportParameterExpression><![CDATA[$P{DCA_num}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="DCA_data"> <subreportParameterExpression><![CDATA[$P{DCA_data}]]></subreportParameterExpression> </subreportParameter> <subreportExpression><![CDATA["Tariffario_Book_cover.jasper"]]></subreportExpression> </p:subreportPart> </part> <part evaluationTime="Report" uuid="56ab525c-754f-4f48-a52c-7cc23934be3d"> <property name="net.sf.jasperreports.bookmarks.data.source.parameter" value="REPORT_DATA_SOURCE"/> <p:subreportPart xmlns:p="http://jasperreports.sourceforge.net/jasperreports/parts" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/parts http://jasperreports.sourceforge.net/xsd/parts.xsd"> <subreportExpression><![CDATA["Tariffario_Book_toc.jasper"]]></subreportExpression> </p:subreportPart> </part> </groupHeader> <groupFooter> <part uuid="88decbbe-63ad-45cc-9e03-5dadc50004d5"> <p:subreportPart xmlns:p="http://jasperreports.sourceforge.net/jasperreports/parts" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/parts http://jasperreports.sourceforge.net/xsd/parts.xsd"> <subreportExpression><![CDATA["Tariffario_Book_backcover.jasper"]]></subreportExpression> </p:subreportPart> </part> </groupFooter> </group> <detail> <part uuid="b66e68ed-777c-4d13-801a-836a12445296"> <p:subreportPart xmlns:p="http://jasperreports.sourceforge.net/jasperreports/parts" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/parts http://jasperreports.sourceforge.net/xsd/parts.xsd"> <subreportParameter name="REPORT_DATA_SOURCE"> <subreportParameterExpression><![CDATA[new net.sf.jasperreports.engine.JREmptyDataSource()]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="RevTariffario"> <subreportParameterExpression><![CDATA[$P{RevTariffario}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="REPORT_CONNECTION"> <subreportParameterExpression><![CDATA[$P{REPORT_CONNECTION}]]></subreportParameterExpression> </subreportParameter> <subreportExpression><![CDATA["Subreport_Criteri.jasper"]]></subreportExpression> </p:subreportPart> </part> <part uuid="b8a0429c-1912-496c-a489-32dac21821cc"> <p:subreportPart xmlns:p="http://jasperreports.sourceforge.net/jasperreports/parts" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/parts http://jasperreports.sourceforge.net/xsd/parts.xsd"> <subreportParameter name="REPORT_CONNECTION"> <subreportParameterExpression><![CDATA[$P{REPORT_CONNECTION}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="RevTariffario"> <subreportParameterExpression><![CDATA[$P{RevTariffario}]]></subreportParameterExpression> </subreportParameter> <subreportExpression><![CDATA["Tariffario_A4_Landscape.jasper"]]></subreportExpression> </p:subreportPart> </part> </detail></jasperReport>Tariffario_book_cover code<?xml version="1.0" encoding="UTF-8"?><!-- Created with Jaspersoft Studio version 6.6.0.final using JasperReports Library version 6.6.0 --><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="typewriter_book_cover" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="AllSectionsNoDetail" columnWidth="842" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" isTitleNewPage="true" uuid="c50b24eb-eb33-413f-8e75-e7e20a5341fd"> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> <parameter name="DCA_num" class="java.lang.String" evaluationTime="Early"/> <parameter name="DCA_data" class="java.lang.String" evaluationTime="Early"/> <queryString> <![CDATA[]]> </queryString> <title> <band height="540" splitType="Stretch"> <textField> <reportElement x="556" y="475" width="234" height="15" uuid="38fc9afd-edcb-42f3-b6bc-cd258f6507b3"/> <textElement textAlignment="Right"> <font size="9"/> </textElement> <textFieldExpression><![CDATA["Documento generato il: " + DATEFORMAT(TODAY( ),"dd-MM-yyyy")]]></textFieldExpression> </textField> <staticText> <reportElement x="271" y="280" width="300" height="50" uuid="7b7dad5a-1f10-46c7-8924-12857622aeca"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Times New Roman" size="40" isBold="true" isItalic="true"/> </textElement> <text><![CDATA[TARIFFARIO]]></text> </staticText> <staticText> <reportElement x="730" y="25" width="60" height="20" uuid="6d45ee89-c692-4220-a19b-503a0954a8cb"/> <text><![CDATA[Allegato 1]]></text> </staticText> <image> <reportElement x="321" y="50" width="200" height="140" uuid="b3d590ad-e044-4209-aa2a-e602712d390d"/> <imageExpression><![CDATA["C:/JaspersoftWorkspace/Tariffario/Images/logo_IZSVe.png"]]></imageExpression> </image> <staticText> <reportElement x="61" y="453" width="720" height="40" uuid="3361fad9-748a-4a92-a8e5-d47eaf39975e"/> <textElement textAlignment="Center"> <font isItalic="true"/> </textElement> <text><![CDATA[iSTITUTO ZOOPROFILATTICO SPERIMENTALE DELLE VENEZIEEnte Sanitario di Diritto PubblicoViale dell'Universita' n. 10 - 35020 LEGNARO (PD)]]></text> </staticText> <line> <reportElement x="61" y="450" width="720" height="1" uuid="a2228783-bf93-4a6c-adae-56e2978126e8"/> </line> <textField> <reportElement x="61" y="375" width="720" height="30" uuid="aaf2eec7-d592-4cd5-bb8f-c1713c6fd25d"> <printWhenExpression><![CDATA[$P{DCA_num}.isEmpty() == false && $P{DCA_data}.isEmpty() == false]]></printWhenExpression> </reportElement> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="12"/> </textElement> <textFieldExpression><![CDATA["Approvato con DCA n. "+ $P{DCA_num} + " del " + $P{DCA_data} + ", esecutiva."]]></textFieldExpression> </textField> <staticText> <reportElement x="61" y="417" width="720" height="30" uuid="f791b109-bc97-46b8-8d99-5c12933de5ef"> <printWhenExpression><![CDATA[$P{DCA_num} != null && $P{DCA_data} != null]]></printWhenExpression> </reportElement> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="11"/> </textElement> <text><![CDATA[L'elenco delle prove accreditate è consultabile sul sito di ACCREDIA (www.accredia.it)]]></text> </staticText> </band> </title></jasperReport> Link to comment Share on other sites More sharing options...
Tommaso.Tassoni Posted April 11, 2019 Author Share Posted April 11, 2019 Problem solved with a workaround.I created a new book structure with the creation book wizard, then imported and added 'old' book parts and recompiled the book.It worked withouit changes on book parts. 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