Jump to content
We've recently updated our Privacy Statement, available here ×

textFieldExpression problem


Recommended Posts

By: Clifton Kussmaul - kussmaul

textFieldExpression problem

2002-11-14 04:45

Hi - I have JR 0.4.3 connected to an HSQL 1.6

database (OfBiz).

 

When I compile and run a report, there seem to be the

right number of rows and columns, but table entries

using textFieldExpressions are empty. This happens

for parameters and fields. (see partial XML below).

 

I've spent some time with the debugger:

during compilation, SymbolCache.addSymbolToCache

catches lots of ArrayIndexOutOfBoundsExceptions.

during fill, JRCalculator.evaluate() and evaluateEstimated()

catch lots of NullPointerExceptions.

 

Can anyone identify what I'm doing wrong?

Thanks!

Clif

 

<jasperReport name="Report" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="30" bottomMargin="30">

 

 

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

 

<queryString><![CDATA[sELECT * FROM WORK_EFFORT]]></queryString>

 

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

 

<title>

<band height="50">

<textField>

<reportElement x="0" y="5" width="50" height="15"/>

<textElement textAlignment="Right">

<font reportFont="Arial_Normal" size="22"/>

</textElement>

<textFieldExpression class="java.lang.String">

$P{ReportTitle}

</textFieldExpression>

</textField>

</band>

</title>

 

<detail>

<band height="20">

<textField>

<reportElement x="0" y="5" width="50" height="15"/>

<textElement textAlignment="Center">

<font reportFont="Arial_Bold"/>

</textElement>

<textFieldExpression class="java.lang.String">

$F{WORK_EFFORT_NAME}

</textFieldExpression>

</textField>

</band>

</detail>

 

</jasperReport>

 

 

 

 

 

By: Teodor Danciu - teodord

RE: textFieldExpression problem

2002-11-14 13:10

 

Hi,

 

I suspect you made your text fields too small.

For example, height="15" is not sufficient for

displaying text size="22" as it is the case with your

report title (check the isStretchWithOverflow

attribute).

It would be a good idea to use one of the available

GUI tools or even the built-in JasperDesignViewer

which is not bad at all, to preview you report

designs.

If you don't see the text field expression there at

design time, then you made the text field too small

compared with the font size.

 

Otherwise, are you sure in the result set returned

by your query there is a column

called "WORK_EFFORT_NAME"?

 

I hope his helps.

Teodor

 

 

 

 

 

By: Clifton Kussmaul - kussmaul

RE: textFieldExpression problem

2002-11-15 11:38

Hi Teodor!

You were right - my text fields were too small.

Thanks!

Clif

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