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

brouardbas

Members
  • Posts

    9
  • 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 brouardbas

  1. Hello, I develop an application and I use the library JasperReports 4.1.1 to create reports. I have a problem on the export of reports in XHTML. Indeed, the names of the pictures are not that originally defined. I know that JasperReports renames them as img_x_y_z. How can we make to keep the original names of the images? Thank you in advance for your help.
  2. Indeed after seen hibernate logs, the limit impact on execution query. Thanks you again for you help.
  3. Code:thanks indeed it works but as regards the execution duration, I think the limit only impact on displaying data and not on amount of data retrieved by hql query.
  4. Code:Thank you for your reply, but I don't want to remove pagination, I want to limit the number of results at 100 for exemple. In SQL, we use instruction "limit 100" but it doesn't exist in hql. With hibernate we can just use the instruction query.maxResult(100) but this is JasperReports that manage query execution so I can't use it. How do you limit the number of results with JasperReports using hql query ? Thank you
  5. Code:thanks you for your reply, but I try to set the property with the following code : jasperDesignReport.setProperty("net.sf.jasperreports.hql.query.list.page.size", "1"); I have the tag in the JRXML but JasperReports continue to fill all pages.
  6. hi, in my application, I use JasperReports library 4.1.1 to make reporting. I use hibernate connection and hql query. I want display in previewer a single page. So I want JasperReports to fill report on only one page. For that I write following source code : But the parameter code "parameters.put(JRHibernateQueryExecuterFactory.PROPERTY_HIBERNATE_QUERY_LIST_PAGE_SIZE, 1);" is not read because I have all filled pages. I saw in JRXML that the tag "<property name="net.sf.jasperreports.hql.query.list.page.size" value="1"/>" is missing. Thank for your help. P.S : sorry for my bad english language Code: /** * This method is used to fill a report and to show if an error occurred during the filling */ public void fillReport() { logger.trace("filling of report"); reportPrinted = null; JasperReport reportCompiled = getReportCompiled(); Session session = HibernateUtil.getSessionFactory().getCurrentSession(); Transaction transaction = session.beginTransaction(); Map<String, Object> reportParameters = getFillingReportParameters(session); try { reportPrinted = JasperFillManager.fillReport(reportCompiled, reportParameters); logger.trace("filling report done and it contains {} pages", getNumberOfPages()); } catch (JRException e) { logger.error("An error is occured while filling of report : {}", LoggerManager.getErrorMessage(e)); } transaction.rollback(); } /** * @param session * the hibernate session * @return the map of filling report parameters */ private Map<String, Object> getFillingReportParameters(Session session) { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put(JRHibernateQueryExecuterFactory.PARAMETER_HIBERNATE_SESSION, session); parameters.put(JRHibernateQueryExecuterFactory.PROPERTY_HIBERNATE_QUERY_RUN_TYPE, JRHibernateQueryExecuterFactory.VALUE_HIBERNATE_QUERY_RUN_TYPE_LIST); parameters.put(JRHibernateQueryExecuterFactory.PROPERTY_HIBERNATE_QUERY_LIST_PAGE_SIZE, 1); return parameters; }
  7. aparfeno Wrote: I solved the problem by simply recompiling Jasper against latest hibernate3.jar. No actual code change was necessary. The reason is that Hibernate.BOOLEAN (and others) are declared as final, so the compiler "took" their signature when it created original jasperreports.jar. I have same problem. How do you recompile Jasper ? Thank you. Post Edited by brouardbas at 07/05/2011 15:44 Post Edited by brouardbas at 07/05/2011 15:45
×
×
  • Create New...