Java - Reportes con ireport. Como mostrar descripciones largas

 
Vista:

Reportes con ireport. Como mostrar descripciones largas

Publicado por Paulina (4 intervenciones) el 15/08/2015 03:09:23
si me podrian ayudar estoy realizando reportes con ireport en el cual necesito que muestra descripciones con mucho texto y al generar el reporte se esta recortando las descripciones
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
sin imagen de perfil
Val: 349
Bronce
Ha mantenido su posición en Java (en relación al último mes)
Gráfica de Java

Reportes con ireport. Como mostrar descripciones largas

Publicado por Andrés Mella Romero (340 intervenciones) el 17/08/2015 05:43:25
http://stackoverflow.com/questions/10631806/jasperreport-wrap-text-to-show-long-text-in-textfield

I found the answer myself :

I did some extra research about the properties of textField and rectangle components. And found that I need to set the following properties.

For rectangle :

<rectangle>
<reportElement stretchType="RelativeToBandHeight" ... />
</rectangle>
For textField :

<textField isStretchWithOverflow="true">
...
</textField>
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil

Reportes con ireport. Como mostrar descripciones largas

Publicado por Marta (12 intervenciones) el 25/08/2015 09:49:25
Buenas,
llevo varios días con lo mismo, y no me lo hace bien, voy a detallarlo:

tengo un report, que tiene lo siguiente:
1
2
3
4
5
6
7
8
9
<pageHeader>
		<band height="240" splitType="Stretch">
                ........................textfields y demas............................
                <subreport>
					<reportElement x="304" y="14" width="232" height="50" stretchType="RelativeToTallestObject"/>
                                        ......................
               </subreport>
               </band>
</pageHeader>

En el subreport tengo lo siguiente:
1
2
3
4
5
6
7
8
9
10
11
12
13
<detail>
        <band height="14" splitType="Stretch">
            <textField>
                <reportElement stretchType="RelativeToTallestObject" x="0" y="0" width="257" height="14">
                </reportElement>
                <textElement markup="styled">
                    <font isBold="false" pdfFontName="Helvetica"/>
                </textElement>
                <textFieldExpression><![CDATA["<style pdfFontName=\"Helvetica-Bold\" size=\"9\" isBold=\"true\">" + $F{name}.get($P{language})
+ "</style> " + ": " + new es.dialsl.codex.util.StudyPlanUtil().getOptionsInString($F{options}, $P{locale}, $P{schoolYearId}, $P{centre})]]></textFieldExpression>
            </textField>
        </band>
    </detail>

Pues bien, he probado miles de combinaciones, y nada, o no me muestra nada, o no me amplia el campo del textfield para que me lo muestre en varias líneas.... estoy ya harta, no se que mas hacer, no paro de ver, que si pongo positionType="Float" que si stretchType="RelativeToTallesObject" o "RelativeToBandHeight".,......... o textField isStretchWithOverflow="true".............

Ya no se q mas probar, o que es lo que estoy haciendo mal.... ¿Me podéis echar una mano? Pleaaaaaase!!!!!

Un saludo!
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar