gdavej Posted February 1, 2010 Share Posted February 1, 2010 I'm creating a report with a lot of text, numbered lists and bulleted lists. I tried using html markup for the lists, but when the text on a list item spills over to a second line, the second line doesn't show the hanging indent. This is what I want to see, This is what I want to see, This is what I want to see, This is what I want to see, This is what I want to see, This is what I want to see, This is what I want to see, This is what I want to see, This is what I want to see. 1. and this is what I see, and this is what I see, and this is what I see, and this is what I see, and this is what I see, and this is what I see,Is there any way that I can get the list items to display correctly (ie like the first example above)?CheersDavid Link to comment Share on other sites More sharing options...
malpohl Posted February 26, 2010 Share Posted February 26, 2010 I am having the same problem. Is there any solution to this? -Guido Link to comment Share on other sites More sharing options...
uhurusurfa Posted August 10, 2010 Share Posted August 10, 2010 Do not think it is possible. Look in JRStyledTextParser.java and search for "u2022".The code simply finds all <li> tags and replaces them wtih the bullet character (\u2022) and all </li> with a newline character (\n).The markup tags are discarded. Link to comment Share on other sites More sharing options...
malpohl Posted August 10, 2010 Share Posted August 10, 2010 In the meantime I have written a patch that enables not only hanging indents, but also tables.I am willing to contribute this, if the JasperReports architects are interested?Regards,-GuidoSolution idea: To enable the indetation I am changing the document structure on the fly by replacing a single text box by a number of text boxes, one for every (indetented) paragraph.Post Edited by malpohl at 08/10/2010 12:24 Link to comment Share on other sites More sharing options...
lucianc Posted August 14, 2010 Share Posted August 14, 2010 malpohlWrote: In the meantime I have written a patch that enables not only hanging indents, but also tables. I am willing to contribute this, if the JasperReports architects are interested? We're of course interested in contributions. Please upload your patch via the project trackers.Thank you,Lucian Link to comment Share on other sites More sharing options...
tom_monnier Posted August 30, 2010 Share Posted August 30, 2010 I have the same requirement.has the patch been uploaded to the trackers and/or has it been integrated in Jasper? If not, Guido, could you share your code with us? I think there are many out there with the same requirements and this issue. Thanks,Tom Link to comment Share on other sites More sharing options...
malpohl Posted August 30, 2010 Share Posted August 30, 2010 Yes, I will share, but the problem is that I am quite busy at the moment. I will try and upload something this week.It probably will be the old version which can not do nested indentations, because the newest one uses JDOM and I am not sure if that is OK with the architects. (The JDOM version can also do tables...)-GuidoPost Edited by malpohl at 08/30/2010 14:19 Link to comment Share on other sites More sharing options...
tom_monnier Posted August 31, 2010 Share Posted August 31, 2010 Hi GuidoThanks for the reply. If you don't mind you can perhaps attach your solution here instead of on the tracker?That way you can attach the later version supporting nested lists. Just a thought, but would be really helpful for me,ThanksTom Link to comment Share on other sites More sharing options...
malpohl Posted August 31, 2010 Share Posted August 31, 2010 OK, here is something... It is the whole 3.7.2 distribution including all my changes which can be found in the JasperReports/src/net/sf/jasperreports/engine/fill/ directory.I included the jasperreports.jar which can be used right away - if you dare to use it.This is the complete version which uses JDOM to parse, so I included it as well. I removed the other libs though...-GuidoPost Edited by malpohl at 08/31/2010 09:39 Link to comment Share on other sites More sharing options...
tom_monnier Posted September 1, 2010 Share Posted September 1, 2010 Thanks alot Guido,im digging into the code now since I have stackoverflow: .... at net.sf.jasperreports.engine.fill.JRFillTextFieldFrame.prepare(JRFillTextFieldFrame.java:147) at net.sf.jasperreports.engine.fill.JRFillTextFieldFrame$JRFillTextFieldElements.prepareElements(JRFillTextFieldFrame.java:312) at net.sf.jasperreports.engine.fill.JRFillTextFieldFrame.prepare(JRFillTextFieldFrame.java:147) at net.sf.jasperreports.engine.fill.JRFillTextFieldFrame$JRFillTextFieldElements.prepareElements(JRFillTextFieldFrame.java:312) at net.sf.jasperreports.engine.fill.JRFillTextFieldFrame.prepare(JRFillTextFieldFrame.java:147) at net.sf.jasperreports.engine.fill.JRFillTextFieldFrame$JRFillTextFieldElements.prepareElements(JRFillTextFieldFrame.java:312) at net.sf.jasperreports.engine.fill.JRFillTextFieldFrame.prepare(JRFillTextFieldFrame.java:147).... I'll let know if I find a solution.... Link to comment Share on other sites More sharing options...
malpohl Posted September 1, 2010 Share Posted September 1, 2010 That looks like I known problem which is already fixed - or at least I thought so. It can only happen if the procedure is trying to replace something that was already replaced. Can you send me the document you are trying to process?-Guido Link to comment Share on other sites More sharing options...
tom_monnier Posted September 2, 2010 Share Posted September 2, 2010 Seems to be related to how you create the listif I do something like this:<ol><li>item 1</li><li>item 2</li></ol>I get the stack overflow, this however does work:<li>some text<li>nested 1</li><li> nested 2</li></li> I was doing the first style, since we need support for both bullet and numbered lists. Can you verify this? example doc in attachment.- Tom Link to comment Share on other sites More sharing options...
tom_monnier Posted September 2, 2010 Share Posted September 2, 2010 Is Lucian or any of the other devs following this discussion?I would like to propose to integrate these features into the jasper codebase.The reason is simple: we need this requirement -> we will be adapting the jasper codebase we want to be able to easily upgrade our jasper versions in the futureI also believe this is a feature many people would like. So if implemented correctly, it could benefit everyone. If the jasper dev's can agree, maybe they can give us some extra information.eg. what do you expect from the feature regarding complexity, what third party libs can be used (eg. jdom in Guido's current implementation, ...)We ourselves need numbered lists, bullet lists (both nested) and indented paragraphs (eg. <p margin="20px">...) Guido, what about the code you attached, can we freely use it and perhaps integrate into Jasper? Link to comment Share on other sites More sharing options...
malpohl Posted September 2, 2010 Share Posted September 2, 2010 OK, obviously my parser is not as robust as it ought to be. My excuse is that in our application we have a different parser generating the field contents, so that I am not really confronted with "illegal" syntax.Obviously I have to put some additional work into error-handling.Currently only "li" tags for lists are supported. example:<li>fist item, first level<li>first item, second level</li></li><li>second item, first level</li>...Numbered lists are not supported (but could be easily).Indented paragraphs are not supported (but could be easily).For more information please take a look at the JavaDoc of net.sf.jasperreports.engine.fill.rtfextension.StyledTextFieldExtension where I explain what is allowed (understood) and what is not.-GuidoPost Edited by malpohl at 09/02/2010 12:16 Link to comment Share on other sites More sharing options...
mhou1981 Posted June 12, 2012 Share Posted June 12, 2012 Is there a solution to the hanging indent for the JasperReport <li> tags now? I have been trying to fix this issue without any success. Link to comment Share on other sites More sharing options...
jswizardry Posted March 6, 2018 Share Posted March 6, 2018 Has this still not made it's way into the product?At ~ v6.1 or some version pre 6.4.3, this was possible using First Line Indent + Left Indent and a negative value. Now, the negative value is ignored the version we currently use, 6.4.3. What's going on? 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