Jump to content
Changes to the Jaspersoft community edition download ×

Using Variable

Recommended Posts

By: Mihai Gheorghiu - tanethq

Using Variable

2002-07-18 14:18

I'm tyrying to use the following:

<variable name="name1" class="java.lang.String" resetType="Report" resetGroup="" calculation="System">

<variableExpression>$F{firstname1}+" "+$F{lastname1}</variableExpression>


However, when I try to print:

<textField isBlankWhenNull="true">

<reportElement x="102" y="38" width="368" height="14" />

<textElement textAlignment="Left" />

<textFieldExpression class="java.lang.String">$V{name1}</textFieldExpression>


nothing prints out, or null, if I remove "isBlankWhenNull".

Input fields are definitely not null.

Please help.

Thank you all.



By: Teodor Danciu - teodord

RE: Using Variable

2002-07-18 23:40




Why are you using calculation="System"?


This means that the engine should not try

to calculate the value for the variable using

the supplied expression, because you will

do it yourself using scriptlets or something.


I think what you need in this case is the default:



Good luck!





By: Mihai Gheorghiu - tanethq

Re: Using Variable

2002-07-19 07:04

Thanks, but it does not work for "Nothing", either.

I'm really puzzled.

JR0.3.2, Java 1.4.0 on RH7.2.



By: Mihai Gheorghiu - tanethq

Re.: Using Variable

2002-07-19 08:50

It works with initialValueExpression :-)

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