Jump to content

Overflowing Grid


fedecarossino

Recommended Posts

hello, my problem is;

I had a table in overflow, and de ireport put cut it and put it down automatic. I want to put de cut table in a new page, can you help me with that?

 

here is de code of de report and i add a photo

Code:
<?xml version="1.0" encoding="ISO-8859-1"  ?><!-- Created with iReport - A designer for JasperReports --><!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd"><jasperReport		 name="reporte_seguimiento_cuerpo_grilla"		 columnCount="1"		 printOrder="Vertical"		 orientation="Landscape"		 pageWidth="752"		 pageHeight="595"		 columnWidth="752"		 columnSpacing="0"		 leftMargin="0"		 rightMargin="0"		 topMargin="0"		 bottomMargin="0"		 whenNoDataType="NoPages"		 isTitleNewPage="false"		 isSummaryNewPage="true">	<property name="ireport.scriptlethandling" value="0" />	<property name="ireport.encoding" value="ISO-8859-1" />	<import value="java.util.*" />	<import value="net.sf.jasperreports.engine.*" />	<import value="net.sf.jasperreports.engine.data.*" />	<queryString><![CDATA[sELECT indicador, periodo, desvio, valor, valorAnterior, posicion FROM indicadorprestadortest]]></queryString>	<field name="indicador" class="java.lang.String"/>	<field name="periodo" class="java.lang.String"/>	<field name="desvio" class="java.lang.String"/>	<field name="valor" class="java.lang.String"/>	<field name="valorAnterior" class="java.lang.String"/>	<field name="posicion" class="java.lang.String"/>	<field name="indicadorReportGroup" class="java.lang.String"/>		<background>			<band height="0"  isSplitAllowed="true" >			</band>		</background>		<title>			<band height="0"  isSplitAllowed="true" >			</band>		</title>		<pageHeader>			<band height="0"  isSplitAllowed="true" >			</band>		</pageHeader>		<columnHeader>			<band height="0"  isSplitAllowed="true" >			</band>		</columnHeader>		<detail>			<band height="0"  isSplitAllowed="true" >			</band>		</detail>		<columnFooter>			<band height="0"  isSplitAllowed="true" >			</band>		</columnFooter>		<pageFooter>			<band height="0"  isSplitAllowed="true" >			</band>		</pageFooter>		<summary>			<band height="60"  isSplitAllowed="true" >				<crosstab >					<reportElement						x="0"						y="0"						width="752"						height="60"						key="crosstab-1"/>					<crosstabDataset isDataPreSorted="true" >						<dataset >						</dataset>					</crosstabDataset>					<crosstabHeaderCell>						<cellContents mode="Transparent">					<box></box>				<staticText>					<reportElement						x="0"						y="0"						width="90"						height="40"						key="staticText-1"/>					<box>					<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/>					<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/>					<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/>					<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/></box>					<textElement textAlignment="Center" verticalAlignment="Middle">						<font fontName="Arial" size="8"/>					</textElement>				<text><![CDATA[iNDICADOR]]></text>				</staticText>				<staticText>					<reportElement						isPrintRepeatedValues="false"						x="90"						y="0"						width="60"						height="40"						isPrintWhenDetailOverflows="true"						key="staticText-1"/>					<box>					<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/>					<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/>					<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/>					<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/></box>					<textElement textAlignment="Center" verticalAlignment="Middle">						<font fontName="Arial" size="8"/>					</textElement>				<text><![CDATA[POSICION]]></text>				</staticText>						</cellContents>					</crosstabHeaderCell>					<rowGroup name="indicadorReportGroup" width="0">						<bucket>							<bucketExpression class="java.lang.String"><![CDATA[$F{indicadorReportGroup}]]></bucketExpression>						</bucket>					</rowGroup>					<rowGroup name="indicador" width="90">						<bucket>							<bucketExpression class="java.lang.String"><![CDATA[$F{indicador}]]></bucketExpression>						</bucket>						<crosstabRowHeader>						<cellContents mode="Transparent">					<box></box>				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >					<reportElement						x="0"						y="0"						width="90"						height="20"						key="textField"/>					<box leftPadding="5">					<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/>					<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/>					<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/>					<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/></box>					<textElement textAlignment="Left" verticalAlignment="Middle">						<font fontName="Arial" size="8"/>					</textElement>				<textFieldExpression   class="java.lang.String"><![CDATA[$V{indicador}]]></textFieldExpression>				</textField>						</cellContents>						</crosstabRowHeader>					</rowGroup>					<rowGroup name="posicion" width="60">						<bucket>							<bucketExpression class="java.lang.String"><![CDATA[$F{posicion}]]></bucketExpression>						</bucket>						<crosstabRowHeader>						<cellContents mode="Transparent">					<box></box>				<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >					<reportElement						x="0"						y="0"						width="60"						height="20"						key="textField"/>					<box rightPadding="2">					<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/>					<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/>					<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/>					<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/></box>					<textElement textAlignment="Right" verticalAlignment="Middle">						<font fontName="Arial" size="8"/>					</textElement>				<textFieldExpression   class="java.lang.String"><![CDATA[$V{posicion}]]></textFieldExpression>				</textField>						</cellContents>						</crosstabRowHeader>					</rowGroup>					<columnGroup name="periodo" height="40" headerPosition="Center">						<bucket>							<bucketExpression class="java.lang.String"><![CDATA[$F{periodo}]]></bucketExpression>						</bucket>						<crosstabColumnHeader>						<cellContents mode="Transparent">					<box></box>				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >					<reportElement						x="0"						y="0"						width="150"						height="20"						key="textField"/>					<box>					<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/>					<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/>					<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/>					<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/></box>					<textElement textAlignment="Center" verticalAlignment="Middle">						<font fontName="Arial" size="8"/>					</textElement>				<textFieldExpression   class="java.lang.String"><![CDATA[$V{periodo}]]></textFieldExpression>				</textField>				<staticText>					<reportElement						x="0"						y="20"						width="50"						height="20"						key="staticText-1"/>					<box>					<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/>					<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/>					<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/>					<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/></box>					<textElement textAlignment="Center" verticalAlignment="Middle">						<font fontName="Arial" size="8"/>					</textElement>				<text><![CDATA[ANTERIOR]]></text>				</staticText>				<staticText>					<reportElement						x="50"						y="20"						width="50"						height="20"						key="staticText-1"/>					<box>					<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/>					<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/>					<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/>					<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/></box>					<textElement textAlignment="Center" verticalAlignment="Middle">						<font fontName="Arial" size="8"/>					</textElement>				<text><![CDATA[ACTUAL]]></text>				</staticText>				<staticText>					<reportElement						x="100"						y="20"						width="50"						height="20"						key="staticText-1"/>					<box>					<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/>					<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/>					<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/>					<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/></box>					<textElement textAlignment="Center" verticalAlignment="Middle">						<font fontName="Arial" size="8"/>					</textElement>				<text><![CDATA[DESVIO]]></text>				</staticText>						</cellContents>						</crosstabColumnHeader>					</columnGroup>					<measure name="desvio_Nothing" class="java.lang.String">						<measureExpression><![CDATA[$F{desvio}]]></measureExpression>					</measure>					<measure name="valor_Nothing" class="java.lang.String">						<measureExpression><![CDATA[$F{valor}]]></measureExpression>					</measure>					<measure name="valorAnterior_Nothing" class="java.lang.String">						<measureExpression><![CDATA[$F{valorAnterior}]]></measureExpression>					</measure>					<crosstabCell width="150" height="20">						<cellContents mode="Transparent">					<box></box>				<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >					<reportElement						x="100"						y="0"						width="50"						height="20"						key="textField"/>					<box rightPadding="2">					<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/>					<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/>					<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/>					<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/></box>					<textElement textAlignment="Right" verticalAlignment="Middle">						<font fontName="Arial" size="8"/>					</textElement>				<textFieldExpression   class="java.lang.String"><![CDATA[$V{desvio_Nothing}]]></textFieldExpression>				</textField>				<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >					<reportElement						x="50"						y="0"						width="50"						height="20"						key="textField-1"/>					<box rightPadding="2">					<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/>					<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/>					<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/>					<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/></box>					<textElement textAlignment="Right" verticalAlignment="Middle">						<font fontName="Arial" size="8"/>					</textElement>				<textFieldExpression   class="java.lang.String"><![CDATA[$V{valor_Nothing}]]></textFieldExpression>				</textField>				<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >					<reportElement						x="0"						y="0"						width="50"						height="20"						key="textField-1"/>					<box rightPadding="2">					<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/>					<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/>					<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/>					<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#CCCCCC"/></box>					<textElement textAlignment="Right" verticalAlignment="Middle">						<font fontName="Arial" size="8"/>					</textElement>				<textFieldExpression   class="java.lang.String"><![CDATA[$V{valorAnterior_Nothing}]]></textFieldExpression>				</textField>						</cellContents>					</crosstabCell>					<crosstabCell width="0" height="20" columnTotalGroup="periodo">						<cellContents mode="Transparent">					<box></box>						</cellContents>					</crosstabCell>					<crosstabCell width="150" height="0" rowTotalGroup="indicador">						<cellContents mode="Transparent">					<box></box>						</cellContents>					</crosstabCell>					<crosstabCell width="0" height="0" rowTotalGroup="indicador" columnTotalGroup="periodo">						<cellContents mode="Transparent">					<box></box>						</cellContents>					</crosstabCell>					<crosstabCell width="150" height="0" rowTotalGroup="posicion">						<cellContents mode="Transparent">					<box></box>						</cellContents>					</crosstabCell>					<crosstabCell width="0" height="0" rowTotalGroup="posicion" columnTotalGroup="periodo">						<cellContents mode="Transparent">					<box></box>						</cellContents>					</crosstabCell>					<crosstabCell width="150" height="0" rowTotalGroup="indicadorReportGroup">						<cellContents mode="Transparent">					<box></box>						</cellContents>					</crosstabCell>					<crosstabCell width="0" height="0" rowTotalGroup="indicadorReportGroup" columnTotalGroup="periodo">						<cellContents mode="Transparent">					<box></box>						</cellContents>					</crosstabCell>					<whenNoDataCell>						<cellContents mode="Transparent">					<box></box>						</cellContents>					</whenNoDataCell>					</crosstab>			</band>		</summary></jasperReport>
Link to comment
Share on other sites

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

hi,sorry for my english.

i read ur problem . i dont know is a absolute,systematic solution for ur problem. But u solve this some tricks.

for example u can enlarge ur grid line heights and put ur crostab middle of summary part. and minimize ur page height.

it will flow next page.

this is a fake solution. but i think u cant solve another way.

Link to comment
Share on other sites

ur overflowed grid is a crostab isnt it. i looked at ur xml quickly and i saw a crostab. never mind this. u take a look crostab after.

if u use ireport u can see 'main report' and 'crostab' under ur main page. u can change ur grids lines height in crostab view. and in main view u can change ur page properties with use properties window.

Link to comment
Share on other sites

when u take a data from database ireport format ur data as own parameter.

for example u took indicator column from database but in ireport its name is $V{indicator}

i think u find some parameter code in used crostab row.

did u try my suggestion to solve ur problem? did it work. i wonder.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...