Jump to content
JasperReports Library 7.0 is now available ×

Rendering oddities specific to a machine!


ianlong

Recommended Posts

Hi All,

 

I'm using jasper reports 1.3.2, and I have an issue that is only reproducible on my production server. I have a report that doesn't fully render on the production server, but that renders fine on all other machine ( Windows XP, Max OS X). Basicaly an empty line gets printed instead of what is supposed to be.

 

I know the query returns the correct information, so that isn't the problem.

 

This makes it very hard to debug! I have tried turning on logging, and the stack trace, although not very comprehensive, is the same for both my local machine and the production server.

 

I know I haven't given many details, but I've attached the report, and I can attach screenshots of the differences, but I don't know what else to provide.

 

My guess was that an exception was being thrown and swalled internally in jasper, and that this accounted for the missing text, but I can't see where.

 

Has anyone run across things like this before? Does anybody have any suggestions?

 

 

Thanks in advance,

Ian [file name=TaskStatus_1.jrxml size=26380]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/TaskStatus_1.jrxml[/file]

Link to comment
Share on other sites

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

ianlong wrote:

Hi All,

I'm using jasper reports 1.3.2, and I have an issue that is only reproducible on my production server. I have a report that doesn't fully render on the production server, but that renders fine on all other machine ( Windows XP, Max OS X). Basicaly an empty line gets printed instead of what is supposed to be.

I know the query returns the correct information, so that isn't the problem.

This makes it very hard to debug! I have tried turning on logging, and the stack trace, although not very comprehensive, is the same for both my local machine and the production server.

I know I haven't given many details, but I've attached the report, and I can attach screenshots of the differences, but I don't know what else to provide.

My guess was that an exception was being thrown and swalled internally in jasper, and that this accounted for the missing text, but I can't see where.

Has anyone run across things like this before? Does anybody have any suggestions?


Thanks in advance,
Ian [file name=TaskStatus_1.jrxml size=26380]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/TaskStatus_1.jrxml[/file]

 

Update: I have updated my jasper reports library to 2.0.2 and the problem still persists!

 

Anyone have any suggestions?

 

TIA,

Ian

Link to comment
Share on other sites

lucianc wrote:

It's not clear what the problem is, but you might want to check whether the Arial font is available in the Java VM of the machine where you have the problem.

Regards,
Lucian

 

Thanks for the response, but I don't think that's the issue, all of the other text fields with that font render correctly.

 

In the following:

 

<band height="17" isSplitAllowed="true" >

<printWhenExpression><![CDATA[boolean.valueOf($P{ShowDetail}.equals( Boolean.TRUE ))]]></printWhenExpression>

<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Group" evaluationGroup="location" hyperlinkType="None" hyperlinkTarget="Self" >

<reportElement

x="25"

y="2"

width="243"

height="15"

key="textField-1"

isPrintWhenDetailOverflows="true"/>

<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>

<textElement textAlignment="Left">

<font fontName="Arial" pdfFontName="Helvetica-Bold" size="13" isBold="true"/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$F{location} + " - " + $F{location_name}]]></textFieldExpression>

</textField>

<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >

<reportElement

x="322"

y="2"

width="112"

height="15"

forecolor="#000000"

key="textField-5"

isPrintWhenDetailOverflows="true"/>

<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>

<textElement textAlignment="Center">

<font fontName="Arial" pdfFontName="Helvetica-Bold" size="13" isBold="true"/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$R{text.percentcomplete}]]></textFieldExpression>

</textField>

<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >

<reportElement

x="435"

y="2"

width="101"

height="15"

key="textField"/>

<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" leftPadding="2" rightBorder="None" rightBorderColor="#000000" rightPadding="2" bottomBorder="None" bottomBorderColor="#000000"/>

<textElement textAlignment="Center">

<font fontName="Arial" pdfFontName="Helvetica-Bold" size="13" isBold="true"/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$R{text.duedate}]]></textFieldExpression>

</textField>

<line direction="TopDown">

<reportElement

x="0"

y="0"

width="648"

height="1"

forecolor="#CCCCCC"

key="line-6"/>

<graphicElement stretchType="NoStretch"/>

</line>

</band>

 

All the text fields are rendered except this one:

 

<textFieldExpression class="java.lang.String"><![CDATA[$F{location} + " - " + $F{location_name}]]></textFieldExpression>

 

Where nothing at all gets rendered, just a blank ( empty column ) in the report.

 

Ian

Link to comment
Share on other sites

Hi --

 

I've had blank lines appear when my font size is just a tad too big for the allocated height. I notice you have font size="13" and height="15". Perhaps you could try a smaller font size or bigger height to see if it makes a difference? I'm not sure why the machine would matter though.

 

Betty

Link to comment
Share on other sites

itchytoes wrote:

Hi --

I've had blank lines appear when my font size is just a tad too big for the allocated height. I notice you have font size="13" and height="15". Perhaps you could try a smaller font size or bigger height to see if it makes a difference? I'm not sure why the machine would matter though.

Betty

 

I'm wondering if some kind of font substitution is happening, and on that machine the font is larger than the area available? I'll give it a try, thanks for the suggestion.

 

Cheers,

Ian

Link to comment
Share on other sites

itchytoes wrote:

Hi --

I've had blank lines appear when my font size is just a tad too big for the allocated height. I notice you have font size="13" and height="15". Perhaps you could try a smaller font size or bigger height to see if it makes a difference? I'm not sure why the machine would matter though.

Betty

 

Hi All,

 

Problem solved!

 

Your suspicion was indeed correct. The font was too big for the allocated height.

Lucian's tip was also crucial, because the Arial font was not installed, as he suspected. I think the production system substituted a font which was too big, whereas the specified arial font fit locally.

 

Thanks!

 

Ian

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