ryvo Posted December 17, 2014 Share Posted December 17, 2014 Good day. I have a XML file that contains element named TextOutput. This elements occurs just once in the XML. It contains a plain text but special about the text is that lines (they are all 80 characters long) are concatenated together without any separators (no line feeds or so). I need to split the text into individual lines and then print 60 lines per page. But I don't know how to achieve this.What I have done so far using Using Jaspersoft Studio 5.6.2:I'v defined the data adapter of type XML document read the entire textI'v also defined a dataset that has one field which uses an xPath to get value of element TextOutput from the XMLI'v created variable textOutput (java.util.Collection) within the reportI'v created class extending JRDefaultScriptletIn method afterDetailEval() I split TextOutput text into individual lines, then I group them by 60 (meaning I concatenated them using "n" separator) and I set the textOutput resulting List of Strings where each item (String) represents a page.I'v placed TextFiled on the form and set it's expression to $V{textOutput}But It prints the first page only on which more then 60 lines appears.Please advise. Many thanks. Vojtech 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