Jump to content
Changes to the Jaspersoft community edition download ×

pdf export problem


Recommended Posts

By: tommy - tommy2381

pdf export problem

2006-07-18 01:51

Hi,

I have this template from below.

<?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="Unanamed" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="0" bottomMargin="20">

<property name="com.jasperassistant.designer.Rulers" value="true"/>

<property name="com.jasperassistant.designer.GridHeight" value="10"/>

<property name="com.jasperassistant.designer.GridWidth" value="10"/>

<property name="com.jasperassistant.designer.SnapToGrid" value="true"/>

<property name="com.jasperassistant.designer.Margins" value="true"/>

<property name="com.jasperassistant.designer.Grid" value="true"/>

<property name="com.jasperassistant.designer.SnapToGuides" value="true"/>

<parameter name="projectName" class="java.lang.String"/>

<parameter name="projectVersion" class="java.lang.String"/>

<parameter name="dateOfGeneration" class="java.lang.String"/>

<parameter name="user" class="java.lang.String"/>

<parameter name="createdDate" class="java.lang.String"/>

<parameter name="statementUntil" class="java.lang.String"/>

<parameter name="status" class="java.lang.String"/>

<parameter name="subject" class="java.lang.String"/>

<parameter name="responsiblePerson" class="java.lang.String"/>

<parameter name="email" class="java.lang.String"/>

<parameter name="requestThisRequirement" class="java.lang.Boolean"/>

<parameter name="cancelThisRequirement" class="java.lang.Boolean"/>

<field name="gostField" class="java.lang.String"/>

<pageHeader>

<band height="90">

<staticText>

<reportElement positionType="Float" x="390" y="50" width="100" height="20"/>

<box topBorder="Thin" leftBorder="Thin" bottomBorder="Thin" rightBorder="Thin"/>

<textElement verticalAlignment="Middle">

<font size="8"/>

</textElement>

<text><![CDATA[user :]]></text>

</staticText>

<staticText>

<reportElement positionType="Float" x="40" y="30" width="100" height="20"/>

<box topBorder="Thin" leftBorder="Thin" bottomBorder="Thin" rightBorder="Thin"/>

<textElement verticalAlignment="Middle">

<font size="8"/>

</textElement>

<text><![CDATA[Project Name :]]></text>

</staticText>

<staticText>

<reportElement positionType="Float" x="390" y="30" width="100" height="20"/>

<box topBorder="Thin" leftBorder="Thin" bottomBorder="Thin" rightBorder="Thin"/>

<textElement verticalAlignment="Middle">

<font size="8"/>

</textElement>

<text><![CDATA[Date of Generation :]]></text>

</staticText>

<staticText>

<reportElement positionType="Float" x="40" y="50" width="100" height="20"/>

<box topBorder="Thin" leftBorder="Thin" bottomBorder="Thin" rightBorder="Thin"/>

<textElement verticalAlignment="Middle">

<font size="8"/>

</textElement>

<text><![CDATA[Project Version :]]></text>

</staticText>

<textField isBlankWhenNull="true">

<reportElement positionType="Float" x="140" y="50" width="100" height="20"/>

<box topBorder="Thin" leftBorder="Thin" bottomBorder="Thin" rightBorder="Thin"/>

<textElement verticalAlignment="Middle">

<font size="8"/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$P{projectVersion}]]></textFieldExpression>

</textField>

<textField isBlankWhenNull="true">

<reportElement positionType="Float" x="140" y="30" width="100" height="20"/>

<box topBorder="Thin" leftBorder="Thin" bottomBorder="Thin" rightBorder="Thin"/>

<textElement verticalAlignment="Middle">

<font size="8"/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$P{projectName}]]></textFieldExpression>

</textField>

<textField isBlankWhenNull="true">

<reportElement positionType="Float" x="490" y="50" width="100" height="20"/>

<box topBorder="Thin" leftBorder="Thin" bottomBorder="Thin" rightBorder="Thin"/>

<textElement verticalAlignment="Middle">

<font size="8"/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$P{user}]]></textFieldExpression>

</textField>

<textField isBlankWhenNull="true">

<reportElement positionType="Float" x="490" y="30" width="100" height="20"/>

<box topBorder="Thin" leftBorder="Thin" bottomBorder="Thin" rightBorder="Thin"/>

<textElement verticalAlignment="Middle">

<font size="8"/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$P{dateOfGeneration}]]></textFieldExpression>

</textField>

</band>

</pageHeader>

<columnHeader>

<band/>

</columnHeader>

<detail>

<band/>

</detail>

</jasperReport>

 

Everything it's ok, but when i try to export it like in pdf like this:

JRExporter exporter = new JRPdfExporter(); exporter.setParameter(JRExporterParameter.JASPER_PRINT, print); exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, fileNameToDirectory+ fileName); exporter.exportReport();

 

 

i get the following exception

 

Caused by: java.lang.RuntimeException: No valid column line found.

at com.lowagie.text.pdf.ColumnText.convertColumn(Unknown Source)

at com.lowagie.text.pdf.ColumnText.setColumns(Unknown Source)

at com.lowagie.text.pdf.ColumnText.setSimpleColumn(Unknown Source)

at com.lowagie.text.pdf.ColumnText.setSimpleColumn(Unknown Source)

at net.sf.jasperreports.engine.export.JRPdfExporter.exportText(JRPdfExporter.java:1698)

at net.sf.jasperreports.engine.export.JRPdfExporter.exportPage(JRPdfExporter.java:458)

at net.sf.jasperreports.engine.export.JRPdfExporter.exportReportToStream(JRPdfExporter.java:398)

at net.sf.jasperreports.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:265)

at de.softcon.projectview.report.util.ExportManager.export(ExportManager.java:80)

 

if anybody knows where the problem is ,

plz tell me.

 

Tommy

ps. sorry for my english

 

 

 

 

 

 

 

 

 

 

By: Lucian Chirita - lucianc

RE: pdf export problem

2006-07-19 10:01

What JR and iText versions are you using?

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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...