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

Dduffek

Members
  • Posts

    15
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Downloads

Everything posted by Dduffek

  1. Never mind. I figure out my issue. It was in a different place in the code. Sorry to bother you. Dan
  2. Hi all, I am work with IReport (getting the newest version) and a program that compiles templates and generates a jasper print. In my template, I have 2 report groups. 1 report group manages pages. The other works off of a variable from the data. The data is read as a field call Operator. The expression of the report group is this $F{Operator}. Also the box is checked for resetting the page count. Anyways, I run this report in IReports and it works perfectly, and the page numbers are reset on every new Operator. In my program, it seems to think every new page has a different operator, thus the page number is always 1. I am using JasperCompileManager.compileReport(uncompiledTemplateIn) to compile my reports. Do I need something else here? I am passing in the data later and that all seems correct, so it looks like the template is just being compiled differently. Also I know both programs are using the same JasperReports jar. Any guesses anyone? Thanks for looking at this. Dan Post edited by: Dduffek, at: 2007/03/26 17:23
  3. I think this might have been an over sight when creating the JasperCompileManager. You cannot use the compile manager to compile a report to a JasperReport that has a subreport that is passed in as a parameter. There is no method which accepts java.util.Map with parameters. In the JasperRunManager, you can pass in a subreport as a parameter, but you cannot compile the jrxml to a JasperReport. The bottom line of what I'm saying is there is no way to compile a template that a parametertized subreport to a JasperReport. Am I correct in this and should it be reported as a bug/new feature? Or am I just missing something? Thanks for your help. Dduffek
  4. Is there any way to retain knowledge of a previous detail row? Futher explanation: I have an xml data source. It has a table with rows. My Xpath expression has the detail band looping over the rows. Each row has a type on it. What I'm looking to do is to place separator when a row type changes from tablerow to subtotal. I figure that I need to use a variable, but I am unsure of how to maintain a reference or maybe the row type of the previous row. Any one got any ideas? Thanks for the help, Dduffek Sample of the xml Code:<Root> <Table> <row type="tablerow"> data </row> <row type="tablerow"> data2 </row> <row type="subtotal"> sub total </row> </Table> </Root>Post edited by: Dduffek, at: 2006/09/15 15:55
  5. I've notice that behavior with my code as well. The virtualizer will reduce the size in memory of the JasperPrint, so I don't think that is your problem. I've had stuff run 24 hours then stop because of memory errors. It was always because my data set was too large. So I wrote a method to split my data into smaller segments, and ran those smallers segments through JasperReports instead of a larger data set. I got a huge performance boost so doing this. So I would recommend doing some data management before processing the report. Good Luck, Dduffek
  6. Hi. I have a report that will be have rows of data and captions. I don't know how many rows of data will exist, but I want to place a bar after every 2 caption rows. I have a field that can tell me if a row is a caption or a data, and I can handle placing the bar, if I know how many captions I have printed up to that point. What I need to figure out is how to keep track of the number of captions that have been printed. I think I need a variable, but I am unsure of how to format the variable. I think I need something similar to this: Code:<variable name="CaptionCount" class="java.lang.Integer" resetType="Report" calculation="Count"> variableExpression><![CDATA[($F{Type}.equals("caption"«»)? increment count: do nothing)]]></variableExpression> <initialValueExpression><![CDATA[new Integer(0)]]></initialValueExpression> </variable> Anyone have any ideas? Thanks for any thoughts you might have. Duffek
  7. You should check your jrxml for your subreport, and ensure it is recieving a data source. Ireport can provide a data source without storing a refernce to it in the jrxml. HTH, Duffek
  8. You can always check the samples that are provided with JasperReports. They are always a good idea of how to solve many problems. Here is the code from the Virtualizer example Code:Map parameters = new HashMap(); parameters.put(JRParameter.REPORT_VIRTUALIZER, virtualizer); JasperPrint jasperPrint = JasperFillManager.fillReport(fileName, parameters, dataSource); virtualizer.setReadOnly(true);
  9. Another option is to increase the size of your jvm. When you start your jvm, pass it these flags: -Xms128m -Xmx256m The first tells it how much mentioned to initially grab. The second tells the jvm how large it can grow to. You can change the numbers (128, 256) to what ever numbers you wish. Also I would only recommend doing this after you have tried the virtualization method mentioned by lucianc. Hope this helps, Duffek
  10. Hi, I suppose the first question is what do you want out of JasperReports or what do you want to accomplish with it? The first thing I would do with it is play with the sample programs that come with JasperReports. They are very good, and have a fair variety. Also I would download iReports designer for JasperReports. It is very useful. http://sourceforge.net/projects/ireport/ Anyways I hope this helps, Dan
  11. Hi, Copying the them into the first page works far better. Thank you for all your help. Dan
  12. Thanks for the idea. It seems like a good one. I can ensure that size and orientations are the same. That's no problem. However I am having a problem getting the pages to copy. Here's my code: public static void concat(Object args[]) { try{ JasperPrint jasperPrint = new JasperPrint(); JasperExportManager JEM= new JasperExportManager(); List jasperPrintList = new ArrayList(); JasperPrint tempPrint = new JasperPrint(); for (int i =0; i< args.length-1; i++){ tempPrint = (JasperPrint) JRLoader.loadObject((String) args); jasperPrintList = tempPrint.getPages(); for(int j =0; j< jasperPrintList.size(); j++){ jasperPrint.addPage((JRBasePrintPage) jasperPrintList.get(j)); } } JasperViewer jasp = new JasperViewer(jasperPrint); jasp.viewReport(jasperPrint); } catch (Exception e){ e.printStackTrace(); } } In args is a list of .jprint files. If i use the JasperViewer on each page, they display properly. However when I display the final page (jasperPrint), then all I see are a series of small blank boxes. So I think I'm copying the pages wrong, but I'm not sure of the proper way of doing it. Thanks for your help, Dan Post edited by: Dduffek, at: 2006/08/30 21:21
  13. That's close to what I'm looking for, except it combines the multiple jprints into a PDF. I am looking for multiple jrpints into 1 jprint. The ultimate end to what I'm trying to accomplish is to display the final combined jprint in the JasperViewer.
  14. Hey Ya'll, I have a quick question about .jprint files. Is it possible to concatenate two .jprint files? Make two reports into one? The reason: I am using large XML data sets, and I use a program to break the XML into smaller data set (essentially 1 report page) and use JR to process it. This allows the process to work much much quick than if it processed the XML as a whole. The problem comes when I have to recombine all the report pages. I can do the recombining with a pdf format, but have had no success with the jprint format. Thanks for any ideas you might have, Dan
×
×
  • Create New...