gudavallibhavani1999 Posted September 12, 2023 Share Posted September 12, 2023 when input string contains "%", the string after this % is getting printed in new line on PDF which is created using jasper soft studioexample: input String : AAAAAAAAAAAAAAAAAAAAA%BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBoutput:AAAAAAAAAAAAAAAAAAAAA%BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBcase 2: when the string between two "%" characters able to fit in same line (based on width of textfield) then the string is coming in same line otherwise printing on new lineinput String : AAAAAAAAAAAAAAAAAAAAA%BBBBBBBBBBBBBB%CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCoutput:AAAAAAAAAAAAAAAAAAAAA%BBBBBBBBBBBBBB%CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCtried using different pdf encodings and by changing properties of text field but still having the issue could someone please help me to resolve this issue.. Link to comment Share on other sites More sharing options...
anish.rai Posted September 12, 2023 Share Posted September 12, 2023 Thank you for posting to the Jaspersoft Community. Our team of experts has read your question and we are working to get you an answer as quickly as we can. If you have a Jaspersoft Professional Subscription plan, please visit https://support.tibco.com/s/ for direct access to our technical support teams offering guaranteed response times. Link to comment Share on other sites More sharing options...
Prasanth Parameswaram Posted September 18, 2023 Share Posted September 18, 2023 Hi, Could you please confirm your Jaspersoft version?I tried with a sample scenario where I added the input control text as Test1%TestConditionTrueforThisCaseAndThisScenario and this is getting printed in a single line.Tried with test1%bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbBB is also getting printed in a single line. However, I see that if we increase the characters, then it's behaving as you mentioned.Could you please elaborate on the scenario which you are trying to achieve? Thanks Link to comment Share on other sites More sharing options...
gudavallibhavani1999 Posted September 20, 2023 Author Share Posted September 20, 2023 Hi,i am using TIBCO Jaspersoft studio 6.12.0-Visual Designer for JasperReports 6.12.1 version.Expected Output:should get the whole input string on PDF without getting split when we have % ! ; . " () [] {} these characters in input string, we need to display the input string properly on pdf text field though we have those special characters in input string by continuing on same line without going to new line (means the string should utilize the current line width of text field).Final Target: we should display the string on pdf text field as given in input by filling from left to right and by considering the width of field. Link to comment Share on other sites More sharing options...
Teodor Danciu Posted September 25, 2023 Share Posted September 25, 2023 Hi,What we see here is standard Java word break/wrap policy and not the result of something we implemented ourselves.It is not clear what exactly you are looking. Are you looking for changing the list of characters that can trigger word breaks, or would you rather have any word cut in the middle if it does not fit? Are you looking to change the way words break/wrap, or are you looking for disabling word break/wrap altogether and simply cut text wherever the text element width occurs?Thank you,Teodor Link to comment Share on other sites More sharing options...
gudavallibhavani1999 Posted September 26, 2023 Author Share Posted September 26, 2023 Hi,I am looking for disabling string break when we have % ! ; . " () [] {} these charactersinput: AAAAAAAAAAAAAA%BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB;CCCCCCCCCCCCgetting output on pdf like below: string breaks when we have % and ;(consider below box as text field in japser soft and pdf) AAAAAAAAAAAAAA% BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB; CCCCCCCCCCCC Expected: string should not break even when we have % and ; on string AAAAAAAAAAAAAA%BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB BBBBBBBBBBBBBBB;CCCCCCCCCCCC Link to comment Share on other sites More sharing options...
gudavallibhavani1999 Posted September 26, 2023 Author Share Posted September 26, 2023 Hi,I am looking for disabling string break when we have % ! ; . " () [] {} these charactersinput: AAAAAAAAAAAAAA%BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB;CCCCCCCCCCCCgetting output on pdf like below: string breaks when we have % and ;(consider below box as text field in japser soft and pdf)AAAAAAAAAAAAAA%BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB;CCCCCCCCCCCCExpected: string should not break even when we have % and ; on stringAAAAAAAAAAAAAA%BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB;CCCCCCCCCCCC Link to comment Share on other sites More sharing options...
Teodor Danciu Posted September 26, 2023 Share Posted September 26, 2023 You did not clarify it for me. So let me ask it differently:If there is a space character somewhere, would you want the word after it to be moved onto next row or should it be cut in the middle?For example, if there is a space between the BBBs and the CCCs, should it look like this:AAAAAAA%BBBBBB CCCCCCCCCCCCOr should it look like this:AAAAAAA%BBBBBBCCCCCCCCCCCCSo I understand that special characters cause unwanted breaks for you, but should we prevent all word breaks, including the classical white spaces and tabs? No word wrap anymore, just break anywhere element width dictates? Link to comment Share on other sites More sharing options...
gudavallibhavani1999 Posted September 26, 2023 Author Share Posted September 26, 2023 Hi,if there is a space between the BBBs and the CCCs, the output should look like thisAAAAAAA%BBBBBBCCCCCCCCCCCCshould we prevent all word breaks, including the classical white spaces and tabs?answer for the above question is no, incase of whitespace and tabs it should move to next line when there is only limited space for the word after the whitespace.example:string : It was found that 64% respondents should come back saying yes.expected output:It was found that 64%respondents should come back saying yes.not like:It was found that 64% respondents should come back saying yes.please help me to resolve this issue as soon as possible.Thank you. Link to comment Share on other sites More sharing options...
gudavallibhavani1999 Posted September 29, 2023 Author Share Posted September 29, 2023 Hi @teodord,could you please confirm us whether this issue can be resolvable or should we consider it as jasper soft studio limitation.Thank you. Link to comment Share on other sites More sharing options...
Teodor Danciu Posted October 3, 2023 Share Posted October 3, 2023 Hi,Achieving this behaviour means customising the way word break policy occurs in Java/AWT.It is not trivial and this can only be done in the context of a request for enhancement, as it is not considered a bug.It would have been easier if word wrap would have been disabled altogether, but what we are talking about here is custom word break policy.It is not even clear how such custom word break policy would be configured. Would it be about establishing a list of characters that should or should not cause word breaks?Definetly not trivial.Thank you,Teodor Link to comment Share on other sites More sharing options...
gudavallibhavani1999 Posted October 4, 2023 Author Share Posted October 4, 2023 Hi,I am getting same issue as discussed in the below link.https://community.jaspersoft.com/ireport-designer/issues/8066please check it and help me to resolve this issue.Thanks,Bhavani 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