Jump to content
Changes to the Jaspersoft community edition download ×

raffimd

Members
  • Posts

    39
  • 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 raffimd

  1. Hi, When i run "net.sf.jasperreports.ant.JRAntCompileTask" ant task, I am getting the following error in linux machine. It works in windows machine. -------------------------------------------------------------------------------------------- org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationExce ption: No suitable Log constructor [Ljava.lang.Class;@b5dac4 for org.apache.comm ons.logging.impl.Log4JLogger -------------------------------------------------------------------------------------------- I am using jasperreports-javaflow-3.0.0.jar Can someone give some pointers to resolve this issue? Thanks in Advance, Raffi
  2. Hi All, Is it possible to populate the data from the bottom to top in a report. For Example in a report, I have the following 3 rows. Cell-1,1 Cell-1,2 Cell-1,3 Cell-2,1 Cell-2,2 Cell-2,3 Cell-3,1 Cell-3,2 Cell3,3 I wish to populate from the bottom to top. I mean, first I want to push the data (Cell-3,1 Cell-3,2 Cell3,3) , then (Cell-2,1 Cell-2,2 Cell-2,3) and then (Cell-1,1 Cell-1,2 Cell-1,3). And the result I want to displayed in the order as mentioned below: Cell-1,1 Cell-1,2 Cell-1,3 Cell-2,1 Cell-2,2 Cell-2,3 Cell-3,1 Cell-3,2 Cell3,3 Is it possible to set any parameter in teh Jasper Engine to achieve this kind of behaviour. Thanks, Raffi
  3. I included the src of the jasperreports in Eclipse and debugged. Looks like it has some problem printing the subreport in the summary. Don't know whether it was a Java Continuation problem, or Virtualizer problem. Just before the StackFlow error, I got the following stack Code: JRVerticalFiller.addPage(boolean) line: 1182 JRVerticalFiller.fillTitle() line: 285 JRVerticalFiller.fillReportStart() line: 224 JRVerticalFiller.fillReport() line: 113 JRVerticalFiller(JRBaseFiller).fill(Map) line: 767 JRVerticalFiller(JRBaseFiller).fill(Map, JRDataSource) line: 690 JRFillSubreport.fillSubreport() line: 515 JRContinuationSubreportRunner(JRSubreportRunnable).run() line: 63 StackRecorder.execute(Object) line: 95 Continuation.continueWith(Continuation, Object) line: 170 Continuation.startWith(Runnable, Object) line: 129 Continuation.startWith(Runnable) line: 102 JRContinuationSubreportRunner.start() line: 57 JRFillSubreport.prepare(int, boolean) line: 589 JRFillBand(JRFillElementContainer).prepareElements(int, boolean) line: 343 JRFillBand.fill(int, boolean) line: 323 JRFillBand.fill(int) line: 282 JRVerticalFiller.fillSummarySamePage() line: 888 JRVerticalFiller.fillSummary() line: 820 After this, in JRVerticalFiller.addPage() - Line 1185, the code is suspending the Continuation Subreport Runner. I could not understand why it is suspending... After that See the StackOverFlow Error. Does anyone use Javaflow and Virtualizer together and have Subreport in the Summary band? Any help is really appreciated.
  4. Check out the dtd. They are available in teh directory: <Jasperreports-x.x.x/src/net/sf/jasperreports/engine/dtds
  5. Looks like some classpath Issue, make sure you place the jasperreports jar in classpath when you are comiling and running the code...
  6. Are you sure you placed that properties file in classpath? If you are running a web application, place the "jasper.properties" in WEB-INF/classes directory.
  7. If your dataset is large, you should not go for JRBeanCollectionDatasource. Instead implement the JRDataSource, fetch the data in chunks/pages and return the data through next() and getFieldValue() APIs.
  8. When I ran the report with debug log level, I found that the JasperReports engine is ending up StackOverFlow condition. Code: Caused by: net.sf.jasperreports.engine.JRRuntimeException: java.lang.StackOverflowError at net.sf.jasperreports.engine.fill.JRFillSubreport.prepare(JRFillSubreport.java:614) at net.sf.jasperreports.engine.fill.JRFillElementContainer.prepareElements(JRFillElementContainer.java:343) at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:323) at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:282) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillSummarySamePage(JRVerticalFiller.java:888) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillSummary(JRVerticalFiller.java:820) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportEnd(JRVerticalFiller.java:263) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:120) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:767) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:690) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:89) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:601) at com.lucent.qip.reports.PagedDataReportGenerator.fillReport(PagedDataReportGenerator.java:47) at com.lucent.qip.reports.JasperReportGenerator.generateReport(JasperReportGenerator.java:273) at com.lucent.qip.reports.JasperReportFactory.generateReport(JasperReportFactory.java:36) at com.lucent.qip.service.impl.ReportsServiceImpl.generateReport(ReportsServiceImpl.java:214) ... 95 more Caused by: java.lang.StackOverflowError at java.util.HashMap$EntryIterator.<init>(HashMap.java:831) at java.util.HashMap$EntryIterator.<init>(HashMap.java:831) at java.util.HashMap.newEntryIterator(HashMap.java:845) at java.util.HashMap$EntrySet.iterator(HashMap.java:949) at java.util.AbstractMap.hashCode(AbstractMap.java:459) HashMap and AbstractMap calls goes into infinitive recusrsive loop. If I remove the subreports in the summary, the report is coming up. Can't I populate JRDataSource implementation using a scriptlet and use that datasource for the chart subreport in the summary?
  9. Hi, In a jasperreport, I observed I was using isIgnorePagination is set to true. I have removed that, the report is hanging after the JRDataSource calls (next()) gets complete. I use Scriptlet in this report to generate the data for the Pie Chart which is printed in the Summary Page. If I add the isIgnorePagination="true", it is working fine. Since I use Virtualizer, I do not want to set the isIgnorePagination attribute to true. Any clues, why the report is hanging when I set the isIgnorePagination attribute to true?
  10. Ar eyou setting ignorePagination ? Code: <jasperReport name="IPv4SubnetInfo_pdf" columnCount="1" printOrder="Vertical" orientation="Landscape" pageWidth="1060" pageHeight="595" columnWidth="800" columnSpacing="0" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" whenNoDataType="AllSectionsNoDetail" scriptletClass="com.lucent.qip.reports.IPv4SubnetSummaryScriptlet" isTitleNewPage="false" isSummaryNewPage="false" resourceBundle="catalog/reportsCatalog" isIgnorePagination="true"> See the last line.... You should not set that when you want to use virtualizer.
  11. I never exported to Excel. for the PDF, I do the following and it works. Code: //Setting Virtualizer for the reports JRSwapFile swapFile = new JRSwapFile(fileDir, 2048, 2048); JRSwapFileVirtualizer virtualizer = new JRSwapFileVirtualizer(2, swapFile, true); finalReportParameters.put(JRParameter.REPORT_VIRTUALIZER, virtualizer); //Export JasperExportManager.exportReportToPdfFile(filedReport, outputFileName);
  12. Do not set the following parameter to true. IS_ONE_PAGE_PER_SHEET If you set this parameter to true, I think jasper engine thinks that all the data should come in one page. If you set something like that, the effect of pagination will not come into picture since there are no pages. If that does not work, Can you try exporting the data to PDF or HTML?
  13. Hi Lucian, Thanks for the reply. I think, I'll not go for the <SortField> right now.
  14. Hi, I have implemented JasperReports with JRDataSource and virtualizer for few huge reports. It takes almost 2 hours right now. I cannot get the sorted data from the service layer in a report and I would like to use the <SortField> element of the JasperReports. Will that have much impact on the report performance? How does the SortField work with virualizer? Does it Sort the items evertime it receives a row/record or at the end of the report data? Any idea about the impact of this on the performance of the report?
  15. It worked perfectly!!! Thanks again, I increased your karma count yesterday itself :)
  16. Hi Lucian, You saved me this time too :) Let me try that.
  17. Set few parameters in the JRParameter class mainly the following parameters BETWEEN_PAGES_HTML IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS --------------------------- Code: else if ("html".equals(reportFormat)) { JRHtmlExporter exporter = new JRHtmlExporter(); exporter.setParameter( JRExporterParameter.JASPER_PRINT, filedReport); exporter.setParameter( JRExporterParameter.OUTPUT_FILE_NAME, oFName); exporter.setParameter( JRHtmlExporterParameter.BETWEEN_PAGES_HTML, ""«»); exporter.setParameter( JRHtmlExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE); exporter.setParameter( JRHtmlExporterParameter.IS_USING_IMAGES_TO_ALIGN, Boolean.FALSE); exporter.exportReport(); }
  18. Hi, I have 2 subreports in a report. Jasper Engine creates seperate threads for each subreport. Because of the thread, I face some problem in Hibernate session. I am implementing the JRDatasource interface for the subreport and making many calls to spring service layer which calls the DB through Hibernate. Looks like the Hibernate session is gettign closed between the service layer calls. Based on the analysis, I beleive that the spawned thread will cause this kind of Hibernate session issue. Is there a way to control the spawning of threading and instruct the JasperEngine to run the subreports in the same thread of the main report? Your help is really appreciated, Thanks in Advance, Raffi
  19. Lucian, You are right, I had 2 jars in one place :( After deleting that it worked :) One small change I did in my code. The pattern is coming as empty string instead of null. So I have added the check for null and empty string. It is working perfectly. Code: public class XFormatFactory extends DefaultFormatFactory{ public java.text.DateFormat createDateFormat(java.lang.String pattern, java.util.Locale locale, java.util.TimeZone timezone) { java.text.DateFormat formattor = null; if (pattern == null) { //In real code, I'll get the //format from configuration formattor = new SimpleDateFormat("yyyyMMdd_HHmmss_SSSZ"«»); return formattor; } else { return super.createDateFormat(pattern, locale, timezone); } } } Thanks a lot, Raffi
  20. Lucian, Thanks for testing it. That might be the reason, I just downloaded 1.3.2 today. i'll double check the classpath, test it and post the results by tommorrow. BTW, thanks to you guys for introducing that capabilities in JR1.3.2 :) Raffi
  21. Hi Lucian, I really appreciate the quick response. I have attached the testReport.jrxml, which has only one field that displays the current date [new Date()]. I just want that date to be in the global format that I set in the formattor. I do not want to specify the pattern for each field in the report, which is difficult to loaclize. Thanks a lot, Raffi [file name=testReport.jrxml size=2304]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/testReport.jrxml[/file]
  22. Hi, In my product, we have common date format. I want to set the same global date format for all the date fields in all the jasper Reports. I have observed that the JasperReports 1.3.2 have some new features to set the format factory. I tried it, but could not make it work. Here is the details: I have extended the DefaultFormatFactory and implemented my date format if the pattern is null. Basically I want to apply the global pattern if the specific pattern is not mentioned in JRXML. Code: public class XFormatFactory extends DefaultFormatFactory{ public java.text.DateFormat createDateFormat(java.lang.String pattern, java.util.Locale locale, java.util.TimeZone timezone) { java.text.DateFormat formattor = null; if (pattern == null) { //In real code, I'll get the //format from configuration formattor = new SimpleDateFormat("yyyyMMdd_HHmmss_SSSZ"«»); return formattor; } else { return super.createDateFormat(pattern, locale, timezone); } } } Then I have created an instance of the above Class and set as the formattor in the report parameters that I pass to the JasperFillManager.fillReport() API. Code:[code]XFormatFactory jasperFormatFactory = new XFormatFactory(); finalReportParameters.put(JRParameter.REPORT_FORMAT_FACTORY, jasperFormatFactory); I debugged my code in Eclipse, the JasperReports is not calling my formattor class for the Date fields. Do I miss anything? Is there a way to set the global date format for all the date fields in the jasperReports? Thanks in Advance, Raffi
  23. I wrote a blog entry to share my experience in the "Implementation of Huge reports in JasperReports" http://www.jasperforge.org/index.php?option=com_content&task=view&id=250&Itemid=5
  24. Hi Teodar, Thanks for the response. Although it is not urgent, I'll raise a feature request. Raffi
×
×
  • Create New...