Jump to content

kenclark

Members
  • Posts

    14
  • Joined

  • Last visited

 Content Type 

Forum

Downloads

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Events

Profiles

Everything posted by kenclark

  1. I created a tracker issue: http://jasperforge.org/tracker/index.php?func=detail&aid=3433&group_id=102&atid=612&action=edit
  2. Thanks for the info and link. Using a debugger, I eventually tracked down the problem, which I am pretty sure is a bug in Jasper. Basically, Jasper cannot render any text string as html markup if it ends in "</ul>", even if that is a legitimate end tag. The html was well formed and there were no problems with it. I think there are problems with other end tags as the last item in the text but I did not look into this any further. I got around this by just tacking on " " to the text content when generating the XML (this is an XML data source, though I am not sure whether that is relevant.) Also, this is occurring within a subreport -- again I don't know whether this is relevant to the problem. Thanks, ken
  3. I would have thought that Jasper would just ignore any tags that it cannot parse, the same as any other html viewing mechanism. Since you have coded defensively around this, I gather you have run into problems? Have you seen something similar to what I posted? I had been assuming that there was some tag in the content that was either missing an end tag or was out of order. If this is the case, removing unknown tags won't solve the problem. Is it really necessary to clean the html tags out? That strikes me as a pretty time consuming workaround, and it would eliminate any possibility of taking advantage of new html support that may come about in future Jasper versions. Thanks, ken
  4. I am trying to generate a report with one of the fields set to HTML markup, but I am getting the error below. I assume there is some data problem, so: 1) I'd like to know where it is so I can fix it. Any ideas how to track it down? 2) This is user input data, so it is possible that it will not be correct. I would like the report to continue to function when it runs into less-than-perfect html markup -- even if it displays an empty field for that particular data instance. Thanks, ken Code:14:32:23,063 ERROR [JRFillSubreport] Fill 1275337158: exceptionjava.lang.IllegalArgumentException: Invalid substring range at java.text.AttributedString.addAttributes(AttributedString.java:359) at net.sf.jasperreports.engine.util.JRStyledText.getAttributedString(JRStyledText.java:113) at net.sf.jasperreports.engine.util.JRStyledTextParser.write(JRStyledTextParser.java:223) at net.sf.jasperreports.engine.util.JEditorPaneHtmlMarkupProcessor.convert(JEditorPaneHtmlMarkupProcessor.java:157) at net.sf.jasperreports.engine.fill.JRFillTextElement.processMarkupText(JRFillTextElement.java:1360) at net.sf.jasperreports.engine.fill.JRFillTextField.evaluateText(JRFillTextField.java:387) at net.sf.jasperreports.engine.fill.JRFillTextField.evaluate(JRFillTextField.java:353) at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:275) at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:426) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:1380) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:692) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportContent(JRVerticalFiller.java:275) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:117) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:888) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:810) at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:544) at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:63) at net.sf.jasperreports.engine.fill.JRThreadSubreportRunner.run(JRThreadSubreportRunner.java:209) at java.lang.Thread.run(Thread.java:637)
  5. You created a variable named ramo_des, but referenced a field named ramo_des $F{ramo_des}. A field represents a value (usually a column) from a data source. A variable is a construct declared inside of your jrxml. ken
  6. You have not actually declared a variable, you have referenced one from a text field. And really you didn't reference it. To reference it you would use $V{ramo_des}, not just ramo_des. Before you can reference it, you need to declare it, as in: <variable name="my_var" class="java.lang.Integer"> <variableExpression><![CDATA[new Integer($V{PAGE_COUNT}.intValue() - 1)]]></variableExpression> </variable> or use whatever formula you need to get the value you desire. Thanks,ken
  7. I think you can do it basically like this: Create a static text element and set it to only print when the field is null using "Print When Expression". On your text field, set it to print blank when null. Put the two fields on top of each other. Good luck, ken
  8. I am having a ton of trouble trying to get XML Datasource based reports working with subreports, so I am trying just to get a basic example working. I am using the addressbook example from this site: http://ireport.sourceforge.net/cap7.html#7.3 I am working with the iReport plugin for NB ver 1.0. So I am starting with just the main report, addressbook.jrxml I have created one field, LASTNAME. Now, if I use the field description as specified in the above link, " /addressbook/category/person+LASTNAME", I cannot find a corresponding datasource expression that works. I assume the datasource expression should be "/addressbook/category/person", but using this plus the above field description gives a single result value in the preview of "NaN". I'm no idiot, I know that's bad. I have also tried an empty datasource expression for the XML file but that made no difference. Changing the field description to just "LASTNAME" makes things work like I would expect (except for some reason when previewing, only 3 last names are shown -- but I think that is just the way the previewer works, it only shows the first three result records no matter what you do.) So now, next step, I will create a hobbies.jrxml. For now, I just have a static text field. Then I embed it into addressbook.jrxml as a subreport. Details: subreport expression: $P{SUBREPORT_DIR} + "hobbies.jasper" connection type: "Use a datasource expression" data source expression: $F{Hobbies} Oh, and of course I had to make the field "Hobbies". The field class has to be java.lang.Object (because it is supposed to be generated as a JRDataSource). Again following the example, I use "/addressbook/category/person+hobbies*hobby". Of course we know this likely won't work, but lets try it anyway. The report still runs -- that's something I guess. But the space that should be filled by the subreport is empty. Trying field expression "hobbies*hobby" does no better. I tried "hobbies/hobby" too, with no luck. And several other iterations. So I am stuck, and this is about as simple an example of XML Datasource subreports that could possibly be imagined. Imagine my frustration (maybe you've been there too.) Anyone see where I am going wrong? Thanks from the bottom of my heart to anyone who is kind enough to reply. I will be happy to post any necessary code. ken Post Edited by Ken Clark at 12/30/08 08:04
  9. I am working on a report that is using a XML Data source. The XML file I am using has dozens of nodes that match the data source expression, but when I preview it only displays the first 3. Is this because of some setting on preview that I need to change, or is there something wrong with the input XML file such that something is breaking when reading the 4th node? Thanks, ken
  10. I tried to get this working on the three most recent versions of iReport and ran into the same issue on each one. Any ideas? Thanks, ken
  11. I should point out that I tried this in all 3 of the latest iReport versions: NB-based, NB-plugin, and Classic. Same basic problem in all three. Any ideas what could be wrong? Thanks, ken
  12. I am new to iReport and thought it would be useful to work on a report using an XML Data Source since I figured that would be easy to do. So far it has been anything but easy. Maybe I fundamentally don't understand something basic about how iReport works, but I have spent several hours reading and trying to follow tutorials, but no matter what I try, I find that I always end up with the same thing -- a popup window that says "The document has no pages." What I am working on now is the xmldatasource sample. Basically: I load the CustomerReport.jrxml file into iReport. I set up a XML File Data Source for the file northwind.xml, with a Select Expression of "/Northwind/Customers/" (I have tried various similar options with no better success.) Then I click on "Execute with active connection" and get the "...no pages" error message. What am I missing? Thanks, ken
×
×
  • Create New...