2005 IR Help Posted August 27, 2006 Share Posted August 27, 2006 By: goskar - goskar problems with displaying data from subreport 2004-11-30 02:13 Hi , i have got problem with displaying all data that match select query on one page, it is crazy but some of data are displayed on first page, some on second, third or fourth. I dont know where the problem is, can anyone help? My main report: <?xml version="1.0" encoding="UTF-8"?> <!-- Created using an evaluation version of JasperAssistant (http://www.jasperassistant.com) --> <!DOCTYPE jasperReport PUBLIC "-//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd"> <jasperReport name="OffenePosten" pageWidth="1200" pageHeight="1400" leftMargin="80" rightMargin="400" topMargin="30" bottomMargin="30"> <property name="com.jasperassistant.designer.GridWidth" value="12"/> <property name="com.jasperassistant.designer.GridHeight" value="12"/> <property name="com.jasperassistant.designer.SnapToGrid" value="false"/> <property name="ireport.scriptlethandling" value="2"/> <property name="com.jasperassistant.designer.Grid" value="false"/> <parameter name="rechnung_pkey" class="java.lang.String"> </parameter> <parameter name="TEMPLATE_DIR" class="java.lang.String"> </parameter> <parameter name="ZUSATZ_WHERE_00" class="java.lang.String"> </parameter> <parameter name="ZUSATZ_WHERE_01" class="java.lang.String"> </parameter> <parameter name="BEREICH_BEZ" class="java.lang.String"> </parameter> <parameter name="HEUTE" class="java.util.Date"> </parameter> <parameter name="kv_code" class="java.lang.String"> </parameter> <parameter name="JP_NAME" class="java.lang.String"> </parameter> <queryString><![CDATA[sELECT DISTINCT jurpers.jp_code,jurpers.jp_name FROM jurpers, offene_posten WHERE jurpers.jp_code=offene_posten.kv_code $P!{ZUSATZ_WHERE_00} ORDER BY jurpers.jp_code]]></queryString> <field name="jp_code" class="java.lang.String"> </field> <pageHeader> <band height="234"> <staticText> <reportElement x="0" y="50" width="250" height="20"/> <textElement> <font size="18" isBold="true"/> </textElement> <text><![CDATA[Offene Posten evodion IT]]></text> </staticText> <textField isBlankWhenNull="true"> <reportElement x="300" y="50" width="200" height="20"/> <textElement> <font size="18"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$P{BEREICH_BEZ}]]></textFieldExpression> </textField> <staticText> <reportElement x="550" y="50" width="80" height="20"/> <textElement> <font size="16"/> </textElement> <text><![CDATA[stand]]></text> </staticText> <textField isBlankWhenNull="true"> <reportElement x="637" y="50" width="83" height="20"/> <textElement> <font size="16"/> </textElement> <textFieldExpression class="java.util.Date"><![CDATA[$P{HEUTE}]]></textFieldExpression> </textField> <staticText> <reportElement x="0" y="150" width="80" height="20"/> <textElement> <font size="14"/> </textElement> <text><![CDATA[Re-Nr]]></text> </staticText> <staticText> <reportElement x="150" y="150" width="100" height="20"/> <textElement> <font size="14"/> </textElement> <text><![CDATA[Re-Datum]]></text> </staticText> <staticText> <reportElement x="250" y="150" width="200" height="20"/> <textElement> <font size="14"/> </textElement> <text><![CDATA[Projekt]]></text> </staticText> <staticText> <reportElement x="400" y="150" width="150" height="20"/> <textElement> <font size="14"/> </textElement> <text><![CDATA[bemerkung ]]></text> </staticText> <staticText> <reportElement x="400" y="170" width="150" height="20"/> <textElement> <font size="14"/> </textElement> <text><![CDATA[zur Mahnstufe]]></text> </staticText> <staticText> <reportElement x="456" y="150" width="100" height="20"/> <textElement> <font size="14"/> </textElement> <text><![CDATA[f䬬ig am]]></text> </staticText> <staticText> <reportElement x="556" y="150" width="100" height="20"/> <textElement> <font size="14"/> </textElement> <text><![CDATA[f䬬ig Mahnst]]></text> </staticText> <staticText> <reportElement x="630" y="150" width="88" height="20"/> <textElement> <font size="14"/> </textElement> <text><![CDATA[bruttobetrag]]></text> </staticText> <textField isBlankWhenNull="true"> <reportElement x="1" y="197" width="200" height="20"/> <textElement> <font size="16"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$P{kv_code}]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> <reportElement x="247" y="197" width="200" height="20"/> <textElement> <font size="16"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$P{JP_NAME}]]></textFieldExpression> </textField> </band> </pageHeader> <detail> <band height="400"> <subreport> <reportElement isPrintRepeatedValues="false" x="0" y="0" width="500" height="10" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" backcolor="#99ccff"/> <subreportParameter name="TEMPLATE_DIR"> <subreportParameterExpression><![CDATA[$P{TEMPLATE_DIR}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="kv_code"> <subreportParameterExpression><![CDATA[$F{jp_code}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="ZUSATZ_WHERE_01"> <subreportParameterExpression><![CDATA[$P{ZUSATZ_WHERE_01}]]></subreportParameterExpression> </subreportParameter> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> <subreportExpression class="java.lang.String"><![CDATA[$P{TEMPLATE_DIR} +"offeneposten_details.jasper"]]></subreportExpression> </subreport> </band> </detail> <pageFooter> <band height="60"> <textField> <reportElement x="200" y="40" width="80" height="15"/> <textElement textAlignment="Right"/> <textFieldExpression class="java.lang.String"><![CDATA["Seite " + String.valueOf($V{PAGE_NUMBER}) + " von"]]></textFieldExpression> </textField> <textField evaluationTime="Report"> <reportElement x="280" y="40" width="75" height="15"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[" " + String.valueOf($V{PAGE_NUMBER})]]></textFieldExpression> </textField> </band> </pageFooter> </jasperReport> my subreport: <?xml version="1.0" encoding="UTF-8"?> <!-- Created using an evaluation version of JasperAssistant (http://www.jasperassistant.com) --> <!DOCTYPE jasperReport PUBLIC "-//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd"> <jasperReport name="Unnamed" pageWidth="500" pageHeight="1500" columnWidth="500" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0"> <property name="com.jasperassistant.designer.GridWidth" value="12"/> <property name="com.jasperassistant.designer.GridHeight" value="12"/> <property name="com.jasperassistant.designer.DataSource" value="test"/> <property name="com.jasperassistant.designer.SnapToGrid" value="false"/> <property name="com.jasperassistant.designer.Grid" value="false"/> <parameter name="ZUSATZ_WHERE_01" class="java.lang.String"> </parameter> <parameter name="kv_code" class="java.lang.String"> </parameter> <parameter name="TEMPLATE_DIR" class="java.lang.String"> </parameter> <queryString><![CDATA[sELECT OFFENE_POSTEN.RE_BRUTTO, OFFENE_POSTEN.RE_ZAHLZIEL, OFFENE_POSTEN.RE_DATUM, OFFENE_POSTEN.RE_PKEY, OFFENE_POSTEN.VO_NAME, OFFENE_POSTEN.MH_ZAHLZIEL, OFFENE_POSTEN.RE_NUMMER FROM OFFENE_POSTEN WHERE offene_posten.kv_code=$P!{kv_code}$P!{ZUSATZ_WHERE_01}]]></queryString> <field name="RE_DATUM" class="java.util.Date"> </field> <field name="VO_NAME" class="java.lang.String"> </field> <field name="RE_NUMMER" class="java.lang.String"> </field> <field name="RE_ZAHLZIEL" class="java.util.Date"> </field> <field name="MH_ZAHLZIEL" class="java.util.Date"> </field> <field name="RE_BRUTTO" class="java.lang.Float"> </field> <field name="re_pkey" class="java.lang.String"> </field> <detail> <band height="40"> <textField isBlankWhenNull="true"> <reportElement x="0" y="0" width="150" height="20"/> <textElement> <font size="16"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{RE_NUMMER}]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> <reportElement x="150" y="0" width="100" height="20"/> <textElement> <font size="14"/> </textElement> <textFieldExpression class="java.util.Date"><![CDATA[$F{RE_DATUM}]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> <reportElement x="250" y="0" width="200" height="20"/> <textElement> <font size="14"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{VO_NAME}]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> <reportElement x="456" y="0" width="100" height="20"/> <textElement> <font size="14"/> </textElement> <textFieldExpression class="java.util.Date"><![CDATA[$F{RE_ZAHLZIEL}]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> <reportElement x="550" y="0" width="100" height="20"/> <textElement> <font size="14"/> </textElement> <textFieldExpression class="java.util.Date"><![CDATA[$F{MH_ZAHLZIEL}]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> <reportElement x="650" y="0" width="100" height="20"/> <textElement> <font size="14"/> </textElement> <textFieldExpression class="java.lang.Float"><![CDATA[$F{RE_BRUTTO}]]></textFieldExpression> </textField> <subreport> <reportElement isPrintRepeatedValues="false" x="0" y="20" width="500" height="10" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" backcolor="#99ccff"/> <subreportParameter name="TEMPLATE_DIR"> <subreportParameterExpression><![CDATA[$P{TEMPLATE_DIR}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="re_pkey"> <subreportParameterExpression><![CDATA[$F{re_pkey}]]></subreportParameterExpression> </subreportParameter> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> <subreportExpression class="java.lang.String"><![CDATA[$P{TEMPLATE_DIR} +"offeneposten_details2.jasper"]]> </subreportExpression> </subreport> </band> </detail> </jasperReport> Thank you in advance gosia r. By: Teodor Danciu - teodord RE: problems with displaying data from subrep 2004-11-30 03:51 Hi, Your detail section in the master report has a height of 400 pixels and only contains the subreport with a specified intial height of 10 pixels. No wonder you get at least 390 pixels of white space every time your subreport appears. If you want your subreport to use the available space, just make the detail 10 pixels tall and not 400!!! Thank you, Teodor 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