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

edeards

Members
  • Posts

    7
  • Joined

  • Last visited

edeards's Achievements

Rookie

Rookie (2/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Ah thanks Lucian. The fact that expressions in JasperReports are straight java had entirely escaped me. That makes my life far easier. Thanks!
  2. Hi all, I'm writing a report generation system which builds pdf fragments from assorted datasources and tacks them together to form a big report. As a consequence I'm trying to generalise all my input fields in such a way that for all these jasper report fragments, I provide the same fields in a JRMapCollectionDataSource. This works fine so far. However I have a subreport in one report which needs to sum a column and place a total in the footer band. Again, this would be simple - if my fields were Integers rather than Strings! I do have a mechanism in my own code to change this - however it's something I'm prefering use as infrequently as possible, as it means I'm breaking away from my generalised interface. I cannot see any function within the iReport expression builder that allows me parse Integers from the String fields. I'm hoping there is some mechanism by which I can write my own function/expression handling code and plug it into the jasper engine. Does such a mechanism exist? Thanks for any advice!
  3. Hi Teodord, I've just come up against this problem also. The error occurs only when the last content in the html fragment is a &ltli>&lt/li> block. For the simplest way to produce the problem, go to your markup sample in the full jasperreports distro and edit the html.txt file to be simply: &ltli>testbullet&lt/li> When you run "ant fill", you'll get an exception as follows: fill: [java] java.lang.IllegalArgumentException: Invalid substring range [java] at java.text.AttributedString.addAttributes(AttributedString.java:341) [java] at net.sf.jasperreports.engine.util.JRStyledText.getAttributedString(JRStyledText.java:113) [java] at net.sf.jasperreports.engine.util.JRStyledTextParser.write(JRStyledTextParser.java:223) [java] at net.sf.jasperreports.engine.util.JEditorPaneHtmlMarkupProcessor.convert(JEditorPaneHtmlMarkupProcessor.java:157) [java] at net.sf.jasperreports.engine.fill.JRFillTextElement.processMarkupText(JRFillTextElement.java:1360) [java] at net.sf.jasperreports.engine.fill.JRFillTextField.evaluateText(JRFillTextField.java:387) [java] at net.sf.jasperreports.engine.fill.JRFillTextField.evaluate(JRFillTextField.java:353) [java] at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:275) [java] at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:426) [java] at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillTitle(JRVerticalFiller.java:311) [java] at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:149) [java] at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:889) [java] at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:811) [java] at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:89) [java] at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:601) [java] at net.sf.jasperreports.engine.JasperFillManager.fillReportToFile(JasperFillManager.java:492) [java] at net.sf.jasperreports.engine.JasperFillManager.fillReportToFile(JasperFillManager.java:448) [java] at MarkupApp.main(MarkupApp.java:109) Simplest fix is to not have &ltli>&lt/li> as the last content in the parameter. Eg, changing html.txt to the following will cause things to work ok. &ltli>test bullet&lt/li>A It's interesting to note that using whitespace rather than 'A' won't work. I imagine there's a trim in there somewhere. Cheers, Ed
  4. Hmm perhaps I either haven't explained my problem clearly or I'm unaware of some way in which css integrates with JasperReports. I'm constructing PDF fragments using JasperReports which I'm then merging together using iText. I had intended to merge together the PDF fragments using another JasperReport template, however I could see no way to have the image control handle PDF content. I know someone is going to say "Why are you making pdf fragments?" - I'm actually constructing a Document, not a Report, the content of this document is not always of the same form or structure. Hence I need to build content fragments and nail it all together. It's working pretty well for the moment except for situations whereI need text wrapping around objects. Is there some mechanism by which I can use CSS to lay out text despite my targetting PDF output? :-o
  5. Apologies - I've obviously posted this in the incorrect place. While I am using iReport for my templates, this is not really an iReport kind of question.
  6. Hi all, Firstly - I'm new to Jasper, iText, iReport and PDF innards in general. However, I'm implementing a pretty complex document creation system and have numerous challenges ahead of me. Secondly - I've stupidly posted this question on the iReport forums first - now I realise it's completely the incorrect place for it. Now, the question.. One thing I need to be able to do is have text "flow" around objects. Nothing tricky - square objects only. For example, the crummy ascii art below depicts text in a text box ( the ~), going around the subreport (depicted by the |||). ~~~~~~~~~||||||||||||||||||||||||| ~~~~~~~~~||||||||||||||||||||||||| ~~~~~~~~~~~~~~~~~~~~ I don't believe that JasperReports has this capability out of the box - am I correct in this belief? If I am correct - is anybody aware of anybody trying to implement this in the past? Alternatively, are there any suggested ways to tackle this problem? Is it likely to be difficult to implement an extension to the Jasper compiler to handle the idea of text flow? The potential ways I see to do this would be: One text box with a subreport (or whatever) on top of it, somehow the text flow is achieved by detecting the overlap and being clever. Two text boxes, one on the left of the subreport, one below the subreport. Some custom attributes linking the two text boxes together, then somehow deal with the situation when the text hits the bottom of the first text box - rather than stretch the box, split the content string and put the second half into the second text box.I've no idea the relative pain in implementing either of these. Any help/guidance/jeering appreciated. Cheers, Ed
  7. Hi all, Firstly - I'm new to Jasper, iText, iReport and PDF innards in general. However, I'm implementing a pretty complex document creation system and have numerous challenges ahead of me. One thing I need to be able to do is have text "flow" around objects. Nothing tricky - square objects only. For example, the crummy ascii art below depicts text in a text box ( the ~), going around the subreport (depicted by the |||). ~~~~~~~~~||||||||||||||||||||||||| ~~~~~~~~~||||||||||||||||||||||||| ~~~~~~~~~~~~~~~~~~~~ I don't believe that JasperReports has this capability out of the box - am I correct in this belief? If I am correct - is anybody aware of anybody trying to implement this in the past? Alternatively, are there any suggested ways to tackle this problem? Is it likely to be difficult to implement an extension to the Jasper compiler to handle the idea of text flow? The potential ways I see to do this would be: One text box with a subreport (or whatever) on top of it, somehow the text flow is achieved by detecting the overlap and being clever. Two text boxes, one on the left of the subreport, one below the subreport. Some custom attributes linking the two text boxes together, then somehow deal with the situation when the text hits the bottom of the first text box - rather than stretch the box, split the content string and put the second half into the second text box.I've no idea the relative pain in implementing either of these. Any help/guidance/jeering appreciated. Cheers, Ed
×
×
  • Create New...