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

Gustaf

Members
  • Posts

    29
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by Gustaf

  1. Hi. Inside my band I have put a frame and within that frame there is an image and a textField. The image streches fine together with the TextField, when the text inside the field needs to use more space. The text usually just breaks, enters the next line, and the image in the background just follows with it and stops just below the text. ... however when there is a lot of text, the image stretches too far and uses too much space leaving a gap between the band height and the textfield. I just don't know how to limit the stretching to always follow the height of the text. I hope I have explained myself. It probably sounds like there is a leading whitespace after the text, but I make sure to trim() the text, so the ws shouldn't be a problem. Any ideas ?
  2. oh hey wait, it works if the two reports included are each put into their own frame object. Just like the example for Follyaxel, the only difference was that I included two subreports into one mainreport. In the mainreport I checked Transparent remove line when blank Print when detail overflows Print repeated values :cheer:
  3. I have a similar problem, however yet still not solved, it's very much like the one you were discussing here. In my case I have a mainreport that includes 2 subreports in the detail band. In the subreports there are textfields, each placed in the detail band in their own report - file (jrxml). The first subreport is called header.jrxml and the second data.jrxml. Header can include text that will overflow one line. However when the header content is too much it overshadows the data content, as if it was underneath, but you just can't see it. I would like it to be able to fit nicely together so that the amount of text in the header file can extend without problems downward. How to do this ? Stretch with overflow is marked in header.jrxml and it extends over the data.jrxml text. If I uncheck it, the full text is not printed.
  4. I have a strange one. I used to be able to run a report (based on an xml source) from iReports. I kind of exported the whole environment to a different computer. After that (same environment as the first computer) the messagebox with "The document has no pages" popped up, and there is no difference in the way the datasource is set up (I think).
  5. Check out a checklist I have made, if the "subreport overflow error" should appear http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=215&func=view&catid=8&id=29012#29012 If you were not using subreports, nevermind.
  6. A quick checklist when getting the Subreport overflow error: 1) Where are you including your subreport in the master report? If you are including it in the detail band, there might be a problem, see this post .. 2) Is the subreport wider than what can be included, or is the page "too long" (the document height property) 3) Does the subreport include any elements that print horizontally rather than vertically? eg the setting of the subreport "Print Order" attribute should probably be changed. I think checking these 3 would lead to a solution of the subreport overflow error.
  7. Strange again because my iReport is using java 1.6. Also did you check out options -> Compatibility ? It looks like you can set the Jasper Reports compatibility there.
  8. I'm very sure it's a Java version issue, as far as I know when the compiler tells you to compile with Xlint flag it's because you are using a deprecated API. So if I am right, then somewhere you probably have to set that flag xlint:unchecked) in order to see what the error is.
  9. I promised to get back, I might not be able to fully explain into detail how we got it to work here, but hey that's why they invented posting in threads, I guess.. The first problem was getting the subreport to print horizontal and then keep this order when including the subreport into the master. Setting the print order did not work 100% in the subreport, unless I defined the subreport to print elements spanning more than 1 column. So I defined 2 columns in the detail band. I didn't need more than one band so I just collapsed the remaining bands that surrounded detail. Back in the main report I measured the width and height of the place of the subreport, so that my subreport would fit in there. I went back to the subreport and adjusted the height and width so it was ok. Also I zeroed the margins. No need for those. In my master report I clicked on the subreport button and expanded the subreport element to fit in where I wanted it. Once inside the subreport I added the following line in the Subreport tab : ((net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("MYPATH") I am using an XML datasource. Under Subreport Expresseion tab, I made sure the Jasper file path was correct.. I just punched in the absolute path to the file. After some hard tries it finally worked and it worked because the subReport parameter (up there) contained the right XPath expression. Working with the Xpath expressions can also take some time.
  10. How is it possible to successfully retrieve a subset from an XML datasource, without having the first element to repeat itself all over? The problem is no longer horizontal printing. I know I have different values in my dataset and I need an xpath expression that successfully retrieves n nodes with different amound of (sub)values, starting from the root I have defined as a parameter to the subset (when setting the datasource expression) What I did was to set an attribute on each subset, so that I select out only the subset with @id='1' for instance ... but little did it help. As all subsets with concurrent id's are retrieved. I am fresh out of ideas. I did something like /root/mydata[@id='1'/subset] mydata[@id=2] has another amount of subset, but my expression selects out all mydata elements. :blush:
  11. You can retrieve a subreport by specifying the Subreport Expression, when you have added the Subreport element to a band in your main report. What kind of data source are you using to retrieve data right now?
  12. Well personally I know you can do this to make your main report print horizontally, but if you have selected the wrong data from the subreport - and even though the subreport is set to print horizontally - you could be trying to fix the wrong problem, if the problem is really the datasource and the way the data is retrieved (it could display in the wrong way). Currently I am trying to solve a problem related to how data is retrieved.
  13. I am very close to solving this, and I have a very good idea how to do it. I will get back asap when it's solved.
  14. I don't really get it, how can you change the print order of a subreport by changing the SubreportExpression to include a relative path ? My main report has a vertical print order, and I have just included a subreport that prints a list of elements horizontally, except when it is included in the main report. It's printed vertically.
  15. I did not see that the topic has been posted before. :unsure:
  16. I have a report, it's fine. I now want to include a subreport into a group I have defined myself. The subreport lies in its own file subreport.jrxml and my main report is in mainreport.jrxml Including the subreport is not the difficult part. I have a successful connection to the subreport elements I want to get out. They are displayed inside my newgroup band, but the print order does not remain horizontal. When I include the subreport the print order in the subreport is vertical and I would like to keep it horizontal - the way it is defined in the subreport. My master report's print order is vertical. How can I keep the subreport's print order ?
  17. Karamveer, are you still following this thread? I found out how to avoid the repeating columnHeader values ! Don't use columnHeaders! Use the title band and remove (if you can) or collapse the surrounding bands. That way - at least for me - I had a report with a different title value from my XML source in every column.
  18. I have a problem with a repeating columnheader. I use an XML file as a datasource and all the elements are displayed fine in detail band (different every time, the way it should be). But in the columnheader it's just the same value everytime. I understand that it's a static band and doesn't behave the same way as detail, but how can I solve the problem and select the new value for every column, in the columnheader ?
  19. Hi there, I have a template jrxml file and a datasource which is some XML. I can generate a test report in iReports without problems, but when I want to use the Jasper java API there is no report generated and "null" is written to the report. Why ? I can see that my jrxml is parsed fine, but it doesn't get the XML. Does anyone recognize this problem ? Some code: jasperReport = JasperCompileManager.compileReport(new FileInputStream(new File("path to template.jrxml"))); BufferedReader bfr=new BufferedReader(new InputStreamReader(new FileInputStream(new File(new String("path to xml.xml"))))); // org.w3c.dom.Document object here JRXmlDataSource jrxml = new JRXmlDataSource(domDocument); // And I think something is wrong in the following // what are params ? // I have just an empty hashmap jasperPrint = JasperFillManager.fillReport(jasperReport, params, jrxml); JasperExportManager.exportReportToPdfFile(jasperPrint, "C:/dev/workspace/tester/simple_report.pdf");
  20. Hi. Also check http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=&func=view&catid=8&id=26828#26828 :)
  21. Insert the following line after </group> <background> <band height="690" isSplitAllowed="true" > <image scaleImage="Clip" vAlign="Bottom" hAlign="Left" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="0" y="8" width="534" height="676" key="image" stretchType="RelativeToBandHeight"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <graphicElement stretchType="RelativeToBandHeight"/> <imageExpression class="java.lang.String"><![CDATA["imglocation.ext"]]></imageExpression> </image> </band> </background> Then play around with the values to adjust the image to the report. Somehow it didn't work for me to add the image directly on the background band, but adding the code in the jrxml and then opening the editoer worked fine.
  22. Hello, So did anyone try out the iReport tool 2.0 ? As far as now does anyone have any experience with the updated tool? Any pros or cons?
  23. Hi, If anyone can help it would be very much appreciated! in Detail Band I have defined 3 columns and my data source is an XML file. Depending on the content of the XML file either column 1, column 1+2 or all three columns will contain data. Currently I am printing all the elements horizontally. If I have elements with no data, they will not be printed accoring to my "print when" expresseion that I have set to not print null values. The thing is I want to be able to align my elements so that they are center relative to the band width. Is this possible? If I have for instance only 2 columns with data, I want to align them in the middle of the detail band. :woohoo:
  24. Might I add you could define a variable as an image URL location that you can use as a parameter to the URL class. in Ireports you can then use the variable to input the image expression as new URL($F{imgvar}.toString()) remember to set the Exp. class to java.net.URL
×
×
  • Create New...