Ver Mensaje Individual
  #1146 (permalink)  
Antiguo 27/06/2011, 01:38
Avatar de cris_maco
cris_maco
 
Fecha de Ingreso: abril-2007
Ubicación: Salamanca
Mensajes: 254
Antigüedad: 17 años
Puntos: 0
Respuesta: Jasper Report + iReport + NetBeans 4

Hola a todos,

Tengo un problema con jasper report y espero que aquí me den alguna idea.

Bien, tengo en la banda de detail unos textos dinámicos y uno estático. Resulta que los dinamicos los relleno de base de datos y claro, pues una vez podrán tener una longitud y otra, otra. Pero lo que ahora mismo siempre me pasa es que poniendo lo mismo en los textos, en dos de ellos se cortan (he visto que es cuando llego a una longitud de caracteres (1110), aunque lo mismo influye la altura de las mayusculas que hay en los textos de prueba) pero en el otro no. todos tienen las mismas propiedades, así que no se por qué pasa. Como siempre es mejor poner un poco de código para clarificar lo que pregunto, ahí va:
Código:
<detail>
			<band height="266"  isSplitAllowed="true" >
				<staticText>
					<reportElement
						x="154"
						y="16"
						width="381"
						height="33"
						key="staticText-7"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement textAlignment="Justified">
						<font fontName="Times New Roman" pdfFontName="Helvetica-Bold" size="9" isBold="true"/>
					</textElement>
				<text><![CDATA[Texto estático]]></text>
				</staticText>
				<textField isStretchWithOverflow="true" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="154"
						y="49"
						width="381"
						height="26"
						key="textField"
						positionType="Float"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement textAlignment="Justified">
						<font fontName="Times New Roman" size="10" isPdfEmbedded ="true"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$P{Informe}]]></textFieldExpression>
				</textField>
				<subreport  isUsingCache="true">
					<reportElement
						x="6"
						y="16"
						width="125"
						height="179"
						key="subreport-1"/>
					<dataSourceExpression><![CDATA[new JRBeanCollectionDataSource($P{LstGrupos})]]></dataSourceExpression>
					<subreportExpression  class="java.lang.String"><![CDATA["./resources/jasperReport/input/grupos.jasper"]]></subreportExpression>
				</subreport>
				<textField isStretchWithOverflow="true" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="154"
						y="105"
						width="381"
						height="65"
						key="textField-11"
						positionType="Float"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement textAlignment="Justified">
						<font fontName="Times New Roman" size="10" isPdfEmbedded ="true"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$P{TextoAdicional1}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="154"
						y="81"
						width="381"
						height="23"
						key="staticText-15"
						positionType="Float"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement textAlignment="Justified" verticalAlignment="Middle">
						<font fontName="Times New Roman" pdfFontName="Helvetica-Bold" size="9" isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$P{LabelTextoAdicional1}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="154"
						y="175"
						width="381"
						height="23"
						key="staticText-16"
						positionType="Float"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement textAlignment="Justified" verticalAlignment="Middle">
						<font fontName="Times New Roman" pdfFontName="Helvetica-Bold" size="9" isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$P{LabelTextoAdicional2}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="true" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="154"
						y="200"
						width="381"
						height="65"
						key="textField-12"
						positionType="Float"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement textAlignment="Justified">
						<font fontName="Times New Roman" size="10" isPdfEmbedded ="true"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$P{TextoAdicional2}]]></textFieldExpression>
				</textField>
			</band>
		</detail>
La versión que utilizo de iReport es la 2.0.1 y tiene que ser esa (exigencias de proyecto).

He probado diferentes cosas relacionadas con el desbordamiento, ampliar la longitud de la banda, estirar, etc, etc. pero nada parece funcionar. Decir que el subreport que hay, pues tambien es dinamico y se alarga todo lo que necesite, asi que ya me parece todavia más extraño lo que ocurre, porque como ya digo, sitio tiene como para que no se corte...
(los que se cortan son los relativos a las propiedades $P{Informe} y $P{TextoAdicional1}. el ultimo, $P{TextoAdicional2}, es el que se ve perfectamente)

Muchas gracias por las ideas y sugerencias que me podais dar.