Jump to content
Changes to the Jaspersoft community edition download ×

bugmenot

Members
  • Posts

    14
  • Joined

  • Last visited

bugmenot'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. Hi all, We use the JasperReports reporting component and are very pleased with it, but for the iReports part we are confronted with the following dilemma. We keep our dates in our oracle database as UTC dates. When we run the report through a connection provided by our application, we can set the correct timezone object for the connection (one can cast to the underling driver implementation, in our case is OracleDriver, and set the timezone on that object), but when runned through iReports all the dates get wrongfully converted by the driver. The same problem seems to be asked here, but with no real answer: My question is this: is there some way we could set the jdbc connection for iReport for our designers so that we could call aditional methods on the connection? Dragos
  2. Hi, I have big problem.I'm servlet that will be generating pdf document that contain large table ( with many colums and rows). It is important that the generated PDF will be printer friendly, with no data lost, and columns and rows not broken in the middle. If there is not enough room for all the columns in the printed page I want that the next page will print the columns that couldnt fit in the previous page. The same with rows Is it possible? Please help
  3. Hi, Thank you for your answers. I tried to export a PDF instead of an excel spreadsheet. Without the IS_ONE_PAGE_PER_SHEET parameter and with isIgnorePagination set to "false", it works. 745 files generated by virtualizer in the temp dir, not more than 25MB used by the java process to generate a PDF with 56000 customers (more than 700 pages). Great ! But when I try to do the same except that I export an excel spreadsheet, a lot of files have been generated in the temp dir but the memory used by the java process grown to 250MB and after one hour I killed it before any result has been generated... Thank you for your help Post edited by: bugmenot, at: 2007/06/13 12:45
  4. Thank you for your answer. So you mean jasper actually uses the virtualizer... So why do I continue get OutOfMemoryError ?
  5. anybody can help ? Do you use virtualizers ? Where am I wrong ? Thank you for your help
  6. arunvishvin wrote: What is the version of your JR?? Oh yes, sorry. I am using jasperreports-1.3.2.jar Thank you for your help.
  7. Hi, I am experiencing OutOfMemoryErrors when generating very large reports (XLS with more than 56000 records). There was a problem in my code, the resultset was retrieving all the database records in memory without fetching. I have corrected this problem. But the OutOfMemoryError now occurs during the export. I have try virtualizer after reading this http://www.jasperforge.org/index.php?option=com_content&task=view&id=250&Itemid=5 My code is below. I have created a virtualizer and added it the the parameters but I think it is never called (no files in my temp dir and OutOfMemoryError before an xls file is generated). Code:JRFileVirtualizer virtualizer = new JRFileVirtualizer( 2, Configuration.getParameter("report.virtualizer.physical.temp.path"«») ); parameters.put( JRParameter.REPORT_VIRTUALIZER, virtualizer ); DataSource dataSource = new DataSource( parameters, jasperReport.getQuery().getText(), connection ); JasperPrint jasperPrint = JasperFillManager.fillReport( jasperReport, parameters, dataSource ); //----------------------------------------------------- JRXlsExporter exporterXLS = new JRXlsExporter(); exporterXLS.setParameter( JRXlsExporterParameter.JASPER_PRINT, jasperPrint ); //exporterXLS.setParameter( JRXlsExporterParameter.OUTPUT_STREAM, output ); exporterXLS.setParameter( JRXlsExporterParameter.OUTPUT_FILE_NAME, PDFReportCreator.BASE_PATH_FOR_PDF + report.getPdfFilePath() ); exporterXLS.setParameter( JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.TRUE ); exporterXLS.setParameter( JRXlsExporterParameter.IS_AUTO_DETECT_CELL_TYPE, Boolean.FALSE ); exporterXLS.setParameter( JRXlsExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.FALSE ); exporterXLS.setParameter( JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE ); exporterXLS.exportReport(); The exportReport method never ends... Code:[code]/** * */ package com.dotbase.jasper.model; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.Map; import java.util.Set; import net.sf.jasperreports.engine.JRDataSource; import net.sf.jasperreports.engine.JRException; import net.sf.jasperreports.engine.JRField; /** * @author lrobert * Dataset pour la virtualisation (traîtement de gros rapports) */ public class DataSource implements JRDataSource { private static final int MAX_RESULT_PER_PAGE = 1000; private String query; private Connection connection; private ResultSet rsReportData; private int currentPage = 0; public DataSource( Map<String, Object> parameters, String query, Connection connection ) throws SQLException { //exécuter la requête connection.setAutoCommit( false ); PreparedStatement statement = connection.prepareStatement( query ); statement.setFetchSize( 100 ); this.rsReportData = Database.executeSelect( statement ); } public Object getFieldValue( JRField jrField ) throws JRException { try { Object field = rsReportData.getObject( jrField.getName() ); return field; } catch( SQLException e ) { throw new JRException( e ); } } private int iNext = 0; public boolean next() throws JRException { try { return rsReportData.next(); } catch( SQLException e ) { throw new JRException( e ); } } } Could somebody help me to solve that ? How could I be sure my virtualizer is used ? What does the first parameter of the virtualizer ("maxsize") mean ? Thank you for your help
  8. Hi, Is it possible to merge two data sources in one report using Jasper? We have our data distributed across two oracle DBs and we have primary keys for cross referencing. Is there a way to do such thing? Regards
  9. Hi, I can not figure out how to use EJBQL, I tried to put the toplink jars in the classpath and point to my persistence.xml file inside my project but it was useless, can you point me to the right direction please? Thanks and sorry about my english bye:dry:
  10. Hi Giulio, I can not figure out how to use EJBQL, I tried to put the toplink jars in the classpath and point to my persistence.xml file inside my project but it was useless, can you point me to the right direction please? Thanks and sorry about my english bye
  11. "I know how to do it but I'm not telling"? Mario, what was the point in even posting?
×
×
  • Create New...