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

henryedsl

Members
  • Posts

    23
  • 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 henryedsl

  1. Hi all, I have a report designed with iReport 5.0.1 which is OK except that when it returns about 10000 or more rows from database, returns the next error: GRAVE: Error executing SQL statement for : rep_asignacion_inicialnet.sf.jasperreports.engine.JRException: Error executing SQL statement for : rep_asignacion_inicial at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:240) at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:1086) at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:667) at net.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:1258) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:877) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:822) at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:61) at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:446) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:849) at org.openxava.actions.JasperReportBaseAction.execute(JasperReportBaseAction.java:105) at org.openxava.controller.ModuleManager.executeAction(ModuleManager.java:374) at org.openxava.controller.ModuleManager.executeAction(ModuleManager.java:291) at org.openxava.controller.ModuleManager.execute(ModuleManager.java:251) at org.apache.jsp.xava.execute_jsp._jspService(execute_jsp.java:177) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488) at org.openxava.web.servlets.Servlets.getURIAsStream(Servlets.java:66) at org.openxava.web.dwr.Module.getURIAsStream(Module.java:182) at org.openxava.web.dwr.Module.request(Module.java:63) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.directwebremoting.impl.ExecuteAjaxFilter.doFilter(ExecuteAjaxFilter.java:34) at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:428) at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:431) at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:283) at org.directwebremoting.servlet.PlainCallHandler.handle(PlainCallHandler.java:52) at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:101) at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:146) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.admon.db.globales.modelo.FiltroUsuarioLifeRay.doFilter(FiltroUsuarioLifeRay.java:45) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.insisto.general.security.utils.LifeTimeFilter.doFilter(LifeTimeFilter.java:143) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) at java.lang.Thread.run(Thread.java:662)Caused by: org.postgresql.util.PSQLException: Ran out of memory retrieving query results. at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1857) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:302) at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93) at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:233) ... 58 moreCaused by: java.lang.OutOfMemoryError: Java heap space at org.postgresql.core.PGStream.ReceiveTupleV3(PGStream.java:359) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1854) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:302) at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93) at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:233) at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:1086) at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:667) at net.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:1258) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:877) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:822) at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:61) at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:446) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:849) at org.openxava.actions.JasperReportBaseAction.execute(JasperReportBaseAction.java:105) at org.openxava.controller.ModuleManager.executeAction(ModuleManager.java:374) at org.openxava.controller.ModuleManager.executeAction(ModuleManager.java:291) at org.openxava.controller.ModuleManager.execute(ModuleManager.java:251) at org.apache.jsp.xava.execute_jsp._jspService(execute_jsp.java:177) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)[/code] I set net.sf.jasperreports.jdbc.fetch.size property to different values with no success. This report is executed from a java web application. I am using a PostgreSQL database, and jdbc4. I'd really appreciate any help. Thanks in advance.
  2. I even copied the jasperreports-fonts-4.1.3.jar located in iReport-4.1.3/ireport/modules/ext into the WEB-INF/lib folder of my application -replacing the one that I created- and still getting the same error.
  3. Hello, I've created a report where I'm using different fonts such as Arial, Verdana etc. I'm getting the error "Font Verdana is not available to the JVM"... so I created Font Extensions using iReport. I added the generated .jar to the WEB-INF/lib of my web application. When I put the font_extensions.jar I created into the lib folder I'm getting an error which I've not been able to solve after searching and searching the web and the forums. I attached the font_extensions.jar and the .jrxml just in case you want to take a look. I appreciate your time and help. Best regards... PS: I'm using iReport-4.1.3 and jasperreports-4.1.3. This is the error that I'm getting: Code: Post Edited by henryedsl at 01/26/2012 22:12
  4. Hi! Here i found the solution that worked for me: jasperforge.org/plugins/espforum/view.php Here you can find another post which although didn't work for me maybe could be usefull for someone else: jasperforge.org/plugins/espforum/view.php God bless you all. Best regards, Henry
  5. Hi! A certain field in my report must be displayed only when the total number of pages is greater than 1, displayed in every page of the report. If the report has only 1 page, then there is no need to display this field. I know that PAGE_NUMBER with evaluationTime="Report" will display the number of pages in the report, but the problem is that i need this in the printWhenExpression of the field. Is there a way to do something like: new Boolean($V{TOTAL_PAGE_NUMBER}.intValue() > 1) So this field is displayed in every page only when the total number of pages is greater than 1? I didn't fint anything in the forums. Thanks in advance. Best regards, Henry
  6. Hello! I need to set the number of rows per page to a certain number, say 3. For example, how can i do to set the number of rows displayed per page to 3? I found this thread: jasperforge.org/plugins/espforum/view.php There, one of the users said to add a manual page break and use the Record_Count to enable the break every X records. I'm using iReport 4.0.0 but i haven't been able to insert a page break, i can't find that option in iReport, in fact i'm not sure whether that option is available yet. Best regards, Henry
  7. Above, i meant that the report footer is displayed at the bottom of each page in the report.
  8. Hello! I have something like an invoice report. I have placed a detail band, a group footer which is getting displayed once per group, a column footer and a report footer which is displayed at the bottom of the report. Everything works fine, but i have not been able to fill the space left between the column footer and the report footer when the report has only a few records printed in the detail band. I attached two files, in the first one you can see the space that i don't want in my report, and in the second file you can see the report i'm trying to design, the good one, there, you can't see any space, in fact, it seem that the lines are drawn to fill the spaces. PD: excuse me that the attached files are in spanish, but i think you can get the idea. Best regards, Henry
  9. By the way, i attach the jar file i added to my application, in case it helps. I also have to say that i packaged up my font extension in a separate JAR.
  10. I forgot the attached file with the error.
  11. I just realized that i'm getting an error in tomcat logs, i attached the file with the error. I guess it has to do with the fact that i added my jar file generated with iReport to the classpath of my application.
  12. Ohh excuse me, the last attched file should have been "installing arial" :)
  13. Hello! I have created a JasperReports report with the bold fonts in the iReport. The PDF preview in the iReport is OK, but when i export to PDF in my application, all font properties get lost and the text looks like plain text. This is what i tried to do with no success: 1. Using iReport, i made sure that all the fonts i used in my report have been defined in iReport. I went to Tools -> Options -> iReport -> Fonts, and installed Verdana, which is one of the fonts i'm using. When installing this font, i made sure to check "Embed this font in PDF document" checkbox. 2. Once all the fonts were installed, i selected all the fonts i used in my report and then clicked the “Export as extension” button to create a jar file. 3. Finally i added the created jar file to the classpath of my application, at this point i thought i was done :( But, after doing all this and runnind my application, i realized that the problem was still there, and the worst part is that i don't know what else to do. Am i missing something? What do i have to do so that bold fonts show properly in PDFs exported from my application? Some additional data: I have OpenSuSe as OS. I have attached three documents so that you can see the good report, the bad report, and the window where i installed the trutype fonts. I'm using iReport 3.7.2 Thanks in advance for your time and help. Best regards... Post Edited by henryedsl at 01/25/2011 19:56
  14. Hello! I solved my problem, i dont know whether it's been the best solution or not, but it's working for me :) This is what i did: In the SQL sentence a created 3 extra columns, like this: SELECT *, case when continent_id = 1 then 'America' else null end as america_country, case when continent_id = 2 then 'Europe' else null end as europe_country, case when continent_id = 3 then 'Asia' else null end as asia_country, FROM countries; Now, in the report this is what i set to every variable i created: TOTAL_AMERICA_COUNTRIES Type: Integer Calculation: Count Reset type: Report Variable Expression: $F{america_country} TOTAL_EUROPE_COUNTRIES Type: Integer Calculation: Count Reset type: Report Variable Expression: $F{europe_country} TOTAL_ASIA_COUNTRIES Type: Integer Calculation: Count Reset type: Report Variable Expression: $F{asia_country} Best regards.
  15. Hello guys. I'm gonna try to explain my issue with a little example. Let's suposse i have a report that shows countries from all over the world, like this: Country - Continent USA - America Canada - America England - Europe Spain - Europe France - Europe Japan - Asia China - Asia In the Summary section of the report, i want to show the number of countries per continent. According to the example above, the report should show something like this: America total countries: 2 Europe total countries: 3 Asia total countries: 2 I have 3 variables: TOTAL_AMERICA_COUNTRIES, TOTAL_EUROPE_COUNTRIES, TOTAL_ASIA_COUNTRIES Type: Integer Calculation: Count Reset type: Report But i dont know how to exactly make this variables to show the number of countries per continent. I hope you can give me a hand. Thanks a lot for your help. Best regards.
  16. Hello! Thanks a lot for your answer, it was really helpful for me. Best regards, Henry
  17. Hello. I am working with iReport 3.7.0 I have a query that looks like this: select * from employees where first_name='$P{first_name}' and last_name='$P{last_name)' if i look for a first name and a last name, it works fine, but i'm looking for a last name so i put in just the last name and leave the first name blank. Well, when i do that, the whole thing blew up because i have a query that looks like this at runtime: select * from employees where first_name='' and last_name='de Sousa' No query returned, and i need all the employees with last_name = 'de Sousa' to be returned. How can i solve this problem? Thanks in advance. Regards.
  18. Hello! I solved the problem! I copied the xml-apis-ext.jar to the tomcat lib folder and now it works perfect. Regards...
  19. By the way, does the barcode placed on the same band as the B-1 text have something to do with the problem? What about the web browser? I have tried everything, and still i have the problem.
  20. Hello Lucian! Thanks for your answer. lucianc Wrote: Any exception logs in your application? Is the barcode placed on the same band as the B-1 text? Regards, Lucian No exception logs, everything seems to be ok, and yes, the barcode is placed on the same band as the B-1 text. This is why i suppose that i need to add some library to my application, because when i export the report to PDF from the iReport, it is ok. Thanks agian Lucian!
  21. Hello people!!! I am working with the JasperReports 3.7.0 and the iReport 3.7.0 version. I have added a Barcde4j component to my report from the iReport so i can print barcodes. What exactly are the libraries i have to add to my web application to preview or print barcodes correctly? I have added the following: jasperreports-3.7.0.jar barcode4j-2.0.jar batik-anim.jar batik-awt-util.jar batik-bridge.jar batik-css.jar batik-dom.jar batik-ext.jar batik-gvt.jar batik-parser.jar batik-script.jar batik-svg-dom.jar batik-svggen.jar batik-util.jar batik-xml.jar When i try to preview my report from my web application, i don't get any errors but the report does not show the barcodes, it is blank. When i try my report from the iReport, it works perfect, it show the barcodes. Regards and thanks in advance for your time to read this post. PD: in the Attachment you can see the report preview from my application and from the iReport.
  22. Hello guys, i solved the problem, my mistake. It was a problem with the connection to database. What a shame, my first post, for this :) Here s the method to export to excel, in case it is useful for someone public void xlsExport(String reportName) throws JRException { Map parameters = new HashMap(); parameters.put("FIELD1", "AAA"); parameters.put("FIELD1", "BBB"); this.reportName = reportName; JasperFillManager.fillReportToFile(REPORT_DIRECTORY + "/" + reportName + ".jasper", REPORT_DIRECTORY + "/" + reportName + ".jrprint", parameters, AbstractDAO.getConnection()); File file = new File(REPORT_DIRECTORY + "/" + reportName + ".jrprint"); System.out.println(REPORT_DIRECTORY + "/" + reportName + ".jrprint"); try { JasperPrint jasperPrint = (JasperPrint) JRLoader.loadObject(file); JExcelApiExporter xlsExporter = new JExcelApiExporter(); xlsExporter.setParameter(JRExporterParameter.JASPER_PRINT,jasperPrint); xlsExporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME,REPORT_DIRECTORY + "/" + reportName + ".xls"); System.out.println("Exporting report..."); xlsExporter.exportReport(); System.out.println("Done!"); } catch (JRException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } } Regards...
  23. Hello friends! I am working with iReport to create JasperReports reports for my web application in java. In iReport i have created the .jasper, .jrxml and .jrprint files. In my java application i have a method to export the .jrprint file to Excel, of course, if i use the .jrprint file i created from iReport, it works fine, but i need to fill the .jrprint from my Application every time i export to excel. The problem is that it seems that the .jrprint is blank, so when i export to excel, it is a blank report. The .jrprint generated by iReport is 12 kb, but the .jrprint generated for me, it is only 2 kb. Here you can see the code i use to export to excel. public void xlsExport(String reportName) throws JRException { JasperReport report = null; JasperPrint print = null; Map parameters = new HashMap(); parameters.put("FIELD1", "AAA"); parameters.put("FIELD1", "BBB"); this.reportName = reportName; report = JasperCompileManager.compileReport(REPORT_DIRECTORY + "/" + reportName + ".jrxml"); // print = JasperFillManager.fillReport(report, parameters, AbstractDAO.getConnection()); THIS CODE DOES NOT WORK // InputStream is = null; // try { // is = new BufferedInputStream(new FileInputStream(REPORT_DIRECTORY + "/" + reportName + ".jasper")); // } catch(FileNotFoundException e) { // // } // print = JasperFillManager.fillReport(is, parameters, AbstractDAO.getConnection()); THIS CODE DOES NOT WORK addMessage(REPORT_DIRECTORY + "/" + reportName + ".jasper"); //JasperFillManager.fillReportToFile(REPORT_DIRECTORY + "/" + reportName + ".jasper", parameters, AbstractDAO.getConnection()); THIS CODE DOES NOT WORK //JasperFillManager.fillReportToFile(report, REPORT_DIRECTORY + "/" + reportName + ".jrprint", parameters, AbstractDAO.getConnection()); THIS CODE DOES NOT WORK JasperFillManager.fillReportToFile(REPORT_DIRECTORY + "/" + reportName + ".jasper", REPORT_DIRECTORY + "/" + reportName + ".jrprint", parameters, AbstractDAO.getConnection()); File file = new File(REPORT_DIRECTORY + "/" + reportName + ".jrprint"); System.out.println(REPORT_DIRECTORY + "/" + reportName + ".jrprint"); try { JasperPrint jasperPrint = (JasperPrint) JRLoader.loadObject(file); JExcelApiExporter xlsExporter = new JExcelApiExporter(); xlsExporter.setParameter(JRExporterParameter.JASPER_PRINT,jasperPrint); xlsExporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME,REPORT_DIRECTORY + "/" + reportName + ".xls"); System.out.println("Exporting report..."); xlsExporter.exportReport(); System.out.println("Done!"); } catch (JRException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } } What's wrong with my code? What do i have to do to fill the .jrprint correctly so i can export to excel? Regards and thanks in advance for your time and help. Post Edited by henryedsl at 12/15/2009 20:16
×
×
  • Create New...