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

jambalaya

Members
  • Posts

    11
  • Joined

  • Last visited

jambalaya's Achievements

Apprentice

Apprentice (3/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Collaborator Rare

Recent Badges

0

Reputation

  1. Sorry, you are right, should have done that. Thanks anyways.
  2. Hi. In the maven 2 central repo, the most up-to-date version of jasperreports is 3.5.3. Is there any other repository that you know of that has the most recent versions? Regards.
  3. Hi. I am looking into a use case where I need to create an index at the very end of the reports (hyperlinks not necessary) which lists all the objects and tells which page they are in. Could anyone suggest how this is done? I am thinking of creating some scriptlet that would assign a page to objects in a kind of a map, and this would contain a LinkedHashMap and be evaluated for every row, and somehow use it at the very end of the report, but nothing concrete. Can you help? Regards, jambalaya
  4. Hi. I have the requirement to be able to render HTML attibuted text, which works fine. The question I have is what subset of HTML is officially supported? I bought the definitive guide (version 3.0) and it doesn't say. The closest it gets is that it lists the schema for the proprietary XML that we can use. However, I am not sure about a few things: 1. what is the style attribute? is it the HTML or JRXML version? 2. the list of supported tags mentions <li>, but I don't see a mention of <ul> or <ol>, how do I use it then? (I enclosed these with the <ol> tag in my example, and it worked, but I am not sure if this is officially supported and if this is the correct way of using that.) Also, I did some tests with RTF, and it looks pretty much the same, with the difference that the list has some visual artifacts. Please see the attached file, this is a fragment from the generated PDF file - you can see small rectangles enclosing the first letter after the item sequence number, as if used for some measurments or sth, I don't know. As the last question, could you tell me what component is responsible for rendering the styled text? Does Jasper discover that a text field is styled, and break it down into many smaller fields, or does it delegate the work to on underlying component (like iText for rendering it to PDF)? Best regards, Jambalaya
  5. Hi. Could someone please tell me at which stage is the total number of pages known? I configured a PDF exporter to export only page 1 (the second one), and to my surprise the "page 1 of X" field worked correctly. So, how is the page count known, how does this work? 1. the number of pages is somehow known before the actual PDF document generation is done, but I fail to see how this can be or 2. the whole document is created (3 pages in this case), and then only the bytes for page 1 are written to the stream I supplied, plues all necessary PDF headers and trailers or 3. some other ingenious way I cannot see now Which one is the case? Best regards.
  6. Hi, thank you for your answer, the trick worked fine. Not sure about the pictures, but as we have our own "not-available" image I will not look into that, will do it when it's necessary. Regards.
  7. Hi. I have a report that has a simple list in the detail band. The list are text fields and an Image. Sometimes the fields are printed on one page, but the image overflows to another page. Is there a way to force that a whole band should be printed on a single page? While I am on images, I would like to ask one more thing - one of the settings is onErrorType=icon. I set this, and some of the images are null in the data source. However, there is no icon, the image field is simply empty. What am I doing wrong here? Best regards.
  8. Hi. I do it like this: I'm using JPA with Oracle, and the entity that has images has a java.awt.Image member, which is populated when the entity instance is loaded from the db. The property name is, say, "image". The template has a field for this property, named "image" (JPA data source expects the field names to correspond to entity property names), and an image element in the detail section. The expression class is set to java.awt.Image and the expression is simply "$F{image}". And this is all you have to do. You can of course set scaling and positioning, but this is specific to your app. If you store the images in a BLOB and execute a JDBC query, you can feed the result set to jasper or have the query incorporated into the template, and Jasper will use a javax.jdbc.Connection that you need to supply. The rest is pretty similar - the field has the same name as the column / alias you use in the query, the type is java.awt.Image, and the imge has the same properties set. Jasper automatically tries to transform BLOBs into images. Hope this helps.
  9. Hi. I would like to ask you if the exporters are reusable. By this I mean executing this code: exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPprint); exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, "page_1.pdf"); exporter.setParameter(JRExporterParameter.PAGE_INDEX, 0); exporter.exportReport(); exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, "page_10.pdf"); exporter.setParameter(JRExporterParameter.PAGE_INDEX, 9); exporter.exportReport(); Why I ask this is tht we will have the reports streamed to the user, but not all pages at once, but in portions. I would like to keep the exporter in a HttpSession maybe, and when the user wants to go to a new page I would take this instance, export another page and send it to the user - a kind of stateful preview. I tried the code with a PDF exporter and this works fine, but this may just be a coincidence. Can I do that and not worry about any dirty stuff preserved in the exporter from the first export, or do I have to create a new instance for each request for a new page? Thank you. Post Edited by jambalaya at 07/22/2009 10:15
  10. Hi. As I am new, first of all I would like to thank the creators of JasperReports for this wonderful and powerful reporting engine. You guys rock! Now, the problem. I have a report that uses some letter one cannot find in Latin alphabet (I using polish and german letters in the tests). The output is ok in most export formats, but PDF. I set the isPdfEmbedded to true (not sure at all if this is required), pdfFontName is the default (Helvetica for me), and pdfEncoding is UTF-8. Now, UTF-8 is not on the list of allowed encodings, I put it there the hard way editing the list. When I export it to PDF (using iReport PDF preview) I can only see standard latin characters the special one simply do not appear on the PDF output. When I change the encoding to Identity-H (Unicode with horizontal writing) the internal preview looks fine, but PDF prints nothing for this field. When I change it to cp1250 (central europe) it works fine, but it is not the ideal solution as I expect that our system might be used in French or Spain, and their character would not be displayed. What can I do to fix this? Please see the file attached. Thank you.
×
×
  • Create New...