bhavin.panchal Posted March 23, 2023 Share Posted March 23, 2023 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 More sharing options...
kenil.m Posted March 23, 2023 Share Posted March 23, 2023 May be that is because of Jusified which tries equalise left and right side Link to comment Share on other sites More sharing options...
bhavin.panchal Posted March 23, 2023 Author Share Posted March 23, 2023 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now