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

How to get previous JRDesignTextField's length


benjaminliuman

Recommended Posts

Currently, I need to generate a title like 'User name + Created on'.

If I generate it by one JRDesignTextField, like "$F{userName} + $F{createon}", the report's global timezone will not work, if I generate it by two JRDesignTextField, I can not generate it in one line, because I can not get "User name" length, if I can get its length, I can use it to set "Created on" x.

 

Below is my code:

 

JRDesignTextField userName = new JRDesignTextField();

JRDesignTextField createon = new JRDesignTextField();

userName.setExpression(new JRDesignExpression("$F{userName}"));

createon.setExpression(new JRDesignExpression("$F{createon}"));

createon.setX( "how can I get userName's length to make createon follow username");

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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