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

Unnecessary space Between words


bhavin.panchal

Recommended Posts

Hello,

In the design of my report, some unnecessary space are captured automatically in textField as well as StaticText.


Below text,
String value  = "THis is checklist, THis is checklist for make ready action. It's include ActivityType and location for trigger point. This checklist for only Project admin role. The checklist name is very long.THis is checklist, THis is checklist for make ready action. It's include ActivityType and location for trigger point. This checklist for only Project admin role. The checklist name is very long."

Above in String value i added only one space between all words. Also In pdf, On first line the string value captured as per above text but in second line they automatically consume extra space in between words.
below the code 
    textField = new JRDesignTextField();
        textField.setX(41);
        textField.setY(21);
        textField.setWidth(259);
        textField.setHeight(25);
        textField.setFontSize(10f);
        textField.setForecolor(Color.decode("#093B5C"));
        textField.setHorizontalTextAlign(HorizontalTextAlignEnum.JUSTIFIED);
        jrExpression = new JRDesignExpression();
        jrExpression.setText("$P{checkListName}");
        textField.setExpression(jrExpression);
        band.addElement(textField);
 and i also added  image for output of pdf.

Can anyone know why this happen?
Bhavin Panchal

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Now i removed the Jusified from textField but still i got this space related issue.
String value = "THis is checklist, THis is checklist for makeready action.It's include ActivityType and location for triggerpoint.This checklist for only Project admin role.The checklist name is very long.THis is checklist,THis is checklist for makeready action.It's include ActivityType and location for trigger point.This checklist for only Project admin role.The check list name is very long. fudhu shfuhsi sduhf ushfduf hudshf duh udfd dsudhu"
Below code,
      textField = new JRDesignTextField();
        textField.setX(36);
        textField.setY(99);
        textField.setWidth(350);
        textField.setHeight(25);
        textField.setFontSize(9f);
        textField.setForecolor(Color.decode("#0E588A"));
        jrExpression = new JRDesignExpression();
        jrExpression.setText("$P{checkListName}");
        textField.setExpression(jrExpression);
        band.addElement(textField);
and below i attached pdf output.

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