[jasperreports-questions] To Date or To String that is the question?
Can my query contain java.util.Date parameters that I would use in a BETWEEN condition or do I need to convert the object to a string representation? What's the best way to do this? Thanks, Srgjan - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ jasperreports-questions mailing list jasperreports-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jasperreports-questions
[jasperreports-questions] Excel report
What's the correct way to export to excel without any formatting? I'm more interested in just putting the data in columns and rows so formatting just gets in the way and doesn't allow the data to be homogeneous. Srgjan - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ jasperreports-questions mailing list jasperreports-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jasperreports-questions
[jasperreports-questions] Manually setting locale and excel to stream
How can I manually set a Locale to a report? I have looked extensively and have been unable to find one. Why don't the excel reports support streaming? Is it really necessary to create the file first? Thanks Srgjan --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ jasperreports-questions mailing list jasperreports-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jasperreports-questions
[jasperreports-questions] I18n
Hi, I've set the value resource bundle base name jasperDesign.setResourceBundle("ApplicationResources"); but I'm only getting my keys back, can someone tell me which variable should I look into when I'm debugging to see if the resource bundle got loaded. Also, how do I choose the language itself (not the setLanguage that chooses java or groovy) ? Thanks Srgjan --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ___ jasperreports-questions mailing list jasperreports-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jasperreports-questions
[jasperreports-questions] Internationalization
Hi, I'd like to use the i18n features of jasper but the keys I enter just don't seem to call the right messages, I've some properties files in the projects root, the files are: ApplicationResources.properties ApplicationResources_en.properties ApplicationResources_it_IT.properties ... How can I apply the properties file that the report needs to look for and how can I select en, or it_IT or any other language from code (in a servlet/action as each user might have a different language selected? Thanks! --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ___ jasperreports-questions mailing list jasperreports-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jasperreports-questions
[jasperreports-questions] Generating reports without temp files and general webapp approach council needed
Hi, I'm using JasperReports in a struts action and a Servlet. I would like to be sure that there are no pitfalls like temporary files left around when there should be none (I've tried to use Streams but I sometimes noted that some files are actually created? what would happen if two request ask the same report and the wrong file gets read and gets presented to the wrong user?). Is there a possibility to refacture this and make it even better? I've used the temp HashMap for parameters as the request.getParameters has a String, String[] and not String, String excerpt of my action, note that I'm also compiling here, I still am not sure whether/how I should precompile on release: Also I'd appreciate any tips on how to guard from sql injection (I'm recuperating the society_id from the session so that is off limits); Does anyone have some other approach? WebApplicationContext applicationContext = WebApplicationContextUtils.getWebApplicationContext(request.getSession().getServletContext()); Map jasperParameters = new HashMap(); jasperParameters.put("society_id",getUser(request).getSocieties(0)); Map reports = new HashMap(); reports.put("society_elevator_models","society_elevator_models.jrxml"); String report = request.getParameter("id"); if(report!=null && reports.containsKey(report)){ if(report.equals("society_elevator_models")){ if (getUser(request).getSocieties(0)==null){ return (mapping.findForward("reportparameterserror")); } if(request.getParameter("order_by")!=null){ jasperParameters.put("order_by",request.getParameter("order_by")); } if(request.getParameter("order_by_order")!=null){ jasperParameters.put("order_by_order",request.getParameter("order_by_order")); } } InputStream reportStream = this.getClass().getResourceAsStream("/it/linksystem/csai/web/servlets/"+reports.get(report)); JasperDesign jasperDesign = JRXmlLoader.load(reportStream); JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign); DataSource ds = (DataSource)applicationContext.getBean("dataSourcePostgresLocalhostJNDI"); JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport,jasperParameters,ds.getConnection()); request.setAttribute("jasperPrint",jasperPrint); return (mapping.findForward("generatereport")); } else { request.setAttribute("reporterrormessage","reporterror.reportnotfound"); return (mapping.findForward("reportnotfound")); } } and here is my servlet doPost method: JasperPrint jasperPrint = (JasperPrint)request.getAttribute("jasperPrint"); String format = "pdf"; if(request.getParameter("format")!=null){ format = request.getParameter("format"); } try { if (format.equals("pdf")){ response.setContentType("application/pdf"); JasperExportManager.exportReportToPdfStream(jasperPrint,response.getOutputStream()); } else if (format.equals("csv")){ response.setContentType("text/csv"); } else if (format.equals("xml")){ response.setContentType("application/xml"); JasperExportManager.exportReportToXmlStream(jasperPrint,response.getOutputStream()); } else if (format.equals("xls")){ } else { response.setContentType("application/pdf"); JasperExportManager.exportReportToPdfStream(jasperPrint,response.getOutputStream()); } } catch (JRException ex) { request.setAttribute("reporterrormessage","reporterror.jaspererror"); doError(request,response); } response.flushBuffer(); Cheers --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ___ jasperreports-questions mailing list jasperreports-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jasperreports-questions
[jasperreports-questions] Dynamic query, parameters question
How can I pass a parameter to the query of the type SELECT COUNT(*),model FROM elevators WHERE society=1 GROUP BY model ORDER BY model DESC I'd like to pass in the order_by (here count) to be also a model, should it be of type java.lang.String? Should the default value be quoted ""? Also how do I specify the society parameter (here I've put it to 1), how can I make it obligatory, and to my java code I'm using java.lang.Long, postgresql characterizes it as int8, what should I choose as data type and how do I set the default value to it as it's not value type but reference type? Srgjan Srepfler --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click ___ jasperreports-questions mailing list jasperreports-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jasperreports-questions