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

tgreanier

Members
  • Posts

    11
  • Joined

  • Last visited

tgreanier'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. I figured the problem out yesterday finally. Our reporting engine's UI allows a report definition (which becomes a jrxml template) to have a name of 100 or less characters. This name is printed in the header of each report page. So, I assumed something like this must be happening: The Jasper fill process added the header and footer, then tried to add the detail section. it noticed there was not enough room, so it started a new page and repeated the process ad infinitum. The solution was to drop the font size of my header from 18 to 16. A nightmare problem solved by reducing a font by 2 points. If only all issues could be this easy ;-) I am going to add some report governor logic though, that is a good idea for the future. Thanks for the responses - Todd
  2. Teodor - Could this issue with the infinite loop with large bands have anything to do with the problem described in my post here?: http://jasperforge.org/plugins/espforum/view.php?group_id=102&forumid=103&topicid=48376 If you suspect it might be similar, is it possible that it could work sometimes (report completes fine) but not other times with the same jrxml content and the same backing data? Thanks - Todd
  3. I am having a strange problem that did not appear until we hit production. I had an OutOfMemory error some time ago in production with reports, which I addressed by using a JRConcurrentSwapFile. All local and QA testing showed this was an improvement. Now, in production I have this scenario: 1. A jrxml is created by the admin using our UI. 2. The report is executed. 3. According to the logs, one of these reports was processing about 2.4 million pages. The report is only 4 pages long. 4. Obviously, the swap file ends up filling up and OutOfMemory occurs again. 5. If I create a new jrxml with exactly the same contents, the report runs normally, resulting in 4 pages. Note that the jrxml and the data are identical in case #3 and case #5. 6. If I then run case #3 again (the original jrxml) the same thing occurs - 2.4 million pages and OutOfMemory. I cannot figure this one out. I cannot tell if this is something going on with the FileChannel in the JRConcurrentSwapFile, something to do with the Csv or Pdf exporter (I produce both reports) or if this is something else entirely. Now I am not sure if my OutOfMemory issue was due to (as I originally thought) a large amount of data/pages for the admin or if it was this problem (but I did not notice it because I was not looking at the logs for the swap file usage). This has to have happened to someone else. Hopefully, I just missed the discussion in the threads. Any help is definitely appreciated. I have included the code I use for creating the swap file below, just in case that is the problem. Code: Some further testing has shown me it is NOT the swap file that is in any way the culprit. With the swap file turned off, it does the same thing with resident memory. So, it appears to be some condition - that is reproducable - that has the JasperFillManager convinced there are an infinite number of pages. Post Edited by Todd Greanier at 11/12/08 16:11 Post Edited by Todd Greanier at 11/12/08 21:49
  4. I am using a JRConcurrentSwapFile with the approproate virtualizer. However, I am confused a bit about the parameters and the results I see. 1. Is it in fact the case that the swap file has no "maximum size" set? In other words, it will continue to grow as needed until, perhaps, it eats all of the file system space available? 2. If the answer to the previous question is yes, then could I set the extensionSize to 0 to prevent growth? 3. Since I am using the JRConcurrentSwapFile I am presuming I should not force a cleanup of the swap file. Thanks - Todd Code:String swapSize = Registry.getInstance().getProperty("JASPER_SWAP_FILE_SIZE");int swapFileSize = (swapSize == null ? DEFAULT_SWAP_FILE_SIZE * 1024 : Integer.valueOf(swapSize) * 1024);JRSwapFile swapFile = new JRConcurrentSwapFile(Registry.getInstance().getProperty("JASPER_SWAP_FILE_PATH"), swapFileSize, 0);String maxPages = Registry.getInstance().getProperty("JASPER_MAXIMUM_IN_MEMORY_PAGES"); int pages = (maxPages == null ? DEFAULT_MAXIMUM_IN_MEMORY_PAGES : Integer.valueOf(maxPages)); JRSwapVirtualizer swapVirtualizer = new JRSwapFileVirtualizer(pages, swapFile);params.put(JRParameter.REPORT_VIRTUALIZER, swapVirtualizer);
  5. After a launch of my code to production yesterday a strange thing has happened. Once in a while my Pdf reports are losing all their color. The data on them is correct, the charts are correct - everything is correct except the color. I have looked at the generated jrxml files and they are correct (referencing the right styles, etc..,). What is puzzling is this does not always happen. The same report will appear in color..and then one time in black and white. Does anyone have any ideas on why this might happen? The only theory I have is some sort of memory issue and the PdfExporter is somehow not "finishing", but it seems odd that everything about the Pdf report is correct except the colors. Thanks for any help - Todd Code:
  6. I faced this issue myself on a work project and I ended up solving it by incorporating an extension I created with JDom and a little Xsl. It works quite well and allows me to have a dynamic number of headers, details and charts. Essentially I construct a "master" jrxml for a given report, which has all the possible elements in it, then I either remove those elements on the fly or augment them with attribute or content manipulation to produce a report specific jrxml. The process is quite fast.
  7. I have a need where I can have 1-3 charts displayed for a pdf report. I have no problem with the dynamics of getting the different chart xml into the summary element, but I am having some confusion over page breaking. I need each chart on its own page. It is not as simple as slamming a break element in and I cannot find a good example anywhere of accomplishing this, which cannot be an unusual need. Any help is much appreciated. Todd
  8. Yes, I tried that earlier, but I think the problem is one of scope. I am using a conditionExpression for a style, and I do not know which group is currently being processed (this is a dynamic reporting engine). Perhaps I can move the logic for the alternating row to each group instead of at the style level?
  9. I know I saw this discussed on the forum, but I cannot find it no matter how I search, so I will ask again. I have no problem alternating row colors, but I cannot seem to figure out how to make sure each group starts with the same color (white) instead of whatever the "next" color should be (white or gray). Anyone know how I can reset to the beginning when the group changes?
  10. Any solution to this? I am having the same issue. My detail band is set to a height of 10, all of the reportElements are set to a height of 10 and the font is a height of 10...but I get an extra space between each record of my report. This is an issue because I am trying to alternate row colors (which is working) but there is always an extra white row between each of my expected rows.
  11. I have been working with JasperReports recently and have created two reports. Both of them have a pageHeader defined. In the view of the design, I can see the area the header should be, though it is blank. In the final report, no headers appear. Any clue?
×
×
  • Create New...