• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Jj Roberts
  • Tim Holloway
  • Piet Souris
  • Himai Minh
  • Carey Brown
  • salvin francis

exported Jasper Report has different look than preview in IReport designer

Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am using IReport 4 and Jasper Report 4 with Netbeans 6.8 in my application. I am able to successfully export the report to pdf form. But the exported report pdf doesn't have the look and feel of the report previwed in IReport designer. For example, the page number i,e, page 1 of 6 , doesn't show up in the exported pdf. Also, the lines that i am using after each row doesn't come up in the exported report.

I have attached both the files with this post. Also posting the XML source of the jasper report.:

<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="report name" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
<property name="ireport.zoom" value="1.0"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
applicant.`name` AS applicant_name,
applicant.`age` AS applicant_age
`applicant` applicant]]>
<field name="applicant_name" class="java.lang.String"/>
<field name="applicant_age" class="java.lang.Integer"/>
<band splitType="Stretch"/>
<band height="72" splitType="Stretch">
<reportElement mode="Opaque" x="220" y="31" width="179" height="21"/>
<font fontName="Times New Roman" size="18" isBold="true" isUnderline="false"/>
<text><![CDATA[ Test Report]]></text>
<reportElement x="173" y="57" width="226" height="1"/>
<band height="46" splitType="Stretch">
<reportElement x="433" y="19" width="80" height="20"/>
<textElement textAlignment="Right"/>
<textFieldExpression class="java.lang.String"><![CDATA["Page "+$V{PAGE_NUMBER}+" of"]]></textFieldExpression>
<textField evaluationTime="Report">
<reportElement x="513" y="19" width="40" height="20"/>
<textFieldExpression class="java.lang.String"><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
<band height="24" splitType="Stretch">
<reportElement x="54" y="0" width="100" height="20"/>
<font size="14" isBold="true"/>
<reportElement x="399" y="0" width="100" height="20"/>
<font size="14" isBold="true"/>
<band height="58" splitType="Stretch">
<reportElement x="391" y="16" width="100" height="20"/>
<textFieldExpression class="java.lang.Integer"><![CDATA[$F{applicant_age}]]></textFieldExpression>
<reportElement x="54" y="16" width="100" height="20"/>
<textFieldExpression class="java.lang.String"><![CDATA[$F{applicant_name}]]></textFieldExpression>
<reportElement x="44" y="47" width="482" height="1"/>
<band height="45" splitType="Stretch"/>
<band height="54" splitType="Stretch">
<reportElement x="220" y="19" width="149" height="20"/>
<font size="12" isBold="true"/>
<band height="42" splitType="Stretch"/>

Any help will be appreciated.
[Thumbnail for exported-report.jpg]
exported report
[Thumbnail for ireport-preview.jpg]
ireport preview
Water proof donuts! Eat them while reading this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic